CH.ifa.draw.contrib
Class 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- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
-
-
Constructor Summary
Constructors Constructor and Description DiamondFigure()DiamondFigure(java.awt.Point origin, java.awt.Point corner)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.awt.InsetsconnectionInsets()Returns the connection inset.booleancontainsPoint(int x, int y)Checks if a point is inside the figure.voiddraw(java.awt.Graphics g)Draws the figure in the given graphics.-
Methods inherited from class CH.ifa.draw.figures.RectangleFigure
basicDisplayBox, displayBox, drawBackground, drawFrame, handles, read, write
-
Methods inherited from class CH.ifa.draw.figures.AttributeFigure
getAttribute, getDefaultAttribute, getFillColor, getFrameColor, setAttribute
-
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, canConnect, center, changed, clone, connectedTextLocator, connectorAt, connectorVisibility, decompose, displayBox, displayBox, figures, findFigureInside, includes, invalidate, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, size, willChange
-
-
-
-
Constructor Detail
-
DiamondFigure
public DiamondFigure()
-
DiamondFigure
public DiamondFigure(java.awt.Point origin, java.awt.Point corner)
-
-
Method Detail
-
draw
public void draw(java.awt.Graphics g)
Description copied from class:AttributeFigureDraws the figure in the given graphics. Draw is a template method calling drawBackground followed by drawFrame.- Specified by:
drawin interfaceFigure- Overrides:
drawin classAttributeFigure- Parameters:
g- the Graphics to draw into
-
connectionInsets
public java.awt.Insets connectionInsets()
Description copied from class:AbstractFigureReturns the connection inset. The connection inset defines the area where the display box of a figure can't be connected. By default the entire display box can be connected.- Specified by:
connectionInsetsin interfaceFigure- Overrides:
connectionInsetsin classAbstractFigure
-
containsPoint
public boolean containsPoint(int x, int y)Description copied from class:AbstractFigureChecks if a point is inside the figure.- Specified by:
containsPointin interfaceFigure- Overrides:
containsPointin classAbstractFigure
-
-
DataMelt 3.0 © DataMelt by jWork.ORG