Package org.omegat.gui.editor.autotext
Class AutotextTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- org.omegat.gui.editor.autotext.AutotextTableModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
public class AutotextTableModel extends javax.swing.table.AbstractTableModel
The table model of the table in the autotext configuration window.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AutotextTableModel(java.util.Collection<Autotext.AutotextItem> data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addRow(Autotext.AutotextItem item, int position)
add a new row.int
getColumnCount()
java.lang.String
getColumnName(int col)
java.util.List<Autotext.AutotextItem>
getData()
Store the data to the specified autotext list.int
getRowCount()
java.lang.Object
getValueAt(int i, int i1)
boolean
isCellEditable(int row, int col)
void
removeRow(int position)
remove a row.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, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Constructor Detail
-
AutotextTableModel
public AutotextTableModel(java.util.Collection<Autotext.AutotextItem> data)
-
-
Method Detail
-
getData
public java.util.List<Autotext.AutotextItem> getData()
Store the data to the specified autotext list. All items, where the target is not empty are stored.- Parameters:
autotext
- the target list
-
getRowCount
public int getRowCount()
-
getColumnCount
public int getColumnCount()
-
getValueAt
public java.lang.Object getValueAt(int i, int i1)
-
getColumnName
public java.lang.String getColumnName(int col)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
-
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
-
addRow
public int addRow(Autotext.AutotextItem item, int position)
add a new row.- Parameters:
item
- what to addposition
- at which position
-
removeRow
public void removeRow(int position)
remove a row.- Parameters:
position
- where from
-
-