Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.spi.viewmodel/2 1.9.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.spi.viewmodel
Class ColumnModel

    java.lang.Object
      org.netbeans.spi.viewmodel.ColumnModel

All Implemented Interfaces:
  Model

    public abstract class ColumnModel

extends Object
implements Model

Defines model for one table view column. Can be used together with `TreeModel` for tree table view representation.

Constructor Summary
`ColumnModel()`

Method Summary
`int` | `getColumnWidth()` Return column width of this column.
`int` | `getCurrentOrderNumber()` Should return current order number of this column.
`abstract String` | `getDisplayName()` Returns display name of this column.
`abstract String` | `getID()` Returns unique ID of this column.
`String` | `getNextColumnID()` Returns ID of column this column should be installed after or `null`.
`String` | `getPreviuosColumnID()` Returns ID of column this column should be installed before or `null`.
`PropertyEditor` | `getPropertyEditor()` Returns `PropertyEditor` to be used for this column.
`String` | `getShortDescription()` Returns tooltip for given column.
`abstract Class` | `getType()` Returns type of column items.
`boolean` | `isSortable()` True if column can be sorted.
`boolean` | `isSorted()` True if column should be sorted by default.
`boolean` | `isSortedDescending()` True if column should be sorted by default in descending order.
`boolean` | `isVisible()` True if column should be visible by default.
`void` | `setColumnWidth(int newColumnWidth)` Is called when column width of this column is changed.
`void` | `setCurrentOrderNumber(int newOrderNumber)` Is called when current order number of this column is changed.
`void` | `setSorted(boolean sorted)` Set true if column should be sorted by default.
`void` | `setSortedDescending(boolean sortedDescending)` Set true if column should be sorted by default in descending order.
`void` | `setVisible(boolean visible)` Set true if column is visible.

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

Constructor Detail

### ColumnModel

    public ColumnModel()

Method Detail

### getID

    public abstract String getID()

  Returns unique ID of this column.

  Returns:
    unique ID of this column

### getDisplayName

    public abstract String getDisplayName()

  Returns display name of this column.

  Returns:
    display name of this column

### getType

    public abstract Class getType()

  Returns type of column items.

  Returns:
    type of column items

### getPreviuosColumnID

    public String getPreviuosColumnID()

  Returns ID of column this column should be installed before or `null`. Defines default order of columns only. This default order can be changed by user, and `getCurrentOrderNumber()` and `setCurrentOrderNumber(int)` are used for sorting after that.

  Returns:
    ID of column this column should be installed before or `null`

### getNextColumnID

    public String getNextColumnID()

  Returns ID of column this column should be installed after or `null`. Defines default order of columns only. This default order can be changed by user, and `getCurrentOrderNumber()` and `setCurrentOrderNumber(int)` are used for sorting after that.

  Returns:
    ID of column next to this one or `null`

### getShortDescription

    public String getShortDescription()

  Returns tooltip for given column. Default implementation returns `null` - do not use tooltip.

  Returns:
    tooltip for given node or `null`

### isSortable

    public boolean isSortable()

  True if column can be sorted. Default implementation returns `true`.

  Returns:
    true if column can be sorted

### isVisible

    public boolean isVisible()

  True if column should be visible by default. Default implementation returns `true`.

  Returns:
    `true` if column should be visible by default

### setVisible

    public void setVisible(boolean visible)

  Set true if column is visible.

  Parameters:
    `visible` - set true if column is visible

### isSorted

    public boolean isSorted()

  True if column should be sorted by default. Default implementation returns `false`.

  Returns:
    `true` if column should be sorted by default

### setSorted

    public void setSorted(boolean sorted)

  Set true if column should be sorted by default.

  Parameters:
    `sorted` - set true if column should be sorted by default

### isSortedDescending

    public boolean isSortedDescending()

  True if column should be sorted by default in descending order. Default implementation returns `false`.

  Returns:
    `true` if column should be sorted by default in descending order

### setSortedDescending

    public void setSortedDescending(boolean sortedDescending)

  Set true if column should be sorted by default in descending order.

  Parameters:
    `sortedDescending` - set true if column should be sorted by default in descending order

### getCurrentOrderNumber

    public int getCurrentOrderNumber()

  Should return current order number of this column. Default value is `-1`. Current order number is used when the default order defined by `getPreviuosColumnID()` and `getNextColumnID()` is changed by user. So getCurrentOrderNumber () method should return `-1`, till the `setCurrentOrderNumber(int)` is called. And it should return newOrderNumber value after that.

  Returns:
    current order number of this column or `-1`

### setCurrentOrderNumber

    public void setCurrentOrderNumber(int newOrderNumber)

  Is called when current order number of this column is changed.

  Parameters:
    `newOrderNumber` - new order number

### getColumnWidth

    public int getColumnWidth()

  Return column width of this column.

  Returns:
    column width of this column

### setColumnWidth

    public void setColumnWidth(int newColumnWidth)

  Is called when column width of this column is changed.

  Parameters:
    `newColumnWidth` - a new column width

### getPropertyEditor

    public PropertyEditor getPropertyEditor()

  Returns `PropertyEditor` to be used for this column. Default implementation returns `null` - means use default PropertyEditor.

  Returns:
    `PropertyEditor` to be used for this column

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.spi.viewmodel/2 1.9.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.