org.jomc.sequences.util
Class SequencesTableModel

Package class diagram package SequencesTableModel
java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.jomc.sequences.util.SequencesTableModel
All Implemented Interfaces:
Serializable, TableModel

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public class SequencesTableModel
extends AbstractTableModel
implements Serializable

Swing TableModel Java Bean for displaying and editing a system's SequenceDirectory.

Specifications

Properties

Dependencies

Messages

Version:
$Id: SequencesTableModel.java 2249 2010-06-29 08:04:28Z schulte2005 $
Author:
Christian Schulte 1.0
See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
static int COLUMN_COUNT
          Number of table columns.
static String INCREMENT_COLUMN_EDITABLE
          Name of property incrementColumnEditable.
static int INCREMENT_COLUMN_INDEX
          Index of the column displaying a sequence's increment value.
static String MAXIMUM_COLUMN_EDITABLE
          Name of property maximumColumnEditable.
static int MAXIMUM_COLUMN_INDEX
          Index of the column displaying a sequence's maximum value.
static String MINIMUM_COLUMN_EDITABLE
          Name of property minimumColumnEditable.
static int MINIMUM_COLUMN_INDEX
          Index of the column displaying a sequence's minimum value.
static String NAME_COLUMN_EDITABLE
          Name of property nameColumnEditable.
static int NAME_COLUMN_INDEX
          Index of the column displaying a sequence's name.
static String SEQUENCE_FILTER
          Name of property sequenceFilter.
static String VALUE_COLUMN_EDITABLE
          Name of property valueColumnEditable.
static int VALUE_COLUMN_INDEX
          Index of the column displaying a sequence's value.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
Constructor and Description
SequencesTableModel()
          Creates a new SequencesTableModel instance.
 
Method Summary
Modifier and Type Method and Description
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a PropertyChangeListener to the listener list.
 void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Add a PropertyChangeListener for a specific property.
protected  void fireExceptionThrown(Exception e)
          Notifies any available ExceptionListener whenever a recoverable exception has been caught.
 Class<?> getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 String getColumnName(int columnIndex)
           
 Boolean getIncrementColumnEditable()
          Gets the flag indicating that the increment column is editable.
 Boolean getMaximumColumnEditable()
          Gets the flag indicating that the maximum column is editable.
 Boolean getMinimumColumnEditable()
          Gets the flag indicating that the minimum column is editable.
 Boolean getNameColumnEditable()
          Gets the flag indicating that the name column is editable.
 PropertyChangeListener[] getPropertyChangeListeners()
          Gets an array of all the listeners that were added to the instance.
 PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
          Gets an array of all the listeners which have been associated with the named property.
 int getRowCount()
           
 org.jomc.sequences.Sequence getSequenceFilter()
          Gets the entity used for filtering sequences.
 List<org.jomc.sequences.Sequence> getSequences()
          Gets the entities of the model.
 Object getValueAt(int rowIndex, int columnIndex)
           
 Boolean getValueColumnEditable()
          Gets the flag indicating that the value column is editable.
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from the listener list.
 void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
          Removes a PropertyChangeListener for a specific property.
 void setIncrementColumnEditable(Boolean value)
          Sets the flag indicating that the increment column is editable.
 void setMaximumColumnEditable(Boolean value)
          Sets the flag indicating that the maximum column is editable.
 void setMinimumColumnEditable(Boolean value)
          Set the flag indicating that the minimum column is editable.
 void setNameColumnEditable(Boolean value)
          Sets the flag indicating that the name column is editable.
 void setSequenceFilter(org.jomc.sequences.Sequence value)
          Sets the entity used for filtering sequences.
 void setValueAt(Object aValue, int rowIndex, int columnIndex)
           
 void setValueColumnEditable(Boolean value)
          Sets the flag indicating that the value column is editable.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_COUNT

public static final int COLUMN_COUNT
Number of table columns.

See Also:
Constant Field Values

NAME_COLUMN_INDEX

public static final int NAME_COLUMN_INDEX
Index of the column displaying a sequence's name.

See Also:
Constant Field Values

MINIMUM_COLUMN_INDEX

public static final int MINIMUM_COLUMN_INDEX
Index of the column displaying a sequence's minimum value.

See Also:
Constant Field Values

MAXIMUM_COLUMN_INDEX

public static final int MAXIMUM_COLUMN_INDEX
Index of the column displaying a sequence's maximum value.

See Also:
Constant Field Values

INCREMENT_COLUMN_INDEX

public static final int INCREMENT_COLUMN_INDEX
Index of the column displaying a sequence's increment value.

See Also:
Constant Field Values

VALUE_COLUMN_INDEX

public static final int VALUE_COLUMN_INDEX
Index of the column displaying a sequence's value.

See Also:
Constant Field Values

NAME_COLUMN_EDITABLE

public static final String NAME_COLUMN_EDITABLE
Name of property nameColumnEditable.

See Also:
Constant Field Values

MINIMUM_COLUMN_EDITABLE

public static final String MINIMUM_COLUMN_EDITABLE
Name of property minimumColumnEditable.

See Also:
Constant Field Values

MAXIMUM_COLUMN_EDITABLE

public static final String MAXIMUM_COLUMN_EDITABLE
Name of property maximumColumnEditable.

See Also:
Constant Field Values

INCREMENT_COLUMN_EDITABLE

public static final String INCREMENT_COLUMN_EDITABLE
Name of property incrementColumnEditable.

See Also:
Constant Field Values

VALUE_COLUMN_EDITABLE

public static final String VALUE_COLUMN_EDITABLE
Name of property valueColumnEditable.

See Also:
Constant Field Values

SEQUENCE_FILTER

public static final String SEQUENCE_FILTER
Name of property sequenceFilter.

See Also:
Constant Field Values
Constructor Detail

SequencesTableModel

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public SequencesTableModel()
Creates a new SequencesTableModel instance.

Method Detail

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel

getColumnName

public String getColumnName(int columnIndex)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getColumnClass

public Class<?> getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Specified by:
getValueAt in interface TableModel

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel

getNameColumnEditable

public Boolean getNameColumnEditable()
Gets the flag indicating that the name column is editable.

Returns:
true if the name column is editable; false if not.

setNameColumnEditable

public void setNameColumnEditable(Boolean value)
Sets the flag indicating that the name column is editable.

Parameters:
value - true if the name column should be editable; false if not.

getMinimumColumnEditable

public Boolean getMinimumColumnEditable()
Gets the flag indicating that the minimum column is editable.

Returns:
true if the minimum column is editable;false if not.

setMinimumColumnEditable

public void setMinimumColumnEditable(Boolean value)
Set the flag indicating that the minimum column is editable.

Parameters:
value - true if the minimum column should be editable; false if not.

getMaximumColumnEditable

public Boolean getMaximumColumnEditable()
Gets the flag indicating that the maximum column is editable.

Returns:
true if the maximum column is editable; false if not.

setMaximumColumnEditable

public void setMaximumColumnEditable(Boolean value)
Sets the flag indicating that the maximum column is editable.

Parameters:
value - true if the maximum column should be editable; false if not.

getIncrementColumnEditable

public Boolean getIncrementColumnEditable()
Gets the flag indicating that the increment column is editable.

Returns:
true if the increment column is editable; false if not.

setIncrementColumnEditable

public void setIncrementColumnEditable(Boolean value)
Sets the flag indicating that the increment column is editable.

Parameters:
value - true if the increment column should be editable; false if not.

getValueColumnEditable

public Boolean getValueColumnEditable()
Gets the flag indicating that the value column is editable.

Returns:
true if the value column is editable; false if not.

setValueColumnEditable

public void setValueColumnEditable(Boolean value)
Sets the flag indicating that the value column is editable.

Parameters:
value - true if the value column should be editable; false if not.

getSequenceFilter

public org.jomc.sequences.Sequence getSequenceFilter()
Gets the entity used for filtering sequences.

Returns:
Entity used for filtering sequences or null.

setSequenceFilter

public void setSequenceFilter(org.jomc.sequences.Sequence value)
Sets the entity used for filtering sequences.

Parameters:
value - Entity to use for filtering sequences or null.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.

The listener is registered for all properties. The same listener object may be added more than once, and will be called as many times as it is added. If listener is null, no exception is thrown and no action is taken.

Parameters:
listener - The listener to be added.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from the listener list.

This removes a PropertyChangeListener that was registered for all properties. If listener was added more than once, it will be notified one less time after being removed. If listener is null, or was never added, no exception is thrown and no action is taken.

Parameters:
listener - The listener to be removed.

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners()
Gets an array of all the listeners that were added to the instance.

If some listeners have been added with a named property, then the returned array will be a mixture of PropertyChangeListeners and PropertyChangeListenerProxys. If the calling method is interested in distinguishing the listeners then it must test each element to see if it's a PropertyChangeListenerProxy, perform the cast, and examine the parameter.

Returns:
All of the PropertyChangeListeners added or an empty array if no listeners have been added.
See Also:
PropertyChangeSupport.getPropertyChangeListeners()

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property.

The listener will be invoked only when an event for that specific property occurs. The same listener object may be added more than once. For each property, the listener will be invoked the number of times it was added for that property. If propertyName or listener is null, no exception is thrown and no action is taken.

Parameters:
propertyName - The name of the property to listen on.
listener - The listener to be added.

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener listener)
Removes a PropertyChangeListener for a specific property.

If listener was added more than once to the instance for the specified property, it will be notified one less time after being removed. If propertyName is null, no exception is thrown and no action is taken. If listener is null, or was never added for the specified property, no exception is thrown and no action is taken.

Parameters:
propertyName - The name of the property that was listened on.
listener - The listener to be removed.

getPropertyChangeListeners

public PropertyChangeListener[] getPropertyChangeListeners(String propertyName)
Gets an array of all the listeners which have been associated with the named property.

Parameters:
propertyName - The name of the property being listened to.
Returns:
All of the PropertyChangeListeners associated with the named property. If no such listeners have been added, or if propertyName is null, an empty array is returned.

getSequences

public List<org.jomc.sequences.Sequence> getSequences()
Gets the entities of the model.

Returns:
The entities of the model.
Throws:
org.jomc.sequences.SequencesSystemException - if searching entities fails.

fireExceptionThrown

protected void fireExceptionThrown(Exception e)
Notifies any available ExceptionListener whenever a recoverable exception has been caught.

Parameters:
e - The exception that was caught.


Copyright © 2005-2010 The JOMC Project. All Rights Reserved.