|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.automed.p2p.gui.graph.TextBox.TextBlock
class TextBox.TextBlock
Represents a wrapped text block
Field Summary | |
---|---|
private java.awt.Dimension |
bound
|
private java.awt.Insets |
insets
|
private java.util.Vector |
lines
|
private double |
lineSpace
|
Constructor Summary | |
---|---|
TextBox.TextBlock(java.awt.Insets insets,
double lineSpace)
Create a new wrapped text block |
Method Summary | |
---|---|
void |
add(java.lang.String line)
Add a new line to the text block |
void |
clear()
|
void |
drawAt(java.awt.Point p,
java.awt.Graphics g)
Draw this text block at a point on the canvas |
java.awt.Dimension |
getBound(java.awt.Graphics g)
|
java.util.Vector |
getText()
Return all the lines of the text block |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Vector lines
private double lineSpace
private java.awt.Insets insets
private java.awt.Dimension bound
Constructor Detail |
---|
public TextBox.TextBlock(java.awt.Insets insets, double lineSpace)
x
- x-coord of the top-left cornery
- y-coord of the top-left cornerinsets
- insets.X is the gap between the first character of each line
to the left border of the bounding box lineSpace
- gap between linesMethod Detail |
---|
public void add(java.lang.String line)
line
- public java.util.Vector getText()
public java.awt.Dimension getBound(java.awt.Graphics g)
public void drawAt(java.awt.Point p, java.awt.Graphics g)
g
- public void clear()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |