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, usesTagProcessingFields 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.protected voidCreate the text and tooltip.protected intGets the caret position from the text or combo.Gets the user input.protected voidCalled when mouse is double-clicked in the text or combobox.protected voidUpon focus gained, the selection of an entry field is selected fully and for a combobox, cursor is placed first.protected voidCalled when focus is lost.protected booleanUpdates the entry or visible part in the editor with a new property value that is not in error state.protected voidsetToolTipText(String msg) Sets the tooltip text.protected voidshowDialogBox(boolean doRich) Shows the raw text dialog box.protected voidChanges state of "icon".Methods inherited from class com.iizigo.prop.editor.KStringPropEditor
checkGoto, doUndefineIfEmpty, formatValue, getDefaultValue, getToolTipText, getValue, onError, onF4List, onUndefined, onUpdate, setInputValueMethods 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:
createin classKStringPropEditor
createTextAndTTCursorChange
protected void createTextAndTTCursorChange()Create the text and tooltip.- Overrides:
createTextAndTTCursorChangein classKStringPropEditor
getCaretPosition
protected int getCaretPosition()Gets the caret position from the text or combo.- Overrides:
getCaretPositionin 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:
setInputin 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:
getCurrentInputin interfaceIEditedPropControllerOwner<KStringProp,KString> - Overrides:
getCurrentInputin 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:
onFocusGainedin 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:
onFocusLostin classBaseEditor<KStringProp,KString>
updateStates
protected void updateStates()Changes state of "icon".- Overrides:
updateStatesin classKStringPropEditor
setToolTipText
Sets the tooltip text. The default is to apply the getToolTipText() text to the edit control.- Overrides:
setToolTipTextin 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:
onDoubleClickin classKStringPropEditor
showDialogBox
protected void showDialogBox(boolean doRich) Shows the raw text dialog box.- Overrides:
showDialogBoxin classKStringPropEditor