public abstract class TreeNodeEntry extends java.lang.Object implements Printable, java.io.Externalizable
Modifier and Type | Class and Description |
---|---|
static class |
TreeNodeEntry.EditorMode
Editor modes
|
Modifier and Type | Field and Description |
---|---|
boolean |
checked
Checked flag
|
TreeNodeEntry.EditorMode |
editorMode
Indicates if the node label editor is active, activating or inactive
|
boolean |
expanded
Expanded flag
|
int |
expandIconId
Expand icon image id
|
boolean |
hasChildren
Leaf or non-leaf node flag
|
int |
iconId
Icon image id
|
int |
nodeBgColor
Node background color
|
int |
nodeFgColor
Node foreground color
|
int |
nodeId
Mandatory node id.
|
private static byte |
NULL
Cell value types used for cell value serialization
|
private static byte |
NUMBER |
private static byte |
OBJECT |
int |
parentId
Node parent id.
|
int |
selectedIconId
The icon image id for the selected node
|
private static byte |
TEXT |
java.lang.String |
tooltip
Node tooltip
|
Constructor and Description |
---|
TreeNodeEntry()
Constructor.
|
TreeNodeEntry(int nodeId,
int parentId)
Constructor for the
TreeViewNode instances. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
|
java.lang.Object |
getValue()
Returns the first cell value.
|
abstract java.lang.Object |
getValue(int cellIndex)
Returns the cell value at the specified index.
|
int |
hashCode()
Returns a hash code value for the object.
|
void |
print(PrintHelper printer)
Add class-specific fields to the helper.
|
protected static java.lang.Object |
readCell(java.io.ObjectInput in)
Read cell value
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
abstract void |
setValue(int cellIndex,
java.lang.Object cellValue)
Sets the cell value at the specified index.
|
protected static void |
writeCell(java.io.ObjectOutput out,
java.lang.Object value)
Write cell value.
|
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
private static final byte NULL
private static final byte TEXT
private static final byte NUMBER
private static final byte OBJECT
public int nodeId
public int parentId
public boolean expanded
public TreeNodeEntry.EditorMode editorMode
public int nodeBgColor
public int nodeFgColor
public int expandIconId
public int iconId
public int selectedIconId
public boolean hasChildren
public java.lang.String tooltip
public boolean checked
public TreeNodeEntry()
public TreeNodeEntry(int nodeId, int parentId)
TreeViewNode
instances.nodeId
- Node id.parentId
- Parent node id. Use unknown when the node has no parent.public java.lang.Object getValue()
public abstract java.lang.Object getValue(int cellIndex)
cellIndex
- Cell index.java.lang.IndexOutOfBoundsException
- if the index is out of rangepublic abstract void setValue(int cellIndex, java.lang.Object cellValue)
cellIndex
- The given cell indexcellValue
- The given cell valuepublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The other object to test.true
if this object is equals to the argument; false
otherwise.public int hashCode()
HashMap
.hashCode
in class java.lang.Object
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
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 writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.protected static void writeCell(java.io.ObjectOutput out, java.lang.Object value) throws java.io.IOException
out
- output streamvalue
- value to be writtenjava.io.IOException
protected static java.lang.Object readCell(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
in
- input streamjava.io.IOException
java.lang.ClassNotFoundException
public void print(PrintHelper printer)