org.tigris.gef.presentation
Class FigCircle

java.lang.Object
  extended by org.tigris.gef.presentation.Fig
      extended by org.tigris.gef.presentation.FigCircle
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, PopupGenerator

public class FigCircle
extends Fig

Primitive Fig for displaying circles and ovals.

See Also:
Serialized Form

Field Summary
protected  boolean _isDashed
           
static double CIRCLE_ADJUST_RADIUS
          Used as a percentage tolerance for making it easier for the user to select a hollow circle with the mouse.
 
Fields inherited from class org.tigris.gef.presentation.Fig
_allowsSaving, _context, _dashes, _dashPeriod, _dashStyle, _filled, _h, _w, _x, _y, an, annotationOwner, annotationStatus, BORDER, MIN_SIZE
 
Constructor Summary
FigCircle(int x, int y, int w, int h)
          Construct a new FigCircle with the given position, size, and attributes.
FigCircle(int x, int y, int w, int h, boolean resizable)
          Construct a new FigCircle w/ the given position and size.
FigCircle(int x, int y, int w, int h, boolean resizable, java.awt.Color lColor, java.awt.Color fColor)
          Construct a new FigCircle w/ the given position, size, line color, and fill color.
FigCircle(int x, int y, int w, int h, java.awt.Color lColor, java.awt.Color fColor)
          Construct a new FigCircle with the given position, size, line color, and fill color
 
Method Summary
 java.awt.Point connectionPoint(java.awt.Point anotherPt)
          Calculate border point of elipse
 boolean contains(int x, int y)
          Reply true if the given coordinates are inside the circle.
 void paint(java.awt.Graphics g)
          Draw this FigCircle.
 
Methods inherited from class org.tigris.gef.presentation.Fig
addAnnotation, addPoint, addPropertyChangeListener, align, calcBounds, center, classNameAndBounds, cleanUp, clone, contains, contains, countCornersContained, createDrag, damage, deleteFromModel, drawDashedLine, drawDashedPerimeter, endTrans, firePropChange, firePropChange, firePropChange, getAnnotationOwner, getAnnotationStrategy, getBounds, getBounds, getClosestPoint, getContext, getDashed, getDashed01, getDashedString, getEnclosedFigs, getEnclosingFig, getFillColor, getFilled, getFilled01, getFirstPoint, getGravityPoints, getGroup, getHalfHeight, getHalfWidth, getHandleBox, getHeight, getId, getLastPoint, getLayer, getLineColor, getLineWidth, getLocation, getLocked, getMinimumSize, getNumPoints, getOwner, getPerimeterLength, getPoint, getPoints, getPopUpActions, getPreferredSize, getPrivateData, getResource, getSingle, getSize, getTipString, getTrapRect, getUseTrapRect, getVisState, getWidth, getX, getXs, getY, getYs, hasFillColor, hasLineColor, hit, initAnnotations, insertPoint, intersects, intersectsPerimeter, isAnnotation, isCopyable, isCutable, isLowerRightResizable, isMovable, isReshapable, isResizable, isRotatable, isSelected, isVisible, makeSelection, OK, pointAlongPerimeter, postLoad, postSave, preSave, print, propertyChange, redraw, removeAnnotation, removeAnnotation, removeFromDiagram, removePoint, removePropertyChangeListener, reorder, routingRect, savingAllowed, setAnnotationOwner, setAnnotationStatus, setAnnotationStrategy, setBounds, setBounds, setCenter, setContext, setDashed, setDashedString, setEnclosingFig, setFillColor, setFilled, setGroup, setHandleBox, setHeight, setLayer, setLineColor, setLineWidth, setLocation, setLocation, setLocked, setMovable, setNumPoints, setOwner, setPoint, setPoint, setPoint, setPoint, setPoints, setPrivateData, setResizable, setResource, setSavingAllowed, setSingle, setSize, setSize, setVisible, setVisState, setWidth, setX, setXs, setY, setYs, stuffBounds, stuffPointAlongPerimeter, translate, translateAnnotations, unsetAnnotationOwner, updateAnnotationPositions, updateVisState, within
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CIRCLE_ADJUST_RADIUS

public static final double CIRCLE_ADJUST_RADIUS
Used as a percentage tolerance for making it easier for the user to select a hollow circle with the mouse. Needs-More-Work: This is bad design that needs to be changed. Should use just GRIP_FACTOR.

See Also:
Constant Field Values

_isDashed

protected boolean _isDashed
Constructor Detail

FigCircle

public FigCircle(int x,
                 int y,
                 int w,
                 int h)
Construct a new FigCircle with the given position, size, and attributes.


FigCircle

public FigCircle(int x,
                 int y,
                 int w,
                 int h,
                 java.awt.Color lColor,
                 java.awt.Color fColor)
Construct a new FigCircle with the given position, size, line color, and fill color


FigCircle

public FigCircle(int x,
                 int y,
                 int w,
                 int h,
                 boolean resizable)
Construct a new FigCircle w/ the given position and size.


FigCircle

public FigCircle(int x,
                 int y,
                 int w,
                 int h,
                 boolean resizable,
                 java.awt.Color lColor,
                 java.awt.Color fColor)
Construct a new FigCircle w/ the given position, size, line color, and fill color.

Method Detail

paint

public void paint(java.awt.Graphics g)
Draw this FigCircle.

Overrides:
paint in class Fig

contains

public boolean contains(int x,
                        int y)
Reply true if the given coordinates are inside the circle.

Overrides:
contains in class Fig
See Also:
FigCircle, FigEdge

connectionPoint

public java.awt.Point connectionPoint(java.awt.Point anotherPt)
Calculate border point of elipse

Overrides:
connectionPoint in class Fig