nodebox.graphics
Class Text

java.lang.Object
  extended by nodebox.graphics.AbstractGrob
      extended by nodebox.graphics.Text
All Implemented Interfaces:
Cloneable, Drawable, Grob

public class Text
extends AbstractGrob


Nested Class Summary
static class Text.Align
           
 
Constructor Summary
Text(String text, double baseLineX, double baseLineY)
           
Text(String text, double x, double y, double width, double height)
           
Text(String text, Point pt)
           
Text(String text, Rect r)
           
Text(Text other)
           
 
Method Summary
 Text clone()
           
 void draw(Graphics2D g)
           
static boolean fontExists(String fontName)
           
 Text.Align getAlign()
           
 double getBaseLineX()
           
 double getBaseLineY()
           
 Rect getBounds()
           
 Color getFillColor()
           
 Font getFont()
           
 String getFontName()
           
 double getFontSize()
           
 double getHeight()
           
 double getLineHeight()
           
 Rect getMetrics()
           
 Path getPath()
           
 String getText()
           
 double getWidth()
           
 boolean isEmpty()
           
 void setAlign(Text.Align align)
           
 void setBaseLineX(double baseLineX)
           
 void setBaseLineY(double baseLineY)
           
 void setFillColor(Color fillColor)
           
 void setFontName(String fontName)
           
 void setFontSize(double fontSize)
           
 void setHeight(double height)
           
 void setLineHeight(double lineHeight)
           
 void setText(String text)
           
protected  void setupTransform(Graphics2D g)
           
 void setWidth(double width)
           
 
Methods inherited from class nodebox.graphics.AbstractGrob
appendTransform, getTransform, getTransformDelegate, prependTransform, restoreTransform, rotate, rotateRadians, saveTransform, scale, scale, setTransform, setTransformDelegate, skew, skew, transform, translate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Text

public Text(String text,
            Point pt)

Text

public Text(String text,
            double baseLineX,
            double baseLineY)

Text

public Text(String text,
            Rect r)

Text

public Text(String text,
            double x,
            double y,
            double width,
            double height)

Text

public Text(Text other)
Method Detail

getText

public String getText()

setText

public void setText(String text)

getBaseLineX

public double getBaseLineX()

setBaseLineX

public void setBaseLineX(double baseLineX)

getBaseLineY

public double getBaseLineY()

setBaseLineY

public void setBaseLineY(double baseLineY)

getWidth

public double getWidth()

setWidth

public void setWidth(double width)

getHeight

public double getHeight()

setHeight

public void setHeight(double height)

getFontName

public String getFontName()

setFontName

public void setFontName(String fontName)

getFontSize

public double getFontSize()

setFontSize

public void setFontSize(double fontSize)

getFont

public Font getFont()

getLineHeight

public double getLineHeight()

setLineHeight

public void setLineHeight(double lineHeight)

getAlign

public Text.Align getAlign()

setAlign

public void setAlign(Text.Align align)

getFillColor

public Color getFillColor()

setFillColor

public void setFillColor(Color fillColor)

fontExists

public static boolean fontExists(String fontName)

getMetrics

public Rect getMetrics()

setupTransform

protected void setupTransform(Graphics2D g)

draw

public void draw(Graphics2D g)

getPath

public Path getPath()

isEmpty

public boolean isEmpty()

getBounds

public Rect getBounds()

clone

public Text clone()
Specified by:
clone in interface Grob
Specified by:
clone in class AbstractGrob


Copyright © 2013. All Rights Reserved.