public class LabelSprite extends Sprite
Label.layout(java.awt.Component)) it will be done when the
sprite is added to a media panel. If the label is altered after the
sprite is created, updateBounds() should be called.HUD_LAYERCARDINAL_DIRECTIONS, CCW, CW, DIRECTION_COUNT, DOWN, EAST, EASTNORTHEAST, EASTSOUTHEAST, FINE_DIRECTION_COUNT, HORIZONTAL, LEFT, NONE, NORTH, NORTHEAST, NORTHNORTHEAST, NORTHNORTHWEST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHSOUTHEAST, SOUTHSOUTHWEST, SOUTHWEST, UP, VERTICAL, WEST, WESTNORTHWEST, WESTSOUTHWEST| Constructor and Description |
|---|
LabelSprite(Label label)
Constructs a label sprite that renders itself with the specified
label.
|
| Modifier and Type | Method and Description |
|---|---|
Label |
getLabel()
Returns the label displayed by this sprite.
|
void |
paint(Graphics2D gfx)
Called by the appropriate manager to request that the media render itself with the given
graphics context.
|
void |
setAntiAliased(boolean antiAliased)
Indicates that our label should be rendered with antialiased text.
|
void |
updateBounds()
Updates the bounds of the sprite after a change to the label.
|
addSpriteObserver, cancelMove, contains, fastForward, getHeight, getOrientation, getPath, getWidth, getX, getXOffset, getY, getYOffset, hitTest, inside, intersects, isMoving, move, paintPath, pathBeginning, pathCompleted, removeSpriteObserver, setLocation, setOrientation, tick, viewLocationDidChangecontains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, intersects, intersects, invalidate, queueNotification, renderCompareTo, setRenderOrder, toStringpublic LabelSprite(Label label)
public Label getLabel()
public void setAntiAliased(boolean antiAliased)
public void updateBounds()
public void paint(Graphics2D gfx)
AbstractMediaCopyright © 2015. All rights reserved.