Class PatternPropEditor

All Implemented Interfaces:
IThemeListener, IEditedPropControllerOwner<KStringProp,KString>, IEditedPropertyEntry<KStringProp,KString>, IEditedPropertyEntryMultiProp<KStringProp,KString>, IPropertyDefined, IDisposedPart

public class PatternPropEditor extends KStringPropEditor
The pattern property editor.
Author:
Christopher Mindus
  • Constructor Details

    • PatternPropEditor

      public PatternPropEditor()
  • Method Details

    • create

      protected void create()
      Creates the property editor controls.
      Overrides:
      create in class KStringPropEditor
    • createTextAndTTCursorChange

      protected void createTextAndTTCursorChange()
      Create the text and tooltip.
      Overrides:
      createTextAndTTCursorChange in class KStringPropEditor
    • getCaretPosition

      protected int getCaretPosition()
      Gets the caret position from the text or combo.
      Overrides:
      getCaretPosition in class KStringPropEditor
    • setInput

      protected boolean setInput(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 class BaseEditor<KStringProp,KString>
      Parameters:
      input - The new input, or null for no change.
      Returns:
      true for changed, false for no change.
    • getCurrentInput

      public String getCurrentInput()
      Gets the user input.
      Specified by:
      getCurrentInput in interface IEditedPropControllerOwner<KStringProp,KString>
      Overrides:
      getCurrentInput in class BaseEditor<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 class BaseEditor<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 class BaseEditor<KStringProp,KString>
    • updateStates

      protected void updateStates()
      Changes state of "icon".
      Overrides:
      updateStates in class KStringPropEditor
    • setToolTipText

      protected void setToolTipText(String msg)
      Sets the tooltip text. The default is to apply the getToolTipText() text to the edit control.
      Overrides:
      setToolTipText in class KStringPropEditor
      Parameters:
      msg - Message in tooltip (normally error), null for none, in which case the getToolTipText2() is used.
    • onDoubleClick

      protected void onDoubleClick(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 class KStringPropEditor
    • showDialogBox

      protected void showDialogBox(boolean doRich)
      Shows the raw text dialog box.
      Overrides:
      showDialogBox in class KStringPropEditor