Class CharTableModel

java.lang.Object
javax.swing.table.AbstractTableModel
org.omegat.gui.editor.chartable.CharTableModel
All Implemented Interfaces:
Serializable, TableModel

public class CharTableModel extends AbstractTableModel
Character table table model
See Also:
  • Constructor Details

    • CharTableModel

      public CharTableModel(String data)
  • Method Details

    • setData

      public boolean setData(String data)
      set the data to a selected string
      Parameters:
      data - the new string
      Returns:
      true if the data have been replaced.
    • getData

      public String getData()
    • allowOnlyUnique

      public void allowOnlyUnique()
      leave only unique characters in the data string.
    • appendChar

      public void appendChar(Character c, boolean checkUnique)
      Append a new character to the data.
      Parameters:
      c - the character
      checkUnique - check for being unique or not
    • removeSelection

      public void removeSelection(int row1, int col1, int row2, int col2)
      Remove the selected characters from the model.
      Parameters:
      row1 - from row
      col1 - from column
      row2 - to row
      col2 - to column
    • getRowCount

      public int getRowCount()
    • getColumnCount

      public int getColumnCount()
    • getValueAt

      public Object getValueAt(int rowIndex, int columnIndex)
    • getColumnName

      public String getColumnName(int column)
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
    • modifyPoint

      public Point modifyPoint(Point p)
      Prevent the use of invalid points in the table (beyond data string length).
      Parameters:
      p - the point in question
      Returns:
      the modified point.