Groovy Documentation

com.wordpress.tipsforjava.swing.table
[Java] Enum VerticalTableHeaderCellRenderer.VerticalSortIcon

java.lang.Object
  com.wordpress.tipsforjava.swing.table.VerticalTableHeaderCellRenderer.VerticalSortIcon
All Implemented Interfaces:
Icon

private enum VerticalTableHeaderCellRenderer.VerticalSortIcon

An icon implementation to paint the contained icon rotated 90 degrees clockwise.

This implementation assumes that the L&F provides ascending and descending sort icons of identical size.


Enum Constant Summary
ASCENDING

DESCENDING

 
Field Summary
private Icon icon

A renderer for a JTableHeader with text rotated 90 degrees counterclockwise.

 
Method Summary
int getIconHeight()

Returns the height of the rotated icon.

int getIconWidth()

Returns the width of the rotated icon.

void paintIcon(Component c, Graphics g, int x, int y)

Paints an icon suitable for the header of a sorted table column, rotated by 90 degrees clockwise.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Enum Constant Detail

ASCENDING

VerticalTableHeaderCellRenderer.VerticalSortIcon ASCENDING


DESCENDING

VerticalTableHeaderCellRenderer.VerticalSortIcon DESCENDING


 
Field Detail

icon

private Icon icon
A renderer for a JTableHeader with text rotated 90 degrees counterclockwise.

Extends DefaultTableHeaderCellRenderer.

Authors:
Rob Camick
Darryl Burke
See Also:
VerticalLabelUI


 
Method Detail

getIconHeight

@Override
public int getIconHeight()
Returns the height of the rotated icon.
Returns:
the width of the contained icon


getIconWidth

@Override
public int getIconWidth()
Returns the width of the rotated icon.
Returns:
the height of the contained icon


paintIcon

@Override
public void paintIcon(Component c, Graphics g, int x, int y)
Paints an icon suitable for the header of a sorted table column, rotated by 90 degrees clockwise. This rotation is applied to compensate the rotation already applied to the passed in Graphics reference by the VerticalLabelUI.

The icon is retrieved from the UIManager to obtain an icon appropriate to the L&F.

Parameters:
c - the component to which the icon is to be rendered
g - the graphics context
x - the X coordinate of the icon's top-left corner
y - the Y coordinate of the icon's top-left corner


 

Groovy Documentation