| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.byu.phun2d.DrawObj
edu.byu.phun2d.Text
public class Text
This will draw a string of text on the screen. The drawing is specified by giving the X location of the left edge of the text and the Y location of the baseline. Note that the baseline is the bottom of most characters. Characters such as 'j' or 'g' descend below the baseline. The text is approximately 1 unit high. The size of the text can be varied by placing this object into a Group and then using the Group's scaling functionality. This can also be used to rotate the text.
| Constructor Summary | |
|---|---|
Text(double left,
     double baseLine,
     java.lang.String text)
Create a new text object.  | 
|
| Method Summary | |
|---|---|
 double | 
getBaseLine()
Returns the Y coordinate of the baseline of where the text is drawn.  | 
 double | 
getLeft()
Returns the X coordinate of the left edge of where the text is drawn.  | 
 java.lang.String | 
getText()
This will return the text string currently being drawn.  | 
 void | 
setLocation(double left,
            double baseline)
This will change the location where the text is drawn.  | 
 void | 
setText(java.lang.String newText)
This will change the text to be displayed.  | 
| Methods inherited from class edu.byu.phun2d.DrawObj | 
|---|
getFillColor, getLineColor, getLineWidth, getRotate, getScaleX, getScaleY, getTranslate, insideToOutside, outsideToInside, setFillColor, setLineColor, setLineWidth, setRotate, setScale, setTranslate | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Text(double left,
            double baseLine,
            java.lang.String text)
left - the X coordinate of the left edge of the text.baseLine - the Y coordinate of the baseline of the text.text - the string to be drawn.| Method Detail | 
|---|
public void setText(java.lang.String newText)
newText - the new text string to be drawn.public java.lang.String getText()
public void setLocation(double left,
                        double baseline)
left - the X coordinate of the left edge of the text.baseline - the Y coordinate of the baseline of the text.public double getLeft()
public double getBaseLine()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||