Package com.iizigo.prop.editor
Class ReferencePropEditor<TARGET extends IPropCnr>
java.lang.Object
com.iizigo.prop.BaseEditor<AbstractReference<TARGET>,ReferenceString> 
com.iizigo.prop.editor.ReferencePropEditor<TARGET>
- All Implemented Interfaces:
- IThemeListener,- IEditedPropControllerOwner<AbstractReference<TARGET>,,- ReferenceString> - IEditedPropertyEntry<AbstractReference<TARGET>,,- ReferenceString> - IEditedPropertyEntryMultiProp<AbstractReference<TARGET>,,- ReferenceString> - IPropertyDefined,- IDisposedPart
- Direct Known Subclasses:
- BaseReferencePropEditor,- ImageReferencePropEditor,- VSParticipantEditor,- VSReferencePropEditor
public class ReferencePropEditor<TARGET extends IPropCnr> extends BaseEditor<AbstractReference<TARGET>,ReferenceString> 
The Reference property editor consists of a simple entry field and a more button. It states it's using StringProp, but it's rather the subclass of it, e.g. VSReference, etc, as this property editor can handle any "simple" string reference.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- protected int- protected Object- protected Class<?>[]- protected ViewerFilter- protected Class<ViewerFilter>- protected Image- protected IzMenu- protected IzMenuItem- protected IzMenuItem- protected String- protected ObjectSelection root.- protected StringText message as tooltip text.- protected IzToolTip- 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 voidAdds drop support for a control.- protected void- create()Creates the property editor controls.- formatValue- (ReferenceString value) Formats the value for user input as a String.- protected StringGets the relative base for reference parsing, i.e.- protected GProp<?>Gets the current property reference target.Gets the default defined value to set in the property when defined.- protected String- getLookupPropReference- (String name) Creates the reference string to look-up from the ReferenceString.- protected StringGets the tooltip text to display in the entry fields (not the one for property errors or validator).- protected ReferenceStringGets the property value for a user input.- protected void- onCreateMenu- (IzMenu menu, boolean isPost) Called to create the menu items.- protected voidCalled when mouse is double-clicked in the text or combobox.- protected boolean- onGoto- (boolean doPerform) Goto reference.- boolean- onList- (boolean doPerform) Displays the listing selection dialog.- protected String- setLookedUpReference- (String name) Sets the reference found that also has been validated.- protected void- setToolTipText- (String msg) Sets the tooltip text.- protected void- setup()Override to provide user settings.- 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, onError, onF4List, onFocusGained, onFocusLost, onMore, onReadOnly, onThemeChanged, onUndefined, onUpdate, setColors, setCurrentValue, setEditable, setFocus, setInput, setInputValue, setInputValueFromProp, showMenu, updateTooltip, validate
- Field Details- TEXT_MESSAGEText message as tooltip text.
- SELECT_MESSAGE
- image
- classes
- filterClass
- filter
- tip
- miSelect
- miGoto
- selectionRootSelection root.
- alternateSelection
- alternateExpansionLevelprotected int alternateExpansionLevel
 
- Constructor Details- ReferencePropEditorpublic ReferencePropEditor()Default constructor called before createControls.
 
- Method Details- createprotected void create()Creates the property editor controls.- Specified by:
- createin class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,- ReferenceString> 
 
- setupprotected void setup()Override to provide user settings.
- onCreateMenuCalled to create the menu items.
- 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<AbstractReference<TARGET extends IPropCnr>,- ReferenceString> 
 
- getLookupPropReferenceCreates the reference string to look-up from the ReferenceString. Override this method for e.g. Base or Fixed Relative referencing.- Parameters:
- name- The reference name.
- Returns:
- The property reference string to look-up.
 
- setLookedUpReferenceSets the reference found that also has been validated. This method gives the opportunity for a subclass to remove e.g. the Base or Fixed Relative reference from the string start.- Parameters:
- name- The full reference.
- Returns:
- The reference to set in this property as ReferenceString.
 
- onListpublic boolean onList- (boolean doPerform) Displays the listing selection dialog.
- onGotoprotected boolean onGoto- (boolean doPerform) Goto reference.
- getToolTipTextGets the tooltip text to display in the entry fields (not the one for property errors or validator).- Specified by:
- getToolTipTextin class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,- ReferenceString> 
 
- getDefaultValueGets the default defined value to set in the property when defined.- Specified by:
- getDefaultValuein interface- IEditedPropControllerOwner<AbstractReference<TARGET extends IPropCnr>,- ReferenceString> 
- Specified by:
- getDefaultValuein class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,- ReferenceString> 
 
- getValueGets the property value for a user input.- Specified by:
- getValuein class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,- ReferenceString> 
- Parameters:
- input- The current user input.
- Returns:
- The property value for the input, or null to un-define the property.
 
- formatValueFormats the value for user input as a String.- Specified by:
- formatValuein interface- IEditedPropControllerOwner<AbstractReference<TARGET extends IPropCnr>,- ReferenceString> 
- Specified by:
- formatValuein class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,- ReferenceString> 
- Parameters:
- value- The value.
- Returns:
- The formatted value.
 
- setToolTipTextSets the tooltip text. The default is to apply the getToolTipText() text to the edit control.- An attempt to show the tooltip of the reference target's DesignerProp tooltip is done. - Overrides:
- setToolTipTextin class- BaseEditor<AbstractReference<TARGET extends IPropCnr>,- ReferenceString> 
- Parameters:
- msg- Message in tooltip (normally error), null for none, in which case the getToolTipText2() is used.
 
- getBaseReferencePathGets the relative base for reference parsing, i.e. the reference path of the base.- Returns:
- null if non-relative.
 
- getCurrentReferenceTargetGets the current property reference target. This reference is retrieved from the current input. If the path contains "Module:/", it is assumed to be a hard path. Otherwise the- getBaseReferencePath()is prepended.
- addDropSupportprotected void addDropSupport()Adds drop support for a control.