public class OutputDisplayImpl extends java.lang.Object implements OutputDisplay
Constructor and Description |
---|
OutputDisplayImpl(java.awt.Graphics2D g) |
Modifier and Type | Method and Description |
---|---|
void |
colorizeByClass(Area area,
java.lang.String cname)
Draws the colorized are bounds.
|
void |
colorizeByTags(Area area,
java.util.Set<Tag> s)
Draws the colorized are bounds.
|
void |
drawBox(Box box)
Draws the box contents on the page depending on the box type.
|
void |
drawExtent(Area area)
Draws the area bounds at the output display.
|
void |
drawExtent(Box box)
Draws the box bounds at the output display.
|
void |
drawPage(Page page)
Draws the complete page including all the boxes.
|
void |
drawRectangle(Rectangular rect,
java.awt.Color color)
Draws the given rectangle with the specified color.
|
java.awt.Graphics2D |
getGraphics() |
protected java.awt.Color |
stringColor(java.lang.String cname) |
public java.awt.Graphics2D getGraphics()
getGraphics
in interface OutputDisplay
public void drawPage(Page page)
OutputDisplay
drawPage
in interface OutputDisplay
page
- The page to draw.public void drawBox(Box box)
OutputDisplay
drawBox
in interface OutputDisplay
box
- The box do draw.public void drawExtent(Box box)
OutputDisplay
drawExtent
in interface OutputDisplay
box
- The box to be displayedpublic void drawExtent(Area area)
OutputDisplay
drawExtent
in interface OutputDisplay
area
- The area to be displayedpublic void drawRectangle(Rectangular rect, java.awt.Color color)
OutputDisplay
drawRectangle
in interface OutputDisplay
rect
- the rectangle to be drawncolor
- the drawing colorpublic void colorizeByTags(Area area, java.util.Set<Tag> s)
OutputDisplay
colorizeByTags
in interface OutputDisplay
area
- The area to be displayeds
- A set of tags used for generating the area colorspublic void colorizeByClass(Area area, java.lang.String cname)
OutputDisplay
colorizeByClass
in interface OutputDisplay
area
- The area to be displayedcname
- The class name used for generating the colors.protected java.awt.Color stringColor(java.lang.String cname)