org.apache.pivot.wtk.media.drawing
Class Text

java.lang.Object
  extended by org.apache.pivot.wtk.media.drawing.Shape
      extended by org.apache.pivot.wtk.media.drawing.Text

public class Text
extends Shape

Shape representing a block of text.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.media.drawing.Shape
Shape.Rotate, Shape.Scale, Shape.Transform, Shape.TransformSequence, Shape.Translate
 
Field Summary
static Font DEFAULT_FONT
           
 
Constructor Summary
Text()
           
 
Method Summary
 void draw(Graphics2D graphics)
           
 HorizontalAlignment getAlignment()
           
 Font getFont()
           
 int getFontSize()
           
 String getText()
           
 ListenerList<TextListener> getTextListeners()
           
 int getWidth()
           
 boolean isFontBold()
           
 boolean isFontItalic()
           
 void setAlignment(HorizontalAlignment alignment)
           
 void setAlignment(String alignment)
           
 void setFill(Paint fill)
           
 void setFont(Font font)
           
 void setFont(String font)
           
 void setFontBold(boolean fontBold)
           
 void setFontItalic(boolean fontItalic)
           
 void setFontSize(int fontSize)
           
 void setStroke(Paint stroke)
           
 void setText(String text)
           
 void setWidth(int width)
           
protected  void validate()
           
 
Methods inherited from class org.apache.pivot.wtk.media.drawing.Shape
getBounds, getFill, getOrigin, getParent, getShapeListeners, getShapeTransformListeners, getStroke, getStrokeThickness, getTransformedBounds, getTransforms, getX, getY, invalidate, isValid, isVisible, setBounds, setFill, setOrigin, setOrigin, setParent, setStroke, setStrokeThickness, setVisible, setX, setY, update, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FONT

public static final Font DEFAULT_FONT
Constructor Detail

Text

public Text()
Method Detail

getText

public String getText()

setText

public void setText(String text)

getFont

public Font getFont()

setFont

public void setFont(Font font)

setFont

public final void setFont(String font)

getFontSize

public int getFontSize()

setFontSize

public final void setFontSize(int fontSize)

isFontBold

public boolean isFontBold()

setFontBold

public final void setFontBold(boolean fontBold)

isFontItalic

public boolean isFontItalic()

setFontItalic

public final void setFontItalic(boolean fontItalic)

getWidth

public int getWidth()

setWidth

public void setWidth(int width)

getAlignment

public HorizontalAlignment getAlignment()

setAlignment

public void setAlignment(HorizontalAlignment alignment)

setAlignment

public final void setAlignment(String alignment)

setFill

public void setFill(Paint fill)
Overrides:
setFill in class Shape

setStroke

public void setStroke(Paint stroke)
Overrides:
setStroke in class Shape

draw

public void draw(Graphics2D graphics)
Specified by:
draw in class Shape

validate

protected void validate()
Overrides:
validate in class Shape

getTextListeners

public ListenerList<TextListener> getTextListeners()