|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcdx.scorebot.util.swing.binding.delegate.GenericDelegate<TYPE,TYPE>
cdx.scorebot.util.swing.binding.delegate.IntermediateFieldDelegate<TYPE>
public class IntermediateFieldDelegate<TYPE>
A delegate for an intermediate field of type TYPE.
| Field Summary | |
|---|---|
protected java.util.Vector<BoundComponent> |
components
components whose bindings are contained within the objects contained in this list |
protected int |
primaryComponentIndex
the index of the subcomponent which determines the names of the entries in the list (-1 [default] => number them instead) |
| Constructor Summary | |
|---|---|
IntermediateFieldDelegate(BoundComponent owner,
IntermediateField compon)
Instantiates an unbound ButtonGroup Delegate |
|
IntermediateFieldDelegate(BoundComponent owner,
IntermediateField compon,
java.lang.Object boundItem,
java.lang.String varName)
Instantiates a bound ButtonGroup Delegate |
|
IntermediateFieldDelegate(BoundComponent owner,
IntermediateField compon,
java.lang.Object boundItem,
java.lang.String getterName,
java.lang.String setterName)
Instantiates a bound ButtonGroup Delegate |
|
IntermediateFieldDelegate(BoundComponent owner,
IntermediateField compon,
java.lang.String varName)
Instantiates an unbound ButtonGroup Delegate |
|
| Method Summary | |
|---|---|
void |
addBoundComponent(BoundComponent b)
add bound component to this (b's parent will be set to this) |
protected void |
completeInit()
does nothing |
java.util.Vector<BoundComponent> |
getBoundComponents()
get bound components this contains |
int |
getPrimaryComponent()
gets the index of the component which whose string value is used as the value to represent that collection, or -1 to just number the sets |
protected void |
handleValidationState()
draw the border to reflect the specified validation state |
void |
load()
refreshes subcomponents bindings |
void |
notifyBoundComponentChange(BoundComponent c)
informs its parent |
void |
save()
tells all subcomponents to save their current value |
void |
selectItem(int index)
does nothing |
void |
setPrimaryComponent(int primComponIndex)
sets the index of the component which whose string value is used as the value to represent that collection, or -1 to just number the sets |
java.lang.String |
toString()
|
void |
updateSubcomponentBindings()
update all components within this component |
| Methods inherited from class cdx.scorebot.util.swing.binding.delegate.GenericDelegate |
|---|
addBindingListener, changeBinding, changeBinding, changeBinding, changeBinding, changeBinding, changeBinding, changeBinding, getBinding, getBoundParent, getFormattedValidationErrorMsg, getMe, getOwner, getValidationErrorMsg, highlightOnError, isContainer, isValidated, notifyListenersOfBindingChanged, notifyListenersOfBindingChanging, notifyListenersOfBindingLoaded, removeBindingListener, setBoundParent, setHighlightOnError, setValidationError, setValidationError, validationError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface cdx.scorebot.util.swing.binding.delegate.BoundDelegateComponent |
|---|
addBindingListener, changeBinding, changeBinding, changeBinding, changeBinding, changeBinding, changeBinding, changeBinding, getBinding, getBoundParent, highlightOnError, isContainer, isValidated, notifyListenersOfBindingChanged, notifyListenersOfBindingChanging, removeBindingListener, setBoundParent, setHighlightOnError |
| Field Detail |
|---|
protected java.util.Vector<BoundComponent> components
protected int primaryComponentIndex
| Constructor Detail |
|---|
public IntermediateFieldDelegate(BoundComponent owner,
IntermediateField compon)
owner - the BoundComponent which this belongs tocompon - the component that this works for
public IntermediateFieldDelegate(BoundComponent owner,
IntermediateField compon,
java.lang.String varName)
owner - the BoundComponent which this belongs tocompon - the component that this works forvarName - the name of the variable; assumes the getter and setter name will
be get and set followed by varName with its first letter capitalized
(ex: if varName is "value" then the getter will be getValue).
public IntermediateFieldDelegate(BoundComponent owner,
IntermediateField compon,
java.lang.Object boundItem,
java.lang.String varName)
owner - the BoundComponent which this belongs tocompon - the component that this works forboundItem - the object this is bound to (contains the value to be modified as specified by varName)varName - the name of the variable; assumes the getter and setter name will
be get and set followed by varName with its first letter capitalized
(ex: if varName is "value" then the getter will be getValue).
public IntermediateFieldDelegate(BoundComponent owner,
IntermediateField compon,
java.lang.Object boundItem,
java.lang.String getterName,
java.lang.String setterName)
owner - the BoundComponent which this belongs tocompon - the component that this works forboundItem - the object this is bound to (contains the value to be modified as specified by the getter and setter name)getterName - how to get the bound value from the bound objectsetterName - how to set the bound value from the bound object| Method Detail |
|---|
protected void completeInit()
completeInit in class GenericDelegate<TYPE,TYPE>public void load()
load in interface BoundDelegateComponentload in class GenericDelegate<TYPE,TYPE>public void save()
save in interface BoundDelegateComponentsave in class GenericDelegate<TYPE,TYPE>protected void handleValidationState()
handleValidationState in class GenericDelegate<TYPE,TYPE>public final void addBoundComponent(BoundComponent b)
addBoundComponent in interface BoundDelegateContainerpublic final java.util.Vector<BoundComponent> getBoundComponents()
getBoundComponents in interface BoundDelegateContainerpublic final void updateSubcomponentBindings()
updateSubcomponentBindings in interface BoundDelegateContainerpublic void notifyBoundComponentChange(BoundComponent c)
notifyBoundComponentChange in interface BoundDelegateContainerpublic void selectItem(int index)
selectItem in interface BoundDelegateContainerpublic java.lang.String toString()
toString in class java.lang.Objectpublic final int getPrimaryComponent()
getPrimaryComponent in interface BoundDelegateContainerpublic final void setPrimaryComponent(int primComponIndex)
setPrimaryComponent in interface BoundDelegateContainerprimComponIndex - index of the BoundComponent which is the primary component in the
getBoundComponents() vector.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||