uic.output
Class AbstractWidget

java.lang.Object
  extended byuic.output.AbstractWidget
Direct Known Subclasses:
AbstractWidget, AbstractWidget, QLabel

public abstract class AbstractWidget
extends Object

Base class that provides implementation each plugin will likely need.


Nested Class Summary
static class AbstractWidget.ActionInformation
          For each connection this is the information to subscribe a signal to a widget.
 
Field Summary
protected  UICBuilder builder
           
protected static int BUTTON
           
protected  boolean debug
           
protected  boolean debugGrid
           
protected static int DEFAULTS
           
protected  char horizontalAlign
           
protected static int PROP_BACKGROUNDCOLOR
           
protected static int PROP_BUTTONMNEMONIC
           
protected static int PROP_BUTTONTEXT
           
protected static int PROP_FOREGROUNDCOLOR
           
protected static int PROP_MAXIMUMSIZE
           
protected static int PROP_MINIMUMSIZE
           
protected  Hashtable properties
           
protected  String sourceVersion
           
protected  TranslatorInterface translator
           
protected  char verticalAlign
           
protected  Element widgetElement
           
 
Constructor Summary
AbstractWidget(UICBuilder builder, Element e)
           
 
Method Summary
abstract  String constructWidget()
          Create the construction of the widget.
 void createActions()
          If a widget wants to add default actions, this is the place.
 char getHorizontalAlign()
           
 int getIntProperty(String propertyName, int defaultValue)
           
protected  String getName()
           
 AbstractWidget.ActionInformation getSignalActionInformation(String signal)
           
 String getSlotActionInformation(String slot)
           
 String getSourceVersion()
          The user specified sourcecode version, check when using 'newer' calls.
 char getVerticalAlign()
           
 WidgetRepresenter getWidgetRepresenter()
           
protected  boolean isHTMLtext(String input)
           
 void setBuildSettings(UIC.BuildSettings buildSettings)
           
 void setDebug(boolean d)
          alter the debugging settings.
 void setDebugGrid(boolean on)
          alter the debugging settings.
 void setSourceVersion(String ver)
          The user specified sourcecode version, check when using 'newer' calls.
 void setTranslator(TranslatorInterface t)
          Sets a translator for translation of on screen strings.
 void setWidgetRepresenter(WidgetRepresenter current)
           
protected  void writeDefaultProperties(String className, int options)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_BACKGROUNDCOLOR

protected static final int PROP_BACKGROUNDCOLOR
See Also:
Constant Field Values

PROP_FOREGROUNDCOLOR

protected static final int PROP_FOREGROUNDCOLOR
See Also:
Constant Field Values

PROP_MINIMUMSIZE

protected static final int PROP_MINIMUMSIZE
See Also:
Constant Field Values

PROP_MAXIMUMSIZE

protected static final int PROP_MAXIMUMSIZE
See Also:
Constant Field Values

DEFAULTS

protected static final int DEFAULTS
See Also:
Constant Field Values

PROP_BUTTONTEXT

protected static final int PROP_BUTTONTEXT
See Also:
Constant Field Values

PROP_BUTTONMNEMONIC

protected static final int PROP_BUTTONMNEMONIC
See Also:
Constant Field Values

BUTTON

protected static final int BUTTON
See Also:
Constant Field Values

translator

protected TranslatorInterface translator

widgetElement

protected Element widgetElement

properties

protected Hashtable properties

debug

protected boolean debug

debugGrid

protected boolean debugGrid

builder

protected UICBuilder builder

sourceVersion

protected String sourceVersion

horizontalAlign

protected char horizontalAlign

verticalAlign

protected char verticalAlign
Constructor Detail

AbstractWidget

public AbstractWidget(UICBuilder builder,
                      Element e)
Method Detail

setWidgetRepresenter

public void setWidgetRepresenter(WidgetRepresenter current)

getWidgetRepresenter

public WidgetRepresenter getWidgetRepresenter()

setBuildSettings

public void setBuildSettings(UIC.BuildSettings buildSettings)

constructWidget

public abstract String constructWidget()
                                throws UnsupportedWidgetException
Create the construction of the widget. The base construction is done here, this is the first method invoced.

Returns:
name The name of the constructed class that should be added to a container.
Throws:
UnsupportedWidgetException

createActions

public void createActions()
If a widget wants to add default actions, this is the place.


setTranslator

public void setTranslator(TranslatorInterface t)
Sets a translator for translation of on screen strings.


setDebug

public void setDebug(boolean d)
alter the debugging settings.


setDebugGrid

public void setDebugGrid(boolean on)
alter the debugging settings.


writeDefaultProperties

protected void writeDefaultProperties(String className,
                                      int options)

getHorizontalAlign

public char getHorizontalAlign()

getVerticalAlign

public char getVerticalAlign()

getSourceVersion

public String getSourceVersion()
The user specified sourcecode version, check when using 'newer' calls.


setSourceVersion

public void setSourceVersion(String ver)
The user specified sourcecode version, check when using 'newer' calls.


getIntProperty

public int getIntProperty(String propertyName,
                          int defaultValue)

getName

protected String getName()

getSignalActionInformation

public AbstractWidget.ActionInformation getSignalActionInformation(String signal)

getSlotActionInformation

public String getSlotActionInformation(String slot)

isHTMLtext

protected boolean isHTMLtext(String input)


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