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:
IThemeListener
,IEditedPropControllerOwner<KStringProp,
,KString> IEditedPropertyEntry<KStringProp,
,KString> IEditedPropertyEntryMultiProp<KStringProp,
,KString> IPropertyDefined
,IDisposedPart
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
Method Summary
Modifier and TypeMethodDescriptionprotected void
create()
Creates the property editor controls.protected void
Create the text and tooltip.protected int
Gets the caret position from the text or combo.Gets the user input.protected void
Called when mouse is double-clicked in the text or combobox.protected void
Upon focus gained, the selection of an entry field is selected fully and for a combobox, cursor is placed first.protected void
Called when focus is lost.protected boolean
Updates the entry or visible part in the editor with a new property value that is not in error state.protected void
setToolTipText
(String msg) Sets the tooltip text.protected void
showDialogBox
(boolean doRich) Shows the raw text dialog box.protected void
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, isDisposed, isPropReadOnly, onDefine, onDispose, onMore, onReadOnly, onThemeChanged, setColors, setCurrentValue, setEditable, setFocus, setInputValueFromProp, showMenu, updateTooltip, validate
Constructor Details
PatternPropEditor
public PatternPropEditor()
Method Details
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
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
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
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
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