ca.odell.glazedlists.swing
Class EventJXTableModel<E>

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by ca.odell.glazedlists.swing.DefaultEventTableModel<E>
          extended by ca.odell.glazedlists.swing.EventTableModel<E>
              extended by ca.odell.glazedlists.swing.EventJXTableModel<E>
All Implemented Interfaces:
ListEventListener<E>, AdvancedTableModel<E>, Serializable, EventListener, TableModel

Deprecated. Use DefaultEventTableModel with a ManyToOneTableModelEventAdapter instead. This class will be removed in the GL 2.0 release. The wrapping of the source list with an EDT safe list has been determined to be undesirable (it is better for the user to provide their own EDT safe list).

@Deprecated
public class EventJXTableModel<E>
extends EventTableModel<E>

An extension of the EventTableModel for better integration with JXTable.

In particular, this table model implements a different strategy to tranform ListEvents to TableModelEvents. Whereas EventTableModel converts each ListEvent block to a TableModelEvent, EventJXTableModel tries to create only one TableModelEvent for a ListEvent, that does not represent a reorder. If the ListEvent contains multiple blocks, a special data changed TableModelEvent will be fired, indicating that all row data has changed. Note, that such a data changed TableModelEvent can lead to a loss of the table selection.

Author:
Holger Brands
See Also:
GlazedListsSwing.eventTableModelWithThreadProxyList(EventList, TableFormat, ca.odell.glazedlists.swing.TableModelEventAdapter.Factory), GlazedListsSwing.manyToOneEventAdapterFactory(), Serialized Form

Field Summary
 
Fields inherited from class ca.odell.glazedlists.swing.EventTableModel
swingThreadSource
 
Fields inherited from class ca.odell.glazedlists.swing.DefaultEventTableModel
source
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
EventJXTableModel(EventList<E> source, String[] propertyNames, String[] columnLabels, boolean[] writable)
          Deprecated. Use GlazedLists.tableFormat(String[], String[], boolean[]) and GlazedListsSwing.eventTableModelWithThreadProxyList(EventList, TableFormat, ca.odell.glazedlists.swing.TableModelEventAdapter.Factory) instead
EventJXTableModel(EventList<E> source, TableFormat<? super E> tableFormat)
          Deprecated. Use GlazedListsSwing.eventTableModelWithThreadProxyList(EventList, TableFormat, ca.odell.glazedlists.swing.TableModelEventAdapter.Factory) instead
 
Method Summary
 
Methods inherited from class ca.odell.glazedlists.swing.EventTableModel
createSwingThreadProxyList, dispose
 
Methods inherited from class ca.odell.glazedlists.swing.DefaultEventTableModel
getColumnClass, getColumnCount, getColumnName, getElementAt, getEventAdapter, getRowCount, getTableFormat, getValueAt, handleListChange, isCellEditable, listChanged, setEventAdapter, setTableFormat, setValueAt
 
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
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, removeTableModelListener
 

Constructor Detail

EventJXTableModel

@Deprecated
public EventJXTableModel(EventList<E> source,
                                    String[] propertyNames,
                                    String[] columnLabels,
                                    boolean[] writable)
Deprecated. Use GlazedLists.tableFormat(String[], String[], boolean[]) and GlazedListsSwing.eventTableModelWithThreadProxyList(EventList, TableFormat, ca.odell.glazedlists.swing.TableModelEventAdapter.Factory) instead

Creates a new table that renders the specified list with an automatically generated TableFormat. It uses JavaBeans and reflection to create a TableFormat as specified.

Note that the classes which will be obfuscated may not work with reflection. In this case, implement a TableFormat manually.

Parameters:
source - the EventList that provides the row objects
propertyNames - an array of property names in the JavaBeans format. For example, if your list contains Objects with the methods getFirstName(), setFirstName(String), getAge(), setAge(Integer), then this array should contain the two strings "firstName" and "age". This format is specified by the JavaBeans PropertyDescriptor.
columnLabels - the corresponding column names for the listed property names. For example, if your columns are "firstName" and "age", then your labels might be "First Name" and "Age".
writable - an array of booleans specifying which of the columns in your table are writable.

EventJXTableModel

@Deprecated
public EventJXTableModel(EventList<E> source,
                                    TableFormat<? super E> tableFormat)
Deprecated. Use GlazedListsSwing.eventTableModelWithThreadProxyList(EventList, TableFormat, ca.odell.glazedlists.swing.TableModelEventAdapter.Factory) instead

Creates a new table model that extracts column data from the given source using the the given tableFormat.

Parameters:
source - the EventList that provides the row objects
tableFormat - the object responsible for extracting column data from the row objects


Glazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by hbrands at 2017-03-13 22:58