TextRegion Class Reference

Inheritance diagram for TextRegion:

Region List of all members.

Public Member Functions

 TextRegion (String name, String theText, Font theFont, Units origX, Units origY)
 TextRegion (String name, String theText, Font theFont, Units origX, Units origY, Units width, Units height)
Color getColor ()
Font getFont ()
String[] getLinesOfText ()
RegionRenderer getRenderer ()
String getText ()
Units getX ()
Units getY ()
void setColor (Color c)
void setLineWrapped (boolean b)
boolean isLineWrapped ()
void setMaxLines (int i)
int getMaxLines ()
String toString ()

Detailed Description

Represents some text that can be drawn on a page.

This software is distributed under the BSD License.

Author:
Ron B Yeh (ronyeh(AT)cs.stanford.edu)

Definition at line 26 of file TextRegion.java.


Constructor & Destructor Documentation

TextRegion ( String  name,
String  theText,
Font  theFont,
Units  origX,
Units  origY 
)

Parameters:
theText What text is displayed.
theFont The Font Family. Specify the size in points through the font object. We will consider the point size of the font as an exact 1/72nd of an inch translation, regardless of the device.
origX 
origY 

Definition at line 94 of file TextRegion.java.

References Units.getValue(), Units.getValueIn(), Region.referenceUnits, and Region.setShape().

TextRegion ( String  name,
String  theText,
Font  theFont,
Units  origX,
Units  origY,
Units  width,
Units  height 
)

Parameters:
name 
theText 
theFont 
origX 
origY 
width override the text's actual width with this value
height override the text's actual height with this value

Definition at line 127 of file TextRegion.java.

References Units.getValue(), Units.getValueIn(), Region.referenceUnits, and Region.setShape().


Member Function Documentation

Color getColor (  ) 

Returns:

Definition at line 153 of file TextRegion.java.

Referenced by TextRenderer.TextRenderer().

Font getFont (  ) 

Returns:

Definition at line 160 of file TextRegion.java.

Referenced by TextRenderer.renderToG2D(), and TextRenderer.TextRenderer().

String [] getLinesOfText (  ) 

Returns:

Definition at line 167 of file TextRegion.java.

Referenced by TextRenderer.renderToG2D().

int getMaxLines (  ) 

Returns:
the maximum number of lines to be set. If <= 0, all lines will be set.

Definition at line 232 of file TextRegion.java.

Referenced by TextRenderer.renderToG2D().

RegionRenderer getRenderer (  ) 

See also:
edu.stanford.hci.r3.paper.Region.getRenderer()

Reimplemented from Region.

Definition at line 174 of file TextRegion.java.

String getText (  ) 

Returns:
the internal text to be rendered.

Definition at line 181 of file TextRegion.java.

Referenced by TextRenderer.TextRenderer().

Units getX (  ) 

Returns:

Definition at line 188 of file TextRegion.java.

Referenced by TextRenderer.renderToG2D().

Units getY (  ) 

Returns:

Definition at line 195 of file TextRegion.java.

Referenced by TextRenderer.renderToG2D().

boolean isLineWrapped (  ) 

Returns:
whether automatic line wrapping should occur. If true, the text will be constrained to the region boundaries.

Definition at line 218 of file TextRegion.java.

Referenced by TextRegion.setLineWrapped().

void setColor ( Color  c  ) 

Parameters:
c 

Definition at line 202 of file TextRegion.java.

void setLineWrapped ( boolean  b  ) 

Parameters:
b whether automatic line wrapping should occur. If ture, the text will be constrained to the region boundaries.

Definition at line 210 of file TextRegion.java.

References TextRegion.isLineWrapped().

void setMaxLines ( int  i  ) 

Parameters:
i the maximum number of lies to set. If <= 0, all lines will be set.

Definition at line 225 of file TextRegion.java.

String toString (  ) 

See also:
edu.stanford.hci.r3.paper.Region.toString()

Reimplemented from Region.

Definition at line 239 of file TextRegion.java.

References Units.getUnitName(), Units.getValue(), and Region.referenceUnits.


The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:42 2007 for R3 Paper Toolkit by  doxygen 1.4.7