public interface Tree extends UIBlock
BlockStyler.Tree#insertColumn
, BlockStyler.Tree#createNode
, BlockStyler.Tree#insertNode
etc.
It is must to insert the column on the tree before inserting any node. Node can be created but cannot be inserted without the column available on the tree.
Note that some of the methods of this class such as BlockStyler.Tree#insertColumn
must be used in or after the BlockStyler.BlockDialog.DialogShown callback after
which tree is fully constructed and ready for use.
Modifier and Type | Interface and Description |
---|---|
static interface |
Tree.AskEditControlCallback
Represents the callback which gets called when edit is attempted on any cell.
|
static class |
Tree.BeginLabelEditState
Represents the state to allow/disallow the node label edit.
|
static class |
Tree.ColumnDisplay
Represents the column display type.
|
static class |
Tree.ColumnResizePolicy
Represents column resize policy.
|
static interface |
Tree.ColumnSortCallback
Represents the callback which gets called when column sort is attempted.
|
static class |
Tree.ColumnSortOption
Represents the column sort option.
|
static class |
Tree.ControlType
Represents the type of edit options.
|
static class |
Tree.EditControlOption
Represents the options to accept or reject the changed value.
|
static class |
Tree.EndLabelEditState
Represents the state to accept/reject the edited label of node.
|
static interface |
Tree.IsDragAllowedCallback
Represents the callback which gets called when node is dragged.
|
static interface |
Tree.IsDropAllowedCallback
Represents the callback which gets called when an attempt is made to drop the node on any target node.
|
static class |
Tree.NodeInsertOption
Represents the node insert option which is used while inserting the node in tree.
|
static interface |
Tree.OnBeginLabelEditCallback
Represents the callback which gets called when label edit is attempted on any column.
|
static interface |
Tree.OnDefaultActionCallback
Represents the callback which gets called when double clicked is performed on the node.
|
static interface |
Tree.OnDeleteNodeCallback
Represents the callback which gets called when the node is deleted from tree.
|
static interface |
Tree.OnDropCallback
Represents the callback which gets called when nodes are dropped on any target node.
|
static interface |
Tree.OnDropMenuCallback
Represents the callback to show the menu when nodes are dragged using MB3 or right mouse click, and dropped on any target node.
|
static interface |
Tree.OnEditOptionSelectedCallback
Represents the callback which gets called when user selects an option in edit-control set by
BlockStyler.Tree.AskEditControlCallback.
|
static interface |
Tree.OnEndLabelEditCallback
Represents the callback which gets called when label edit is completed on any column.
|
static interface |
Tree.OnExpandCallback
Represents the callback which gets called when the node is expanded.
|
static interface |
Tree.OnInsertColumnCallback
Represents the callback which gets called for each node when the column is inserted using
BlockStyler.Tree#insertColumn . |
static interface |
Tree.OnInsertNodeCallback
Represents the callback which gets called when the node is inserted.
|
static interface |
Tree.OnMenuCallback
Represents the callback which gets called when MB3 or right click is attempted on node or tree.
|
static interface |
Tree.OnMenuSelectionCallback
Represents the callback which gets called when one of the menu option is selected.
|
static interface |
Tree.OnPreSelectCallback
Represents the callback which gets called when pre selection is attempted on node.
|
static interface |
Tree.OnSelectCallback
Represents the callback which gets called when the node is selected.
|
static interface |
Tree.OnStateChangeCallback
Represents the callback which gets called when the state icon is clicked.
|
static interface |
Tree.StateIconNameCallback
Represents the callback which gets called when the node state is set
by
BlockStyler.Node#setState and the corresponding
state icon of node state is not known. |
static interface |
Tree.ToolTipTextCallback
Represents the callback which gets called when tree seeks the tooltip.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canStretchHeight()
Returns the CanStretchHeight.
|
Node |
copyNode(Node sourceNode)
Copies the existing
BlockStyler.Node . |
TreeListMenu |
createMenu()
Creates the menu.
|
Node |
createNode(String displayText)
Creates the node but does not insert it.
|
void |
deleteNode(Node node)
Deletes the node from tree.
|
Node |
firstSelectedNode()
Returns the first selected node among the available selected nodes.
|
Tree.ColumnDisplay |
getColumnDisplayType(int columnID)
Gets the display type of the column.
|
int |
getColumnId(int columnPosition)
Gets the column Id for the provided column position.
|
int |
getColumnPosition(int columnID)
Gets column position.
|
Tree.ColumnResizePolicy |
getColumnResizePolicy(int columnID)
Gets the column resize policy.
|
boolean |
getColumnSortable(int columnID)
Gets the flag indicating whether the column is sortable.
|
Tree.ColumnSortOption |
getColumnSortOption(int columnID)
Gets the column sort option.
|
String |
getColumnTitle(int columnID)
Gets the column title.
|
boolean |
getColumnVisible(int columnID)
Gets the flag indicating whether the column is visible.
|
int |
getColumnWidth(int columnID)
Gets column width
License requirements: None. |
Node[] |
getSelectedNodes()
Gets the selected nodes.
|
String[] |
getSelectionModeMembers()
Gets the SelectionMode
License requirements: None. |
int |
height()
Returns the Height
License requirements: None. |
int |
insertColumn(int columnID,
String columnTitle,
int columnWidth)
Inserts a column.
|
void |
insertNode(Node newNode,
Node parentNode,
Node afterNode,
Tree.NodeInsertOption nodeInsertOption)
Inserts the node.
|
boolean |
localize()
Returns the Localize
License requirements: None. |
int |
maximumHeight()
Returns the MaximumHeight
License requirements: None. |
int |
minimumHeight()
Returns the MinimumHeight
License requirements: None. |
int |
numberOfColumns()
Returns the number of column inserted in the tree.
|
void |
redraw(boolean redraw)
Freezes the tree if the value is set to False which implies that no changes would occur
in the tree after this point.
|
Node |
rootNode()
Returns the root node.
|
int |
scrollFrozenColumn()
Returns the ScrollFrozenColumn.
|
int |
scrollLineNumber()
Returns the ScrollLineNumber.
|
String |
selectionModeAsString()
Returns the SelectionMode
License requirements: None. |
void |
selectNode(Node node,
boolean isSelect,
boolean isOtherNodeAffected)
Selects the provided node.
|
void |
selectNodes(Node[] node,
boolean isSelect,
boolean isOtherNodeAffected)
Selects the provided nodes.
|
void |
setAskEditControlHandler(Tree.AskEditControlCallback cb)
Sets the node-edit-control callback
License requirements: None. |
void |
setCanStretchHeight(boolean stretchHeight)
License requirements: None. |
void |
setColumnDisplayType(int columnID,
Tree.ColumnDisplay displayType)
Sets the display type of the column.
|
void |
setColumnResizePolicy(int columnID,
Tree.ColumnResizePolicy resizePolicy)
Sets the column resize policy.
|
void |
setColumnSortable(int columnID,
boolean isSortable)
Sets the flag indicating whether the column is sortable.
|
void |
setColumnSortHandler(Tree.ColumnSortCallback cb)
Sets the column sort callback.
|
void |
setColumnSortOption(int columnID,
Tree.ColumnSortOption sortOption)
Sets the column sort option.
|
void |
setColumnTitle(int columnID,
String columnHeaderTitle)
Sets the column title.
|
void |
setColumnVisible(int columnID,
boolean isVisible)
Sets the flag indicating whether the column is visible
License requirements: None. |
void |
setColumnWidth(int columnID,
int columnWidth)
Sets the column width
License requirements: None. |
void |
setEditOptions(String[] stringArray,
int defaultIndex)
Sets the options in edit-control.
|
void |
setHeight(int height)
License requirements: None. |
void |
setIsDragAllowedHandler(Tree.IsDragAllowedCallback cb)
Sets the callback handler for node drag
License requirements: None. |
void |
setIsDropAllowedHandler(Tree.IsDropAllowedCallback cb)
Sets the callback handler for node drop
License requirements: None. |
void |
setLocalize(boolean localize)
License requirements: None. |
void |
setMaximumHeight(int maxHeight)
License requirements: None. |
void |
setMenu(TreeListMenu menu)
Sets the menu, resulting the menu to appear on the screen.
|
void |
setMinimumHeight(int minHeight)
License requirements: None. |
void |
setOnBeginLabelEditHandler(Tree.OnBeginLabelEditCallback cb)
Sets the on-begin-label-edit callback
License requirements: None. |
void |
setOnDefaultActionHandler(Tree.OnDefaultActionCallback cb)
Sets the on select node callback
License requirements: None. |
void |
setOnDeleteNodeHandler(Tree.OnDeleteNodeCallback cb)
Sets on delete node callback
License requirements: None. |
void |
setOnDropHandler(Tree.OnDropCallback cb)
Sets the callback handler for node drop
License requirements: None. |
void |
setOnDropMenuHandler(Tree.OnDropMenuCallback cb)
Sets the callback handler for on drop menu.
|
void |
setOnEditOptionSelectedHandler(Tree.OnEditOptionSelectedCallback cb)
Sets the on-end-label-edit callback
License requirements: None. |
void |
setOnEndLabelEditHandler(Tree.OnEndLabelEditCallback cb)
Sets the on-end-label-edit callback
License requirements: None. |
void |
setOnExpandHandler(Tree.OnExpandCallback cb)
Sets the on expand callback to the tree.
|
void |
setOnInsertColumnHandler(Tree.OnInsertColumnCallback cb)
Sets the on insert column callback to the tree.
|
void |
setOnInsertNodeHandler(Tree.OnInsertNodeCallback cb)
Sets the on insert node callback.
|
void |
setOnMenuHandler(Tree.OnMenuCallback cb)
Sets the on menu callback
License requirements: None. |
void |
setOnMenuSelectionHandler(Tree.OnMenuSelectionCallback cb)
Sets the on menu selection callback
License requirements: None. |
void |
setOnPreSelectHandler(Tree.OnPreSelectCallback cb)
Sets on pre select callback
License requirements: None. |
void |
setOnSelectHandler(Tree.OnSelectCallback cb)
Sets the on select node callback
License requirements: None. |
void |
setOnStateChangeHandler(Tree.OnStateChangeCallback cb)
Sets the on state change callback.
|
void |
setPreSelectionTimeOut(double timeOut)
Sets the pre selection time out.
|
void |
setScrollFrozenColumn(int scrollFrozenColumn)
License requirements: None. |
void |
setScrollLineNumber(int scrollLineNumber)
License requirements: None. |
void |
setSelectionModeAsString(String enumString)
License requirements: None. |
void |
setShowExpandCollapseMarker(boolean show)
License requirements: None. |
void |
setShowHeader(boolean show)
License requirements: None. |
void |
setShowMultipleColumns(boolean show)
License requirements: None. |
void |
setShowToolTips(boolean show)
License requirements: None. |
void |
setSortRootNodes(boolean sort)
License requirements: None. |
void |
setStateIconNameHandler(Tree.StateIconNameCallback cb)
Sets the state icon name callback.
|
void |
setToolTipTextHandler(Tree.ToolTipTextCallback cb)
Sets the tool tip callback.
|
boolean |
showExpandCollapseMarker()
Returns the ShowExpandCollapseMarker.
|
boolean |
showHeader()
Returns the ShowHeader
License requirements: None. |
boolean |
showMultipleColumns()
Returns the ShowMultipleColumns
License requirements: None. |
boolean |
showToolTips()
Returns the ShowToolTips
License requirements: None. |
boolean |
sortRootNodes()
Returns the SortRootNodes.
|
enable, expanded, focus, getProperties, group, label, name, setEnable, setExpanded, setGroup, setLabel, setShow, show, type
printTestData, printTestData, tag, tagValue
Node createNode(String displayText) throws NXException, RemoteException
BlockStyler.Tree#insertNode
to insert
the node.
displayText
- Specifies the display text of the node.NXException
RemoteException
void insertNode(Node newNode, Node parentNode, Node afterNode, Tree.NodeInsertOption nodeInsertOption) throws NXException, RemoteException
newNode
- New Node.parentNode
- Parent node under which new node is supposed to be placed.afterNode
- New node placed after this node. If there is mismatch between parent-node and after-node then former is honoured.nodeInsertOption
- Node insert option. Provide the value if after node is null.
This value is not considered if a valid after-node is supplied.NXException
RemoteException
void deleteNode(Node node) throws NXException, RemoteException
node
- Node to deleteNXException
RemoteException
void selectNode(Node node, boolean isSelect, boolean isOtherNodeAffected) throws NXException, RemoteException
node
- Node to be selectedisSelect
- Select/Deselect flag. If true, the provided node is selected, else deselected.isOtherNodeAffected
- Flag indicating whether selection of other nodes is affected. If true,
all the previous selected nodes are deselected, else unaffected.NXException
RemoteException
void selectNodes(Node[] node, boolean isSelect, boolean isOtherNodeAffected) throws NXException, RemoteException
node
- Nodes to be selectedisSelect
- Select/Deselect flag. If true, the provided nodes are selected, else deselected.isOtherNodeAffected
- Flag indicating whether selection of other nodes is affected. If true,
all the previous selected nodes are deselected, else remain so.NXException
RemoteException
int insertColumn(int columnID, String columnTitle, int columnWidth) throws NXException, RemoteException
BlockStyler.Tree.ColumnSortOption
as BlockStyler.Tree.ColumnSortOption#ASCENDING
BlockStyler.Tree.ColumnDisplay
as BlockStyler.Tree.ColumnDisplay#TEXT
BlockStyler.Tree.ColumnResizePolicy
as BlockStyler.Tree.ColumnResizePolicy#CONSTANT_WIDTH
columnID
- Unique column Id associated with the column. Any further interaction with the column is done with this column Id.columnTitle
- Column header title.columnWidth
- Column width. Provide -1 for default width.NXException
RemoteException
String getColumnTitle(int columnID) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.NXException
RemoteException
void setColumnTitle(int columnID, String columnHeaderTitle) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.columnHeaderTitle
- Column header title.NXException
RemoteException
int getColumnId(int columnPosition) throws NXException, RemoteException
columnPosition
- Column position.NXException
RemoteException
int getColumnPosition(int columnID) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.NXException
RemoteException
int getColumnWidth(int columnID) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.NXException
RemoteException
void setColumnWidth(int columnID, int columnWidth) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.columnWidth
- Column width.NXException
RemoteException
Tree.ColumnSortOption getColumnSortOption(int columnID) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.NXException
RemoteException
void setColumnSortOption(int columnID, Tree.ColumnSortOption sortOption) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.sortOption
- Column sort option.NXException
RemoteException
boolean getColumnSortable(int columnID) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.NXException
RemoteException
void setColumnSortable(int columnID, boolean isSortable) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.isSortable
- Flag indicating whether the column is sortable.NXException
RemoteException
boolean getColumnVisible(int columnID) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.NXException
RemoteException
void setColumnVisible(int columnID, boolean isVisible) throws NXException, RemoteException
columnID
- Unique column Id associated with the columnisVisible
- Flag indicating whether the column is visibleNXException
RemoteException
Tree.ColumnDisplay getColumnDisplayType(int columnID) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.NXException
RemoteException
void setColumnDisplayType(int columnID, Tree.ColumnDisplay displayType) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.displayType
- Display type.NXException
RemoteException
Tree.ColumnResizePolicy getColumnResizePolicy(int columnID) throws NXException, RemoteException
columnID
- Unique column Id associated with the column.NXException
RemoteException
void setColumnResizePolicy(int columnID, Tree.ColumnResizePolicy resizePolicy) throws NXException, RemoteException
columnID
- Unique column Id associated with the columnresizePolicy
- Resize policyNXException
RemoteException
Node rootNode() throws NXException, RemoteException
NXException
RemoteException
Node firstSelectedNode() throws NXException, RemoteException
NXException
RemoteException
void setPreSelectionTimeOut(double timeOut) throws NXException, RemoteException
timeOut
- Time in millisecondNXException
RemoteException
Node[] getSelectedNodes() throws NXException, RemoteException
NXException
RemoteException
void redraw(boolean redraw) throws NXException, RemoteException
redraw
- Flag corresponds to freeze/unfreeze of tree changes.NXException
RemoteException
int numberOfColumns() throws NXException, RemoteException
NXException
RemoteException
void setOnExpandHandler(Tree.OnExpandCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setOnInsertColumnHandler(Tree.OnInsertColumnCallback cb) throws NXException, RemoteException
cb
- Callback.NXException
RemoteException
void setStateIconNameHandler(Tree.StateIconNameCallback cb) throws NXException, RemoteException
cb
- Callback.NXException
RemoteException
void setOnInsertNodeHandler(Tree.OnInsertNodeCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setOnPreSelectHandler(Tree.OnPreSelectCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setOnDeleteNodeHandler(Tree.OnDeleteNodeCallback cb) throws NXException, RemoteException
cb
- Callback.NXException
RemoteException
void setOnSelectHandler(Tree.OnSelectCallback cb) throws NXException, RemoteException
cb
- Callback.NXException
RemoteException
void setOnStateChangeHandler(Tree.OnStateChangeCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setToolTipTextHandler(Tree.ToolTipTextCallback cb) throws NXException, RemoteException
cb
- Callback.NXException
RemoteException
void setColumnSortHandler(Tree.ColumnSortCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setOnBeginLabelEditHandler(Tree.OnBeginLabelEditCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setOnEndLabelEditHandler(Tree.OnEndLabelEditCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setAskEditControlHandler(Tree.AskEditControlCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setEditOptions(String[] stringArray, int defaultIndex) throws NXException, RemoteException
stringArray
- Options to be made availabe in edit-controldefaultIndex
- Index for default selection. This is zero based, for instance if it is set to 1 then 2nd option is selected by default during edit operation.NXException
RemoteException
void setOnEditOptionSelectedHandler(Tree.OnEditOptionSelectedCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setOnMenuHandler(Tree.OnMenuCallback cb) throws NXException, RemoteException
cb
- Callback.NXException
RemoteException
void setOnMenuSelectionHandler(Tree.OnMenuSelectionCallback cb) throws NXException, RemoteException
cb
- Callback.NXException
RemoteException
void setIsDragAllowedHandler(Tree.IsDragAllowedCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setIsDropAllowedHandler(Tree.IsDropAllowedCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setOnDropHandler(Tree.OnDropCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setOnDropMenuHandler(Tree.OnDropMenuCallback cb) throws NXException, RemoteException
cb
- CallbackNXException
RemoteException
void setOnDefaultActionHandler(Tree.OnDefaultActionCallback cb) throws NXException, RemoteException
cb
- Callback.NXException
RemoteException
TreeListMenu createMenu() throws NXException, RemoteException
BlockStyler.Tree#setMenu
to set the created menu.
NXException
RemoteException
void setMenu(TreeListMenu menu) throws NXException, RemoteException
menu
- Menu.NXException
RemoteException
Node copyNode(Node sourceNode) throws NXException, RemoteException
BlockStyler.Node
. The tree can copy either its own node or the node of another tree.
The copied node can only be inserted into the tree which has copied that node. The column texts are not passed to the copied node.
sourceNode
- Source node. Can be node of other tree.NXException
RemoteException
boolean canStretchHeight() throws NXException, RemoteException
NXException
RemoteException
void setCanStretchHeight(boolean stretchHeight) throws NXException, RemoteException
stretchHeight
- NXException
RemoteException
int height() throws NXException, RemoteException
NXException
RemoteException
void setHeight(int height) throws NXException, RemoteException
height
- NXException
RemoteException
boolean localize() throws NXException, RemoteException
NXException
RemoteException
void setLocalize(boolean localize) throws NXException, RemoteException
localize
- NXException
RemoteException
int maximumHeight() throws NXException, RemoteException
NXException
RemoteException
void setMaximumHeight(int maxHeight) throws NXException, RemoteException
maxHeight
- NXException
RemoteException
int minimumHeight() throws NXException, RemoteException
NXException
RemoteException
void setMinimumHeight(int minHeight) throws NXException, RemoteException
minHeight
- NXException
RemoteException
int scrollFrozenColumn() throws NXException, RemoteException
NXException
RemoteException
void setScrollFrozenColumn(int scrollFrozenColumn) throws NXException, RemoteException
scrollFrozenColumn
- NXException
RemoteException
int scrollLineNumber() throws NXException, RemoteException
NXException
RemoteException
void setScrollLineNumber(int scrollLineNumber) throws NXException, RemoteException
scrollLineNumber
- NXException
RemoteException
String selectionModeAsString() throws NXException, RemoteException
NXException
RemoteException
void setSelectionModeAsString(String enumString) throws NXException, RemoteException
enumString
- NXException
RemoteException
String[] getSelectionModeMembers() throws NXException, RemoteException
NXException
RemoteException
boolean showExpandCollapseMarker() throws NXException, RemoteException
NXException
RemoteException
void setShowExpandCollapseMarker(boolean show) throws NXException, RemoteException
show
- NXException
RemoteException
boolean showHeader() throws NXException, RemoteException
NXException
RemoteException
void setShowHeader(boolean show) throws NXException, RemoteException
show
- NXException
RemoteException
boolean showMultipleColumns() throws NXException, RemoteException
NXException
RemoteException
void setShowMultipleColumns(boolean show) throws NXException, RemoteException
show
- NXException
RemoteException
boolean showToolTips() throws NXException, RemoteException
NXException
RemoteException
void setShowToolTips(boolean show) throws NXException, RemoteException
show
- NXException
RemoteException
boolean sortRootNodes() throws NXException, RemoteException
NXException
RemoteException
void setSortRootNodes(boolean sort) throws NXException, RemoteException
sort
- NXException
RemoteException
Copyright 2011 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.