|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cdx.scorebot.util.swing.binding.delegate.GenericDelegate<FROM,TO> cdx.scorebot.util.swing.binding.delegate.GenericJComponentDelegate<FROM,java.lang.Boolean> cdx.scorebot.util.swing.binding.delegate.JToggleButtonComponentDelegate<FROM>
public class JToggleButtonComponentDelegate<FROM>
A delegate for a JToggleButton which is bound to a value of type FROM which can be represented as a Boolean.
Constructor Summary | |
---|---|
JToggleButtonComponentDelegate(BoundComponent owner,
BoundComponent compon)
Instantiates an unbound JToggleButton Delegate |
|
JToggleButtonComponentDelegate(BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,java.lang.Boolean> translator,
java.lang.Object boundItem,
java.lang.String varName)
Instantiates a bound JToggleButton Delegate |
|
JToggleButtonComponentDelegate(BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,java.lang.Boolean> translator,
java.lang.Object boundItem,
java.lang.String getterName,
java.lang.String setterName)
Instantiates a bound JToggleButton Delegate |
|
JToggleButtonComponentDelegate(BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,java.lang.Boolean> translator,
java.lang.Object boundItem,
java.lang.String getterName,
java.lang.String setterName,
int indexAt)
Instantiates a bound JToggleButton Delegate |
|
JToggleButtonComponentDelegate(BoundComponent owner,
BoundComponent compon,
TypeTranslator<FROM,java.lang.Boolean> translator,
java.lang.String varName)
Instantiates a bound JToggleButton Delegate |
Method Summary | |
---|---|
protected void |
completeInit()
adds a focus listener which binds any changes in the component to the object it is bound to when focus is lost |
void |
load()
load the current text for this component from the bound object |
void |
save()
save the current text in this component to the bound object |
void |
setSelected(java.lang.Boolean b)
Sets the bound item with the the specified value |
Methods inherited from class cdx.scorebot.util.swing.binding.delegate.GenericJComponentDelegate |
---|
handleValidationState |
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, toString, 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 |
Constructor Detail |
---|
public JToggleButtonComponentDelegate(BoundComponent owner, BoundComponent compon)
owner
- the BoundComponent which this belongs tocompon
- the component that this works for; must be a JToggleButtonpublic JToggleButtonComponentDelegate(BoundComponent owner, BoundComponent compon, TypeTranslator<FROM,java.lang.Boolean> translator, java.lang.String varName)
owner
- the BoundComponent which this belongs tocompon
- the component that this works for; must be a JToggleButtontranslator
- 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 JToggleButtonComponentDelegate(BoundComponent owner, BoundComponent compon, TypeTranslator<FROM,java.lang.Boolean> translator, java.lang.Object boundItem, java.lang.String varName)
owner
- the BoundComponent which this belongs tocompon
- the component that this works for; must be a JToggleButtontranslator
- 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 JToggleButtonComponentDelegate(BoundComponent owner, BoundComponent compon, TypeTranslator<FROM,java.lang.Boolean> translator, java.lang.Object boundItem, java.lang.String getterName, java.lang.String setterName)
owner
- the BoundComponent which this belongs tocompon
- the component that this works for; must be a JToggleButtontranslator
- 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 objectpublic JToggleButtonComponentDelegate(BoundComponent owner, BoundComponent compon, TypeTranslator<FROM,java.lang.Boolean> translator, java.lang.Object boundItem, java.lang.String getterName, java.lang.String setterName, int indexAt)
owner
- the BoundComponent which this belongs tocompon
- the component that this works for; must be a JToggleButtontranslator
- 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 -1Method Detail |
---|
protected void completeInit()
completeInit
in class GenericJComponentDelegate<FROM,java.lang.Boolean>
public void load()
load
in interface BoundDelegateComponent
load
in class GenericDelegate<FROM,java.lang.Boolean>
public void save()
save
in interface BoundDelegateComponent
save
in class GenericDelegate<FROM,java.lang.Boolean>
public void setSelected(java.lang.Boolean b)
b
- the new value to be set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |