public class TablePersister
extends java.lang.Object
implements javax.swing.event.TableColumnModelListener, java.beans.PropertyChangeListener, javax.swing.event.AncestorListener
Modifier and Type | Method and Description |
---|---|
void |
ancestorAdded(javax.swing.event.AncestorEvent event)
Called when the source or one of its ancestors is made visible
either by setVisible(true) being called or by its being
added to the component hierarchy.
|
void |
ancestorMoved(javax.swing.event.AncestorEvent event)
Called when either the source or one of its ancestors is moved.
|
void |
ancestorRemoved(javax.swing.event.AncestorEvent event)
Called when the source or one of its ancestors is made invisible
either by setVisible(false) being called or by its being
remove from the component hierarchy.
|
void |
columnAdded(javax.swing.event.TableColumnModelEvent e)
Tells listeners that a column was added to the model.
|
void |
columnMarginChanged(javax.swing.event.ChangeEvent e)
Tells listeners that a column was moved due to a margin change.
|
void |
columnMoved(javax.swing.event.TableColumnModelEvent e)
Tells listeners that a column was repositioned.
|
void |
columnRemoved(javax.swing.event.TableColumnModelEvent e)
Tells listeners that a column was removed from the model.
|
void |
columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
Tells listeners that the selection model of the
TableColumnModel changed.
|
static TablePersister |
getInstance()
Get the TablePersister instance.
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
This method gets called when a bound property is changed.
|
void |
register(javax.swing.JTable table,
java.lang.String name)
Monitor a table for persisting any column changes.
|
public static TablePersister getInstance()
public void register(javax.swing.JTable table, java.lang.String name)
table
- JTable to monitorname
- String name to use to remember the changespublic void columnAdded(javax.swing.event.TableColumnModelEvent e)
columnAdded
in interface javax.swing.event.TableColumnModelListener
public void columnRemoved(javax.swing.event.TableColumnModelEvent e)
columnRemoved
in interface javax.swing.event.TableColumnModelListener
public void columnMoved(javax.swing.event.TableColumnModelEvent e)
columnMoved
in interface javax.swing.event.TableColumnModelListener
public void columnMarginChanged(javax.swing.event.ChangeEvent e)
columnMarginChanged
in interface javax.swing.event.TableColumnModelListener
public void columnSelectionChanged(javax.swing.event.ListSelectionEvent e)
columnSelectionChanged
in interface javax.swing.event.TableColumnModelListener
public void ancestorAdded(javax.swing.event.AncestorEvent event)
ancestorAdded
in interface javax.swing.event.AncestorListener
public void ancestorRemoved(javax.swing.event.AncestorEvent event)
ancestorRemoved
in interface javax.swing.event.AncestorListener
public void ancestorMoved(javax.swing.event.AncestorEvent event)
ancestorMoved
in interface javax.swing.event.AncestorListener
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
evt
- A PropertyChangeEvent object describing the event source
and the property that has changed.