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.AbstractTableModelThe 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 intaddRow(Autotext.AutotextItem item, int position)add a new row.intgetColumnCount()java.lang.StringgetColumnName(int col)java.util.List<Autotext.AutotextItem>getData()Store the data to the specified autotext list.intgetRowCount()java.lang.ObjectgetValueAt(int i, int i1)booleanisCellEditable(int row, int col)voidremoveRow(int position)remove a row.voidsetValueAt(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:
getColumnNamein interfacejavax.swing.table.TableModel- Overrides:
getColumnNamein classjavax.swing.table.AbstractTableModel
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)- Specified by:
setValueAtin interfacejavax.swing.table.TableModel- Overrides:
setValueAtin classjavax.swing.table.AbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int col)- Specified by:
isCellEditablein interfacejavax.swing.table.TableModel- Overrides:
isCellEditablein 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
-
-