|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.montsuqi.monsia.builders.WidgetPropertySetter
abstract class WidgetPropertySetter
WidgetPropertySetter is a class to help assigning properties to widgets.
These setters exist one for a class(and subclass) and property name.
When building a widget, a widget builder will look up a suitable setter for each key in provided properties. When such a setter is found, its set method is called to set a certain property of the widget.
| Field Summary | |
|---|---|
protected static Logger |
logger
|
| Constructor Summary | |
|---|---|
WidgetPropertySetter()
|
|
| Method Summary | |
|---|---|
(package private) static WidgetPropertySetter |
getSetter(java.lang.Class clazz,
java.lang.String name)
Looks up a property setter for given class or its ancestors and property name. |
(package private) static java.lang.String |
normalize(java.lang.String value,
java.lang.String prefixToRemove)
Removes given prefix along with "GTK_" and "GTK_". |
(package private) abstract void |
set(Interface xml,
java.awt.Container parent,
java.awt.Component widget,
java.lang.String value)
This method does the actual work of setting a property. |
protected void |
warnUnsupportedProperty(java.lang.String value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Logger logger
| Constructor Detail |
|---|
WidgetPropertySetter()
| Method Detail |
|---|
abstract void set(Interface xml,
java.awt.Container parent,
java.awt.Component widget,
java.lang.String value)
This method does the actual work of setting a property. Subclasses must implement this method.
xml - glade screen definitionparent - parent widget of the target widget.widget - target widget.value - the value to set in String.protected void warnUnsupportedProperty(java.lang.String value)
static WidgetPropertySetter getSetter(java.lang.Class clazz,
java.lang.String name)
Looks up a property setter for given class or its ancestors and property name.
When no setter is found, nullWidgetPropertySetter, which does nothing, is returned.
clazz - class of the widget whose property is to be set.name - the proeprty name to be set.
static java.lang.String normalize(java.lang.String value,
java.lang.String prefixToRemove)
Removes given prefix along with "GTK_" and "GTK_".
value - target string to be normalized.prefixToRemove - a prefix to remove. Ignored if it is null or its length is zero.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||