com.arsdigita.toolbox.rebop
Class WrappedRun
java.lang.Object
com.arsdigita.toolbox.rebop.FormattedText
com.arsdigita.toolbox.rebop.WrappedRun
- public class WrappedRun
- extends FormattedText
Represents a "run" of text with a single set of
style attributes. Does NOT perform word-wrapping
calculations (in other words they have already
been performed, resulting in a collection of these
WrappedRun objects).
- Author:
- Gavin Doughtie
- See Also:
StyledText
Method Summary |
void |
draw(Graphics g)
Draw the text using this run's font and color |
void |
setPoint(int x,
int y)
Sets the point at which this run of text will be drawn
inside the current component's coordinate space. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
versionId
public static final String versionId
- See Also:
- Constant Field Values
WrappedRun
public WrappedRun(Font font,
Color color,
String string,
int x,
int y)
- Creates a new
WrappedRun
instance.
- Parameters:
font
- Text will be drawn using this font, or
the current font of the passed-in Graphics object if
font is set to null.color
- Text will be drawn in this color, or
the current color of the passed-in Graphics object if
color is set to null.string
- Text to drawx
- horizontal location to begin drawing text aty
- vertical location to begin drawing text at
draw
public void draw(Graphics g)
- Draw the text using this run's font and color
- Parameters:
g
- Graphics to draw upon
setPoint
public void setPoint(int x,
int y)
- Sets the point at which this run of text will be drawn
inside the current component's coordinate space.
- Parameters:
x
- horizontal locationy
- vertical location
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC