Package com.iizigo.prop.editor
Interface IPropEditorExtender<EDITOR extends BaseEditor<PROP,VALUE>,PROP extends GProp<VALUE>,VALUE>
public interface IPropEditorExtender<EDITOR extends BaseEditor<PROP,VALUE>,PROP extends GProp<VALUE>,VALUE>
Interface used to extend the property editor of a single edited property item. The edited property itself could be several properties with their values at once if multiple selection is possible.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptiongetLabelText
(PROP[] props) Gets the text to display in a potential label to the right of the "more" button.void
initialize
(EDITOR editor, IzMenu menu) Requests initialization of the menu for the property editor, if one is present.boolean
isReplaceOperationAllowed
(Shell shell, PROP newProp, VALUE newValue) Checks if a new value should be allowed from a dialog box.boolean
isUndefinedOperationAllowed
(Shell shell) Checks if undefined should be allowed.void
Called to update the menu item states.void
updateTooltip
(IzToolTip tip, PROP[] props) Updates the tooltip.
Method Details
initialize
Requests initialization of the menu for the property editor, if one is present.- Parameters:
editor
- The property editor.menu
- The menu in question, null for none.
updateMenuItemStates
void updateMenuItemStates()Called to update the menu item states.isUndefinedOperationAllowed
Checks if undefined should be allowed. This gives the opportunity to cancel the operation.- Parameters:
shell
- The shell (for message boxes).- Returns:
- true for OK to undefine, false to keep the property intact and defined.
isReplaceOperationAllowed
Checks if a new value should be allowed from a dialog box. This gives the opportunity to cancel the operation.- Parameters:
shell
- The shell (for message boxes).newProp
- The new property (cloned, perhaps not attached to a parent).newValue
- The new property value.- Returns:
- true for OK to proceed, false to keep the existing property intact.
updateTooltip
Updates the tooltip.- Parameters:
tip
- The tip instance to set.props
- The properties.
getLabelText
Gets the text to display in a potential label to the right of the "more" button.- Parameters:
props
- The edited properties. A property in the array MAY BEnull
.- Returns:
- The text, or null for none.