You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



All Packages  This Package  Class Hierarchy  Class Search  Index

Interface grendel.widgets.ColumnModel

An interface for the data model that stores the layout of a set of columns. This interface is shared by the ColumnHeaders and the TreeTable to provide a common column layout for both.


public interface  ColumnModel
{
          // Methods 19
     public abstract void addColumn(Column);
     public abstract void addColumnAt(Column, int);
     public abstract void addColumnModelListener(ColumnModelListener);
     public abstract Column getColumn(int);
     public abstract Column getColumn(Object);
     public abstract int getColumnCount();
     public abstract int getColumnIndex(Column);
     public abstract int getColumnIndexAtX(int);
     public abstract int getColumnMargin();
     public abstract Enumeration getColumns();
     public abstract String getPrefString();
     public abstract Column getSelectedColumn();
     public abstract int getTotalColumnWidth();
     public abstract void moveColumn(int, int);
     public abstract void removeColumn(Column);
     public abstract void removeColumnModelListener(ColumnModelListener);
     public abstract void setColumnMargin(int);
     public abstract void setPrefString(String);
     public abstract void setSelectedColumn(Column);
}



Methods


addColumn

   public abstract void addColumn(Column aColumn) 

Add a column to the model. The column is added at the end.



addColumnAt

   public abstract void addColumnAt(Column aColumn, 
                                    int aIndex) 

Add a column to the model at a specified index. An exception may be if the index is invalid.



removeColumn

   public abstract void removeColumn(Column aColumn) 

Removes a column from the model.



moveColumn

   public abstract void moveColumn(int aSource, 
                                   int aDest) 

Moves a column at the source index to the destination index. Columns in between may be shifted. An exception may be thrown if either index is invalid.



getColumnCount

   public abstract int getColumnCount() 

Returns:
The total number of columns in this model.


getColumn

   public abstract Column getColumn(int aIndex) 

Returns:
The column at the given index. Returns null if index is invalid.


getColumn

   public abstract Column getColumn(Object aID) 

Returns:
The column with the given ID. Returns null if a column with the given ID is not in the model.


getColumns

   public abstract Enumeration getColumns() 

Returns:
An enumeration of all the columns in the model.


getColumnIndex

   public abstract int getColumnIndex(Column aColumn) 

Returns:
The index of the column in the model. Returns -1 if the column is not in the model.


getColumnIndexAtX

   public abstract int getColumnIndexAtX(int aX) 

Returns:
The index of the column at the given X location. Returns -1 if the given X does not fall over a column.


getColumnMargin

   public abstract int getColumnMargin() 

Returns:
The margin (gap) between columns.


setColumnMargin

   public abstract void setColumnMargin(int aMargin) 

Sets the margin (gap) between columns.



getTotalColumnWidth

   public abstract int getTotalColumnWidth() 

Returns:
The sum of all column widths and margins.


addColumnModelListener

   public abstract void addColumnModelListener(ColumnModelListener aListener) 

Adds a ColumnModelListener.



removeColumnModelListener

   public abstract void removeColumnModelListener(ColumnModelListener aListener) 

Removes a ColumnModelListener.



getSelectedColumn

   public abstract Column getSelectedColumn() 

Returns:
The currently selected column.


setSelectedColumn

   public abstract void setSelectedColumn(Column aColumn) 

Sets the currently selected column. Currently only single selection is supported.



getPrefString

   public abstract String getPrefString() 

Returns:
A string representing the layout (order and widths) of the columns.


setPrefString

   public abstract void setPrefString(String aString) 

Restores a column layout that was obtained from getPrefString().



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4