Package jmri.jmrit.beantable.oblock
Class BlockPortalTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.beantable.oblock.BlockPortalTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
public class BlockPortalTableModel extends javax.swing.table.AbstractTableModel implements java.beans.PropertyChangeListener
GUI to define Portal-Block-Portal combos for OBlocks. No differences between _desktop and _tabbed code, so _tabbed not stored.
This file is part of JMRI.JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) OBlockTableModel
_oBlockModel
static int
BLOCK_NAME_COLUMN
static int
NUMCOLS
static int
OPPOSING_BLOCK_NAME
static int
PORTAL_NAME_COLUMN
-
Constructor Summary
Constructors Constructor Description BlockPortalTableModel(OBlockTableModel oBlockModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>
getColumnClass(int col)
int
getColumnCount()
java.lang.String
getColumnName(int col)
int
getPreferredWidth(int col)
int
getRowCount()
java.lang.Object
getValueAt(int row, int col)
boolean
isCellEditable(int row, int col)
void
propertyChange(java.beans.PropertyChangeEvent e)
void
setValueAt(java.lang.Object value, int row, int col)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
BLOCK_NAME_COLUMN
public static final int BLOCK_NAME_COLUMN
- See Also:
- Constant Field Values
-
PORTAL_NAME_COLUMN
public static final int PORTAL_NAME_COLUMN
- See Also:
- Constant Field Values
-
OPPOSING_BLOCK_NAME
public static final int OPPOSING_BLOCK_NAME
- See Also:
- Constant Field Values
-
NUMCOLS
public static final int NUMCOLS
- See Also:
- Constant Field Values
-
_oBlockModel
OBlockTableModel _oBlockModel
-
-
Constructor Detail
-
BlockPortalTableModel
public BlockPortalTableModel(OBlockTableModel oBlockModel)
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfacejavax.swing.table.TableModel
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
-
getColumnName
public java.lang.String getColumnName(int col)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int col)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.AbstractTableModel
-
getColumnClass
public java.lang.Class<?> getColumnClass(int col)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classjavax.swing.table.AbstractTableModel
-
getPreferredWidth
public int getPreferredWidth(int col)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
-