uic
Class UIC

java.lang.Object
  extended byuic.UIC

public class UIC
extends Object

UserInterface Compiler (http://uic.sf.net)


Nested Class Summary
static class UIC.BuildSettings
           
 
Field Summary
protected  File inputFile
           
protected  String packageOfClass
           
static String VERSION
           
 
Constructor Summary
UIC(String filename)
          Default constructor Same as calling new UIC(fileName,"");
UIC(String filename, String baseDir)
          Constructor
 
Method Summary
 void addConnections(Element connections)
           
 Object compile(UIC.BuildSettings buildSettings)
           
static Hashtable getProperties(Element element)
           
static String getPropertyName(Element property)
           
static String getPropertyValue(Element property)
          Method to get the value of the property, for example name and text are properties for label Returns properties first child for new qt-designer xml files Otherwise return properties second child
static String getWidgetClassName(Element widget)
          Method to get the class name of the widget Returns property.getAttributeValue for new qt-designer xml files Otherwise return property.getChildText
static void main(String[] args)
           
 void setBuildConfig(String widgetSet, String postProcessor, InputStream buildProperties)
          Call this method to specify which widgetset and plugins are going to be used for building.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputFile

protected File inputFile

VERSION

public static final String VERSION

packageOfClass

protected String packageOfClass
Constructor Detail

UIC

public UIC(String filename)
    throws JDOMException,
           IOException
Default constructor Same as calling new UIC(fileName,"");


UIC

public UIC(String filename,
           String baseDir)
    throws JDOMException,
           IOException
Constructor

Parameters:
filename - filename to convert from .ui to .java file
baseDir - base directory that is part of the location of the ui file but should not be part of the java package
Method Detail

compile

public Object compile(UIC.BuildSettings buildSettings)
               throws IOException,
                      CompilerException
Throws:
IOException
CompilerException

setBuildConfig

public void setBuildConfig(String widgetSet,
                           String postProcessor,
                           InputStream buildProperties)
                    throws IOException
Call this method to specify which widgetset and plugins are going to be used for building. When not called we use the uic.properties from the classpath, so calling this is completely optional. Notice that you have to call this before the compile method otherwise undefined behavior will wreck your project :)

Parameters:
widgetSet - the widgetset, or null
postProcessor - for the postProcessor, or null
buildProperties - for the uic.properties, or null
Throws:
IOException

addConnections

public void addConnections(Element connections)

getProperties

public static Hashtable getProperties(Element element)

getWidgetClassName

public static String getWidgetClassName(Element widget)
Method to get the class name of the widget Returns property.getAttributeValue for new qt-designer xml files Otherwise return property.getChildText

Parameters:
widget - the widget to fetch the classname from
Returns:
the classname

getPropertyName

public static String getPropertyName(Element property)

getPropertyValue

public static String getPropertyValue(Element property)
Method to get the value of the property, for example name and text are properties for label Returns properties first child for new qt-designer xml files Otherwise return properties second child

Parameters:
property - the property to fetch the property value from
Returns:
the property value

main

public static void main(String[] args)


Copyright © 2002,2003 Thomas Zander Available under the Free Apache licence