org.xulux.guilayer.swing.models
Class NyxTableColumnModel

java.lang.Object
  extended by javax.swing.table.DefaultTableColumnModel
      extended by org.xulux.guilayer.swing.models.NyxTableColumnModel
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.swing.event.ListSelectionListener, javax.swing.table.TableColumnModel

public class NyxTableColumnModel
extends javax.swing.table.DefaultTableColumnModel

Version:
$Id: NyxTableColumnModel.java,v 1.1 2005/12/18 12:58:21 mvdb Exp $
Author:
Martin van den Bemt
See Also:
Serialized Form

Field Summary
protected  boolean initializing
          is the model initializing?
protected  int lockedColumnWidth
          the lockedwidth
protected  NyxTableColumnModel lockedModel
          the model
protected  Table table
          the table
 
Fields inherited from class javax.swing.table.DefaultTableColumnModel
changeEvent, columnMargin, columnSelectionAllowed, listenerList, selectionModel, tableColumns, totalColumnWidth
 
Constructor Summary
NyxTableColumnModel()
           
NyxTableColumnModel(Table table)
          Initializes the columnModel and sets the table for later reference
 
Method Summary
 void destroy()
          destroy the instance variables Just in case..
 javax.swing.table.TableColumn getColumn(int columnIndex)
           
 NyxTableColumnModel getLockedColumnModel()
           
 java.awt.Dimension getLockedColumnWidth()
           
 boolean hasLockedColumns()
           
 boolean isInitializing()
           
 void refresh()
          Refresh the columns especially when widgets have been refreshed.
protected  void removeAllColumns()
          Removes all columns from the column list.
 void removeLockedColumns()
          Removes locked columns from the current list of columns.
 void removeUnlockedColumns()
          Removes the unlocked columns from the main table.
 void setLockedColumnWidth(int width)
          Set the columnwidth to the new value.
 void setTable(Table table)
           
 
Methods inherited from class javax.swing.table.DefaultTableColumnModel
addColumn, addColumnModelListener, createSelectionModel, fireColumnAdded, fireColumnMarginChanged, fireColumnMoved, fireColumnRemoved, fireColumnSelectionChanged, getColumnCount, getColumnIndex, getColumnIndexAtX, getColumnMargin, getColumnModelListeners, getColumns, getColumnSelectionAllowed, getListeners, getSelectedColumnCount, getSelectedColumns, getSelectionModel, getTotalColumnWidth, moveColumn, propertyChange, recalcWidthCache, removeColumn, removeColumnModelListener, setColumnMargin, setColumnSelectionAllowed, setSelectionModel, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected Table table
the table


lockedModel

protected NyxTableColumnModel lockedModel
the model


lockedColumnWidth

protected int lockedColumnWidth
the lockedwidth


initializing

protected boolean initializing
is the model initializing?

Constructor Detail

NyxTableColumnModel

public NyxTableColumnModel()

NyxTableColumnModel

public NyxTableColumnModel(Table table)
Initializes the columnModel and sets the table for later reference

Parameters:
table - - the table that is using the columnModel.
Method Detail

setTable

public void setTable(Table table)
Parameters:
table - the table

hasLockedColumns

public boolean hasLockedColumns()
Returns:
if table has columns that are locked.

refresh

public void refresh()
Refresh the columns especially when widgets have been refreshed.


removeAllColumns

protected void removeAllColumns()
Removes all columns from the column list. This removes also all columns from the locked table.


removeUnlockedColumns

public void removeUnlockedColumns()
Removes the unlocked columns from the main table. Call this one with care, since when there are no locks all rows will be deleted. Also wize to call this AFTER the removeLockedColumns.


removeLockedColumns

public void removeLockedColumns()
Removes locked columns from the current list of columns.


getLockedColumnWidth

public java.awt.Dimension getLockedColumnWidth()
Returns:
the locked columnWidth. This is set when removing columns

setLockedColumnWidth

public void setLockedColumnWidth(int width)
Set the columnwidth to the new value.

Parameters:
width - - the width

getLockedColumnModel

public NyxTableColumnModel getLockedColumnModel()
Returns:
The columnModel to lock columns.

destroy

public void destroy()
destroy the instance variables Just in case..


getColumn

public javax.swing.table.TableColumn getColumn(int columnIndex)
Specified by:
getColumn in interface javax.swing.table.TableColumnModel
Overrides:
getColumn in class javax.swing.table.DefaultTableColumnModel
See Also:
TableColumnModel.getColumn(int)

isInitializing

public boolean isInitializing()
Returns:
true if this component is still initializing..


Copyright © 2002-2007 Martin van den Bemt. All Rights Reserved.