eu.beesoft.gaia.swing.builder
Class TextComponentBuilder<T extends javax.swing.text.JTextComponent>
java.lang.Object
eu.beesoft.gaia.util.ObjectBuilder<T>
eu.beesoft.gaia.swing.builder.SwingBuilder<T>
eu.beesoft.gaia.swing.builder.ComponentBuilder<T>
eu.beesoft.gaia.swing.builder.TextComponentBuilder<T>
- Type Parameters:
T
-
- Direct Known Subclasses:
- TextAreaBuilder, TextFieldBuilder
public abstract class TextComponentBuilder<T extends javax.swing.text.JTextComponent>
- extends ComponentBuilder<T>
Abstract superclass for builders that produce text components.
It supports these properties:
- editable - enabled value is true or false
- selectedTextColor - enabled value is a color, see comment to
property
background
in ComponentBuilder
- selectionColor - enabled value is a color, see comment to property
background
in ComponentBuilder
- text - any string
Method Summary |
protected java.lang.Object |
getBoundValueFromComponent(java.util.Set<java.lang.Object> changedObjects,
java.lang.String fullBinding)
Gets data value from the component created by this builder. |
protected void |
initEditable(java.lang.String value)
|
protected void |
initSelectedTextColor(java.lang.String value)
|
protected void |
initSelectionColor(java.lang.String value)
|
protected void |
initText(java.lang.String value)
|
protected void |
setBoundValueToComponent(java.lang.Object data,
java.lang.String fullBinding)
Sets given data value to the component created by this builder. |
Methods inherited from class eu.beesoft.gaia.swing.builder.ComponentBuilder |
addChild, addSwingChild, convertValue, createBoundData, findBoundData, getLayoutConstraints, initBackground, initBorder, initEnabled, initFont, initForeground, initId, initLayoutConstraint, initName, initOpaque, initSize, initToolTipText, initVisible, parseColor, parseIcon, setLayoutConstraints |
Methods inherited from class eu.beesoft.gaia.util.ObjectBuilder |
createObject, createObject, getFactory, getChildren, getId, getObject, getParent, getProperties, getProperty, initClass, initObjectProperties, initObjectProperty, parseBoolean, parseClass, parseConstant, parseConstructor, parseDouble, parseInstance, parseInstance, parseInt, parseInt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextComponentBuilder
public TextComponentBuilder()
initSelectedTextColor
protected void initSelectedTextColor(java.lang.String value)
initSelectionColor
protected void initSelectionColor(java.lang.String value)
initText
protected void initText(java.lang.String value)
initEditable
protected void initEditable(java.lang.String value)
setBoundValueToComponent
protected void setBoundValueToComponent(java.lang.Object data,
java.lang.String fullBinding)
- Description copied from class:
SwingBuilder
- Sets given data value to the component created by this builder. Override
this method for specific component. This implementation simply throws
RuntimeException to notify programmer about a necessity to override this
method.
- Overrides:
setBoundValueToComponent
in class SwingBuilder<T extends javax.swing.text.JTextComponent>
- Parameters:
data
- - a value to setfullBinding
- - binding to given value from root form object
getBoundValueFromComponent
protected java.lang.Object getBoundValueFromComponent(java.util.Set<java.lang.Object> changedObjects,
java.lang.String fullBinding)
- Description copied from class:
SwingBuilder
- Gets data value from the component created by this builder. Override this
method for specific component. This implementation simply throws
RuntimeException to notify programmer about a necessity to override this
method.
- Overrides:
getBoundValueFromComponent
in class SwingBuilder<T extends javax.swing.text.JTextComponent>
- Parameters:
changedObjects
- - collection of changed data objects, add your data object to
this if your component's value was changed by userfullBinding
- - binding to component's value from root form object
- Returns:
- value from component's object