|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jidesoft.treemap.AbstractTreeMapModel<AbstractTreeMapNode>
com.jidesoft.treemap.DefaultTreeMapModel<N>
N - the type of nodespublic class DefaultTreeMapModel<N extends AbstractTreeMapNode>
Default implementation of a TreeMapModel. This class provides an easy way to integration with Swing's TableModel.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.jidesoft.treemap.AbstractTreeMapModel |
|---|
AbstractTreeMapModel.Worker |
| Field Summary | |
|---|---|
protected TableModel |
_tableModel
|
| Fields inherited from class com.jidesoft.treemap.AbstractTreeMapModel |
|---|
_settings, PROPERTY_HIGHLIGHTING, PROPERTY_PROBING, PROPERTY_SELECTION |
| Fields inherited from interface com.jidesoft.treemap.TreeMapModel |
|---|
PROPERTY_PROGRESS |
| Constructor Summary | |
|---|---|
DefaultTreeMapModel(TableModel tableModel)
|
|
| Method Summary | |
|---|---|
protected void |
addChild(AbstractTreeMapNode parent,
AbstractTreeMapNode child)
|
protected void |
addChild(AbstractTreeMapNode parent,
List<Object> path,
List<TreeMapField> groupBy,
List<TreeMapField> childrenGroupBy,
int row)
Add a child according to its path in the hierarchy. |
MutableColorMap |
createDefaultColorMap(TreeMapField field)
|
protected AbstractTreeMapNode |
createLeafNode(int row)
|
protected AbstractTreeMapNode |
createParentNode(Object name,
TreeMapField<AbstractTreeMapNode> groupByField,
TreeMapField<AbstractTreeMapNode> childrenGroupByField)
|
protected AbstractTreeMapNode |
createRootNode(TreeMapField<AbstractTreeMapNode> childrenGroupByField)
|
protected TreeMapField |
createTreeMapField(int columnIndex)
|
protected boolean |
doGroupBy(AbstractTreeMapNode parent,
TreeMapWorker worker)
|
protected AbstractTreeMapNode |
getChild(AbstractTreeMapNode parent,
Object name)
|
int |
getChildCount(AbstractTreeMapNode node)
Returns the number of children of a given node. |
Iterable<AbstractTreeMapNode> |
getChildren(AbstractTreeMapNode parent)
Returns an iterator of the children of the given node. |
Color |
getColor(AbstractTreeMapNode node)
Gets the color of the given node. |
Class<?> |
getColumnClass(int columnIndex)
Returns the most specific superclass for all the cell values in the column. |
int |
getColumnCount()
Returns the number of columns in the model. |
String |
getColumnName(int columnIndex)
Returns the name of the column at columnIndex. |
Color |
getCushionColor(AbstractTreeMapNode node)
Returns the color of the cushion. |
BufferedImage |
getCushionImage(AbstractTreeMapNode node)
Returns the image used for painting the cushion. |
String |
getLabelName(AbstractTreeMapNode node)
Gets the label of the given node. |
Double |
getNumericMax(TreeMapField columnIndex)
Gets the maximum value contained in the specified column. |
Double |
getNumericMin(TreeMapField columnIndex)
Gets the minimum value contained in the specified column. |
AbstractTreeMapNode |
getParent(AbstractTreeMapNode node)
Gets the parent node of the given node. |
TableModel |
getTableModel()
|
TreeMapField |
getTreeMapField(int columnIndex)
Gets the field corresponding to the specified column index. |
TreeMapField |
getTreeMapField(String columnName)
Gets the field corresponding to the specified column name. |
Object |
getValueAt(AbstractTreeMapNode node,
int columnIndex)
Returns the value for the cell at columnIndex and of
node. |
boolean |
isEveryValueUnique(TreeMapField<AbstractTreeMapNode> field)
Indicates whether all the values in the given field are unique. |
boolean |
isRoot(AbstractTreeMapNode node)
Tells whether the given node is the root node or not. |
void |
setNumericMax(TreeMapField columnIndex,
double max)
Sets the maximum value contained in the specified column. |
void |
setNumericMin(TreeMapField columnIndex,
double min)
Sets the minimum value contained in the specified column. |
void |
setTableModel(TableModel tableModel)
Change the underlying TableModel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jidesoft.treemap.TreeMapModel |
|---|
setColor |
| Field Detail |
|---|
protected TableModel _tableModel
| Constructor Detail |
|---|
public DefaultTreeMapModel(TableModel tableModel)
| Method Detail |
|---|
public void setTableModel(TableModel tableModel)
tableModel - the new TableModelpublic String getLabelName(AbstractTreeMapNode node)
node - the node.
public Color getColor(AbstractTreeMapNode node)
node - the node.
public AbstractTreeMapNode getParent(AbstractTreeMapNode node)
node - the node
public boolean isRoot(AbstractTreeMapNode node)
node - the node
public int getChildCount(AbstractTreeMapNode node)
node - the parent node.
public Iterable<AbstractTreeMapNode> getChildren(AbstractTreeMapNode parent)
parent - the parent node
public BufferedImage getCushionImage(AbstractTreeMapNode node)
node - the node
public Color getCushionColor(AbstractTreeMapNode node)
node - the node
protected AbstractTreeMapNode createRootNode(TreeMapField<AbstractTreeMapNode> childrenGroupByField)
createRootNode in class AbstractTreeMapModel<AbstractTreeMapNode>protected AbstractTreeMapNode createLeafNode(int row)
protected AbstractTreeMapNode createParentNode(Object name,
TreeMapField<AbstractTreeMapNode> groupByField,
TreeMapField<AbstractTreeMapNode> childrenGroupByField)
protected AbstractTreeMapNode getChild(AbstractTreeMapNode parent,
Object name)
protected void addChild(AbstractTreeMapNode parent,
AbstractTreeMapNode child)
protected boolean doGroupBy(AbstractTreeMapNode parent,
TreeMapWorker worker)
doGroupBy in class AbstractTreeMapModel<AbstractTreeMapNode>
protected void addChild(AbstractTreeMapNode parent,
List<Object> path,
List<TreeMapField> groupBy,
List<TreeMapField> childrenGroupBy,
int row)
parent - the parent nodepath - the pathrow - the row of the childpublic TreeMapField getTreeMapField(int columnIndex)
TreeMapModel
columnIndex - the index of the column.
protected TreeMapField createTreeMapField(int columnIndex)
public TreeMapField getTreeMapField(String columnName)
TreeMapModel
columnName - the name of the column.
public TableModel getTableModel()
public int getColumnCount()
TreeMapModel
public String getColumnName(int columnIndex)
TreeMapModelcolumnIndex. Note: this name does
not need to be unique; two columns in a table can have the same name.
columnIndex - the index of the column
public Class<?> getColumnClass(int columnIndex)
TreeMapModel
columnIndex - the index of the column
public Object getValueAt(AbstractTreeMapNode node,
int columnIndex)
TreeMapModelcolumnIndex and of
node.
node - the node whose value is to be queriedcolumnIndex - the column whose value is to be queried
public boolean isEveryValueUnique(TreeMapField<AbstractTreeMapNode> field)
TreeMapModel
field - the field whose whose values are to be queried
public Double getNumericMax(TreeMapField columnIndex)
TreeMapModel
columnIndex - the index of the column.
public Double getNumericMin(TreeMapField columnIndex)
TreeMapModel
columnIndex - the index of the column.
public void setNumericMax(TreeMapField columnIndex,
double max)
TreeMapModel
columnIndex - the index of the column.max - the maximum value.
public void setNumericMin(TreeMapField columnIndex,
double min)
TreeMapModel
columnIndex - the index of the column.min - the minimum value.public MutableColorMap createDefaultColorMap(TreeMapField field)
|
JIDE 3.5.15 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||