56 public class DefaultTableColumnModel implements TableColumnModel,
57 PropertyChangeListener, ListSelectionListener, Serializable
58 {
59 //
60 // Instance Variables
61 //
62
63 /** Array of TableColumn objects in this model */
64 protected Vector<TableColumn> tableColumns;
65
66 /** Model for keeping track of column selections */
67 protected ListSelectionModel selectionModel;
68
69 /** Width margin between each column */
70 protected int columnMargin;
71
72 /** List of TableColumnModelListener */
73 protected EventListenerList listenerList = new EventListenerList();
74
75 /** Change event (only one needed) */
76 transient protected ChangeEvent changeEvent = null;
77
78 /** Column selection allowed in this column model */
79 protected boolean columnSelectionAllowed;
80
81 /** A local cache of the combined width of all columns */
82 protected int totalColumnWidth;
83
84 //
85 // Constructors
86 //
87 /**
88 * Creates a default table column model.
89 */
90 public DefaultTableColumnModel() {
91 super();
92
93 // Initialize local ivars to default
94 tableColumns = new Vector<TableColumn>();
95 setSelectionModel(createSelectionModel());
96 setColumnMargin(1);
|
56 public class DefaultTableColumnModel implements TableColumnModel,
57 PropertyChangeListener, ListSelectionListener, Serializable
58 {
59 //
60 // Instance Variables
61 //
62
63 /** Array of TableColumn objects in this model */
64 protected Vector<TableColumn> tableColumns;
65
66 /** Model for keeping track of column selections */
67 protected ListSelectionModel selectionModel;
68
69 /** Width margin between each column */
70 protected int columnMargin;
71
72 /** List of TableColumnModelListener */
73 protected EventListenerList listenerList = new EventListenerList();
74
75 /** Change event (only one needed) */
76 protected transient ChangeEvent changeEvent = null;
77
78 /** Column selection allowed in this column model */
79 protected boolean columnSelectionAllowed;
80
81 /** A local cache of the combined width of all columns */
82 protected int totalColumnWidth;
83
84 //
85 // Constructors
86 //
87 /**
88 * Creates a default table column model.
89 */
90 public DefaultTableColumnModel() {
91 super();
92
93 // Initialize local ivars to default
94 tableColumns = new Vector<TableColumn>();
95 setSelectionModel(createSelectionModel());
96 setColumnMargin(1);
|