All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.contrib.DiamondFigure

java.lang.Object
   |
   +----CH.ifa.draw.standard.AbstractFigure
           |
           +----CH.ifa.draw.figures.AttributeFigure
                   |
                   +----CH.ifa.draw.figures.RectangleFigure
                           |
                           +----CH.ifa.draw.contrib.DiamondFigure

public class DiamondFigure
extends RectangleFigure
A diamond with vertices at the midpoints of its enclosing rectangle


Constructor Index

 o DiamondFigure()
 o DiamondFigure(Point, Point)

Method Index

 o connectionInsets()
Returns the connection inset.
 o containsPoint(int, int)
Checks if a point is inside the figure.
 o draw(Graphics)
Draws the figure in the given graphics.
 o polygon()
Return the polygon describing the diamond

Constructors

 o DiamondFigure
 public DiamondFigure()
 o DiamondFigure
 public DiamondFigure(Point origin,
                      Point corner)

Methods

 o polygon
 protected Polygon polygon()
Return the polygon describing the diamond

 o draw
 public void draw(Graphics g)
Draws the figure in the given graphics.

Overrides:
draw in class AttributeFigure
 o connectionInsets
 public Insets connectionInsets()
Returns the connection inset.

Overrides:
connectionInsets in class AbstractFigure
 o containsPoint
 public boolean containsPoint(int x,
                              int y)
Checks if a point is inside the figure.

Overrides:
containsPoint in class AbstractFigure

All Packages  Class Hierarchy  This Package  Previous  Next  Index