|
||||||||||
| 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<FROM,TO>
cdx.scorebot.util.swing.binding.delegate.GenericJComponentDelegate<FROM,TO>
public abstract class GenericJComponentDelegate<FROM,TO>
Binds some Object of type FROM to a component which requires type TO
| Constructor Summary | |
|---|---|
GenericJComponentDelegate(boolean isContainer,
BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,TO> translator,
java.lang.Object boundItem,
java.lang.String varName)
Instantiates a bound JComponent Delegate |
|
GenericJComponentDelegate(boolean isContainer,
BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,TO> translator,
java.lang.Object boundItem,
java.lang.String getterName,
java.lang.String setterName)
Instantiates a bound JComponent Delegate |
|
GenericJComponentDelegate(boolean isContainer,
BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,TO> translator,
java.lang.Object boundItem,
java.lang.String getterName,
java.lang.String setterName,
int indexAt)
Instantiates a bound JComponent Delegate |
|
GenericJComponentDelegate(boolean isContainer,
BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,TO> translator,
java.lang.String varName)
Instantiates a bound JComponent Delegate |
|
GenericJComponentDelegate(BoundComponent owner,
BoundComponent compon)
Instantiates an unbound JComponent Delegate |
|
| Method Summary | |
|---|---|
protected abstract void |
completeInit()
suggested that this is used to load the component with its initial values after the constructor is done |
protected void |
handleValidationState()
draw the border to reflect the specified validation state if me() returns a JComponent, and does nothing otherwise |
| 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, load, notifyListenersOfBindingChanged, notifyListenersOfBindingChanging, notifyListenersOfBindingLoaded, removeBindingListener, save, setBoundParent, setHighlightOnError, setValidationError, setValidationError, validationError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericJComponentDelegate(BoundComponent owner,
BoundComponent compon)
owner - the BoundComponent which this belongs tocompon - the component that this works for
public GenericJComponentDelegate(boolean isContainer,
BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,TO> translator,
java.lang.String varName)
owner - the BoundComponent which this belongs toisContainer - whether or not this component can contain otherscompon - the component that this works fortranslator - how to translate between the value in the boundItem (type FROM) a another value of type TOvarName - 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 GenericJComponentDelegate(boolean isContainer,
BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,TO> translator,
java.lang.Object boundItem,
java.lang.String varName)
owner - the BoundComponent which this belongs toisContainer - whether or not this component can contain otherscompon - the component that this works fortranslator - how to translate between the value in the boundItem (type FROM) a another value of type TOboundItem - 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 GenericJComponentDelegate(boolean isContainer,
BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,TO> translator,
java.lang.Object boundItem,
java.lang.String getterName,
java.lang.String setterName)
owner - the BoundComponent which this belongs toisContainer - whether or not this component can contain otherscompon - the component that this works fortranslator - how to translate between the value in the boundItem (type FROM) a another value of type TOboundItem - 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
public GenericJComponentDelegate(boolean isContainer,
BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,TO> translator,
java.lang.Object boundItem,
java.lang.String getterName,
java.lang.String setterName,
int indexAt)
owner - the BoundComponent which this belongs toisContainer - whether or not this component can contain otherscompon - the component that this works fortranslator - how to translate between the value in the boundItem (type FROM) a another value of type TOboundItem - 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 objectindexAt - if bound value is stored within a container with get(index) and
set(index, Object) methods, then indexAt should be the index to
use; otherwise, indexAt should be -1| Method Detail |
|---|
protected abstract void completeInit()
completeInit in class GenericDelegate<FROM,TO>protected void handleValidationState()
handleValidationState in class GenericDelegate<FROM,TO>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||