org.tbee.swing
Class VerticalTextIcon

java.lang.Object
  extended by org.tbee.swing.VerticalTextIcon
All Implemented Interfaces:
Icon, SwingConstants

public class VerticalTextIcon
extends Object
implements Icon, SwingConstants

A vertical text icon especially interesting for JTabbedPane where the icon can be put rotated on the side (instead of straight up).

Version:
$Revision: 1.4 $

Field Summary
static String SOURCECODE_VERSION
          Standard variable for determining version of a class file.
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
VerticalTextIcon(String text, boolean clockwize)
           
 
Method Summary
static void addTab(JTabbedPane tabPane, String tablabel, Component tabcontents)
          Add a vertical icon to a JTabbedPane as a tab
static JTabbedPane createTabbedPane(int tabPlacement)
          Create a JTabbedPane that supports vertical icons
 int getIconHeight()
           
 int getIconWidth()
           
static void main(String[] args)
           
 void paintIcon(Component c, Graphics g, int x, int y)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOURCECODE_VERSION

public static final String SOURCECODE_VERSION
Standard variable for determining version of a class file.

See Also:
Constant Field Values
Constructor Detail

VerticalTextIcon

public VerticalTextIcon(String text,
                        boolean clockwize)
Method Detail

paintIcon

public void paintIcon(Component c,
                      Graphics g,
                      int x,
                      int y)
Specified by:
paintIcon in interface Icon

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface Icon

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface Icon

createTabbedPane

public static JTabbedPane createTabbedPane(int tabPlacement)
Create a JTabbedPane that supports vertical icons

Parameters:
tabPlacement -
Returns:

addTab

public static void addTab(JTabbedPane tabPane,
                          String tablabel,
                          Component tabcontents)
Add a vertical icon to a JTabbedPane as a tab


main

public static void main(String[] args)


Copyright © 2011 KnowledgePlaza. All Rights Reserved.