Package cz.vutbr.fit.layout.io
Class Graphics2DDisplay
- java.lang.Object
-
- cz.vutbr.fit.layout.io.Graphics2DDisplay
-
- All Implemented Interfaces:
OutputDisplay
- Direct Known Subclasses:
ImageOutputDisplay
public class Graphics2DDisplay extends Object implements OutputDisplay
An output display implementation that shows the areas on a Graphics2D device.- Author:
- burgetr
-
-
Constructor Summary
Constructors Constructor Description Graphics2DDisplay(Graphics2D g)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearArea(int x, int y, int width, int height)voidcolorizeByClass(ContentRect rect, String cname)voidcolorizeByTags(ContentRect rect, Set<Tag> s)voiddrawBox(Box box)voiddrawConnection(ContentRect a1, ContentRect a2, Color color)voiddrawExtent(Area area)voiddrawExtent(Box box)voiddrawPage(Page page)voiddrawPage(Page page, boolean bitmap)voiddrawRectangle(Rectangular rect, Color color)Graphics2DgetGraphics()voidsetGraphics(Graphics2D g)protected voidsetupGraphics()Configures the graphics context for drawing the boxes.protected ColorstringColor(String cname)
-
-
-
Constructor Detail
-
Graphics2DDisplay
public Graphics2DDisplay(Graphics2D g)
-
-
Method Detail
-
getGraphics
public Graphics2D getGraphics()
- Specified by:
getGraphicsin interfaceOutputDisplay
-
setGraphics
public void setGraphics(Graphics2D g)
-
drawPage
public void drawPage(Page page)
- Specified by:
drawPagein interfaceOutputDisplay
-
drawPage
public void drawPage(Page page, boolean bitmap)
- Specified by:
drawPagein interfaceOutputDisplay
-
drawBox
public void drawBox(Box box)
- Specified by:
drawBoxin interfaceOutputDisplay
-
drawExtent
public void drawExtent(Box box)
- Specified by:
drawExtentin interfaceOutputDisplay
-
drawExtent
public void drawExtent(Area area)
- Specified by:
drawExtentin interfaceOutputDisplay
-
drawRectangle
public void drawRectangle(Rectangular rect, Color color)
- Specified by:
drawRectanglein interfaceOutputDisplay
-
drawConnection
public void drawConnection(ContentRect a1, ContentRect a2, Color color)
- Specified by:
drawConnectionin interfaceOutputDisplay
-
colorizeByTags
public void colorizeByTags(ContentRect rect, Set<Tag> s)
- Specified by:
colorizeByTagsin interfaceOutputDisplay
-
clearArea
public void clearArea(int x, int y, int width, int height)- Specified by:
clearAreain interfaceOutputDisplay
-
colorizeByClass
public void colorizeByClass(ContentRect rect, String cname)
- Specified by:
colorizeByClassin interfaceOutputDisplay
-
setupGraphics
protected void setupGraphics()
Configures the graphics context for drawing the boxes. This method is normally called fromdrawPage(Page)before the actual drawing starts.
-
-