Package com.iizigo.prop.editor
Class LocalizedStringPropEditor
java.lang.Object
com.iizigo.prop.BaseEditor<StringProp,String>
com.iizigo.prop.editor.StringPropEditor
com.iizigo.prop.editor.LocalizedStringPropEditor
- All Implemented Interfaces:
IThemeListener
,IEntryValidator
,IEditedPropControllerOwner<StringProp,
,String> IEditedPropertyEntry<StringProp,
,String> IEditedPropertyEntryMultiProp<StringProp,
,String> IPropertyDefined
The Localized String Prop editor consists of a simple entry field where all the localized languages are placed, the default language first, followed by the other languages, as a "comma" separated String.
The validator will automatically be set and check the supported languages from the application language definition.
The "options" parameter can be "prompt=text-to-display-in-pop-up menu", defaults to "Select languages".
- Author:
- Christopher Mindus
Field Summary
Fields inherited from class com.iizigo.prop.editor.StringPropEditor
descr
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
Method Summary
Modifier and TypeMethodDescriptionprotected void
create()
Creates the property editor controls.getDescription
(IPropertyEditorController controller, PropertyEditorInfo info, PropCnr[] parents, String[] options) Gets a description of the validation options.protected void
setToolTipText
(String msg) Sets the tooltip text.validate
(IPropertyEditorController controller, PropertyEditorInfo info, PropCnr[] parents, String value, String[] options) Validates the property value after editing.Methods inherited from class com.iizigo.prop.editor.StringPropEditor
doUndefineIfEmpty, formatValue, getDefaultValue, getToolTipText, getToolTipText2, getValue, parseOptions
Methods inherited from class com.iizigo.prop.BaseEditor
assignMaster, beginProcessEvent, canProcessEvents, checkInput, createCCombo, createControls, createGridLayout, createIzMenu, createMoreButton, createMoreIzMenu, createText, dispose, doValueChangeConversion, endProcessEvent, getBaseEditor, getCurrentInput, getCurrentValue, getCurrentValues, getModifyListener, getNativeToolTip, getOption, getSelectionListener, getSeverity, getShell, hasFocus, initialize, isPropReadOnly, onDefine, onDispose, onDoubleClick, onError, onF4List, onFocusGained, onFocusLost, onMore, onReadOnly, onThemeChanged, onUndefined, onUpdate, setColors, setCurrentValue, setEditable, setFocus, setInput, setInputValue, setInputValueFromProp, showMenu, updateTooltip, validate
Constructor Details
LocalizedStringPropEditor
public LocalizedStringPropEditor()Default constructor called before createControls.
Method Details
create
protected void create()Creates the property editor controls.- Overrides:
create
in classStringPropEditor
setToolTipText
Sets the tooltip text. The default is to apply the getToolTipText() text to the edit control.- Overrides:
setToolTipText
in classBaseEditor<StringProp,
String> - Parameters:
msg
- Message in tooltip (normally error), null for none, in which case the getToolTipText2() is used.
validate
public String validate(IPropertyEditorController controller, PropertyEditorInfo info, PropCnr[] parents, String value, String[] options) Validates the property value after editing. If this is successful, null is returned. Otherwise an error message string is returned that can be used as the tooltip text.- Specified by:
validate
in interfaceIEntryValidator
- Parameters:
controller
- The controller of the property editor.info
- Information about the item being edited.parents
- Parent property containers of the validated property.value
- The string value to set.options
- Validation options, may be null for none.- Returns:
- An error message or null for OK validation.
getDescription
public String getDescription(IPropertyEditorController controller, PropertyEditorInfo info, PropCnr[] parents, String[] options) Gets a description of the validation options.- Specified by:
getDescription
in interfaceIEntryValidator
- Parameters:
controller
- The controller of the property editor.info
- Information about the item being edited.parents
- Parent property containers of the validated property.options
- Validation options, may be null for none.- Returns:
- The descriptive string that can be prepended with e.g. "Enter ";