jmri.jmrit.beantable.sensor
Class SensorTableDataModel

Show UML class diagram
java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by jmri.jmrit.beantable.BeanTableDataModel
          extended by jmri.jmrit.beantable.sensor.SensorTableDataModel
All Implemented Interfaces:
PropertyChangeListener, Serializable, EventListener, TableModel

public class SensorTableDataModel
extends BeanTableDataModel

Data model for a SensorTable

See Also:
Serialized Form

Field Summary
static int ACTIVEDELAY
           
static int EDITCOL
           
static int INACTIVEDELAY
           
static int INVERTCOL
           
(package private) static org.slf4j.Logger log
           
static ResourceBundle rb
           
(package private) static ResourceBundle rbean
           
(package private)  SensorManager senManager
           
protected  JTable table
           
static int USEGLOBALDELAY
           
 
Fields inherited from class jmri.jmrit.beantable.BeanTableDataModel
COMMENTCOL, DELETECOL, NUMCOLUMN, SYSNAMECOL, sysNameList, USERNAMECOL, VALUECOL
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
SensorTableDataModel()
           
SensorTableDataModel(SensorManager manager)
           
 
Method Summary
protected  void clickOn(NamedBean t)
           
 void configureTable(JTable table)
          Configure a table to have our standard rows and columns.
(package private)  void editButton(Sensor s)
           
protected  String getBeanType()
           
protected  NamedBean getBySystemName(String name)
           
protected  NamedBean getByUserName(String name)
           
 String getClassDescription()
           
protected  String getClassName()
           
 Class<?> getColumnClass(int col)
           
 int getColumnCount()
           
 String getColumnName(int col)
           
protected  Manager getManager()
           
protected  String getMasterClassName()
           
 int getPreferredWidth(int col)
           
 String getValue(String name)
           
 Object getValueAt(int row, int col)
           
 boolean isCellEditable(int row, int col)
           
protected  boolean matchPropertyName(PropertyChangeEvent e)
          Is this property event announcing a change this table should display?
protected  void setManager(SensorManager manager)
           
 void setValueAt(Object value, int row, int col)
           
 void showDebounce(boolean show)
           
 
Methods inherited from class jmri.jmrit.beantable.BeanTableDataModel
addMouseListenerToHeader, configDeleteColumn, configureButton, configValueColumn, copyName, deleteBean, dispose, getDisplayDeleteMsg, getRowCount, loadTableColumnDetails, loadTableColumnDetails, makeJTable, moveBean, printColumns, printTable, propertyChange, removeName, renameBean, saveTableColumnDetails, saveTableColumnDetails, setColumnToHoldButton, setDisplayDeleteMsg, setManager, showPopup, showTableHeaderPopup, updateNameList
 
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

INVERTCOL

public static final int INVERTCOL
See Also:
Constant Field Values

EDITCOL

public static final int EDITCOL
See Also:
Constant Field Values

USEGLOBALDELAY

public static final int USEGLOBALDELAY
See Also:
Constant Field Values

ACTIVEDELAY

public static final int ACTIVEDELAY
See Also:
Constant Field Values

INACTIVEDELAY

public static final int INACTIVEDELAY
See Also:
Constant Field Values

senManager

SensorManager senManager

table

protected JTable table

rb

public static final ResourceBundle rb

rbean

static final ResourceBundle rbean

log

static final org.slf4j.Logger log
Constructor Detail

SensorTableDataModel

public SensorTableDataModel()

SensorTableDataModel

public SensorTableDataModel(SensorManager manager)
Method Detail

getValue

public String getValue(String name)
Specified by:
getValue in class BeanTableDataModel

setManager

protected void setManager(SensorManager manager)

getManager

protected Manager getManager()
Specified by:
getManager in class BeanTableDataModel

getBySystemName

protected NamedBean getBySystemName(String name)
Specified by:
getBySystemName in class BeanTableDataModel

getByUserName

protected NamedBean getByUserName(String name)
Specified by:
getByUserName in class BeanTableDataModel

getMasterClassName

protected String getMasterClassName()
Specified by:
getMasterClassName in class BeanTableDataModel

clickOn

protected void clickOn(NamedBean t)
Specified by:
clickOn in class BeanTableDataModel

getColumnCount

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

getColumnName

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

getColumnClass

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

getPreferredWidth

public int getPreferredWidth(int col)
Overrides:
getPreferredWidth in class BeanTableDataModel

isCellEditable

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

getValueAt

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

setValueAt

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

getBeanType

protected String getBeanType()
Specified by:
getBeanType in class BeanTableDataModel

matchPropertyName

protected boolean matchPropertyName(PropertyChangeEvent e)
Description copied from class: BeanTableDataModel
Is this property event announcing a change this table should display?

Note that events will come both from the NamedBeans and also from the manager

Overrides:
matchPropertyName in class BeanTableDataModel

configureTable

public void configureTable(JTable table)
Description copied from class: BeanTableDataModel
Configure a table to have our standard rows and columns. This is optional, in that other table formats can use this table model. But we put it here to help keep it consistent.

Overrides:
configureTable in class BeanTableDataModel

editButton

void editButton(Sensor s)

showDebounce

public void showDebounce(boolean show)

getClassName

protected String getClassName()

getClassDescription

public String getClassDescription()


Copyright © 1997-2013 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