Class InterfaceTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
mgui.interfaces.tables.InterfaceTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel, AttributeObject, InterfaceObject, NamedObject, TreeObject, CleanableObject
Direct Known Subclasses:
DataTableModel, VariableTableModel

public abstract class InterfaceTableModel
extends javax.swing.table.AbstractTableModel
implements InterfaceObject, AttributeObject
Abstract Table Model interface class. Can be subclassed to provide an implementation that assigns values from the underlying data model to an instance of InterfaceDataTable
Author:
Andrew Reid
See Also:
Serialized Form
  • Field Summary

    Fields inherited from class javax.swing.table.AbstractTableModel

    listenerList
  • Constructor Summary

    Constructors
    Constructor Description
    InterfaceTableModel()  
  • Method Summary

    Modifier and Type Method Description
    protected void _init()  
    void clean()
    Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.
    void destroy()
    Destroy this object (prepare it to be removed from memory)
    Attribute<?> getAttribute​(java.lang.String attrName)
    Returns a specific attribute for this object.
    AttributeList getAttributes()
    Returns the list of current attributes for this object.
    java.lang.Object getAttributeValue​(java.lang.String name)
    Gets the value of attribute name, or null if it does not exist.
    java.lang.String getName()
    Gets the name for this object.
    abstract java.lang.Object getSource()
    Returns the source of data for this table.
    java.lang.String getTreeLabel()
    Returns the label text to appear in a tree node.
    boolean isDestroyed()
    Test whether this object has been destroyed
    InterfaceTreeNode issueTreeNode()
    Issues a new InterfaceTreeNode for this object.
    void setAttribute​(java.lang.String attrName, java.lang.Object newValue)
    Sets a value for a specific attribute.
    void setAttributes​(AttributeList thisList)
    Sets the list of attributes for this object.
    void setName​(java.lang.String name)
    Sets the name for this object.
    void setTreeNode​(InterfaceTreeNode node)
    Sets the children for this node's InterfaceTreeNode.

    Methods inherited from class javax.swing.table.AbstractTableModel

    addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javax.swing.table.TableModel

    getColumnCount, getRowCount, getValueAt
  • Constructor Details

    • InterfaceTableModel

      public InterfaceTableModel()
  • Method Details

    • _init

      protected void _init()
    • getSource

      public abstract java.lang.Object getSource()
      Returns the source of data for this table.
      Returns:
    • destroy

      public void destroy()
      Description copied from interface: InterfaceObject
      Destroy this object (prepare it to be removed from memory)
      Specified by:
      destroy in interface InterfaceObject
    • getName

      public java.lang.String getName()
      Description copied from interface: NamedObject
      Gets the name for this object.
      Specified by:
      getName in interface NamedObject
      Returns:
    • clean

      public void clean()
      Description copied from interface: CleanableObject
      Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.
      Specified by:
      clean in interface CleanableObject
    • isDestroyed

      public boolean isDestroyed()
      Description copied from interface: InterfaceObject
      Test whether this object has been destroyed
      Specified by:
      isDestroyed in interface InterfaceObject
      Returns:
    • setName

      public void setName​(java.lang.String name)
      Description copied from interface: NamedObject
      Sets the name for this object.
      Specified by:
      setName in interface NamedObject
    • getTreeLabel

      public java.lang.String getTreeLabel()
      Description copied from interface: TreeObject
      Returns the label text to appear in a tree node.
      Specified by:
      getTreeLabel in interface TreeObject
      Returns:
    • issueTreeNode

      public InterfaceTreeNode issueTreeNode()
      Description copied from interface: TreeObject
      Issues a new InterfaceTreeNode for this object. The object is responsible for maintaining, updating, and destroying the tree nodes it issues, or notifying containers -- i.e., parent trees -- of changes which require the tree nodes to be modified or destroyed.
      Specified by:
      issueTreeNode in interface TreeObject
      Returns:
    • setTreeNode

      public void setTreeNode​(InterfaceTreeNode node)
      Description copied from interface: TreeObject
      Sets the children for this node's InterfaceTreeNode.
      Specified by:
      setTreeNode in interface TreeObject
    • getAttribute

      public Attribute<?> getAttribute​(java.lang.String attrName)
      Description copied from interface: AttributeObject
      Returns a specific attribute for this object.
      Specified by:
      getAttribute in interface AttributeObject
      Returns:
    • getAttributeValue

      public java.lang.Object getAttributeValue​(java.lang.String name)
      Description copied from interface: AttributeObject
      Gets the value of attribute name, or null if it does not exist.
      Specified by:
      getAttributeValue in interface AttributeObject
      Parameters:
      name - Name of the attribute
      Returns:
      the value of attribute name, or null if it does not exist
    • getAttributes

      public AttributeList getAttributes()
      Description copied from interface: AttributeObject
      Returns the list of current attributes for this object.
      Specified by:
      getAttributes in interface AttributeObject
      Returns:
    • setAttribute

      public void setAttribute​(java.lang.String attrName, java.lang.Object newValue)
      Description copied from interface: AttributeObject
      Sets a value for a specific attribute.
      Specified by:
      setAttribute in interface AttributeObject
    • setAttributes

      public void setAttributes​(AttributeList thisList)
      Description copied from interface: AttributeObject
      Sets the list of attributes for this object.
      Specified by:
      setAttributes in interface AttributeObject