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 voidcreate()Creates the property editor controls.protected voidcreateTextAndTTCursorChange()Create the text and tooltip.protected intgetCaretPosition()Gets the caret position from the text or combo.java.lang.StringgetCurrentInput()Gets the user input.protected voidonDoubleClick(org.eclipse.swt.widgets.Event e)Called when mouse is double-clicked in the text or combobox.protected voidonFocusGained()Upon focus gained, the selection of an entry field is selected fully and for a combobox, cursor is placed first.protected voidonFocusLost()Called when focus is lost.protected booleansetInput(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 voidsetToolTipText(java.lang.String msg)Sets the tooltip text.protected voidshowDialogBox(boolean doRich)Shows the raw text dialog box.protected voidupdateStates()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:
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
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:
setInputin 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:
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
protected void setToolTipText(java.lang.String msg)
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
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:
onDoubleClickin classKStringPropEditor
showDialogBox
protected void showDialogBox(boolean doRich)
Shows the raw text dialog box.- Overrides:
showDialogBoxin classKStringPropEditor