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
FieldsFields 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, wasDefinedAtFocusGainedConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionprotected voidcreate()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 StringGets the tooltip text to display in the entry fields (not the one for property errors or validator).protected BooleanGets the property value for a user input.voidonError(String input, String message, int severity, boolean isMultipleValueWarning, boolean isChildError) Called when the property is updated due to an error.voidCalled when the property is undefined.voidCalled when the property is updated without errors, with a new value.protected voidAdds label to color.voidNot processed.voidCheckbox 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:
createin classBaseEditor<BoolProp,Boolean>
getToolTipText
Gets the tooltip text to display in the entry fields (not the one for property errors or validator).- Specified by:
getToolTipTextin classBaseEditor<BoolProp,Boolean>
getDefaultValue
Gets the default defined value to set in the property when defined.- Specified by:
getDefaultValuein interfaceIEditedPropControllerOwner<BoolProp,Boolean> - Specified by:
getDefaultValuein classBaseEditor<BoolProp,Boolean>
getValue
Gets the property value for a user input.- Specified by:
getValuein 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:
formatValuein interfaceIEditedPropControllerOwner<BoolProp,Boolean> - Specified by:
formatValuein 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:
onUpdatein interfaceIEditedPropControllerOwner<BoolProp,Boolean> - Overrides:
onUpdatein 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:
onErrorin interfaceIEditedPropControllerOwner<BoolProp,Boolean> - Overrides:
onErrorin classBaseEditor<BoolProp,Boolean>
onUndefined
public void onUndefined()Called when the property is undefined.- Specified by:
onUndefinedin interfaceIEditedPropControllerOwner<BoolProp,Boolean> - Overrides:
onUndefinedin classBaseEditor<BoolProp,Boolean>
widgetSelected
Checkbox pressed.- Specified by:
widgetSelectedin interfaceSelectionListener
widgetDefaultSelected
Not processed.- Specified by:
widgetDefaultSelectedin interfaceSelectionListener
setColors
Adds label to color.- Overrides:
setColorsin classBaseEditor<BoolProp,Boolean>