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

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
                      extended by org.openbp.cockpit.modeler.figures.generic.XTriangleFigure
All Implemented Interfaces:
CH.ifa.draw.framework.Figure, CH.ifa.draw.util.Storable, java.io.Serializable, java.lang.Cloneable, ChildFigure, Colorizable

public class XTriangleFigure
extends XPolygonFigure

Extended triangle figure.

Author:
Stephan Moritz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.openbp.cockpit.modeler.figures.generic.XPolygonFigure
polygon
 
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
XTriangleFigure()
          Constructor.
 
Method Summary
 java.awt.Polygon getPolygon()
          Returns the polygon describing the triangle.
 java.awt.Rectangle placeAdjacent(java.awt.Rectangle rect, double angle)
          Places the given rectangle so that its center is in the given direction and it exactly touches the node, without crossing any lines.
 
Methods inherited from class org.openbp.cockpit.modeler.figures.generic.XPolygonFigure
center, changed, connectionInsets, containsPoint, createShape, drawFigure, drawFrame, handles
 
Methods inherited from class org.openbp.cockpit.modeler.figures.generic.XRectangleFigure
basicDisplayBox, basicMoveBy, createRectangularShape, displayBox, drawAppliances, initialize
 
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
 

Constructor Detail

XTriangleFigure

public XTriangleFigure()
Constructor.

Method Detail

placeAdjacent

public java.awt.Rectangle placeAdjacent(java.awt.Rectangle rect,
                                        double angle)
Places the given rectangle so that its center is in the given direction and it exactly touches the node, without crossing any lines.

Overrides:
placeAdjacent in class XRectangleFigure
Parameters:
rect - The rectangle to adjust
angle - The direction in which the rectangle should be placed
Returns:
The translated rectangle

getPolygon

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

Specified by:
getPolygon in class XPolygonFigure


Copyright © 2011. All Rights Reserved.