Package com.iizigo.prop.editor
Class BoolPropEditor
- All Implemented Interfaces:
IThemeListener
,IEditedPropControllerOwner<BoolProp,
,Boolean> IEditedPropertyEntry<BoolProp,
,Boolean> IEditedPropertyEntryMultiProp<BoolProp,
,Boolean> IPropertyDefined
,IDisposedPart
,EventListener
,SelectionListener
,SWTEventListener
- Direct Known Subclasses:
ContentProviderPropEditor
,NullValueAllowedPropEditor
The boolean property editor consists of a simple check box.
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizigo.prop.BaseEditor
appUI, combo, control, controller, definedButton, display, editor, focusListener, hasBeenModified, info, more, multipleValueWarningInput, options, parent, propController, shell, text, validator, wasDefinedAtFocusGained
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionprotected void
create()
Creates the property editor controls.formatValue
(Boolean value) Formats the value for user input as a String.Gets the default defined value to set in the property when defined.protected String
Gets the tooltip text to display in the entry fields (not the one for property errors or validator).protected Boolean
Gets the property value for a user input.void
onError
(String input, String message, int severity, boolean isMultipleValueWarning, boolean isChildError) Called when the property is updated due to an error.void
Called when the property is undefined.void
Called when the property is updated without errors, with a new value.protected void
Adds label to color.void
Not processed.void
Checkbox pressed.Methods inherited from class com.iizigo.prop.BaseEditor
assignMaster, beginProcessEvent, canProcessEvents, checkInput, createCCombo, createControls, createGridLayout, createIzMenu, createMoreButton, createMoreIzMenu, createText, dispose, doUndefineIfEmpty, doValueChangeConversion, endProcessEvent, getBaseEditor, getCurrentInput, getCurrentValue, getCurrentValues, getModifyListener, getNativeToolTip, getOption, getSelectionListener, getSeverity, getShell, getToolTipText2, hasFocus, initialize, isDisposed, isPropReadOnly, onDefine, onDispose, onDoubleClick, onF4List, onFocusGained, onFocusLost, onMore, onReadOnly, onThemeChanged, setCurrentValue, setEditable, setFocus, setInput, setInputValue, setInputValueFromProp, setToolTipText, showMenu, updateTooltip, validate
Field Details
defaultValue
protected boolean defaultValueThe default value.button
The button.
Constructor Details
BoolPropEditor
public BoolPropEditor()Default constructor called before createControls.
Method Details
create
protected void create()Creates the property editor controls.- Specified by:
create
in classBaseEditor<BoolProp,
Boolean>
getToolTipText
Gets the tooltip text to display in the entry fields (not the one for property errors or validator).- Specified by:
getToolTipText
in classBaseEditor<BoolProp,
Boolean>
getDefaultValue
Gets the default defined value to set in the property when defined.- Specified by:
getDefaultValue
in interfaceIEditedPropControllerOwner<BoolProp,
Boolean> - Specified by:
getDefaultValue
in classBaseEditor<BoolProp,
Boolean>
getValue
Gets the property value for a user input.- Specified by:
getValue
in classBaseEditor<BoolProp,
Boolean> - Parameters:
input
- The current user input.- Returns:
- The property value for the input, or null to un-define the property.
- Throws:
Exception
- For validation errors.
formatValue
Formats the value for user input as a String.- Specified by:
formatValue
in interfaceIEditedPropControllerOwner<BoolProp,
Boolean> - Specified by:
formatValue
in classBaseEditor<BoolProp,
Boolean> - Parameters:
value
- The value.- Returns:
- The formatted value.
onUpdate
Called when the property is updated without errors, with a new value.- Specified by:
onUpdate
in interfaceIEditedPropControllerOwner<BoolProp,
Boolean> - Overrides:
onUpdate
in classBaseEditor<BoolProp,
Boolean>
onError
public void onError(String input, String message, int severity, boolean isMultipleValueWarning, boolean isChildError) Called when the property is updated due to an error.- Specified by:
onError
in interfaceIEditedPropControllerOwner<BoolProp,
Boolean> - Overrides:
onError
in classBaseEditor<BoolProp,
Boolean>
onUndefined
public void onUndefined()Called when the property is undefined.- Specified by:
onUndefined
in interfaceIEditedPropControllerOwner<BoolProp,
Boolean> - Overrides:
onUndefined
in classBaseEditor<BoolProp,
Boolean>
widgetSelected
Checkbox pressed.- Specified by:
widgetSelected
in interfaceSelectionListener
widgetDefaultSelected
Not processed.- Specified by:
widgetDefaultSelected
in interfaceSelectionListener
setColors
Adds label to color.- Overrides:
setColors
in classBaseEditor<BoolProp,
Boolean>