Package com.iizigo.prop.editor
Class BoolPropEditor
- All Implemented Interfaces:
IThemeListener,IEditedPropControllerOwner<BoolProp,,Boolean> IEditedPropertyEntry<BoolProp,,Boolean> IEditedPropertyEntryMultiProp<BoolProp,,Boolean> IPropertyDefined,EventListener,org.eclipse.swt.events.SelectionListener,org.eclipse.swt.internal.SWTEventListener
- Direct Known Subclasses:
ContentProviderPropEditor,NullValueAllowedPropEditor
public class BoolPropEditor extends BaseEditor<BoolProp,Boolean> implements org.eclipse.swt.events.SelectionListener
The boolean property editor consists of a simple check box.
- Author:
- Christopher Mindus
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.swt.widgets.ButtonThe button.protected booleanThe default value.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, 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 voidsetColors(org.eclipse.swt.widgets.Control... additional) Adds label to color.voidwidgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) Not processed.voidwidgetSelected(org.eclipse.swt.events.SelectionEvent e) 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, 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
protected org.eclipse.swt.widgets.Button buttonThe 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
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) Checkbox pressed.- Specified by:
widgetSelectedin interfaceorg.eclipse.swt.events.SelectionListener
widgetDefaultSelected
public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e) Not processed.- Specified by:
widgetDefaultSelectedin interfaceorg.eclipse.swt.events.SelectionListener
setColors
protected void setColors(org.eclipse.swt.widgets.Control... additional) Adds label to color.- Overrides:
setColorsin classBaseEditor<BoolProp,Boolean>