com.jgoodies.animation.components

Class BasicTextLabel


public final class BasicTextLabel
extends JComponent

A Swing text component that can change the text, x and y scaling, glyph space, x and y offset and alignment mode.
Version:
$Revision: 1.1 $
Author:
Karsten Lentzsch
See Also:
BasicTextRenderer

Field Summary

static String
PROPERTYNAME_COLOR
static String
PROPERTYNAME_HEIGHT_MODE
static String
PROPERTYNAME_OFFSET_X
static String
PROPERTYNAME_OFFSET_Y
static String
PROPERTYNAME_SCALE
static String
PROPERTYNAME_SCALE_X
static String
PROPERTYNAME_SCALE_Y
static String
PROPERTYNAME_SPACE
static String
PROPERTYNAME_TEXT

Constructor Summary

BasicTextLabel()
Constructs a animation text Swing label with an empty initial text.
BasicTextLabel(String text)
Constructs a animation text Swing label for the given text.

Method Summary

Color
getColor()
HeightMode
getHeightMode()
float
getOffsetX()
float
getOffsetY()
float
getScale()
float
getScaleX()
float
getScaleY()
float
getSpace()
String
getText()
void
paintComponent(Graphics g)
Paints the component.
void
setColor(Color newColor)
void
setHeightMode(HeightMode heightMode)
void
setOffsetX(float offsetX)
void
setOffsetY(float offsetY)
void
setScale(float newScale)
void
setScaleX(float newScaleX)
void
setScaleY(float newScaleY)
void
setSpace(float newSpace)
void
setText(String newText)

Field Details

PROPERTYNAME_COLOR

public static final String PROPERTYNAME_COLOR

PROPERTYNAME_HEIGHT_MODE

public static final String PROPERTYNAME_HEIGHT_MODE

PROPERTYNAME_OFFSET_X

public static final String PROPERTYNAME_OFFSET_X

PROPERTYNAME_OFFSET_Y

public static final String PROPERTYNAME_OFFSET_Y

PROPERTYNAME_SCALE

public static final String PROPERTYNAME_SCALE

PROPERTYNAME_SCALE_X

public static final String PROPERTYNAME_SCALE_X

PROPERTYNAME_SCALE_Y

public static final String PROPERTYNAME_SCALE_Y

PROPERTYNAME_SPACE

public static final String PROPERTYNAME_SPACE

PROPERTYNAME_TEXT

public static final String PROPERTYNAME_TEXT

Constructor Details

BasicTextLabel

public BasicTextLabel()
Constructs a animation text Swing label with an empty initial text.

BasicTextLabel

public BasicTextLabel(String text)
Constructs a animation text Swing label for the given text.
Parameters:
text - the initial text to be displayed

Method Details

getColor

public Color getColor()

getHeightMode

public HeightMode getHeightMode()

getOffsetX

public float getOffsetX()

getOffsetY

public float getOffsetY()

getScale

public float getScale()

getScaleX

public float getScaleX()

getScaleY

public float getScaleY()

getSpace

public float getSpace()

getText

public String getText()

paintComponent

public void paintComponent(Graphics g)
Paints the component. Enabled anti-aliasing and sets high quality hints, then renderers the component via the underlying renderer.
Parameters:
g - the Graphics object to render on

setColor

public void setColor(Color newColor)

setHeightMode

public void setHeightMode(HeightMode heightMode)

setOffsetX

public void setOffsetX(float offsetX)

setOffsetY

public void setOffsetY(float offsetY)

setScale

public void setScale(float newScale)

setScaleX

public void setScaleX(float newScaleX)

setScaleY

public void setScaleY(float newScaleY)

setSpace

public void setSpace(float newSpace)

setText

public void setText(String newText)

Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.