T - Type of child element.public class PropertyEditorCustomTree<T extends ElementBase> extends PropertyEditorCustom
| Modifier and Type | Class and Description |
|---|---|
class |
PropertyEditorCustomTree.Proxy
Subclass ElementProxy to allow us to synchronize changes to label property with the
corresponding tree node.
|
popupeditor| Constructor and Description |
|---|
PropertyEditorCustomTree(Class<T> childClass,
String labelProperty,
boolean hierarchical)
Create the editor instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected PropertyEditorCustomTree.Proxy |
addProxy(PropertyEditorCustomTree.Proxy proxy)
Add a proxy to the proxy list.
|
protected org.fujion.component.Treenode |
addTreenode(PropertyEditorCustomTree.Proxy proxy,
org.fujion.component.BaseComponent parent,
org.fujion.component.Treenode insertAfter)
Adds a tree node under the specified parent.
|
protected boolean |
canDemote(org.fujion.component.Treenode node)
Override to enable promotion of items
|
protected boolean |
canPromote(org.fujion.component.Treenode node)
Override to enable promotion of items
|
boolean |
commit()
Commits changes to all proxies.
|
void |
doClose()
Invoked when the associated component is closed;
|
protected Object |
getValue()
Logic to return the value from the editor component.
|
boolean |
hasChanged()
Returns true if changes have been made since the last commit.
|
protected void |
init(Object target,
PropertyInfo propInfo,
PropertyGrid propGrid)
Initializes the property editor by constructing the tree view based on the child elements of
the target element.
|
protected void |
initProxy(PropertyEditorCustomTree.Proxy proxy)
Subclasses may override to provide any special proxy initialization.
|
protected PropertyEditorCustomTree.Proxy |
newProxy(ElementBase child)
Creates a new proxy for the specified child.
|
protected PropertyEditorCustomTree.Proxy |
newProxy(PluginDefinition def)
Creates a new proxy for a child to be created.
|
void |
onLabelChange$tree() |
protected void |
resequenceTargets(org.fujion.component.BaseComponent tc,
ElementBase parent)
Resequence all UI elements to match that of the tree view.
|
boolean |
revert()
Reverts all changes to the last committed state.
|
protected void |
setValue(Object value)
Logic to set the value in the editor component.
|
protected void |
wireController() |
doOpen, setFocuscompareTo, getEditor, getPropInfo, getTarget, onChange, setWrongValueException, setWrongValueMessage, updateValuepublic PropertyEditorCustomTree(Class<T> childClass, String labelProperty, boolean hierarchical)
childClass - This is the class of child elements managed by this editor. It is used to
create new instances of the UI element from within the editor and to restrict the
selection of child elements to that type only.
The child class may be null. In this case, there is no restriction on the child type. The user is prompted for an element type when creating a new instance.
labelProperty - This is the name of the property on the child UI element that will be
synchronized with the label of the corresponding tree node. It may be null.hierarchical - If true, the editor assumes that child elements may contain other child
elements.protected void initProxy(PropertyEditorCustomTree.Proxy proxy)
proxy - Proxy to be initialized.protected void init(Object target, PropertyInfo propInfo, PropertyGrid propGrid)
init in class PropertyEditorCustomtarget - Target element whose children will be represented in the tree view.propInfo - The property information associated with the child elements.propGrid - The parent property grid.protected void wireController()
wireController in class PropertyEditorBase<org.fujion.component.Popupbox>public boolean commit()
commit in class PropertyEditorBase<org.fujion.component.Popupbox>public boolean revert()
revert in class PropertyEditorBase<org.fujion.component.Popupbox>protected org.fujion.component.Treenode addTreenode(PropertyEditorCustomTree.Proxy proxy, org.fujion.component.BaseComponent parent, org.fujion.component.Treenode insertAfter)
proxy - The proxy associated with the tree node.parent - The tree parent to receive the new tree node.insertAfter - Tree node after which new node will be added (may be null).protected void resequenceTargets(org.fujion.component.BaseComponent tc,
ElementBase parent)
tc - Root of subtree.parent - The parent UI element.protected PropertyEditorCustomTree.Proxy newProxy(ElementBase child)
child - Element to be proxied. May not be null.protected PropertyEditorCustomTree.Proxy newProxy(PluginDefinition def)
def - Plugin definition for child to be created.protected PropertyEditorCustomTree.Proxy addProxy(PropertyEditorCustomTree.Proxy proxy)
proxy - Proxy to addpublic void onLabelChange$tree()
public void doClose()
PropertyEditorCustomdoClose in class PropertyEditorCustomprotected boolean canPromote(org.fujion.component.Treenode node)
node - The node to test.protected boolean canDemote(org.fujion.component.Treenode node)
node - The node to test.public boolean hasChanged()
hasChanged in class PropertyEditorBase<org.fujion.component.Popupbox>protected Object getValue()
PropertyEditorBasegetValue in class PropertyEditorBase<org.fujion.component.Popupbox>protected void setValue(Object value)
PropertyEditorBasesetValue in class PropertyEditorBase<org.fujion.component.Popupbox>value - Value for the editor component.Copyright © 2017 Regenstrief Center for Biomedical Informatics. All rights reserved.