Package mgui.interfaces.tables
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()voidclean()Instructs this object to search its members for any object which has been destroyed, and release the pointer to it.voiddestroy()Destroy this object (prepare it to be removed from memory)Attribute<?>getAttribute(java.lang.String attrName)Returns a specific attribute for this object.AttributeListgetAttributes()Returns the list of current attributes for this object.java.lang.ObjectgetAttributeValue(java.lang.String name)Gets the value of attributename, ornullif it does not exist.java.lang.StringgetName()Gets the name for this object.abstract java.lang.ObjectgetSource()Returns the source of data for this table.java.lang.StringgetTreeLabel()Returns the label text to appear in a tree node.booleanisDestroyed()Test whether this object has been destroyedInterfaceTreeNodeissueTreeNode()Issues a newInterfaceTreeNodefor this object.voidsetAttribute(java.lang.String attrName, java.lang.Object newValue)Sets a value for a specific attribute.voidsetAttributes(AttributeList thisList)Sets the list of attributes for this object.voidsetName(java.lang.String name)Sets the name for this object.voidsetTreeNode(InterfaceTreeNode node)Sets the children for this node'sInterfaceTreeNode.Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAtMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:InterfaceObjectDestroy this object (prepare it to be removed from memory)- Specified by:
destroyin interfaceInterfaceObject
-
getName
public java.lang.String getName()Description copied from interface:NamedObjectGets the name for this object.- Specified by:
getNamein interfaceNamedObject- Returns:
-
clean
public void clean()Description copied from interface:CleanableObjectInstructs this object to search its members for any object which has been destroyed, and release the pointer to it.- Specified by:
cleanin interfaceCleanableObject
-
isDestroyed
public boolean isDestroyed()Description copied from interface:InterfaceObjectTest whether this object has been destroyed- Specified by:
isDestroyedin interfaceInterfaceObject- Returns:
-
setName
public void setName(java.lang.String name)Description copied from interface:NamedObjectSets the name for this object.- Specified by:
setNamein interfaceNamedObject
-
getTreeLabel
public java.lang.String getTreeLabel()Description copied from interface:TreeObjectReturns the label text to appear in a tree node.- Specified by:
getTreeLabelin interfaceTreeObject- Returns:
-
issueTreeNode
Description copied from interface:TreeObjectIssues a newInterfaceTreeNodefor 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:
issueTreeNodein interfaceTreeObject- Returns:
-
setTreeNode
Description copied from interface:TreeObjectSets the children for this node'sInterfaceTreeNode.- Specified by:
setTreeNodein interfaceTreeObject
-
getAttribute
Description copied from interface:AttributeObjectReturns a specific attribute for this object.- Specified by:
getAttributein interfaceAttributeObject- Returns:
-
getAttributeValue
public java.lang.Object getAttributeValue(java.lang.String name)Description copied from interface:AttributeObjectGets the value of attributename, ornullif it does not exist.- Specified by:
getAttributeValuein interfaceAttributeObject- Parameters:
name- Name of the attribute- Returns:
- the value of attribute
name, ornullif it does not exist
-
getAttributes
Description copied from interface:AttributeObjectReturns the list of current attributes for this object.- Specified by:
getAttributesin interfaceAttributeObject- Returns:
-
setAttribute
public void setAttribute(java.lang.String attrName, java.lang.Object newValue)Description copied from interface:AttributeObjectSets a value for a specific attribute.- Specified by:
setAttributein interfaceAttributeObject
-
setAttributes
Description copied from interface:AttributeObjectSets the list of attributes for this object.- Specified by:
setAttributesin interfaceAttributeObject
-