org.geworkbench.util.sequences
Class PatternTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.geworkbench.util.sequences.PatternTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class PatternTableModel
extends javax.swing.table.AbstractTableModel

Title: Sequence and Pattern Plugin

Description: The model holds the current displayed patterns in the table. The model gets its pattern from a PatternSource class.

Copyright: Copyright (c) 2003

Company:

Version:
$Id: PatternTableModel.java 8637 2011-12-22 19:23:14Z zji $
Author:
not attributable
See Also:
Serialized Form

Field Summary
static int PTMPattern
           
static int PTMSeqNo
           
static int PTMSupport
          Column definition
static int PTMTokNo
           
static int PTMZScore
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
PatternTableModel(PatternResult patternResult)
           
 
Method Summary
 int getColumnCount()
          See javax.swing.table.TableModel
 java.lang.String getColumnName(int columnIndex)
          See javax.swing.table.TableModel
 DSMatchedSeqPattern getPattern(int row)
          Get the pattern at the index row.
 int getRowCount()
          See javax.swing.table.TableModel
 java.lang.Object getValueAt(int row, int col)
           
 void mask(int[] index, boolean maskOperation)
          Mask the patterns of this model
 void sort(int field)
          Sort the patterns in the model on field
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PTMSupport

public static final int PTMSupport
Column definition

See Also:
Constant Field Values

PTMSeqNo

public static final int PTMSeqNo
See Also:
Constant Field Values

PTMTokNo

public static final int PTMTokNo
See Also:
Constant Field Values

PTMZScore

public static final int PTMZScore
See Also:
Constant Field Values

PTMPattern

public static final int PTMPattern
See Also:
Constant Field Values
Constructor Detail

PatternTableModel

public PatternTableModel(PatternResult patternResult)
Method Detail

sort

public void sort(int field)
Sort the patterns in the model on field


mask

public void mask(int[] index,
                 boolean maskOperation)
Mask the patterns of this model

Parameters:
indeces - to mask.
mask - operation

getColumnCount

public int getColumnCount()
See javax.swing.table.TableModel

Returns:
number of columns in the model

getRowCount

public int getRowCount()
See javax.swing.table.TableModel

Returns:
number of columns in the model

getColumnName

public java.lang.String getColumnName(int columnIndex)
See javax.swing.table.TableModel

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
columnIndex - the index of the column
Returns:
the name of the column

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)

getPattern

public DSMatchedSeqPattern getPattern(int row)
Get the pattern at the index row. This method will block until the pattern is retrieved from the underline source. See setPatternSource.

Parameters:
row -
Returns: