Package com.iizigo.prop.editor
Class BadgePropEditor
- All Implemented Interfaces:
- IThemeListener,- IEditedPropControllerOwner<BadgeProp,,- GBadge> - IEditedPropertyEntry<BadgeProp,,- GBadge> - IEditedPropertyEntryMultiProp<BadgeProp,,- GBadge> - IPropertyDefined,- IDisposedPart
The Badge property editor consists of an icon for the color and font size.
A context menu is available when right-clicking on the icon. A double-click on it opens the Rich Text Editor or the Text Editor.
The option "plain" makes input limited to PLAIN KStrings and should be combined with PlainKStringProp.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- protected final ListenerSelection listener to check for caret location.- 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 SummaryConstructors
- Method SummaryModifier and TypeMethodDescription- protected voidChecks the goto-enablement from the selection.- protected void- create()Creates the property editor controls.- protected voidCreate the text and tooltip.- formatValue- (GBadge value) Formats the value for user input as a String.- protected intGets the selection from the text or combo.Gets the default defined value to set in the property when defined.- protected StringGets the tooltip text to display in the entry fields (not the one for property errors or validator).- protected GBadgeGets the property value for a user input.- protected voidCalled when mouse is double-clicked in the text or combobox.- void- onError- (String input, String message, int severity, boolean isMultipleValueWarning, boolean isChildError) Called when the property is updated due to an error.- void- onF4List()Called when F4 is pressed in a Text field.- voidCalled when the property is undefined.- voidCalled when the property is updated without errors, with a new value.- protected void- setInputValue- (GBadge value) Sets the new input value.- protected void- setToolTipText- (String msg) Sets the tooltip text.- Methods inherited from class com.iizigo.prop.BaseEditor- assignMaster, beginProcessEvent, canProcessEvents, checkInput, createCCombo, createControls, createGridLayout, createIzMenu, createMoreButton, createMoreIzMenu, createText, dispose, doUndefineIfEmpty, doValueChangeConversion, endProcessEvent, getBaseEditor, getCurrentInput, getCurrentValue, getCurrentValues, getModifyListener, getNativeToolTip, getOption, getSelectionListener, getSeverity, getShell, getToolTipText2, hasFocus, initialize, isDisposed, isPropReadOnly, onDefine, onDispose, onFocusGained, onFocusLost, onMore, onReadOnly, onThemeChanged, setColors, setCurrentValue, setEditable, setFocus, setInput, setInputValueFromProp, showMenu, updateTooltip, validate
- Field Details- caretListenerSelection listener to check for caret location.
 
- Constructor Details- BadgePropEditorpublic BadgePropEditor()
 
- Method Details- createprotected void create()Creates the property editor controls.- Specified by:
- createin class- BaseEditor<BadgeProp,- GBadge> 
 
- createTextAndTTCursorChangeprotected void createTextAndTTCursorChange()Create the text and tooltip.
- getCaretPositionprotected int getCaretPosition()Gets the selection from the text or combo.
- checkGotoprotected void checkGoto()Checks the goto-enablement from the selection.
- onDoubleClickCalled 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 class- BaseEditor<BadgeProp,- GBadge> 
 
- onF4Listpublic void onF4List()Called when F4 is pressed in a Text field.- Overrides:
- onF4Listin class- BaseEditor<BadgeProp,- GBadge> 
 
- getToolTipTextGets the tooltip text to display in the entry fields (not the one for property errors or validator).- Specified by:
- getToolTipTextin class- BaseEditor<BadgeProp,- GBadge> 
 
- setToolTipTextSets the tooltip text. The default is to apply the getToolTipText() text to the edit control.- Overrides:
- setToolTipTextin class- BaseEditor<BadgeProp,- GBadge> 
- Parameters:
- msg- Message in tooltip (normally error), null for none, in which case the getToolTipText2() is used.
 
- getDefaultValueGets the default defined value to set in the property when defined.- Specified by:
- getDefaultValuein interface- IEditedPropControllerOwner<BadgeProp,- GBadge> 
- Specified by:
- getDefaultValuein class- BaseEditor<BadgeProp,- GBadge> 
 
- getValueGets the property value for a user input.- Specified by:
- getValuein class- BaseEditor<BadgeProp,- GBadge> 
- Parameters:
- input- The current user input.
- Returns:
- The property value for the input, or null to un-define the property.
- Throws:
- KStringException- For parsing errors.
 
- formatValueFormats the value for user input as a String.- Specified by:
- formatValuein interface- IEditedPropControllerOwner<BadgeProp,- GBadge> 
- Specified by:
- formatValuein class- BaseEditor<BadgeProp,- GBadge> 
- Parameters:
- value- The value.
- Returns:
- The formatted value.
 
- setInputValueSets the new input value.- Overrides:
- setInputValuein class- BaseEditor<BadgeProp,- GBadge> 
- Parameters:
- value- The value to set, null for empty.
 
- onUpdateCalled when the property is updated without errors, with a new value.- Specified by:
- onUpdatein interface- IEditedPropControllerOwner<BadgeProp,- GBadge> 
- Overrides:
- onUpdatein class- BaseEditor<BadgeProp,- GBadge> 
 
- onUndefinedpublic void onUndefined()Called when the property is undefined.- Specified by:
- onUndefinedin interface- IEditedPropControllerOwner<BadgeProp,- GBadge> 
- Overrides:
- onUndefinedin class- BaseEditor<BadgeProp,- GBadge> 
 
- onErrorpublic void onError- (String input, String message, int severity, boolean isMultipleValueWarning, boolean isChildError) Called when the property is updated due to an error.- Specified by:
- onErrorin interface- IEditedPropControllerOwner<BadgeProp,- GBadge> 
- Overrides:
- onErrorin class- BaseEditor<BadgeProp,- GBadge>