|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.swing.control.attributetree.AttributeTreeModel
The TableModel for the AttributeTree
| Constructor Summary | |
AttributeTreeModel(SwingAttributeTree tree)
Constructor |
|
| Method Summary | |
void |
addTableModelListener(javax.swing.event.TableModelListener l)
|
void |
allowEditing(boolean b)
Enables/disables the editing of fields that are usually not editable |
void |
attributesChanged(AttributableOnSetEvent attributableOnSetEvent)
Invoked when an attribute in an AttributableOnSet object
has changed. |
protected void |
expandPath(AttributeTreeNode node)
Expands all nodes on the path to the given node |
AttributableOnSet |
getAttributableOnSet()
Returns the AttributableOnSet currently loaded into the
table |
java.util.List |
getAttributePaths(boolean ignoreLeafs)
Returns all paths of the current attribute set |
java.lang.Class |
getColumnClass(int columnIndex)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int columnIndex)
|
protected AttributeSet |
getCurrentAttributeSet()
Returns the current AttributeSet |
java.util.Vector |
getLeafExpansions()
Returns all expanded nodes that have no expanded child nodes |
AttributeTreeNode |
getNodeByPath(java.lang.String path)
Returns the node with the given path |
java.lang.String |
getNodePath(AttributeTreeNode node)
Returns the path to the given node. |
java.util.Collection |
getRealPaths(java.lang.String shortPath)
Returns the real paths the given short path (retrieved by node.getPathName()) is referring to. |
AttributeTreeNode |
getRoot()
Returns the root node of the tree structure |
protected AttributeTreeNode |
getRow(AttributeTreeNode node,
int row)
Returns the AttributeTreeNode representing the given table
row relative to the given node. |
AttributeTreeNode |
getRow(int row)
Returns the AttributeTreeNode representing the given table
row. |
int |
getRowCount()
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
|
protected boolean |
isExpanded(int row)
Returns true, if the node at the given row is expanded |
boolean |
isMutable(java.lang.String pathName)
Checks, if the attribute described by the given path name is mutable or not. ! |
boolean |
isUndefined(int row,
int col)
Returns true, if the attribute at the given row and column is in a undefined state when editing a multiselection. |
void |
rebuildTree()
Rebuilds the tree that is displayed in this table |
void |
refreshTree()
Refreshed the information in the tree by reloading it from the current AttributableOnSet |
void |
removeTableModelListener(javax.swing.event.TableModelListener l)
|
void |
setAttributableOnSet(AttributableOnSet attributable)
Sets the AttributableOnSet to be edited in this table |
void |
setExpanded(int row,
boolean expanded)
Expands/collapse the node at the given row |
void |
setExpandedAll(int row,
boolean expanded)
Set the expanded state of all nodes in the subtree under the node at the given row. |
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
|
void |
updateStaticValues()
Updates the static values of the nodes like the visible state or the level |
void |
updateTree()
Updates the values in the tree by reloading the attributes from the AttributableOnSet |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AttributeTreeModel(SwingAttributeTree tree)
tree - The tree this model belongs to| Method Detail |
public int getRowCount()
getRowCount in interface javax.swing.table.TableModelpublic int getColumnCount()
getColumnCount in interface javax.swing.table.TableModelpublic java.lang.String getColumnName(int columnIndex)
getColumnName in interface javax.swing.table.TableModelpublic java.lang.Class getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModel
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModelpublic AttributeTreeNode getRow(int row)
AttributeTreeNode representing the given table
row.
row - The row to retrieve the node for
AttributeTreeNode representing the
given table row.
protected AttributeTreeNode getRow(AttributeTreeNode node,
int row)
AttributeTreeNode representing the given table
row relative to the given node.
node - The node that rhe relative row number is referring torow - The row to retrieve the node for
AttributeTreeNode representing the
given table row.
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
getValueAt in interface javax.swing.table.TableModel
public void setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelpublic void addTableModelListener(javax.swing.event.TableModelListener l)
addTableModelListener in interface javax.swing.table.TableModelpublic void removeTableModelListener(javax.swing.event.TableModelListener l)
removeTableModelListener in interface javax.swing.table.TableModelpublic void rebuildTree()
public void updateTree()
AttributableOnSet
public boolean isMutable(java.lang.String pathName)
pathName - The path name of the attribute (type root might be removed)
public void setAttributableOnSet(AttributableOnSet attributable)
attributable - the AttributableOnSet to be edited in this tablepublic AttributableOnSet getAttributableOnSet()
AttributableOnSet currently loaded into the
table
AttributableOnSet currently loaded into the
tableprotected AttributeSet getCurrentAttributeSet()
public void refreshTree()
public void attributesChanged(AttributableOnSetEvent attributableOnSetEvent)
AttributableOnSetListenerAttributableOnSet object
has changed.
attributesChanged in interface AttributableOnSetListenerattributableOnSetEvent - the event carrying information.public void allowEditing(boolean b)
b - True to enable editingpublic java.util.Vector getLeafExpansions()
public AttributeTreeNode getNodeByPath(java.lang.String path)
path - The path of the node
public void updateStaticValues()
protected boolean isExpanded(int row)
row - The row to check
public void setExpanded(int row,
boolean expanded)
row - The row to expand/collapseexpanded - True to expand, false to collapse
public void setExpandedAll(int row,
boolean expanded)
row - The row to expand/collapseexpanded - The new stateprotected void expandPath(AttributeTreeNode node)
node - The node which defines the end of the path to expandpublic java.lang.String getNodePath(AttributeTreeNode node)
node - The node to retrieve the path for
public boolean isUndefined(int row,
int col)
row - The row of the attribute to checkcol - The column of the attribute to check
public AttributeTreeNode getRoot()
public java.util.List getAttributePaths(boolean ignoreLeafs)
ignoreLeafs - true, to ignore leafs
public java.util.Collection getRealPaths(java.lang.String shortPath)
shortPath - The path name retrieved by AttributeTreeNode.getPathName()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||