public interface TreeFace extends Nodes, RemoveNode, CustomFont, OcxDragDrop, HasVisible
Modifier and Type | Method and Description |
---|---|
void |
clearAll()
Unconditionally removes all the nodes from the tree.
|
void |
clearNodesImageList()
Clears all images used as node images.
|
void |
collapseAll()
Collapses all the nodes.
|
void |
collapseAllExcept(handle node)
Collapses all the nodes, except the one specified.
|
void |
collapseNode(NumberType nodeId)
Collapses a node.
|
integer |
createImage(character path)
Creates an image that can be later used in
setTreeNodeIcons(NumberType, NumberType, NumberType) and
createSubNode(NumberType, character, character, logical, NumberType, NumberType, integer) . |
integer |
createMergedImage(integer imgIndex,
character imgFile)
Implements legacy method CREATE-MERGED-IMAGE.
|
void |
createSubNode(NumberType parentNodeId,
character nodeText,
character nodeKey,
logical hasChildren,
NumberType collapseIcon,
NumberType expandIcon,
character tooltip,
integer newNodeId)
Creates a new node for the supplied parent node.
|
default void |
createSubNode(NumberType parentNodeId,
character nodeText,
character nodeKey,
logical hasChildren,
NumberType collapseIcon,
NumberType expandIcon,
integer newNodeId)
Creates a new node for the supplied parent node.
|
void |
deleteChildNodes(NumberType nodeId)
Recursively delete all node children.
|
void |
ensureNodeVisible(character nodeKey)
Makes the supplied node the first visible node (at the top of the view if possible).
|
void |
expandAll()
Expands all the nodes.
|
void |
expandNode(NumberType nodeId)
Expands a node.
|
handle |
findNode(character nodeKey)
Finds a node in the tree.
|
handle |
findNode(NumberType nodeId)
Finds a node in the tree.
|
handle |
getDraggedNode()
The attribute holds the dragged node that is the target of the current trigger.
|
handle |
getDraggedOverNode()
The attribute holds the dragged over node that is the target of the current trigger.
|
handle |
getDropHighlight()
Returns a reference to a node object that is highlighted with the system highlight color
when the cursor moves over it.
|
void |
getFirstChildNode(NumberType nodeId,
integer outChildId,
character outChildKey)
Returns the first child node of the specified parent node.
|
integer |
getFirstNode()
Getter for the FIRST-NODE attribute.
|
handle |
getFirstVisibleNode()
Getter for the FIRST-VISIBLE-NODE attribute.
|
handle |
getFocusedAndSelectedNode()
Getter for the FOCUSED-AND-SELECTED-NODE attribute.
|
character |
getFocusedAndSelectedNodeKey()
Getter for the FOCUSED-AND-SELECTED-NODE-KEY attribute.
|
handle |
getFocusedNode()
Getter for the FOCUSED-NODE attribute.
|
character |
getFocusedNodeKey()
Getter for the FOCUSED-NODE-KEY attribute.
|
integer |
getHWND()
Returns its widget identifier.
|
handle |
getImageList()
Returns the assigned imagelist or unknown.
|
integer |
getIndentation()
Getter for the INDENTATION attribute.
|
integer |
getLineStyle()
Gets the LINE-STYLE attribute value.
|
integer |
getMousePointerNum()
Gets the type of mouse pointer displayed when over part of an object.
|
character |
getNewNodeLabel()
Returns the new label for the trigger node.
|
integer |
getNextNode(NumberType nodeId)
Returns the next visible node from the specified node.
|
void |
getNextSiblingNode(NumberType nodeId,
integer outSiblingId,
character outSiblingKey)
Returns the next sibling node of the specified node.
|
character |
getNodeAt(NumberType x,
NumberType y)
Returns key of the node at the specified location relative to the tree's top-left corner.
|
integer |
getNodeBgColor(NumberType nodeId)
Returns background color of the supplied node.
|
boolean |
getNodeBold(character nodeKey)
Getter for the NODE-BOLD attribute.
|
integer |
getNodeFgColor(NumberType nodeId)
Returns foreground color of the supplied node.
|
logical |
getNodeHasChildren(NumberType nodeId)
Returns true if the node represented by the supplied node id is allowed to have child nodes.
|
integer |
getNodeHeight()
Getter for the NODE-HEIGHT attribute.
|
integer |
getNodeLevel(character nodeKey)
Returns tree level of the specified node.
|
character |
getNodeText(character nodeKey)
Implements legacy method GET-NODE-TEXT.
|
logical |
getNodeVisibleInViewPort(character nodeKey)
The method returns
true if the specified node is visible in the current view port. |
void |
getParentNode(NumberType nodeId,
integer outParentId,
character outParentKey)
Returns the parent node of the specified node.
|
void |
getPrevSiblingNode(NumberType nodeId,
integer outSiblingId,
character outSiblingKey)
Returns the previous sibling node of the specified node.
|
java.lang.String |
getPrivateData(character nodeKey)
Getter for the PRIVATE-DATA attribute.
|
logical |
getRemoveNodeOnCollapse()
Getter for the REMOVE-NODE-ON-COLLAPSE attribute.
|
integer |
getRowHeight()
Returns row height for tree based widget.
|
integer |
getScrollNodeCount()
The attribute holds the number of scrolled nodes before firing the current trigger.
|
integer |
getScrollWheelLines()
Getter for the SCROLL-WHEEL-LINES attribute.
|
handle |
getSelectedNode()
Getter for the SELECTED-NODE attribute.
|
void |
getSelectedNodeColors(integer outBg,
integer outFg)
Returns background and foreground colors for selected nodes.
|
integer |
getSelectedNodeId()
Getter for the SELECTED-NODE-ID attribute.
|
character |
getSelectedNodeKey()
Getter for the SELECTED-NODE-KEY attribute.
|
integer |
getStyle()
Gets the STYLE attribute value.
|
integer |
getTopVisibleNodeId()
Returns node id of the top visible node.
|
handle |
getTriggerNode()
The attribute holds the node that is the target of the current trigger.
|
integer |
getVisibleNodeCount()
Getter for the VISIBLE-NODE-COUNT attribute.
|
comhandle |
hitTest(NumberType x,
NumberType y)
Get the TreeView node under mouse cursor as a node handle.
|
handle |
hitTestFwd(NumberType x,
NumberType y)
Get the TreeView node under mouse cursor as a node handle.
|
logical |
isBuildingTree()
Getter for the BUILDING-TREE attribute.
|
logical |
isCheckBoxes()
Returns
true if a check box is displayed next to each tree node
in the tree view; otherwise, false . |
logical |
isDblClickExpanding()
Getter for the DBL-CLICK-EXPANDING attribute.
|
logical |
isDragDrop()
Getter for the DRAG-DROP attribute.
|
logical |
isDragDropOtherTree()
Getter for the ALLOW-DRAG-DROP-OTHER-TREE attribute.
|
logical |
isExpandOnEnter()
Getter for the EXPAND-ON-ENTER attribute.
|
logical |
isExpandOnSingleClick()
Getter for the EXPAND-ON-SINGLE-CLICK attribute.
|
logical |
isMultiSelect(logical extended)
IS-MULTI-SELECT method.
|
logical |
isNodeExpanded(NumberType nodeId)
Returns
true when the node of the supplied id is expanded. |
logical |
isShowButtons()
Getter for the SHOW-BUTTONS attribute.
|
logical |
isTextEdit()
Getter for the TEXT-EDIT attribute.
|
integer |
nodeKeyToId(character nodeKey)
Implement legacy method NODE-KEY-TO-ID.
|
void |
scrollNodeToTop(character nodeKey)
Makes the supplied node the first visible (at the top of the view if possible) node.
|
void |
scrollVertical(NumberType lines)
Scrolls the tree view the specified number of lines.
|
void |
selectSetFirstVisibleNode(NumberType nodeId)
Makes the supplied node the first visible node (at the top of the view if possible).
|
void |
setBuildingTree(logical value)
Setter for the BUILDING-TREE attribute.
|
void |
setCheckBoxes(logical value)
Set to
true to display a check box next to each tree node
in the tree view; otherwise, false . |
void |
setDblClickExpanding(logical value)
Setter for the DBL-CLICK-EXPANDING attribute.
|
void |
setDragDrop(logical value)
Setter for the DRAG-DROP attribute.
|
void |
setDragDropOtherTree(logical value)
Setter for the ALLOW-DRAG-DROP-OTHER-TREE attribute.
|
void |
setDropHighlight(handle node)
Sets a reference to a node object that is highlighted with the system highlight color when
the cursor moves over it.
|
void |
setExpandOnEnter(logical value)
Setter for the EXPAND-ON-ENTER attribute.
|
void |
setExpandOnSingleClick(logical value)
Setter for the EXPAND-ON-SINGLE-CLICK attribute.
|
void |
setImageList(handle imgList)
Assigns an imagelist resource to the tree.
|
void |
setImageList(ImageList imgList)
Assigns an imagelist resource to the tree.
|
void |
setIndentation(NumberType value)
Setter for the INDENTATION attribute.
|
void |
setLineStyle(integer value)
Sets the LINE-STYLE attribute value.
|
void |
setMousePointerNum(integer value)
Sets the type of mouse pointer displayed when over part of an object.
|
void |
setMultiSelect(logical extended,
logical value)
SET-MULTI-SELECT method.
|
void |
setNewNodeLabel(character newLabel)
Sets the new label for the trigger node.
|
void |
setNodeBgColor(NumberType nodeId,
NumberType bgrValue)
Sets background color for the supplied node.
|
void |
setNodeBold(character nodeKey,
logical value)
Setter for the NODE-BOLD attribute.
|
void |
setNodeFgColor(NumberType nodeId,
NumberType fgrValue)
Sets foreground color for the supplied node.
|
void |
setNodeHasChildren(NumberType nodeId,
logical value)
Set the child node allowance on the node represented by the supplied node.
|
void |
setNodeHeight(NumberType value)
Setter for the NODE-HEIGHT attribute.
|
void |
setNodeText(character nodeKey,
character text)
Implements legacy method SET-NODE-TEXT.
|
void |
setPrivateData(character nodeKey,
character value)
Setter for the PRIVATE-DATA attribute.
|
void |
setRemoveNodeOnCollapse(logical value)
Setter for the REMOVE-NODE-ON-COLLAPSE attribute.
|
void |
setRowHeight(NumberType heightValue)
Sets row height for tree based widget.
|
void |
setScrollWheelLines(NumberType value)
Setter for the SCROLL-WHEEL-LINES attribute.
|
void |
setSelectedNode(handle value)
Setter for the SELECTED-NODE attribute.
|
void |
setSelectedNodeColors(NumberType bg,
NumberType fg)
Sets background and foreground colors for selected nodes.
|
void |
setSelectedNodeKey(character value)
Setter for the SELECTED-NODE-KEY attribute.
|
void |
setShowButtons(logical value)
Setter for the SHOW-BUTTONS attribute.
|
void |
setStyle(integer value)
Sets the STYLE attribute value.
|
void |
setTextEdit(logical value)
Setter for the TEXT-EDIT attribute.
|
void |
setTreeNodeIcons(NumberType nodeId,
NumberType icon,
NumberType expandIcon)
Sets leaf, collapse and expand icons for the specified node.
|
void |
startLabelEdit()
Begins a label editing operation for the current node.
|
removeNode
getFontInfo, getFontName, getFontSize, isFontBold, isFontItalic, isFontUnderline, setFontBold, setFontItalic, setFontName, setFontSize, setFontUnderline
getAllowedEffects, getDataFormat, getEffect, getOleDragMode, getOleDropMode, getOleX, getOleY, getState, isDefaultCursors, oleDrag, setAllowedEffects, setDataFormat, setDefaultCursors, setEffect, setOleDragMode, setOleDropMode, setOleX, setOleY, setState
isVisible, setVisible, setVisible
logical isTextEdit()
void setTextEdit(logical value)
value
- the attribute valueinteger getIndentation()
void setIndentation(NumberType value)
value
- the attribute valuelogical isDragDrop()
true
the tree nodes can be dragged by the end user.
Note that currently this feature is not supported..void setDragDrop(logical value)
true
the tree nodes can be dragged by the end user.
Note that currently this feature is not supported.value
- the attribute valuehandle getDraggedNode()
handle getDraggedOverNode()
integer getScrollNodeCount()
handle getDropHighlight()
void setDropHighlight(handle node)
node
- The reference to a nodehandle getSelectedNode()
TreeViewNode
.void setSelectedNode(handle value)
value
- the attribute valueinteger getSelectedNodeId()
character getSelectedNodeKey()
void setSelectedNodeKey(character value)
value
- the attribute valuehandle getFocusedNode()
TreeViewNode
.
Note that the runtime behavior is the same as for the SELECTED-NODE attribute.character getFocusedNodeKey()
handle getFocusedAndSelectedNode()
TreeViewNode
.
Note that the runtime behavior is the same as for the SELECTED-NODE attribute.character getFocusedAndSelectedNodeKey()
integer getNodeHeight()
void setNodeHeight(NumberType value)
value
- the attribute valueinteger getVisibleNodeCount()
handle getFirstVisibleNode()
integer getFirstNode()
integer getNextNode(NumberType nodeId)
nodeId
- Id of the node for to start the search.void selectSetFirstVisibleNode(NumberType nodeId)
nodeId
- the node to make the top visibleinteger getNodeFgColor(NumberType nodeId)
nodeId
- a valid node idvoid setNodeFgColor(NumberType nodeId, NumberType fgrValue)
nodeId
- a valid node idfgrValue
- the new colorinteger getNodeBgColor(NumberType nodeId)
nodeId
- a valid node idvoid setNodeBgColor(NumberType nodeId, NumberType bgrValue)
nodeId
- a valid node idbgrValue
- the new colorvoid getSelectedNodeColors(integer outBg, integer outFg)
outBg
- the out parameter that will be assigned the background color for selected nodesoutFg
- the out parameter that will be assigned the foreground color for selected nodesvoid setSelectedNodeColors(NumberType bg, NumberType fg)
bg
- the new background colorfg
- the new foreground colorvoid ensureNodeVisible(character nodeKey)
nodeKey
- the node to make the top visibledefault void createSubNode(NumberType parentNodeId, character nodeText, character nodeKey, logical hasChildren, NumberType collapseIcon, NumberType expandIcon, integer newNodeId)
parentNodeId
- Id of the parent node for the newly created node. Use 0 to create a root node.nodeText
- The node text.nodeKey
- The unique node key for the new node.hasChildren
- When set to false
the node will be created as a leaf node without any children,
use true
for nodes that may hold child nodes.collapseIcon
- Optional collapse image. Use one of the built-in image ids or an id returned by
createImage(character)
. For no image pass unknown or -1.
The built-in images are: Id Image 0 Default expanded icon. 1 Default collapsed icon. 2 Default leaf-node icon.
expandIcon
- Optional expand image. Use one of the built-in image ids or an id returned by
createImage(character)
. For no image pass unknown or -1.
The built-in images are: Id Image 0 Default expanded icon. 1 Default collapsed icon. 2 Default leaf-node icon.
newNodeId
- Will be assigned node id of the created node if the operation succeeds.void createSubNode(NumberType parentNodeId, character nodeText, character nodeKey, logical hasChildren, NumberType collapseIcon, NumberType expandIcon, character tooltip, integer newNodeId)
createImage(character)
or
one of the following fixed built-in values:
parentNodeId
- Id of the parent node for the newly created node. Use 0 to create a root node.nodeText
- The node text.nodeKey
- The unique node key for the new node.hasChildren
- When set to false
the node will be created as a leaf node without any children,
use true
for nodes that may hold child nodes.collapseIcon
- Optional collapse image index. See above for the value interpretation.expandIcon
- Optional collapse image index. See above for the value interpretation.tooltip
- The tooltip character string to be used with the new node.newNodeId
- Will be assigned node id of the created node if the operation succeeds.logical isMultiSelect(logical extended)
extended
- extended selection (TODO: find out semantics of this attribute)void setMultiSelect(logical extended, logical value)
extended
- extended selection (TODO: find out semantics of this attribute)value
- the new multiselect valuelogical isNodeExpanded(NumberType nodeId)
true
when the node of the supplied id is expanded.nodeId
- Id of the node to be checked.void expandNode(NumberType nodeId)
nodeId
- Id of the node to be expanded.void collapseNode(NumberType nodeId)
nodeId
- Id of the node to be collapsed.void clearAll()
logical isExpandOnSingleClick()
void setExpandOnSingleClick(logical value)
true
nodes will be
expanded/collapsed on single-click, when false
nodes will be expanded/collapsed on
double-click. The default is the double-click expansion.value
- the attribute valuelogical isExpandOnEnter()
void setExpandOnEnter(logical value)
true
nodes will be
expanded/collapsed on single-click, when false
nodes will be expanded/collapsed on
double-click. The default is the double-click expansion.value
- the attribute valuelogical isDblClickExpanding()
void setDblClickExpanding(logical value)
value
- the attribute value.void getFirstChildNode(NumberType nodeId, integer outChildId, character outChildKey)
nodeId
- Id of the parent node.outChildId
- Upon return will hold id of the found node, 0 if no such node found.outChildKey
- Upon return will hold key of the found node, empty string if no such node found.integer getHWND()
void getNextSiblingNode(NumberType nodeId, integer outSiblingId, character outSiblingKey)
nodeId
- Id of the node where the search should start.outSiblingId
- Upon return will hold id of the found node, 0 if no such node found.outSiblingKey
- Upon return will hold key of the found node, unknown if no such node found.void getPrevSiblingNode(NumberType nodeId, integer outSiblingId, character outSiblingKey)
nodeId
- Id of the node where the search should start.outSiblingId
- Upon return will hold id of the found node, 0 if no such node found.outSiblingKey
- Upon return will hold key of the found node, unknown if no such node found.void getParentNode(NumberType nodeId, integer outParentId, character outParentKey)
nodeId
- Id of the node where the search should start.outParentId
- Upon return will hold id of the found node, 0 if no such node found.outParentKey
- Upon return will hold key of the found node, unknown if no such node found.integer getNodeLevel(character nodeKey)
nodeKey
- Node key.void scrollNodeToTop(character nodeKey)
nodeKey
- the node to make the top visiblelogical isShowButtons()
void setShowButtons(logical value)
true
to make the node expand icons (+-) visible,
false
to make the expand icons invisible.value
- the attribute valuelogical isBuildingTree()
void setBuildingTree(logical value)
true
any model changes (nodes added or
removed) won't be reflected until the attribute is set back to false
.value
- the attribute valuevoid scrollVertical(NumberType lines)
lines
- The number of lines to scroll.integer createImage(character path)
setTreeNodeIcons(NumberType, NumberType, NumberType)
and
createSubNode(NumberType, character, character, logical, NumberType, NumberType, integer)
.
The returned integer value is the 0-based index into the local node image list.path
- The image file path. Can be an absolute name or relative. When relative, the Propath entries
will be searched.character getNodeAt(NumberType x, NumberType y)
x
- The x pixel coordinate.y
- The y pixel coordinate.logical getNodeVisibleInViewPort(character nodeKey)
true
if the specified node is visible in the current view port.nodeKey
- Node key of the node to check.void setTreeNodeIcons(NumberType nodeId, NumberType icon, NumberType expandIcon)
nodeId
- Id of the node to modify.icon
- Id of the image resource to be used as leaf icon (when the node has no children) or collapse
icon (when the node has children). The image must be first created with the
call to createImage(character)
.expandIcon
- Id of the image resource to be used as expand icon. The image must be first created with the
call to createImage(character)
.void startLabelEdit()
void clearNodesImageList()
handle findNode(NumberType nodeId)
nodeId
- Node id of the node to find.TreeViewNode
or unknown.handle findNode(character nodeKey)
nodeKey
- Node key of the node to find.TreeViewNode
or unknown.handle getTriggerNode()
character getNewNodeLabel()
void setNewNodeLabel(character newLabel)
newLabel
- The new label for the trigger nodeinteger getTopVisibleNodeId()
integer getScrollWheelLines()
void setScrollWheelLines(NumberType value)
value
- the attribute valuevoid expandAll()
void collapseAll()
void collapseAllExcept(handle node)
node
- The node to exclude from collapsing, if unknown all nodes will be collapsed.logical getNodeHasChildren(NumberType nodeId)
nodeId
- The node to query.void setNodeHasChildren(NumberType nodeId, logical value)
nodeId
- The node to modify.value
- true
to set the node to allow to have child nodes, false
otherwise.logical getRemoveNodeOnCollapse()
void setRemoveNodeOnCollapse(logical value)
true
collapsing a node will
cause all the node's children to be deleted.value
- the attribute valueboolean getNodeBold(character nodeKey)
nodeKey
- the node keyvoid setNodeBold(character nodeKey, logical value)
nodeKey
- the node keyvalue
- the attribute valuecharacter getNodeText(character nodeKey)
nodeKey
- Key of the node for which the text should be returned.void setNodeText(character nodeKey, character text)
nodeKey
- Key of the node for which the text should be set.text
- The text to set.logical isDragDropOtherTree()
void setDragDropOtherTree(logical value)
value
- the attribute valueinteger createMergedImage(integer imgIndex, character imgFile)
imgIndex
- Index of the target image.imgFile
- Image file of the source image.integer nodeKeyToId(character nodeKey)
nodeKey
- A node key.handle getImageList()
void setImageList(handle imgList)
imgList
- The image list to assign.void setImageList(ImageList imgList)
imgList
- The image list to assign.handle hitTestFwd(NumberType x, NumberType y)
x
- Mouse cursor x position.y
- Mouse cursor y position.comhandle hitTest(NumberType x, NumberType y)
x
- Mouse cursor x position.y
- Mouse cursor y position.integer getRowHeight()
void setRowHeight(NumberType heightValue)
heightValue
- the new row height vale in pixels.void deleteChildNodes(NumberType nodeId)
nodeId
- the node IDjava.lang.String getPrivateData(character nodeKey)
nodeKey
- the node key valuevoid setPrivateData(character nodeKey, character value)
nodeKey
- the node key valuevalue
- new attribute valueinteger getMousePointerNum()
void setMousePointerNum(integer value)
value
- the new mouse pointer valueinteger getLineStyle()
void setLineStyle(integer value)
value
- the new line style valueinteger getStyle()
void setStyle(integer value)
value
- the new line style valuelogical isCheckBoxes()
true
if a check box is displayed next to each tree node
in the tree view; otherwise, false
. The default is false
.void setCheckBoxes(logical value)
true
to display a check box next to each tree node
in the tree view; otherwise, false
. The default is false
.