|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.table.JTableHeader com.jidesoft.grid.DraggingTableHeader com.jidesoft.grid.CellStyleTableHeader
public class CellStyleTableHeader
This is a table header which is able to paint designated style in the header while keeping original header renderer in its maximum effort.
Since NestedTableHeader has multiple rows, CellStyleTableHeader will get its renderer component with row index as 0 instead of -1.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.table.JTableHeader |
---|
JTableHeader.AccessibleJTableHeader |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected List<CellStyle> |
_cellStyleList
|
Fields inherited from class com.jidesoft.grid.DraggingTableHeader |
---|
PROPERTY_DRAGGED_COLUMN, PROPERTY_DRAGGED_DISTANCE, PROPERTY_RESIZING_COLUMN |
Fields inherited from class javax.swing.table.JTableHeader |
---|
columnModel, draggedColumn, draggedDistance, reorderingAllowed, resizingAllowed, resizingColumn, table, updateTableInRealTime |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
CellStyleTableHeader()
|
|
CellStyleTableHeader(JTable table)
|
|
CellStyleTableHeader(TableColumnModel cm)
|
Method Summary | |
---|---|
void |
addCellDecorator(int index,
TableHeaderCellDecorator cellDecorator)
Adds a table header cell decorator. |
void |
addCellDecorator(TableHeaderCellDecorator cellDecorator)
Adds a table header cell decorator to the end. |
void |
addCellStyleCustomizer(CellStyleCustomizer customizer)
Adds a new CellStyleCustomizer. |
void |
clearCellStyleCustomizers()
Clears all the CellStyleCustomizers. |
protected void |
collectCellStyles(int row,
int column)
Collects the cell style of the cell and put into a sorted ArrayList which is a field called _cellStyleList. |
JToolTip |
createToolTip()
|
void |
customizeRendererComponent(Component component,
int rowIndex,
int columnIndex,
Rectangle cellRect)
Customizes the renderer component to be painted. |
int |
getActualHeaderY()
Gets the start Y of actual table header. |
String |
getActualUIClassID()
Returns a string that actually represents the UI class ID of this class. |
TableHeaderCellDecorator[] |
getCellDecorators()
Get all header cell decorators. |
CellStyle |
getCellStyleAt(int row,
int column)
Get the merged cell style for the cell from all its underlying HeaderStyleModel. |
CellStyleCustomizer[] |
getCellStyleCustomizers()
Gets all the CellStyleCustomizers. |
Cursor |
getDefaultCursor()
Gets the default cursor of the CellStyleTableHeader. |
String |
getUIDelegateClassID()
Returns a string that specifies the name of the UIDelegate class that paints this component. |
protected static CellStyle |
mergeCellStyles(List<CellStyle> cellStyles)
Merges the cell styles in the list into one CellStyle. |
int |
originalColumnAtPoint(Point point)
Gets column at point disregarding the Y. |
void |
releaseRendererComponent(Component component,
int rowIndex,
int columnIndex,
Rectangle cellRect)
Releases the customization of the renderer component after being painted. |
void |
removeCellDecorator(TableHeaderCellDecorator cellDecorator)
Removes the existing table header cell decorator. |
void |
removeCellStyleCustomizer(CellStyleCustomizer customizer)
Removes an existing CellStyleCustomizer. |
void |
setCursor(Cursor cursor)
|
void |
setDefaultRenderer(TableCellRenderer defaultRenderer)
|
void |
updateUI()
|
Methods inherited from class com.jidesoft.grid.DraggingTableHeader |
---|
getPreferredSize, getToolTipText, paintComponent, setDraggedColumn, setDraggedDistance, setResizingColumn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final List<CellStyle> _cellStyleList
Constructor Detail |
---|
public CellStyleTableHeader()
public CellStyleTableHeader(JTable table)
public CellStyleTableHeader(TableColumnModel cm)
Method Detail |
---|
public String getUIDelegateClassID()
public String getActualUIClassID()
public void updateUI()
updateUI
in class JTableHeader
public void setDefaultRenderer(TableCellRenderer defaultRenderer)
setDefaultRenderer
in class JTableHeader
public JToolTip createToolTip()
createToolTip
in class JComponent
public int getActualHeaderY()
NestedTableHeader
and GroupTableHeader
scenarios, this method will return different value other
than 0.
public void addCellDecorator(TableHeaderCellDecorator cellDecorator)
cellDecorator
- the table header cell decorator to addpublic void addCellDecorator(int index, TableHeaderCellDecorator cellDecorator)
index
- the order the cell decorator will be invokedcellDecorator
- the table header cell decorator to addpublic void removeCellDecorator(TableHeaderCellDecorator cellDecorator)
cellDecorator
- the cell decorator to removepublic TableHeaderCellDecorator[] getCellDecorators()
public int originalColumnAtPoint(Point point)
point
- the mouse point
public CellStyle getCellStyleAt(int row, int column)
row
- the row indexcolumn
- the view column index
protected static CellStyle mergeCellStyles(List<CellStyle> cellStyles)
cellStyles
- the list of CellStyles.
protected void collectCellStyles(int row, int column)
row
- the row index.column
- the view column index.public void customizeRendererComponent(Component component, int rowIndex, int columnIndex, Rectangle cellRect)
component
- the renderer componentrowIndex
- the view row index inside the table header. Should be 0 unless it is a NestedTableHeader.columnIndex
- the view column indexcellRect
- the cell rectangle to paint the componentpublic void releaseRendererComponent(Component component, int rowIndex, int columnIndex, Rectangle cellRect)
customizeRendererComponent(java.awt.Component, int, int, java.awt.Rectangle)
component
- the renderer componentrowIndex
- the view row index inside the table header. Should be 0 unless it is a NestedTableHeader.columnIndex
- the view column indexcellRect
- the cell rectangle to paint the componentpublic void setCursor(Cursor cursor)
setCursor
in class Component
public Cursor getDefaultCursor()
setCursor(java.awt.Cursor)
. Only one
cursor, Cursor.E_RESIZE_CURSOR
, won't be returned here.
public void addCellStyleCustomizer(CellStyleCustomizer customizer)
customizeRendererComponent(java.awt.Component, int, int, java.awt.Rectangle)
methods.
customizer
- a new CellStyleCustomizer.public void removeCellStyleCustomizer(CellStyleCustomizer customizer)
customizer
- the CellStyleCustomizer to be removedpublic CellStyleCustomizer[] getCellStyleCustomizers()
public void clearCellStyleCustomizers()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |