Class AbstractTreeTableModel

java.lang.Object
com.portal.ctrl.AbstractTreeTableModel
All Implemented Interfaces:
TreeTableModel, TreeModel
Direct Known Subclasses:
PSubscriberPrefsServiceModel

public abstract class AbstractTreeTableModel extends Object implements TreeTableModel
An abstract implementation of the TreeTableModel interface, handling the list of listeners. original AbstractTreeTableModel component taken from: Sun Microsystems, Inc. Copyright 1997, 1998 by Sun Microsystems, Inc.
Version:
%version: 1 % %date_modified: Mon Aug 02 20:01:45 1999 %
Author:
lruslen
  • Field Details

    • root

      protected Object root
      Root of tree model.
    • listenerList

      protected EventListenerList listenerList
      Listeners that have registered interest for notification on this event type.
  • Constructor Details

    • AbstractTreeTableModel

      public AbstractTreeTableModel(Object root)
      Creates a new AbstractTreeTableModel.
      Type Parameters:
      em - root root of tree model
  • Method Details

    • getRoot

      public Object getRoot()
      Default implmentation for method in the TreeModel interface.
      Specified by:
      getRoot in interface TreeModel
    • isLeaf

      public boolean isLeaf(Object node)
      Default implmentation for method in the TreeModel interface.
      Specified by:
      isLeaf in interface TreeModel
    • valueForPathChanged

      public void valueForPathChanged(TreePath path, Object newValue)
      Default implmentation for method in the TreeModel interface.
      Specified by:
      valueForPathChanged in interface TreeModel
    • getIndexOfChild

      public int getIndexOfChild(Object parent, Object child)
      This is not called in the JTree's default mode: use a naive implementation.
      Specified by:
      getIndexOfChild in interface TreeModel
    • addTreeModelListener

      public void addTreeModelListener(TreeModelListener l)
      Default implmentation for method in the TreeModel interface.
      Specified by:
      addTreeModelListener in interface TreeModel
    • removeTreeModelListener

      public void removeTreeModelListener(TreeModelListener l)
      Default implmentation for method in the TreeModel interface.
      Specified by:
      removeTreeModelListener in interface TreeModel
    • fireTreeNodesChanged

      protected void fireTreeNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children)
      Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
      See Also:
    • fireTreeNodesInserted

      protected void fireTreeNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children)
      Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
      See Also:
    • fireTreeNodesRemoved

      protected void fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
      Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
      See Also:
    • fireTreeStructureChanged

      protected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
      Notify all listeners that have registered interest for notification on this event type. The event instance is lazily created using the parameters passed into the fire method.
      See Also:
    • getColumnClass

      public Class getColumnClass(int column)
      Default implmentation for method in the TreeModel interface.
      Specified by:
      getColumnClass in interface TreeTableModel
    • isCellEditable

      public boolean isCellEditable(Object node, int column)
      By default, make the column with the Tree in it the only editable one. Making this column editable causes the JTable to forward mouse and keyboard events in the Tree column to the underlying JTree.
      Specified by:
      isCellEditable in interface TreeTableModel
    • setValueAt

      public void setValueAt(Object aValue, Object node, int row, int column)
      Default implmentation for method in the TreeModel interface.
      Specified by:
      setValueAt in interface TreeTableModel