|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--nl.skybound.awt.VerticalLabel
Label like class that displays it's label tilted + or - 90 degrees so that you can read the label either down-up or up-down.
Label,
Canvas, Serialized Form| Inner classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static int |
DIRECTION_DOWN
Text direction constant for reading downwards (with your head tilted to the right). |
static int |
DIRECTION_UP
Text direction constant for reading upwards (with your head tilted to the left). |
| 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 | |
VerticalLabel(int direction,
java.lang.String text)
Constructs a new VerticalLabel with the specified text, direction, and Label.LEFT alignment. |
|
VerticalLabel(int direction,
java.lang.String text,
int alignment)
Constructs a new VerticalLabel with the specified direction, text, and alignment. |
|
VerticalLabel(java.lang.String text)
Constructs a new VerticalLabel with the specified text, Label.LEFT alignment, and DIRECTION_UP direction. |
|
VerticalLabel(java.lang.String text,
int alignment)
Constructs a new VerticalLabel with the specified text, alignment, and DIRECTION_UP direction. |
|
| Method Summary | |
void |
addNotify()
|
int |
getAlignment()
Gets the alignment for this label. |
int |
getDirection()
Gets the direction for this label. |
java.awt.Dimension |
getMaximumSize()
Gets the maximum size of this label. |
java.awt.Dimension |
getMinimumSize()
Gets the minimum size of this label. |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size of this label. |
java.lang.String |
getText()
Gets the text of this label. |
void |
paint(java.awt.Graphics g)
Paints the vertical text. |
protected java.lang.String |
paramString()
Returns the parameter string representing the state of this label. |
void |
setAlignment(int alignment)
Sets the alignment for this label to the specified alignment. |
void |
setDirection(int direction)
Sets the direction for this label to the specified direction. |
void |
setFont(java.awt.Font font)
Sets the font of this label. |
void |
setSize(int width,
int height)
|
void |
setText(java.lang.String text)
Sets the text for this label to the specified text. |
void |
update(java.awt.Graphics g)
Calls paint(Graphics g). |
| Methods inherited from class java.awt.Canvas |
getAccessibleContext |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setVisible, show, show, size, toString, transferFocus, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DIRECTION_DOWN
public static final int DIRECTION_UP
| Constructor Detail |
public VerticalLabel(java.lang.String text)
text - the initial text.Label
public VerticalLabel(java.lang.String text,
int alignment)
text - the initial text.alignment - the initial alignment.Label
public VerticalLabel(int direction,
java.lang.String text)
direction - the initial direction.text - the initial text.Label
public VerticalLabel(int direction,
java.lang.String text,
int alignment)
direction - the initial direction.text - the initial text.alignment - the initial alignment.Label| Method Detail |
public void setAlignment(int alignment)
Label.LEFT,
Label.RIGHT, and Label.CENTER.alignment - the alignment to be set.java.lang.IllegalArgumentException - if an improper value for
alignment is given.getAlignment()public int getAlignment()
setAlignment(int),
Label.getAlignment()public void setDirection(int direction)
VerticalLabel.DIRECTION_UP,
VerticalLabel.DIRECTION_DOWN.direction - the direction to be set.java.lang.IllegalArgumentException - if an improper value for
direction is given.getDirection()public int getDirection()
setDirection(int)public java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Componentpublic java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Componentpublic java.awt.Dimension getMaximumSize()
getMaximumSize in class java.awt.Componentpublic void setFont(java.awt.Font font)
setFont in class java.awt.ComponentComponent.setFont(java.awt.Font)public void addNotify()
addNotify in class java.awt.CanvasCanvas.addNotify()public void paint(java.awt.Graphics g)
paint in class java.awt.Canvasupdate(java.awt.Graphics),
Canvas.paint(java.awt.Graphics)public void update(java.awt.Graphics g)
update in class java.awt.Componentpaint(java.awt.Graphics),
Canvas.paint(java.awt.Graphics)
public void setSize(int width,
int height)
setSize in class java.awt.ComponentComponent.setSize(int, int)public java.lang.String getText()
null if
the text has been set to null.setText(java.lang.String)public void setText(java.lang.String text)
text - the text that this label displays. If
text is null, it is
treated for display purposes like an empty
string "".getText()protected java.lang.String paramString()
paramString in class java.awt.Component
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||