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

Class grendel.widgets.Column

java.lang.Object
   |
   +----grendel.widgets.Column

A Column is a vertical display unit for a table that maintains width, rendering, and header display data. A column has no data model, thus it is only useful in conjunction with another UI component that provides a one.


public class  Column
     extends java.lang.Object
{
          // Fields 12
     CellEditor fCellEditor;
     CellRenderer fCellRenderer;
     HeaderRenderer fHeaderRenderer;
     Object fID;
     Icon fIcon;
     Vector fListeners;
     int fMaxWidth;
     int fMinWidth;
     boolean fResizeable;
     boolean fSelectable;
     String fTitle;
     int fWidth;

          // Constructors 3
     public Column(Object);
     public Column(Object, Icon);
     public Column(Object, String);

          // Methods 25
     public void addColumnChangeListener(ColumnChangeListener);
     public CellEditor getCellEditor();
     public CellRenderer getCellRenderer();
     public HeaderRenderer getHeaderRenderer();
     public Object getID();
     public Icon getIcon();
     public int getMaxWidth();
     public int getMinWidth();
     public String getTitle();
     public int getWidth();
     public boolean isResizeable();
     public boolean isSelectable();
     void notifyWidthChange();
     public void removeColumnChangeListener(ColumnChangeListener);
     public void setCellEditor(CellEditor);
     public void setCellRenderer(CellRenderer);
     public void setHeaderRenderer(HeaderRenderer);
     public void setID(Object);
     public void setIcon(Icon);
     public void setMaxWidth(int);
     public void setMinWidth(int);
     public void setResizeable(boolean);
     public void setSelectable(boolean);
     public void setTitle(String);
     public void setWidth(int);
}



Fields


fIcon

   Icon fIcon


fTitle

   String fTitle


fID

   Object fID


fWidth

   int fWidth


fMinWidth

   int fMinWidth


fMaxWidth

   int fMaxWidth


fResizeable

   boolean fResizeable


fSelectable

   boolean fSelectable


fListeners

   Vector fListeners


fCellRenderer

   CellRenderer fCellRenderer


fCellEditor

   CellEditor fCellEditor


fHeaderRenderer

   HeaderRenderer fHeaderRenderer



Constructors


Column

   public Column(Object aID, 
                 String aTitle) 

Constructs a column with the given ID and title



Column

   public Column(Object aID, 
                 Icon aIcon) 

Contructs a column with the given ID and icon



Column

   public Column(Object aID) 

Constructs a column with the given ID




Methods


setWidth

   public void setWidth(int aWidth) 

Sets the width of the column.

See Also: getWidth



getWidth

   public int getWidth() 

Returns the current column width

See Also: setWidth



setMinWidth

   public void setMinWidth(int aWidth) 

Sets the minimum column width. This width is for reference only, it is not enforced

See Also: getMinWidth



getMinWidth

   public int getMinWidth() 

Returns the minimum column width. This width is for reference only, it is not enforced

See Also: setMinWidth



setMaxWidth

   public void setMaxWidth(int aWidth) 

Sets the maximum column width. This width is for reference only, it is not enforced

See Also: getMaxWidth



getMaxWidth

   public int getMaxWidth() 

returns the maximum column width. This width is for reference only, it is not enforced

See Also: setMaxWidth



setResizeable

   public void setResizeable(boolean aResizeable) 

Sets whether or not the column is resizable. This attribute is for reference only, it is not enforced.

See Also: isResizeable



isResizeable

   public boolean isResizeable() 

Returns whether or not the column is resizable. This attribute is for reference only, it is not enforced.

See Also: setResizeable



setSelectable

   public void setSelectable(boolean aSelectable) 

Sets whether or not the column is selectable.

See Also: isSelectable



isSelectable

   public boolean isSelectable() 

Returns whether or not the column is resizable. This attribute is for reference only, it is not enforced.

See Also: setSelectable



setTitle

   public void setTitle(String aTitle) 

Sets the column title. This is intended to be displayed in the header above the column.

See Also: getTitle



getTitle

   public String getTitle() 

Returns the column title.

See Also: setTitle



setIcon

   public void setIcon(Icon aIcon) 

Sets the icon for the column. This is intended to be displayed in the header above the column

See Also: getIcon



getIcon

   public Icon getIcon() 

Returns the column icon

See Also: setIcon



setID

   public void setID(Object aID) 

Sets the column's user defined id. The user can define whatever value they find meaningful for this purpose.

See Also: getID



getID

   public Object getID() 

Returns the column's user defined id.

See Also: setID



setCellRenderer

   public void setCellRenderer(CellRenderer aRenderer) 

Sets the cell renderer for this column. This renderer is used for column data provided by another source.

See Also: getCellRenderer, CellRenderer



getCellRenderer

   public CellRenderer getCellRenderer() 

Returns the cell renderer for this column.

See Also: setCellRenderer, CellRenderer



setCellEditor

   public void setCellEditor(CellEditor aEditor) 

Not implemented



getCellEditor

   public CellEditor getCellEditor() 

Not implemented



setHeaderRenderer

   public void setHeaderRenderer(HeaderRenderer aRenderer) 

Sets the column's header renderer. This renders the column caption in a space provided by that object

See Also: getHeaderRenderer, com.sun.java.swing.CellRenderer



getHeaderRenderer

   public HeaderRenderer getHeaderRenderer() 

Returns the column's header renderer

See Also: setHeaderRenderer



addColumnChangeListener

   public void addColumnChangeListener(ColumnChangeListener aListener) 

Adds a ColumnChangeListener. The listener is notified whenever a significant attribute changes. Currently this only includes the column width, but this will expand.

See Also: removeColumnListener, ColumnChangeListener



removeColumnChangeListener

   public void removeColumnChangeListener(ColumnChangeListener aListener) 

Removes a ColumnChangeListener.

See Also: addColumnChangeListener.



notifyWidthChange

   void notifyWidthChange() 

Used internally



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