pivot.wtk.media.drawing
Class Text

java.lang.Object
  extended by pivot.wtk.media.drawing.Shape
      extended by pivot.wtk.media.drawing.Text
All Implemented Interfaces:
Visual

public class Text
extends Shape

Shape representing a block of text.

TODO We may need to specify a font here - otherwise, we won't be able to calculate the bounds.


Constructor Summary
Text()
           
 
Method Summary
 boolean contains(int x, int y)
          TODO Subclasses should override this method to perform an inverse transformation and map to the untransformed coordinate space.
 java.awt.Font getFont()
           
 int getHeight()
          Returns the visual's height.
 java.lang.String getText()
           
 int getWidth()
          Returns the visual's width.
 int getWrapWidth()
           
 void paint(java.awt.Graphics2D graphics)
          Paints the visual.
 void setFont(java.awt.Font font)
           
 void setText(java.lang.String text)
           
 void setWrapWidth(int wrapWidth)
           
 
Methods inherited from class pivot.wtk.media.drawing.Shape
getBounds, getFill, getOrigin, getParent, getRotation, getScaleX, getScaleY, getStroke, getStrokeThickness, getTransform, getTranslateX, getTranslateY, getX, getY, setFill, setFill, setOrigin, setOrigin, setParent, setRotation, setScaleX, setScaleY, setStroke, setStroke, setStrokeThickness, setTranslateX, setTranslateY, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Text

public Text()
Method Detail

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

getFont

public java.awt.Font getFont()

setFont

public void setFont(java.awt.Font font)

getWrapWidth

public int getWrapWidth()

setWrapWidth

public void setWrapWidth(int wrapWidth)

getWidth

public int getWidth()
Description copied from interface: Visual
Returns the visual's width.


getHeight

public int getHeight()
Description copied from interface: Visual
Returns the visual's height.


paint

public void paint(java.awt.Graphics2D graphics)
Description copied from interface: Visual
Paints the visual.

Parameters:
graphics - The graphics context in which to paint the visual.

contains

public boolean contains(int x,
                        int y)
Description copied from class: Shape
TODO Subclasses should override this method to perform an inverse transformation and map to the untransformed coordinate space.

Specified by:
contains in class Shape