|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.commons.swt.data.editors.api.PropertyEditor com.ibm.commons.swt.data.editors.api.AbstractCheckBoxEditor
public abstract class AbstractCheckBoxEditor
An editor for a property which can be set via a checkbox control. Typically this property will only have two acceptable properties (e.g. 'true'/'false', 'yes'/'no', 'pass'/'fail' etc..)
Constructor Summary | |
---|---|
AbstractCheckBoxEditor()
|
|
AbstractCheckBoxEditor(java.lang.String text,
java.lang.String checkedValue,
java.lang.String uncheckedValue)
Constructs a new instance of this class with the given label, checked value, and unchecked value. |
Method Summary | |
---|---|
org.eclipse.swt.widgets.Control |
createControl(CompositeEditor parent)
This method is called by the PropertyEditor during initialization. |
org.eclipse.swt.widgets.Button |
getCheckbox()
Return the checkbox control. |
java.lang.String |
getCheckedValue()
Return the checked value - the value applied when the checkbox is set/clicked. |
boolean |
getDefaultValue()
Return if the checkbox is checked by default. |
java.lang.String |
getText()
Return the current text value, the control label. |
java.lang.String |
getUncheckedValue()
Return the unchecked value - the value applied when the checkbox is not set/clicked. |
void |
initControlValue(CompositeEditor parent,
java.lang.String value)
Set the given value into the control created for this property editor. |
void |
setCheckedValue(java.lang.String checkedValue)
Set the checked value - the value applied when the checkbox is set/clicked. |
void |
setDefaultValue(boolean value)
Set if the checkbox is checked by default. |
void |
setId(java.lang.String id)
Allows the implementor to associate an ID attribute with this control. |
void |
setText(java.lang.String text)
Set the current text value. |
void |
setUncheckedValue(java.lang.String uncheckedValue)
Set the unchecked value - the value applied when the checkbox is not set/clicked. |
boolean |
stopEdit(CompositeEditor parent)
Called to tell the current editor to stop editing the associated attribute. |
Methods inherited from class com.ibm.commons.swt.data.editors.api.PropertyEditor |
---|
addPropertyEditorUpdateListener, addValidator, callDialog, getContextAttribute, getContextObject, getDefaultEditor, getDialogButtonAltText, getDialogButtonImage, getDialogButtonText, getEditor, getRenderedValue, getScriptMode, getTextValidator, getValidator, getWorkBenchPart, hasDialogButton, isScriptModeFixed, postModelUpdate, preModelUpdate, removePropertyEditorUpdateListener, setContextAttribute, setContextObject, setScriptMode, setValidator, setWorkBenchPart |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractCheckBoxEditor()
public AbstractCheckBoxEditor(java.lang.String text, java.lang.String checkedValue, java.lang.String uncheckedValue)
text
- a String value that is the 'text' of the button control.checkedValue
- the value of the property when the widget is set/checked (e.g. 'true', 'yes', 'ok')uncheckedValue
- the value of the property when the widget is not set/unchecked (e.g. 'false', 'no', 'cancel')Method Detail |
---|
public org.eclipse.swt.widgets.Control createControl(CompositeEditor parent)
PropertyEditor
createControl
in class PropertyEditor
parent
- - The parent of the control
public void setId(java.lang.String id)
PropertyEditor
setId
in class PropertyEditor
public void initControlValue(CompositeEditor parent, java.lang.String value)
PropertyEditor
initControlValue
in class PropertyEditor
CompositeEditor
public boolean stopEdit(CompositeEditor parent)
PropertyEditor
stopEdit
in class PropertyEditor
parent
- - CompositeEditor
public java.lang.String getText()
public void setText(java.lang.String text)
String
- public org.eclipse.swt.widgets.Button getCheckbox()
public java.lang.String getCheckedValue()
public void setCheckedValue(java.lang.String checkedValue)
String
- public java.lang.String getUncheckedValue()
String
- public void setUncheckedValue(java.lang.String uncheckedValue)
String
- public void setDefaultValue(boolean value)
boolean
- public boolean getDefaultValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |