org.openbp.cockpit.modeler.figures.generic
Class XPolygonFigure

java.lang.Object
  extended by CH.ifa.draw.standard.AbstractFigure
      extended by org.openbp.cockpit.modeler.figures.generic.BasicFigure
          extended by org.openbp.cockpit.modeler.figures.generic.XFigure
              extended by org.openbp.cockpit.modeler.figures.generic.XRectangleFigure
                  extended by org.openbp.cockpit.modeler.figures.generic.XPolygonFigure
All Implemented Interfaces:
CH.ifa.draw.framework.Figure, CH.ifa.draw.util.Storable, java.io.Serializable, java.lang.Cloneable, ChildFigure, Colorizable
Direct Known Subclasses:
XDiamondFigure, XTriangleFigure

public abstract class XPolygonFigure
extends XRectangleFigure

Extended triangle figure.

Author:
Heiko Erhardt
See Also:
Serialized Form

Field Summary
protected  java.awt.Polygon polygon
          Cached polygon of the triangle
 
Fields inherited from class org.openbp.cockpit.modeler.figures.generic.XRectangleFigure
barHeight, box, frameCount, frameDistance, nBars
 
Fields inherited from class org.openbp.cockpit.modeler.figures.generic.XFigure
DECO_FILLCOLOR2, DECO_FRAMECOLOR, DECO_FRAMESTROKE, descriptor, needUpdatePaint, paint
 
Fields inherited from class org.openbp.cockpit.modeler.figures.generic.BasicFigure
DECO_FILLCOLOR, DECO_OVERLAY
 
Fields inherited from interface CH.ifa.draw.framework.Figure
POPUP_MENU
 
Constructor Summary
XPolygonFigure()
          Constructor.
 
Method Summary
 java.awt.Point center()
           
 void changed()
           
 java.awt.Insets connectionInsets()
           
 boolean containsPoint(int x, int y)
           
 java.awt.Shape createShape()
          Creates a shape object that defines the outline of the figure.
protected  void drawFigure(java.awt.Graphics g)
          Draws the figure.
protected  void drawFrame(java.awt.Graphics g)
          Draws the frame of the figure.
abstract  java.awt.Polygon getPolygon()
          Returns the polygon describing the triangle.
 java.util.Vector handles()
           
 
Methods inherited from class org.openbp.cockpit.modeler.figures.generic.XRectangleFigure
basicDisplayBox, basicMoveBy, createRectangularShape, displayBox, drawAppliances, initialize, placeAdjacent
 
Methods inherited from class org.openbp.cockpit.modeler.figures.generic.XFigure
clone, draw, drawImage, getDefaultFillColor, getDefaultFillColor2, getDefaultFrameColor, getDescriptor, getFillColor2, getFrameColor, getFrameStroke, getImageIcon, getOrientation, requestPaintUpdate, setDescriptor, setFillColor, setFillColor2, setFrameColor, setFrameStroke, setImageIcon, setOrientation, updatePaint
 
Methods inherited from class org.openbp.cockpit.modeler.figures.generic.BasicFigure
decorateValue, getDecorationOwner, getFillColor, getParent, setParent
 
Methods inherited from class CH.ifa.draw.standard.AbstractFigure
addFigureChangeListener, addToContainer, canConnect, connectedTextLocator, connectorAt, connectorVisibility, decompose, displayBox, displayBox, figures, findFigureInside, getAttribute, getZValue, includes, invalidate, isEmpty, listener, moveBy, read, release, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface CH.ifa.draw.framework.Figure
addFigureChangeListener, addToContainer, canConnect, connectedTextLocator, connectorAt, connectorVisibility, decompose, displayBox, displayBox, figures, findFigureInside, getAttribute, getZValue, includes, invalidate, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, setAttribute, setZValue, size, willChange
 
Methods inherited from interface CH.ifa.draw.util.Storable
read, write
 

Field Detail

polygon

protected java.awt.Polygon polygon
Cached polygon of the triangle

Constructor Detail

XPolygonFigure

public XPolygonFigure()
Constructor.

Method Detail

containsPoint

public boolean containsPoint(int x,
                             int y)
Specified by:
containsPoint in interface CH.ifa.draw.framework.Figure
Overrides:
containsPoint in class CH.ifa.draw.standard.AbstractFigure
See Also:
(int x, int y)

drawFigure

protected void drawFigure(java.awt.Graphics g)
Draws the figure.

Overrides:
drawFigure in class XRectangleFigure
Parameters:
g - Graphics to draw to

drawFrame

protected void drawFrame(java.awt.Graphics g)
Draws the frame of the figure.

Overrides:
drawFrame in class XRectangleFigure
Parameters:
g - Graphics to draw to

changed

public void changed()
Specified by:
changed in interface CH.ifa.draw.framework.Figure
Overrides:
changed in class XFigure
See Also:
AbstractFigure.changed()

handles

public java.util.Vector handles()
Specified by:
handles in interface CH.ifa.draw.framework.Figure
Overrides:
handles in class XRectangleFigure
See Also:
CH.ifa.draw.fraemwork.Figure#handles()

connectionInsets

public java.awt.Insets connectionInsets()
Specified by:
connectionInsets in interface CH.ifa.draw.framework.Figure
Overrides:
connectionInsets in class CH.ifa.draw.standard.AbstractFigure
See Also:
Figure.connectionInsets()

center

public java.awt.Point center()
Specified by:
center in interface CH.ifa.draw.framework.Figure
Overrides:
center in class CH.ifa.draw.standard.AbstractFigure
See Also:
Figure.center()

createShape

public java.awt.Shape createShape()
Creates a shape object that defines the outline of the figure.

Overrides:
createShape in class XRectangleFigure
Returns:
The shape (a java.awt.geom.Rectangle2D)

getPolygon

public abstract java.awt.Polygon getPolygon()
Returns the polygon describing the triangle.



Copyright © 2011. All Rights Reserved.