public class TreeListNodeResource extends TreeNodeResource implements TreeListNode
Modifier and Type | Field and Description |
---|---|
protected java.util.List<ColorRgb> |
cellBGColors
Cell custom background colors
|
protected java.util.List<ColorRgb> |
cellFGColors
Cell custom text colors
|
java.util.List<java.lang.Object> |
cellValues
Cell values for this node entry.
|
bold, checked, key, nodeId, nodes, parent, tag, tree
instProc
Constructor and Description |
---|
TreeListNodeResource(TreeWidgetBase treeList,
int nodeId,
java.lang.String key,
java.lang.String text,
TreeNodeResource parent)
Constructor.
|
TreeListNodeResource(TreeWidgetBase treeList,
int nodeId,
java.lang.String key,
TreeNodeResource parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getBgColor()
Returns the node's background color, if it was previously set with
setBgColor(int) . |
<T> T |
getCellValue(int colIndex,
java.util.function.Function<TreeNodeResource,java.util.List<T>> getValues)
Helper method to retrieve indexed field values, like cell colors and values.
|
int |
getFgColor()
Returns the node's foreground color.
|
character |
getNodeText()
Getter for the NODE-TEXT attribute.
|
protected TreeNodeEntry |
saveToEntry()
The method serializes the node state into new config entry instance.
|
void |
setBgColor(int bgColor)
Sets the node's background color.
|
void |
setFgColor(int fgColor)
Sets the node's foreground color.
|
void |
setNodeText(character value)
Setter for the NODE-TEXT attribute.
|
_dynamic, _getHasChildren, _getNodeId, _getNodeKey, _getNodeLevel, _getNodes, _getNodes, _getParent, _isNodeExpanded, _removeCollection, _setExpandNodeIcon, _setHasChildren, _setNodeExpanded, _setNodeIcon, _setSelectedNodeIcon, _setTooltip, delete, dynamic, ensureVisible, getChildNode, getChildren, getEditorMode, getExpandNodeIcon, getFirstSiblingNode, getFullPath, getLastSiblingNode, getNextNode, getNodeIcon, getNodeId, getNodeIndex, getNodeKey, getNodeParent, getNodes, getParentNode, getPreviousNode, getSelectedNodeIcon, getTag, getTreeNodeIndex, getTreeNodeValue, isBold, isChecked, isNodeExpanded, isSelected, isVisible, loadFromEntry, print, resourceDelete, saveToEntry, setBold, setChecked, setChecked, setEditorMode, setExpandNodeIcon, setExpandNodeIcon, setNodeExpanded, setNodeIcon, setNodeIcon, setNodeKey, setParentNode, setSelected, setSelectedNodeIcon, setSelectedNodeIcon, setTag, setTreeNodeValue, valid
doDelete, getResourceType, id, id, implicitDeletion, incrementTrigger, instantiatingProcedure, invalidAttribute, processResource, readOnlyError, readOnlyError, registerResource, setInstantiatingProcedure, toString, type, unableToAssignUnknown, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
ensureVisible, getChildNode, getChildren, getEditorMode, getExpandNodeIcon, getFirstSiblingNode, getFullPath, getLastSiblingNode, getNextNode, getNodeIcon, getNodeId, getNodeIndex, getNodeKey, getNodeParent, getParentNode, getPreviousNode, getSelectedNodeIcon, getTag, getTreeNodeIndex, getTreeNodeValue, isBold, isNodeExpanded, isSelected, isVisible, setBold, setEditorMode, setExpandNodeIcon, setExpandNodeIcon, setNodeExpanded, setNodeIcon, setNodeIcon, setNodeKey, setParentNode, setSelected, setSelectedNodeIcon, setSelectedNodeIcon, setTag, setTreeNodeValue
id, id, unknown, valid
isChecked, setChecked, setChecked
public final java.util.List<java.lang.Object> cellValues
protected final java.util.List<ColorRgb> cellBGColors
protected final java.util.List<ColorRgb> cellFGColors
public TreeListNodeResource(TreeWidgetBase treeList, int nodeId, java.lang.String key, java.lang.String text, TreeNodeResource parent)
treeList
- Owning tree list.nodeId
- Node id.key
- Node key.text
- Node text.parent
- Node parent.public TreeListNodeResource(TreeWidgetBase treeList, int nodeId, java.lang.String key, TreeNodeResource parent)
treeList
- Owning tree list.nodeId
- Node id.key
- Node key.parent
- Node parent.public int getBgColor()
setBgColor(int)
.
Until the widget is realized the method returns undefined value. The returned color
value is compatible with the P4GL color binary format, i.e. BGR
encoding.getBgColor
in class TreeNodeResource
public final <T> T getCellValue(int colIndex, java.util.function.Function<TreeNodeResource,java.util.List<T>> getValues)
T
- the value typecolIndex
- the cell indexgetValues
- the procedure to retrieve the value array from the nodepublic int getFgColor()
getFgColor
in class TreeNodeResource
public character getNodeText()
getNodeText
in interface TreeNodeFace
getNodeText
in class TreeNodeResource
public void setBgColor(int bgColor)
setBgColor
in class TreeNodeResource
bgColor
- New background color.public void setFgColor(int fgColor)
setFgColor
in class TreeNodeResource
fgColor
- New foreground color.public void setNodeText(character value)
setNodeText
in interface TreeNodeFace
setNodeText
in class TreeNodeResource
value
- the new attribute value.protected TreeNodeEntry saveToEntry()
saveToEntry
in class TreeNodeResource
TreeListNodeEntry
.