Documentation of 'org.jdesktop.swingx.util.ComponentTreeTableModel' Java class
ComponentTreeTableModel
org.jdesktop.swingx.util

Class ComponentTreeTableModel

  • All Implemented Interfaces:
    javax.swing.tree.TreeModel, TreeTableModel


    public class ComponentTreeTableModel
    extends AbstractTreeTableModel
    A static snapshot of a container hierarchy. NOTE: does not listen to any property changes of contained components - cell updates are arbitrary on repaint only!
    • Constructor Detail

      • ComponentTreeTableModel

        public ComponentTreeTableModel(java.awt.Container root)
    • Method Detail

      • setRoot

        public void setRoot(java.awt.Container root)
      • getChild

        public java.lang.Object getChild(java.lang.Object parent,
                                         int index)
      • getChildCount

        public int getChildCount(java.lang.Object parent)
      • getIndexOfChild

        public int getIndexOfChild(java.lang.Object parent,
                                   java.lang.Object child)
      • isLeaf

        public boolean isLeaf(java.lang.Object node)
        Description copied from class: AbstractTreeTableModel
        Returns true if node is a leaf.
        Specified by:
        isLeaf in interface javax.swing.tree.TreeModel
        Overrides:
        isLeaf in class AbstractTreeTableModel
        Parameters:
        node - a node in the tree, obtained from this data source
        Returns:
        true if node is a leaf
      • convertValueToText

        public java.lang.String convertValueToText(java.lang.Object node)
      • getColumnClass

        public java.lang.Class<?> getColumnClass(int column)
        Description copied from class: AbstractTreeTableModel
        Returns the most specific superclass for all the cell values in the column. This is used by the JXTreeTable to set up a default renderer and editor for the column.
        Specified by:
        getColumnClass in interface TreeTableModel
        Overrides:
        getColumnClass in class AbstractTreeTableModel
        Parameters:
        column - the index of the column
        Returns:
        the common ancestor class of the object values in the model.
        See Also:
        TableModel.getColumnClass(int)
      • getColumnCount

        public int getColumnCount()
        Description copied from interface: TreeTableModel
        Returns the number of columns in the model. A JXTreeTable uses this method to determine how many columns it should create and display by default.
        Returns:
        the number of columns in the model
        See Also:
        TableModel.getColumnCount()
      • getColumnName

        public java.lang.String getColumnName(int column)
        Description copied from class: AbstractTreeTableModel
        Returns the name of the column at columnIndex. This is used to initialize the table's column header name. Note: this name does not need to be unique; two columns in a table can have the same name.
        Specified by:
        getColumnName in interface TreeTableModel
        Overrides:
        getColumnName in class AbstractTreeTableModel
        Parameters:
        column - the index of the column
        Returns:
        the name of the column
        See Also:
        TableModel.getColumnName(int)
      • getValueAt

        public java.lang.Object getValueAt(java.lang.Object node,
                                           int column)
        Description copied from interface: TreeTableModel
        Returns the value for the node at columnIndex. The node must be managed by this model. Unamanaged nodes should throw an IllegalArgumentException.
        Parameters:
        node - the node whose value is to be queried
        column - the column whose value is to be queried
        Returns:
        the value Object at the specified cell
        See Also:
        TreeTableModel.setValueAt(java.lang.Object, java.lang.Object, int), TableModel.getValueAt(int, int)

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.