: Class Column

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## grendel.widgets
Class Column

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

public class Column
extends java.lang.Object

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.

Constructor Summary
`Column(java.lang.Object aID)` Constructs a column with the given ID
`Column(java.lang.Object aID, javax.swing.Icon aIcon)` Contructs a column with the given ID and icon
`Column(java.lang.Object aID, java.lang.String aTitle)` Constructs a column with the given ID and title

Method Summary
`void` | `addColumnChangeListener(ColumnChangeListener aListener)` Adds a ColumnChangeListener.
`CellEditor` | `getCellEditor()` Not implemented
`CellRenderer` | `getCellRenderer()` Returns the cell renderer for this column.
`HeaderRenderer` | `getHeaderRenderer()` Returns the column's header renderer
`javax.swing.Icon` | `getIcon()` Returns the column icon
`java.lang.Object` | `getID()` Returns the column's user defined id.
`int` | `getMaxWidth()` returns the maximum column width.
`int` | `getMinWidth()` Returns the minimum column width.
`java.lang.String` | `getTitle()` Returns the column title.
`int` | `getWidth()` Returns the current column width
`boolean` | `isResizeable()` Returns whether or not the column is resizable.
`boolean` | `isSelectable()` Returns whether or not the column is resizable.
`void` | `removeColumnChangeListener(ColumnChangeListener aListener)` Removes a ColumnChangeListener.
`void` | `setCellEditor(CellEditor aEditor)` Not implemented
`void` | `setCellRenderer(CellRenderer aRenderer)` Sets the cell renderer for this column.
`void` | `setHeaderRenderer(HeaderRenderer aRenderer)` Sets the column's header renderer.
`void` | `setIcon(javax.swing.Icon aIcon)` Sets the icon for the column.
`void` | `setID(java.lang.Object aID)` Sets the column's user defined id.
`void` | `setMaxWidth(int aWidth)` Sets the maximum column width.
`void` | `setMinWidth(int aWidth)` Sets the minimum column width.
`void` | `setResizeable(boolean aResizeable)` Sets whether or not the column is resizable.
`void` | `setSelectable(boolean aSelectable)` Sets whether or not the column is selectable.
`void` | `setTitle(java.lang.String aTitle)` Sets the column title.
`void` | `setWidth(int aWidth)` Sets the width of the column.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Column

    public Column(java.lang.Object aID,
                  java.lang.String aTitle)

  Constructs a column with the given ID and title

### Column

    public Column(java.lang.Object aID,
                  javax.swing.Icon aIcon)

  Contructs a column with the given ID and icon

### Column

    public Column(java.lang.Object aID)

  Constructs a column with the given ID

Method Detail

### 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(java.lang.String aTitle)

  Sets the column title. This is intended to be displayed in the header above the column.
  See Also:
    `getTitle()`

### getTitle

    public java.lang.String getTitle()

  Returns the column title.
  See Also:
    `setTitle()`

### setIcon

    public void setIcon(javax.swing.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 javax.swing.Icon getIcon()

  Returns the column icon
  See Also:
    `setIcon()`

### setID

    public void setID(java.lang.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 java.lang.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()`, `javax.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.`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD