public abstract class TreeConfig extends WidgetConfigExt
Modifier and Type | Class and Description |
---|---|
static class |
TreeConfig.StockImage
The enum defines stock tree view/list images.
|
Modifier and Type | Field and Description |
---|---|
int |
assignFlags
Bit field to keep track of field assignments
|
private static int |
ATTR_MASK_CHECK_BOXES
Bitwise mask to mark SHOW CHECK BOXES attribute usage.
|
private static int |
ATTR_MASK_DRAG_DROP
Bitwise mask to mark DRAG_DROP attribute usage.
|
private static int |
ATTR_MASK_EXPAND_DOUBLE_CLICK
Bitwise mask to mark EXPAND ON DOUBLE CLICK attribute usage.
|
private static int |
ATTR_MASK_EXPAND_ENTER
Bitwise mask to mark EXPAND ON ENTER attribute usage.
|
private static int |
ATTR_MASK_EXPAND_SINGLE_CLICK
Bitwise mask to mark EXPAND ON SINGLE CLICK attribute usage.
|
private static int |
ATTR_MASK_REM_NODE_COLLAPSE
Bitwise mask to mark REMOVE NODE ON COLLAPSE attribute usage.
|
private static int |
ATTR_MASK_SHOW_EXPAND_ICON
Bitwise mask to mark SHOW EXPAND ICON attribute usage.
|
private static int |
ATTR_MASK_SORTED
Bitwise mask to mark SORTED attribute usage.
|
private static int |
ATTR_MASK_TEXT_EDIT
Bitwise mask to mark TEXT EDIT attribute usage.
|
boolean |
checkBoxes
Check boxes flag
|
boolean |
dragDrop
Flag to toggle drag drop
|
int |
draggedNode
The currently dragged node.
|
int |
draggedOverNode
The currently node over which the dragging is made.
|
int |
dropHighlightNodeId
Node id of the currently drop highlight node
|
int |
ensureVisibleNodeId
Node id of the node to ensure visible
|
boolean |
expandOnDoubleClick
Flag to toggle expand on double click
|
boolean |
expandOnEnter
Flag to toggle expand on ENTER
|
boolean |
expandOnSingleClick
Flag to toggle expand on single click
|
int |
imageListId
Id of the image list assigned to the tree
|
int |
indentation
Indentation pixel size
|
java.lang.String |
newLabel
The new label of the trigger node.
|
int |
nodeHeight
Node pixel height
|
java.util.List<java.lang.Integer> |
nodeImageList
List of global image ids for all node images, indices to this
array are returned by CreateImage and CreateIcon OCX calls
|
java.util.List<TreeNodeEntry> |
nodes
The flat list of tree nodes
|
boolean |
removeNodeOnCollapse
Remove node on collapse flag
|
int |
scrollNodeCount
The number of scrolled node count before firing the CHANGE-TOP-VISIBLE-NODE.
|
int |
selectedNodeBackgroundColor
Background color for the selected node
|
int |
selectedNodeForegroundColor
Foreground color for the selected node
|
int |
selectedNodeId
Node id of the currently selected node
|
boolean |
showExpandIcon
Flag to toggle expand node icons visibility
|
boolean |
sorted
Flag to toggle sorting
|
boolean |
textEdit
Flag to toggle node text editing
|
int |
topNode
The current top node ID or -1 if tree is empty
|
int |
triggerNode
The target node of the current trigger.
|
CC_ARROW, CC_ARROW_HOURGLASS, CC_ARROW_QUESTION, CC_CROSS, CC_CUSTOM, CC_DEFAULT, CC_HOURGLASS, CC_IBEAM, CC_ICON, CC_NO_DROP, CC_SIZE, CC_SIZE_ALL, CC_SIZE_EW, CC_SIZE_NESW, CC_SIZE_NS, CC_SIZE_NWSE, CC_UP_ARROW, mouseIcon, mousePointer
oleAllowedEffects, oleDataFormat, oleDefaultCursors, oleDragMode, oleDropMode, oleEffect, oleState, oleX, oleY
mouseButton, mouseShift, mouseX, mouseY
attrSpace, autoResize, clabel, dataType, dropTarget, forceLabel, help, index, INVALID_SELECTION, label, labels, possibleSideLabel, selectionActive, selectionEnd, selectionStart, sideLabelId, untranslatedLabel
align, bgcolor, bgcolorRgb, captionFontSize, clientColumn, clientHeightChars, clientHeightPixels, clientRow, clientWidthChars, clientWidthPixels, clientX, clientY, column, dcolor, dynamic, fgcolor, fgcolorRgb, fixedHeight, fixedWidth, font, fontChanged, fontName, fontSize, fontStyle, frameColumnOffset, frameRowOffset, frameXOffset, frameYOffset, heightChars, heightPixels, initColumn, initHeightChars, initRow, initWidthChars, initX, initY, INV_COORD, locationChanged, movable, name, parentId, pfcolor, resizable, row, selected, sysbgcolor, sysfgcolor, systemParentId, tabStop, title, titleDColor, titleFont, tooltip, widgetPlaced, widthChars, widthPixels, x, y
cfgClass, contextHelpId, disableRedraw, enabled, frameDefValue, frameId, header, hidden, id, manualHightlight, menuKey, menuMouse, modified, popupMenuId, realized, selectable, state, visible, wasRealized, zorder
Modifier | Constructor and Description |
---|---|
|
TreeConfig()
Default constructor.
|
protected |
TreeConfig(int id)
Create a new config and associate it with the given widget.
|
protected |
TreeConfig(WidgetId id)
Create a new config and associate it with the given widget.
|
Modifier and Type | Method and Description |
---|---|
void |
applyConfig(WidgetConfig config)
Set new values from the provided configuration instance.
|
protected abstract java.util.function.Supplier<TreeNodeEntry> |
createNodeEntry()
Create node entry instance.
|
int |
getSelectedNodeBackgroundColor()
Returns the assigned selection background color.
|
int |
getSelectedNodeForegroundColor()
Returns the assigned selection foreground color.
|
private void |
init()
Initialize this config.
|
boolean |
isSelectedNodeBackgroundAssigned()
Returns
true when setSelectedNodeBackgroundColor(int) is called at least once. |
boolean |
isSelectedNodeForegroundAssigned()
Returns
true when setSelectedNodeForegroundColor(int) is called at least once. |
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
setSelectedNodeBackgroundColor(int selectedNodeBg)
Assigns the selection background color value.
|
void |
setSelectedNodeForegroundColor(int selectedNodeFg)
Assigns the selection foreground color value.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
setDynamicFormat
getConfigManager, getDynamicColumnLabel, getDynamicFormat, getDynamicHelp, getDynamicLabel, getDynamicUntranslatedLabel, markFieldsDirty, setDynamicHeader, setDynamicHelp, setDynamicLabel, setDynamicLabels, setDynamicUntranslatedLabel, toString
public int assignFlags
public boolean dragDrop
public int draggedNode
public int draggedOverNode
public int dropHighlightNodeId
public int ensureVisibleNodeId
public boolean expandOnDoubleClick
public boolean expandOnEnter
public boolean expandOnSingleClick
public int imageListId
public int indentation
public java.lang.String newLabel
public int nodeHeight
public java.util.List<java.lang.Integer> nodeImageList
public java.util.List<TreeNodeEntry> nodes
public boolean removeNodeOnCollapse
public int scrollNodeCount
public int selectedNodeBackgroundColor
public int selectedNodeForegroundColor
public int selectedNodeId
public boolean showExpandIcon
public boolean checkBoxes
public boolean sorted
public boolean textEdit
public int topNode
public int triggerNode
private static final int ATTR_MASK_DRAG_DROP
private static final int ATTR_MASK_EXPAND_DOUBLE_CLICK
private static final int ATTR_MASK_EXPAND_ENTER
private static final int ATTR_MASK_EXPAND_SINGLE_CLICK
private static final int ATTR_MASK_REM_NODE_COLLAPSE
private static final int ATTR_MASK_SHOW_EXPAND_ICON
private static final int ATTR_MASK_SORTED
private static final int ATTR_MASK_TEXT_EDIT
private static final int ATTR_MASK_CHECK_BOXES
public TreeConfig()
protected TreeConfig(int id)
id
- The ID of the widget to which this configuration belongs.protected TreeConfig(WidgetId id)
id
- The ID of the widget to which this configuration belongs.public void applyConfig(WidgetConfig config)
applyConfig
in class WidgetConfigExt
config
- The instance from which to take values.public int getSelectedNodeBackgroundColor()
public int getSelectedNodeForegroundColor()
public boolean isSelectedNodeBackgroundAssigned()
true
when setSelectedNodeBackgroundColor(int)
is called at least once.public boolean isSelectedNodeForegroundAssigned()
true
when setSelectedNodeForegroundColor(int)
is called at least once.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class WidgetConfigExt
in
- The input source from which fields will be restored.java.io.IOException
- In case of I/O errors.java.lang.ClassNotFoundException
- If payload can't be instantiated.public void setSelectedNodeBackgroundColor(int selectedNodeBg)
selectedNodeBg
- Background color to assign.public void setSelectedNodeForegroundColor(int selectedNodeFg)
selectedNodeFg
- Foreground color to assign.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class WidgetConfigExt
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.protected abstract java.util.function.Supplier<TreeNodeEntry> createNodeEntry()
private void init()