org.argouml.uml.ui
Class SourcePathTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byjavax.swing.table.DefaultTableModel
          extended byorg.argouml.uml.ui.SourcePathTableModel
All Implemented Interfaces:
Serializable, TableModel

class SourcePathTableModel
extends DefaultTableModel

The table model for source path settings. This class contains functionality to load the source path settings from the model.


Field Summary
private static Logger LOG
          Logger.
(package private) static int MODEL_ELEMENT_COLUMN
          Index of the column where model element objects are placed.
(package private) static int NAME_COLUMN
          Index of the column where the model element names are placed.
(package private) static int SOURCE_PATH_COLUMN
          Index of the column where the source paths for the model elements are placed.
(package private) static int TYPE_COLUMN
          Index of the column where the types of the model elements are placed.
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
SourcePathTableModel(SourcePathController srcPathCtrl)
          Creates a new instance of SourcePathTableModel.
 
Method Summary
 String getMEName(int rowIndex)
          For the specified row, get the model element (ME) name.
 String getMESourcePath(int rowIndex)
          For the specified row get the, get the source path.
 String getMEType(int rowIndex)
          For the specified row, get the ME type.
 Object getModelElement(int rowIndex)
          For the specified row, get the model element (ME).
 boolean isCellEditable(int rowIndex, int columnIndex)
          The only editable cells are the ones in the source path column.
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_ELEMENT_COLUMN

static final int MODEL_ELEMENT_COLUMN
Index of the column where model element objects are placed.

See Also:
Constant Field Values

NAME_COLUMN

static final int NAME_COLUMN
Index of the column where the model element names are placed.

See Also:
Constant Field Values

TYPE_COLUMN

static final int TYPE_COLUMN
Index of the column where the types of the model elements are placed.

See Also:
Constant Field Values

SOURCE_PATH_COLUMN

static final int SOURCE_PATH_COLUMN
Index of the column where the source paths for the model elements are placed.

See Also:
Constant Field Values

LOG

private static final Logger LOG
Logger.

Constructor Detail

SourcePathTableModel

public SourcePathTableModel(SourcePathController srcPathCtrl)
Creates a new instance of SourcePathTableModel.

Method Detail

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
The only editable cells are the ones in the source path column.

See Also:
DefaultTableModel.isCellEditable(int, int)

getModelElement

public Object getModelElement(int rowIndex)
For the specified row, get the model element (ME).

Parameters:
rowIndex - the row index where the ME data is located
Returns:
the ME

getMEName

public String getMEName(int rowIndex)
For the specified row, get the model element (ME) name.

Parameters:
rowIndex - the row index where the ME data is located
Returns:
the ME name

getMEType

public String getMEType(int rowIndex)
For the specified row, get the ME type.

Parameters:
rowIndex - the row index where the ME data is located
Returns:
the String representation of the ME type

getMESourcePath

public String getMESourcePath(int rowIndex)
For the specified row get the, get the source path.

Parameters:
rowIndex - the row index where the ME data is located
Returns:
the String representation of the ME source path


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook