Package com.iizigo.prop.editor
Class PatternPropEditor
- java.lang.Object
- com.iizigo.prop.BaseEditor<KStringProp,KString>
- com.iizigo.prop.editor.KStringPropEditor
- com.iizigo.prop.editor.PatternPropEditor
- All Implemented Interfaces:
IEditedPropControllerOwner<KStringProp,KString>
,IEditedPropertyEntry<KStringProp,KString>
,IEditedPropertyEntryMultiProp<KStringProp,KString>
,IPropertyDefined
public class PatternPropEditor extends KStringPropEditor
The pattern property editor.- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizigo.prop.editor.KStringPropEditor
caretListener, menu, miConvert, miExternalize, miGoto, miRawText, miRichText, miTagProcessing, tip, usesTagProcessing
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 PatternPropEditor()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
create()
Creates the property editor controls.protected void
createTextAndTTCursorChange()
Create the text and tooltip.protected int
getCaretPosition()
Gets the caret position from the text or combo.java.lang.String
getCurrentInput()
Gets the user input.protected void
onDoubleClick(org.eclipse.swt.widgets.Event e)
Called when mouse is double-clicked in the text or combobox.protected void
onFocusGained()
Upon focus gained, the selection of an entry field is selected fully and for a combobox, cursor is placed first.protected void
onFocusLost()
Called when focus is lost.protected boolean
setInput(java.lang.String input)
Updates the entry or visible part in the editor with a new property value that is not in error state.protected void
setToolTipText(java.lang.String msg)
Sets the tooltip text.protected void
showDialogBox(boolean doRich)
Shows the raw text dialog box.protected void
updateStates()
Changes state of "icon".Methods inherited from class com.iizigo.prop.editor.KStringPropEditor
checkGoto, doUndefineIfEmpty, formatValue, getDefaultValue, getToolTipText, getValue, onError, onF4List, onUndefined, onUpdate, setInputValue
Methods inherited from class com.iizigo.prop.BaseEditor
assignMaster, beginProcessEvent, canProcessEvents, checkInput, createCCombo, createControls, createGridLayout, createIzMenu, createMoreButton, createMoreIzMenu, createText, dispose, doValueChangeConversion, endProcessEvent, getBaseEditor, getCurrentValue, getCurrentValues, getModifyListener, getNativeToolTip, getOption, getSelectionListener, getSeverity, getShell, getToolTipText2, hasFocus, initialize, isPropReadOnly, onDefine, onDispose, onMore, onReadOnly, setColors, setCurrentValue, setEditable, setFocus, setInputValueFromProp, showMenu, updateTooltip, validate
Method Detail
create
protected void create()
Creates the property editor controls.- Overrides:
create
in classKStringPropEditor
createTextAndTTCursorChange
protected void createTextAndTTCursorChange()
Create the text and tooltip.- Overrides:
createTextAndTTCursorChange
in classKStringPropEditor
getCaretPosition
protected int getCaretPosition()
Gets the caret position from the text or combo.- Overrides:
getCaretPosition
in classKStringPropEditor
setInput
protected boolean setInput(java.lang.String input)
Updates the entry or visible part in the editor with a new property value that is not in error state. The default implementation updates the combo box or text with the value.toString() representation. The existing input should be checked for difference in order not to update the entry if not required. If the input is null, it means no change of the current input the user has made or was previously set.- Overrides:
setInput
in classBaseEditor<KStringProp,KString>
- Parameters:
input
- The new input, or null for no change.- Returns:
- true for changed, false for no change.
getCurrentInput
public java.lang.String getCurrentInput()
Gets the user input.- Specified by:
getCurrentInput
in interfaceIEditedPropControllerOwner<KStringProp,KString>
- Overrides:
getCurrentInput
in classBaseEditor<KStringProp,KString>
onFocusGained
protected void onFocusGained()
Upon focus gained, the selection of an entry field is selected fully and for a combobox, cursor is placed first.- Overrides:
onFocusGained
in classBaseEditor<KStringProp,KString>
onFocusLost
protected void onFocusLost()
Called when focus is lost. The control can set the selection to the beginning of the field to show the text.- Overrides:
onFocusLost
in classBaseEditor<KStringProp,KString>
updateStates
protected void updateStates()
Changes state of "icon".- Overrides:
updateStates
in classKStringPropEditor
setToolTipText
protected void setToolTipText(java.lang.String msg)
Sets the tooltip text. The default is to apply the getToolTipText() text to the edit control.- Overrides:
setToolTipText
in classKStringPropEditor
- Parameters:
msg
- Message in tooltip (normally error), null for none, in which case the getToolTipText2() is used.
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 classKStringPropEditor
showDialogBox
protected void showDialogBox(boolean doRich)
Shows the raw text dialog box.- Overrides:
showDialogBox
in classKStringPropEditor