Package com.iizigo.prop.editor
Class ValuePropEditor
- java.lang.Object
- com.iizigo.prop.BaseEditor<ValueProp,Value>
- com.iizigo.prop.editor.ValuePropEditor
- All Implemented Interfaces:
IEditedPropControllerOwner<ValueProp,Value>
,IEditedPropertyEntry<ValueProp,Value>
,IEditedPropertyEntryMultiProp<ValueProp,Value>
,IPropertyDefined
public class ValuePropEditor extends BaseEditor<ValueProp,Value>
The Value property editor for the VSField Value.- 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
Constructors Constructor Description ValuePropEditor()
Default constructor called before createControls.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkInput(boolean focusLost)
Overridden to provide value type.protected void
create()
Creates the property editor controls.protected boolean
doUndefineIfEmpty(boolean focusLost)
Keeps empty strings as defined, when input has been changed specifically to empty string, or if the entry was defined when editing began.java.lang.String
formatValue(Value value)
Formats the value for user input as a String.Value
getDefaultValue()
Gets the default defined value to set in the property when defined.protected java.lang.String
getToolTipText()
Gets the tooltip text to display in the entry fields (not the one for property errors or validator).protected Value
getValue(java.lang.String input)
Gets the property value for a user input.void
onDefine(boolean on)
Overridden to provide type.protected void
onDoubleClick(org.eclipse.swt.widgets.Event e)
Called when mouse is double-clicked in the text or combobox.void
onMore()
Displays menu.Methods inherited from class com.iizigo.prop.BaseEditor
assignMaster, beginProcessEvent, canProcessEvents, createCCombo, createControls, createGridLayout, createIzMenu, createMoreButton, createMoreIzMenu, createText, dispose, doValueChangeConversion, endProcessEvent, getBaseEditor, getCurrentInput, getCurrentValue, getCurrentValues, getModifyListener, getNativeToolTip, getOption, getSelectionListener, getSeverity, getShell, getToolTipText2, hasFocus, initialize, isPropReadOnly, onDispose, onError, onF4List, onFocusGained, onFocusLost, onReadOnly, onUndefined, onUpdate, setColors, setCurrentValue, setEditable, setFocus, setInput, setInputValue, setInputValueFromProp, setToolTipText, showMenu, updateTooltip, validate
Method Detail
create
protected void create()
Creates the property editor controls.- Specified by:
create
in classBaseEditor<ValueProp,Value>
onDoubleClick
protected void onDoubleClick(org.eclipse.swt.widgets.Event e)
Called when mouse is double-clicked in the text or combobox. Overridden to check if Goto reference is enabled, and if so goes there.- Overrides:
onDoubleClick
in classBaseEditor<ValueProp,Value>
onMore
public void onMore()
Displays menu.- Overrides:
onMore
in classBaseEditor<ValueProp,Value>
getToolTipText
protected java.lang.String getToolTipText()
Gets the tooltip text to display in the entry fields (not the one for property errors or validator).- Specified by:
getToolTipText
in classBaseEditor<ValueProp,Value>
getDefaultValue
public Value getDefaultValue()
Gets the default defined value to set in the property when defined.- Specified by:
getDefaultValue
in interfaceIEditedPropControllerOwner<ValueProp,Value>
- Specified by:
getDefaultValue
in classBaseEditor<ValueProp,Value>
doUndefineIfEmpty
protected boolean doUndefineIfEmpty(boolean focusLost)
Keeps empty strings as defined, when input has been changed specifically to empty string, or if the entry was defined when editing began.- Overrides:
doUndefineIfEmpty
in classBaseEditor<ValueProp,Value>
getValue
protected Value getValue(java.lang.String input) throws java.text.ParseException
Gets the property value for a user input.- Specified by:
getValue
in classBaseEditor<ValueProp,Value>
- Parameters:
input
- The current user input.- Returns:
- The property value for the input, or null to un-define the property.
- Throws:
java.text.ParseException
- For value errors.
formatValue
public java.lang.String formatValue(Value value)
Formats the value for user input as a String.- Specified by:
formatValue
in interfaceIEditedPropControllerOwner<ValueProp,Value>
- Specified by:
formatValue
in classBaseEditor<ValueProp,Value>
- Parameters:
value
- The value.- Returns:
- The formatted value.
checkInput
protected void checkInput(boolean focusLost)
Overridden to provide value type.- Overrides:
checkInput
in classBaseEditor<ValueProp,Value>
onDefine
public void onDefine(boolean on)
Overridden to provide type.- Specified by:
onDefine
in interfaceIPropertyDefined
- Overrides:
onDefine
in classBaseEditor<ValueProp,Value>
- Parameters:
on
- The defined state.