public class TextBlock extends Object implements RenderLine
Constructor and Description |
---|
TextBlock() |
TextBlock(String text,
ImageMaker maker,
Graphics2D g,
int align) |
Modifier and Type | Method and Description |
---|---|
int |
align()
How to align the content. -1 = left; 0 = center; 1 = right
|
int |
expand()
How much to expand the line around the real content.
|
int |
getAlign() |
Rectangle |
getBounds() |
Font |
getFont() |
Graphics2D |
getGraphics() |
int |
getPageWidth()
Get the pageWidth.
|
String |
getText() |
int |
height()
The full hight of the real content (Size of the box for the content).
|
void |
init() |
void |
render(Rectangle borders)
Render the real content.
|
void |
setAlign(int align) |
void |
setFont(Font font) |
void |
setGraphics(Graphics2D graphics) |
void |
setPageWidth(int pageWidth) |
void |
setText(String text) |
int |
width()
The widht of the real content.
|
public TextBlock()
public TextBlock(String text, ImageMaker maker, Graphics2D g, int align)
public void init()
public void render(Rectangle borders)
RenderLine
render
in interface RenderLine
borders
- The borders allowed for rendering.public Rectangle getBounds()
public int expand()
expand
in interface RenderLine
public int height()
height
in interface RenderLine
public int align()
align
in interface RenderLine
public int width()
width
in interface RenderLine
public String getText()
public void setText(String text)
public Font getFont()
public void setFont(Font font)
public Graphics2D getGraphics()
public void setGraphics(Graphics2D graphics)
public int getAlign()
public void setAlign(int align)
public void setPageWidth(int pageWidth)
pageWidth
- the pageWidth to setpublic int getPageWidth()
Copyright © 2009–2018 JaProSt (Ulrich David). All rights reserved.