jmri.jmrit.beantable.oblock
Class OBlockTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by jmri.jmrit.picker.PickListModel
          extended by jmri.jmrit.beantable.oblock.OBlockTableModel
All Implemented Interfaces:
PropertyChangeListener, Serializable, EventListener, TableModel

public class OBlockTableModel
extends PickListModel

Duplicates the JTable model for BlockTableAction and adds a column for the occupancy sensor. Configured for use within an internal frame.

See Also:
Serialized Form

Field Summary
static int COMMENTCOL
           
static int CURVECOL
           
static int DELETE_COL
           
static int EDIT_COL
           
static String gradualText
           
static int LENGTHCOL
           
static String noneText
           
static int NUMCOLS
           
static int SENSORCOL
           
static String severeText
           
static int SYSNAMECOL
           
static String tightText
           
static int UNITSCOL
           
static int USERNAMECOL
           
 
Fields inherited from class jmri.jmrit.picker.PickListModel
_name, _pickList, POSITION_COL, rb, SNAME_COLUMN, UNAME_COLUMN
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
OBlockTableModel(TableFrames parent)
           
 
Method Summary
 NamedBean addBean(String name)
          Return bean with name given in parameter.
 NamedBean addBean(String sysName, String userName)
           
 boolean canAddBean()
          Return true if model can create beans
 NamedBean getBySystemName(String name)
           
 Class<?> getColumnClass(int col)
           
 int getColumnCount()
           
 String getColumnName(int col)
           
 Manager getManager()
           
 int getPreferredWidth(int col)
           
 int getRowCount()
           
 Object getValueAt(int row, int col)
           
 boolean isCellEditable(int row, int col)
           
 void propertyChange(PropertyChangeEvent e)
           
 void setValueAt(Object value, int row, int col)
           
 
Methods inherited from class jmri.jmrit.picker.PickListModel
conditionalPickModelInstance, dispose, getBeanAt, getBeanList, getIndexOf, getName, getNumInstances, getTable, init, lightPickModelInstance, makePickTable, memoryPickModelInstance, multiSensorPickModelInstance, oBlockPickModelInstance, reporterPickModelInstance, sensorPickModelInstance, signalHeadPickModelInstance, signalMastPickModelInstance, turnoutPickModelInstance, warrantPickModelInstance
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSNAMECOL

public static final int SYSNAMECOL
See Also:
Constant Field Values

USERNAMECOL

public static final int USERNAMECOL
See Also:
Constant Field Values

COMMENTCOL

public static final int COMMENTCOL
See Also:
Constant Field Values

SENSORCOL

public static final int SENSORCOL
See Also:
Constant Field Values

LENGTHCOL

public static final int LENGTHCOL
See Also:
Constant Field Values

UNITSCOL

public static final int UNITSCOL
See Also:
Constant Field Values

CURVECOL

public static final int CURVECOL
See Also:
Constant Field Values

EDIT_COL

public static final int EDIT_COL
See Also:
Constant Field Values

DELETE_COL

public static final int DELETE_COL
See Also:
Constant Field Values

NUMCOLS

public static final int NUMCOLS
See Also:
Constant Field Values

noneText

public static final String noneText

gradualText

public static final String gradualText

tightText

public static final String tightText

severeText

public static final String severeText
Constructor Detail

OBlockTableModel

public OBlockTableModel(TableFrames parent)
Method Detail

getManager

public Manager getManager()
Specified by:
getManager in class PickListModel

getBySystemName

public NamedBean getBySystemName(String name)
Specified by:
getBySystemName in class PickListModel

addBean

public NamedBean addBean(String name)
Description copied from class: PickListModel
Return bean with name given in parameter. Create if needed and possible

Specified by:
addBean in class PickListModel

addBean

public NamedBean addBean(String sysName,
                         String userName)
Specified by:
addBean in class PickListModel

canAddBean

public boolean canAddBean()
Description copied from class: PickListModel
Return true if model can create beans

Specified by:
canAddBean in class PickListModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel
Overrides:
getColumnCount in class PickListModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel
Overrides:
getRowCount in class PickListModel

getValueAt

public Object getValueAt(int row,
                         int col)
Specified by:
getValueAt in interface TableModel
Overrides:
getValueAt in class PickListModel

setValueAt

public void setValueAt(Object value,
                       int row,
                       int col)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class PickListModel

getColumnName

public String getColumnName(int col)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class PickListModel

getColumnClass

public Class<?> getColumnClass(int col)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class PickListModel

getPreferredWidth

public int getPreferredWidth(int col)

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class PickListModel

propertyChange

public void propertyChange(PropertyChangeEvent e)
Specified by:
propertyChange in interface PropertyChangeListener
Overrides:
propertyChange in class PickListModel


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads