com.arsdigita.toolbox.rebop
Class WrappedRun

java.lang.Object
  extended bycom.arsdigita.toolbox.rebop.FormattedText
      extended bycom.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

Field Summary
static String versionId
           
 
Constructor Summary
WrappedRun(Font font, Color color, String string, int x, int y)
          Creates a new WrappedRun instance.
 
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 com.arsdigita.toolbox.rebop.FormattedText
draw, drawWrappedText, getColor, getFont, getString, setColor, setFont, setString, updateGraphics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

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 draw
x - horizontal location to begin drawing text at
y - vertical location to begin drawing text at
Method Detail

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 location
y - vertical location


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC