|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
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.JPanel | +--com.klg.jclass.util.swing.JCSortableTable.SortableHeaderRenderer
Renderer/editor that has two components: the label and the sort order icon, which is stored in a button.
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected com.klg.jclass.util.swing.JCBrace |
brace
|
protected boolean |
currentLayoutLeft
|
protected JLabel |
label
|
protected JButton |
sortButton
|
protected Icon |
sortIcon
|
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 | |
JCSortableTable.SortableHeaderRenderer()
Constructor that sets up the layout using a left to right orientation. |
|
JCSortableTable.SortableHeaderRenderer(boolean orientationLeft)
Constructor that sets up the layout using a passed in orientation indicator. |
Method Summary | |
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
Returns the component used for drawing the cell. |
boolean |
isCurrentLayoutLeft()
Is the most recent layout, left to right oriented. |
void |
reLayout(boolean orientationLeft)
Remove all components and add the components back in based on their availability and the table's component orientation. |
protected void |
setProperties(JTable table)
Set properties on the header renderer component based on the table header. |
void |
setSortIcon(Icon sortIcon)
Sets the icon to use to draw the sort icon. |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected JLabel label
protected JButton sortButton
protected com.klg.jclass.util.swing.JCBrace brace
protected Icon sortIcon
protected boolean currentLayoutLeft
Constructor Detail |
public JCSortableTable.SortableHeaderRenderer()
sortButton
) to start.
public JCSortableTable.SortableHeaderRenderer(boolean orientationLeft)
sortButton
) to start.
orientationLeft
- If true, the renderer is oriented leftToRight.Method Detail |
public boolean isCurrentLayoutLeft()
protected void setProperties(JTable table)
table
- The table whose header is used to set the properties.public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
getTableCellRendererComponent
in interface TableCellRenderer
table
- the JTable
that is asking the renderer to
draw; can be null
value
- The value of the cell to be rendered. It is up to the
specific renderer to interpret and draw the value. For example, if
value
is the String true
, it could be
rendered as a String, or it could be rendered as a check box that is
checked. null
is a valid value.isSelected
- true
if the cell is to be rendered with
the selection highlighted; otherwise false
hasFocus
- If true
, render cell appropriately. For
example, put a special border on the cell, if the cell can be edited,
rendered in the color used to indicate editing.row
- The row index of the cell being drawn. When drawing the
header, the value of row
is -1column
- the column index of the cell being drawn
public void setSortIcon(Icon sortIcon)
setSortIcon
in interface JCSortableTable.SortableColumnHeader
sortIcon
- the new sort icon to usepublic void reLayout(boolean orientationLeft)
orientationLeft
- If true, layout in left to right orientation.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |