public class ETableColumn extends TableColumn implements Comparable<ETableColumn>
Modifier and Type | Class and Description |
---|---|
class |
ETableColumn.RowComparator
Comparator used for sorting the rows according to value in
a given column.
|
CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, COLUMN_WIDTH_PROPERTY, HEADER_RENDERER_PROPERTY, HEADER_VALUE_PROPERTY, headerRenderer, headerValue, identifier, isResizable, maxWidth, minWidth, modelIndex, resizedPostingDisableCount, width
Constructor and Description |
---|
ETableColumn(ETable table)
Creates a new instance of ETableColumn
|
ETableColumn(int modelIndex,
ETable table)
Creates a new instance of ETableColumn
|
ETableColumn(int modelIndex,
int width,
ETable table)
Creates a new instance of ETableColumn
|
ETableColumn(int modelIndex,
int width,
TableCellRenderer cellRenderer,
TableCellEditor cellEditor,
ETable table)
Creates a new instance of ETableColumn
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ETableColumn obj) |
protected TableCellRenderer |
createDefaultHeaderRenderer()
Overridden to return our special header renderer.
|
Comparator |
getNestedComparator()
Returns comparator for sorting the rows belonging to
same parent in tree-like part of table.
|
protected Comparator<ETable.RowMapping> |
getRowComparator(int column,
boolean ascending)
Allow subclasses to supply special row comparator object.
|
int |
getSortRank()
Rank value 1 means that this is the most important column
(with respect to the table sort), value 2 means second etc.
|
boolean |
isAscending()
Checks whether the sort order is ascending (true means ascending,
false means descending).
|
boolean |
isHidingAllowed()
The column can be hidden if this method returns true.
|
boolean |
isSorted()
Returns true if the table is sorted using this column.
|
boolean |
isSortingAllowed()
The column can be sorted if this method returns true.
|
void |
readSettings(Properties p,
int index,
String propertyPrefix)
Method allowing to read stored values.
|
void |
setAscending(boolean ascending)
Sets the sort order.
|
void |
setCustomIcon(Icon i)
Allows setting a custom icon for this column.
|
void |
setHeaderRenderer(TableCellRenderer tcr)
Allows to set the header renderer.
|
void |
setNestedComparator(Comparator c)
Method allowing to set custom comparator for sorting the rows belonging to
same parent in tree-like part of table.
|
void |
setSorted(int rank,
boolean ascending)
Deprecated.
This method has no effect if the column was not already sorted before.
Use
ETableColumnModel.setColumnSorted(org.netbeans.swing.etable.ETableColumn, boolean, int) instead. |
void |
setSortRank(int newRank)
Rank value 1 means that this is the most important column
(with respect to the table sort), value 2 means second etc.
|
void |
writeSettings(Properties p,
int index,
String propertyPrefix)
Method allowing to store customization values.
|
addPropertyChangeListener, disableResizedPosting, enableResizedPosting, getCellEditor, getCellRenderer, getHeaderRenderer, getHeaderValue, getIdentifier, getMaxWidth, getMinWidth, getModelIndex, getPreferredWidth, getPropertyChangeListeners, getResizable, getWidth, removePropertyChangeListener, setCellEditor, setCellRenderer, setHeaderValue, setIdentifier, setMaxWidth, setMinWidth, setModelIndex, setPreferredWidth, setResizable, setWidth, sizeWidthToFit
public ETableColumn(ETable table)
public ETableColumn(int modelIndex, ETable table)
public ETableColumn(int modelIndex, int width, ETable table)
public ETableColumn(int modelIndex, int width, TableCellRenderer cellRenderer, TableCellEditor cellEditor, ETable table)
@Deprecated public void setSorted(int rank, boolean ascending)
ETableColumnModel.setColumnSorted(org.netbeans.swing.etable.ETableColumn, boolean, int)
instead.rank
- value 1 means that this is the most important sorted
column, number 2 means second etc.ascending
- true means ascendingpublic boolean isSorted()
public void setSortRank(int newRank)
newRank
- value 1 means that this is the most important sorted
column, number 2 means second etc.public int getSortRank()
public boolean isAscending()
public void setAscending(boolean ascending)
ascending
- true means ascendingpublic void setHeaderRenderer(TableCellRenderer tcr)
setHeaderRenderer
in class TableColumn
public boolean isHidingAllowed()
public boolean isSortingAllowed()
public void setCustomIcon(Icon i)
public void readSettings(Properties p, int index, String propertyPrefix)
public void writeSettings(Properties p, int index, String propertyPrefix)
public int compareTo(ETableColumn obj)
compareTo
in interface Comparable<ETableColumn>
protected Comparator<ETable.RowMapping> getRowComparator(int column, boolean ascending)
public void setNestedComparator(Comparator c)
c
- comparator or null for using the default comparatorpublic Comparator getNestedComparator()
protected TableCellRenderer createDefaultHeaderRenderer()
createDefaultHeaderRenderer
in class TableColumn
TableColumn.createDefaultHeaderRenderer()