站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ColumnModel (TreeTableView Model) - NetBeans API Javadoc (Current Development Version)

org.netbeans.spi.viewmodel/2 1.11

org.netbeans.spi.viewmodel
Class ColumnModel

java.lang.Object
  extended by 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.
 Character getDisplayedMnemonic()
          Returns the character, that indicates a mnemonic key for this column name.
abstract  String getDisplayName()
          Returns display name of this column.
abstract  String getID()
          Returns unique ID of this column.
 String getNextColumnID()
          Deprecated. Not used. See getCurrentOrderNumber().
 String getPreviuosColumnID()
          Deprecated. Not used. See getCurrentOrderNumber().
 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 is sorted.
 boolean isSortedDescending()
          True if column should be sorted in descending order.
 boolean isVisible()
          True if column should be visible.
 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 is to be sorted.
 void setSortedDescending(boolean sortedDescending)
          Set true if column is to be sorted in descending order.
 void setVisible(boolean visible)
          Set true if column is to be 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

getDisplayedMnemonic

public Character getDisplayedMnemonic()
Returns the character, that indicates a mnemonic key for this column name. Can be null.

Returns:
the mnemonic key or null.
Since:
1.11

getType

public abstract Class getType()
Returns type of column items.

Returns:
type of column items

getPreviuosColumnID

public String getPreviuosColumnID()
Deprecated. Not used. See getCurrentOrderNumber().

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()
Deprecated. Not used. See getCurrentOrderNumber().

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. Default implementation returns true.

Returns:
true if column should be visible

setVisible

public void setVisible(boolean visible)
Set true if column is to be visible. Default implementation does nothing.

Parameters:
visible - set true if column is to be visible

isSorted

public boolean isSorted()
True if column is sorted. Default implementation returns false.

Returns:
true if column is sorted.

setSorted

public void setSorted(boolean sorted)
Set true if column is to be sorted. Default implementation does nothing.

Parameters:
sorted - set true if column is to be sorted

isSortedDescending

public boolean isSortedDescending()
True if column should be sorted in descending order. Default implementation returns false.

Returns:
true if column should be sorted in descending order

setSortedDescending

public void setSortedDescending(boolean sortedDescending)
Set true if column is to be sorted in descending order. Default implementation does nothing.

Parameters:
sortedDescending - set true if column is to be sorted in descending order

getCurrentOrderNumber

public int getCurrentOrderNumber()
Should return current order number of this column. Default value is -1.

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. Default implementation does nothing.

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. Default implementation does nothing.

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

org.netbeans.spi.viewmodel/2 1.11

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.