eu.beesoft.gaia.swing.builder
Class ComboBoxBuilder
java.lang.Object
eu.beesoft.gaia.util.ObjectBuilder<T>
eu.beesoft.gaia.swing.builder.SwingBuilder<T>
eu.beesoft.gaia.swing.builder.ComponentBuilder<javax.swing.JComboBox>
eu.beesoft.gaia.swing.builder.ComboBoxBuilder
public class ComboBoxBuilder
- extends ComponentBuilder<javax.swing.JComboBox>
Builder to produce instances of JComboBoxWithSeparator
. It supports these properties:
- editable - enabled values are true or false
- itemBinding - enabled value is property name of the data object, see note in
SwingBuilder
- maximumRowCount - enable values are integers
- model - enabled value is name of the class that implements
ComboBoxModel
- renderer - enabled value is name of the class that implements
javax.swing.ListCellRenderer
- separators - this is just a shortcut for separatorsAfter
- separatorsAfter - enabled values are integers separated by comma
Methods inherited from class eu.beesoft.gaia.swing.builder.ComponentBuilder |
addChild, 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, 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 |
EMPTY_ITEM
public static final java.lang.Object EMPTY_ITEM
ComboBoxBuilder
public ComboBoxBuilder()
createObject
protected javax.swing.JComboBox createObject()
- Description copied from class:
ObjectBuilder
- Creates object for this builder. This method is invoked only once, when
properties for builder and the builder's parent (but not children) are
set.
- Specified by:
createObject
in class ObjectBuilder<javax.swing.JComboBox>
- Returns:
- created object
addSwingChild
protected void addSwingChild(ObjectBuilder<?> builder)
- Description copied from class:
ComponentBuilder
- This implementation processes just instances of
LayoutConstraintsBuilder
to remember layout constraints for
component of this builder.
- Overrides:
addSwingChild
in class ComponentBuilder<javax.swing.JComboBox>
- Parameters:
builder
- - the builder which object should be added to swing component
initEditable
protected void initEditable(java.lang.String value)
initMaximumRowCount
protected void initMaximumRowCount(java.lang.String value)
initItemBinding
protected void initItemBinding(java.lang.String value)
initRenderer
protected void initRenderer(java.lang.String value)
initModel
protected void initModel(java.lang.String value)
initSeparators
protected void initSeparators(java.lang.String value)
initSeparatorsAfter
protected void initSeparatorsAfter(java.lang.String value)
isBindable
protected boolean isBindable()
- Description copied from class:
SwingBuilder
- Returns true if binding != null.
- Overrides:
isBindable
in class SwingBuilder<javax.swing.JComboBox>
- Returns:
- true if binding != null
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<javax.swing.JComboBox>
- 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<javax.swing.JComboBox>
- 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