mixconfig.panels.CascadePanel.MixListTableModel Class Reference

Inherits javax::swing::table::AbstractTableModel.

List of all members.

Public Member Functions

 MixListTableModel ()
 MixListTableModel (Element a_mixList)
int getColumnCount ()
int getRowCount ()
Class<?> getColumnClass (int columnIndex)
String getColumnName (int columnIndex)
Object getValueAt (int rowIndex, int columnIndex)
void setValueAt (Object value, int rowIndex, int columnIndex)
boolean isCellEditable (int row, int col)
Object[] getRow (int rowIndex)
void addRow (Object a_mix[])
void addRow (Element a_mix)
void removeRow (Object a_mle)
void removeRow (int rowIndex)
void moveRow (int src, int dest)
Node toXmlElement (Document a_doc)

Package Attributes

Vector< Object[]> mixList = new Vector<Object[]>()

Private Member Functions

String getElementData (Element a_parent, String a_elementName)

Private Attributes

final String columnName []


Detailed Description

This inner class represents the data model for the two tables and holds the mix list entries.

Constructor & Destructor Documentation

mixconfig.panels.CascadePanel.MixListTableModel.MixListTableModel (  ) 

Constructs a new empty instance of MixListTableModel

mixconfig.panels.CascadePanel.MixListTableModel.MixListTableModel ( Element  a_mixList  ) 

Constructs a new instance of MixListTableModel.

Parameters:
a_mixList The list of mixes to be contained in the table model as an XML/DOM element

References mixconfig.panels.CascadePanel.MixListTableModel.addRow(), and mixconfig.panels.CascadePanel.MixListTableModel.getElementData().


Member Function Documentation

int mixconfig.panels.CascadePanel.MixListTableModel.getColumnCount (  ) 

int mixconfig.panels.CascadePanel.MixListTableModel.getRowCount (  ) 

Class<?> mixconfig.panels.CascadePanel.MixListTableModel.getColumnClass ( int  columnIndex  ) 

String mixconfig.panels.CascadePanel.MixListTableModel.getColumnName ( int  columnIndex  ) 

Object mixconfig.panels.CascadePanel.MixListTableModel.getValueAt ( int  rowIndex,
int  columnIndex 
)

void mixconfig.panels.CascadePanel.MixListTableModel.setValueAt ( Object  value,
int  rowIndex,
int  columnIndex 
)

boolean mixconfig.panels.CascadePanel.MixListTableModel.isCellEditable ( int  row,
int  col 
)

Object [] mixconfig.panels.CascadePanel.MixListTableModel.getRow ( int  rowIndex  ) 

Gets the entry at the specified index

Parameters:
rowIndex The index of the row to be returned
Returns:
The row at the specified index as an array of Object

References mixconfig.panels.CascadePanel.MixListTableModel.mixList.

Referenced by mixconfig.panels.CascadePanel.moveMix().

void mixconfig.panels.CascadePanel.MixListTableModel.addRow ( Object  a_mix[]  ) 

Adds an entry to the table model. The array representing the entry must have 5 fields: Mix ID, mix name, location (City), type (FirstMix, MiddleMix, LastMix), and desired cascade length (a String reprentation of an int value, or null).

Parameters:
a_mix An array of Object holding the mix data.

References mixconfig.panels.CascadePanel.MixListTableModel.getRowCount(), mixconfig.panels.CascadePanel.MixListTableModel.getValueAt(), mixconfig.panels.CascadePanel.m_availableMixTable, mixconfig.panels.CascadePanel.m_configuredMixTable, and mixconfig.panels.CascadePanel.MixListTableModel.mixList.

Referenced by mixconfig.panels.CascadePanel.MixListTableModel.addRow(), mixconfig.panels.CascadePanel.MixListTableModel.MixListTableModel(), and mixconfig.panels.CascadePanel.moveMix().

void mixconfig.panels.CascadePanel.MixListTableModel.addRow ( Element  a_mix  ) 

Adds an entry to the table model. The Element representing the entry must have one attribute named "id" containing the mix ID, and one or more of the following child nodes:

  • Name (containing a text node with the mix's name)
  • MixType (containing a text node with the mix's type)
  • Location (containing a child node named City with a text node with the mix's type)
  • MinCascadeLength (containing a text node with an integer value)
If one of the nodes is missing, the corresponding field in the table entry is left blank. Additional other nodes will be ignored.
Parameters:
a_mix The DOM element containing the mix data

References mixconfig.panels.CascadePanel.MixListTableModel.addRow(), mixconfig.panels.CascadePanel.MixListTableModel.getColumnCount(), and mixconfig.panels.CascadePanel.MixListTableModel.getElementData().

void mixconfig.panels.CascadePanel.MixListTableModel.removeRow ( Object  a_mle  ) 

Removes the specified object from the list of entries.

Parameters:
a_mle An array of Object representing a mix list entry

References mixconfig.panels.CascadePanel.MixListTableModel.mixList.

Referenced by mixconfig.panels.CascadePanel.moveMix().

void mixconfig.panels.CascadePanel.MixListTableModel.removeRow ( int  rowIndex  ) 

Removes the object at the specified index from the list of entries.

Parameters:
rowIndex The index of the entry to be removed

References mixconfig.panels.CascadePanel.MixListTableModel.mixList.

void mixconfig.panels.CascadePanel.MixListTableModel.moveRow ( int  src,
int  dest 
)

Moves a row from one index to another. The other rows are shifted accordingly.

Parameters:
src The index of the row to be moved
dest The destination index

References mixconfig.panels.CascadePanel.m_configuredMixTable, and mixconfig.panels.CascadePanel.MixListTableModel.mixList.

Node mixconfig.panels.CascadePanel.MixListTableModel.toXmlElement ( Document  a_doc  ) 

Converts the data in this model to a XML/DOM structure.

Parameters:
a_doc The document for which the resulting element will be created
Returns:
An XML/DOM DocumentFragment object containing the mix list entries as elements (<Mix id="...">...</Mix&gt)

References mixconfig.panels.MixConfigPanel.getConfiguration(), mixconfig.MixConfiguration.getValue(), and mixconfig.panels.CascadePanel.MixListTableModel.mixList.

String mixconfig.panels.CascadePanel.MixListTableModel.getElementData ( Element  a_parent,
String  a_elementName 
) [private]

Searches the specified element for a child node with the specified name, and returns the first text node under that element (if found; null otherwise).

Parameters:
a_parent The parent element to be searched
a_elementName The name of the child element whose text node is to be returned
Returns:
The element's text node as a String, or null if there is no such node

Referenced by mixconfig.panels.CascadePanel.MixListTableModel.addRow(), and mixconfig.panels.CascadePanel.MixListTableModel.MixListTableModel().


Member Data Documentation

Initial value:

      {"Mix ID", "Mix name", "Location", "Type"}
The names of the columns in the model

Referenced by mixconfig.panels.CascadePanel.MixListTableModel.getColumnName().

Vector<Object[]> mixconfig.panels.CascadePanel.MixListTableModel.mixList = new Vector<Object[]>() [package]


The documentation for this class was generated from the following file:

Generated on Mon Nov 16 23:24:47 2009 for MixConfig by  doxygen 1.5.6