|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNGP.Graphics.Text
cs015.SketchySupport.SketchyText
A simple wrapper around the NGP.Graphics.Text class that allows for easier manipulation of location and font size.
Field Summary |
Fields inherited from interface NGP.Colorable |
DEFAULT_GRAY |
Constructor Summary | |
SketchyText(DrawingPanel dp,
java.lang.String s)
Create a new SketchyText object that displays the given string on the given drawing panel. |
Method Summary | |
java.awt.Dimension |
getDimension()
Get the dimension of this text object. |
int |
getFontSize()
Get the size of the font of this text object. |
java.awt.Point |
getLocation()
Get the location of the center of this text object. |
void |
setFontSize(int size)
Change the size of the font of this text object to the specified value. |
void |
setLocation(java.awt.Point p)
Set the location of this text object. |
Methods inherited from class NGP.Graphics.Text |
contains, createBounds, drag, getBounds, getCenterLocation, getColor, getDrawingPanel, getFont, getRotation, getString, hide, intersects, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, paint, react, setCenterLocation, setColor, setDrawingPanel, setFont, setRotation, setString, show, unwrap, wrap |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SketchyText(DrawingPanel dp, java.lang.String s)
dp
- the DrawingPanel for the texts
- the string that will be displayed by this text object.Method Detail |
public void setFontSize(int size)
size
- the new font size of this text objectpublic int getFontSize()
public void setLocation(java.awt.Point p)
p
- the point representing the new position of the center of this
text objectpublic java.awt.Point getLocation()
public java.awt.Dimension getDimension()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |