Package cz.vutbr.fit.layout.api
Interface OutputDisplay
-
public interface OutputDisplayAn abstraction of the graphical display of the segmentation output. It allows drawing the area bounds and distinguishing the area types by colors.- Author:
- burgetr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearArea(int x, int y, int width, int height)Clears the given area of the display.voidcolorizeByClass(Area area, String cname)Draws the colorized are bounds.voidcolorizeByTags(Area area, Set<Tag> s)Draws the colorized are bounds.voiddrawBox(Box box)Draws the box contents on the page depending on the box type.voiddrawExtent(Area area)Draws the area bounds at the output display.voiddrawExtent(Box box)Draws the box bounds at the output display.voiddrawPage(Page page)Draws the complete page including all the boxes.voiddrawPage(Page page, boolean bitmap)Draws the complete page by drawing all the boxes or a bitmap screenshot.voiddrawRectangle(Rectangular rect, Color color)Draws the given rectangle with the specified color.Graphics2DgetGraphics()
-
-
-
Method Detail
-
getGraphics
Graphics2D getGraphics()
-
drawPage
void drawPage(Page page)
Draws the complete page including all the boxes.- Parameters:
page- The page to draw.
-
drawPage
void drawPage(Page page, boolean bitmap)
Draws the complete page by drawing all the boxes or a bitmap screenshot.- Parameters:
page- The page to draw.bitmap- Use bitmap page screen shot if available.
-
drawBox
void drawBox(Box box)
Draws the box contents on the page depending on the box type. This does not automatically draw the child boxes.- Parameters:
box- The box do draw.
-
drawExtent
void drawExtent(Box box)
Draws the box bounds at the output display.- Parameters:
box- The box to be displayed
-
drawExtent
void drawExtent(Area area)
Draws the area bounds at the output display.- Parameters:
area- The area to be displayed
-
drawRectangle
void drawRectangle(Rectangular rect, Color color)
Draws the given rectangle with the specified color.- Parameters:
rect- the rectangle to be drawncolor- the drawing color
-
colorizeByTags
void colorizeByTags(Area area, Set<Tag> s)
Draws the colorized are bounds. The color is defined by the tags. Multiple colors should be used when there are multiple tags (e.g. splitting the area bounds to several parts). The output display should assign different colors to different tags; the exact implementation of the color mapping depends on the OutputDisplay implementation. The area is not displayed when the tag set is empty.- Parameters:
area- The area to be displayeds- A set of tags used for generating the area colors
-
colorizeByClass
void colorizeByClass(Area area, String cname)
Draws the colorized are bounds. The color is defined by a string. The output display should assign different colors to different strings; the exact implementation of the color mapping depends on the OutputDisplay implementation. The area is not displayed when class name is empty.- Parameters:
area- The area to be displayedcname- The class name used for generating the colors.
-
clearArea
void clearArea(int x, int y, int width, int height)Clears the given area of the display.- Parameters:
x- the area X coordinatey- the area Y coordinatewidth- the area widthheight- the area height
-
-