com.swfm.mica.shapes
Class Mi3PointArc

java.lang.Object
  extended bycom.swfm.mica.core.MiPart
      extended bycom.swfm.mica.core.MiMultiPointShape
          extended bycom.swfm.mica.shapes.Mi3PointArc
All Implemented Interfaces:
MiiActionTypes, MiiAttributeTypes, MiiDragAndDropParticipant, MiiEventTypes, MiiNames, MiiPropertyTypes, MiiTypes

public class Mi3PointArc
extends MiMultiPointShape

Version:
%I% %G%
Author:
Michael L. Davis

Field Summary
                 
Constructor Summary
Mi3PointArc()
           
Mi3PointArc(double x1, double y1, double x2, double y2)
           
Mi3PointArc(MiPoint startPt, MiPoint ctlPt)
           
 
Method Summary
 void calcPreferredSize(MiSize size)
          Gets the preferred size of this MiPart.
 void copy(MiPart source)
          Copies the given MiPart.
 double getEndAngle()
           
 double getOrthoDistance()
           
 double getPointEntryAngle(int pointNumber)
          Get the angle of the shape as it enters the point with the given number.
 double getPointExitAngle(int pointNumber)
          Get the angle of the shape as it exits the point with the given number.
 MiPoint getRelativeLocation(int pointNumber, MiBounds boundsToPosition, MiPoint pt, MiMargins margins)
          Gets location into given point and positions given bounds as specified by the given location.
 double getStartAngle()
           
 double getSweptAngle()
           
 boolean pick(MiBounds area)
          Gets whether the given area intersects the bounds of this MiPart.
 void render(MiRenderer renderer)
           
 void setOrthoDistance(double d)
           
 java.lang.String toString()
          Returns information about this MiPart.
 
Methods inherited from class com.swfm.mica.core.MiMultiPointShape
appendPoint, appendPoints, getMaintainOrthogonality, getNumberOfPoints, getPoint, getPoint, getPointX, getPointY, getPropertyDescriptions, getPropertyValue, insertPoint, isHorizontal, isVertical, makeManipulator, removePoint, setMaintainOrthogonality, setNumberOfPoints, setPoint, setPropertyValue, translatePoint
 
Methods inherited from class com.swfm.mica.core.MiPart
_reCalcBounds, _render, _replaceBounds, _setContainer, _setDrawManager, _setValidatingLayout, appendActionHandler, appendActionHandler, appendActionHandler, appendActionHandler, appendActionHandler, appendAttachment, appendAttachment, appendCommandHandler, appendCommandHandler, appendCommandHandler, appendConnection, appendContainer, appendEventHandler, appendItem, appendPart, appendPoint, applyCustomLookAndFeel, calcMinimumSize, containsItem, containsOpaqueRectangles, containsPart, copy, deepCopy, deleteAllConnections, deleteAllParts, deleteSelf, dispatchAction, dispatchAction, dispatchAction, dispatchActionRequest, dispatchActionRequest, dispatchActionRequest, dispatchEvent, doExport, doImport, draw, drawNow, drawNow, flip, flip, freeAccessLock, get1DShapeStrokeBackgroundColor, get1DShapeStrokesFilled, getAccessLock, getActionHandler, getActionsGenerated, getActionsLocallyGenerated, getActionsRequestedFromParts, getAfterRenderer, getAlphaCompositeRenderMode, getAnnotationPointManager, getAssociatedParts, getAttachment, getAttachment, getAttachmentMargins, getAttachments, getAttributeLockMask, getAttributePublicMask, getAttributes, getAttributeValue, getBackgroundColor, getBackgroundImage, getBackgroundRenderer, getBackgroundTile, getBalloonHelp, getBeforeRenderer, getBlackColor, getBorderHiliteColor, getBorderHiliteWidth, getBorderLook, getBorderRenderer, getBounds, getBounds, getCenter, getCenter, getCenterOfRotation, getCenterX, getCenterY, getColor, getConnection, getConnectionPointManager, getContainer, getContainerRequestedActions, getContainingEditor, getContainingWindow, getContextCursor, getContextMenu, getContextMenu, getControlPointManager, getCustomLookAndFeels, getCustomLookAndFeels, getDarkColor, getDeepConnection, getDeepConnection, getDeepConnections, getDeeplyInvalidateAreas, getDefaultAttributes, getDialogHelp, getDoubleBuffer, getDragAndDropBehavior, getDrawBounds, getDrawManager, getEventHandler, getEventHandler, getEventHandlerWithClass, getEventHandlingDisabledByContainer, getEventHandlingEnabled, getFlipped, getFont, getFontHorizontalJustification, getFontPointSize, getFontVerticalJustification, getHasBorderHilite, getHasShadow, getHeight, getID, getIncomingInvalidLayoutNotificationsEnabled, getIndexOfItem, getIndexOfPart, getInnerBounds, getInnerBounds, getIntersectionWithLine, getInvalidAreaNotificationsEnabled, getInvalidLayoutNotificationsEnabled, getItem, getItem, getKeyFocusTraversalGroup, getLayout, getLayoutManipulator, getLightColor, getLineEndSize, getLineEndsRenderer, getLineEndsSizeFnOfLineWidth, getLineEndStyle, getLineStartSize, getLineStartStyle, getLineStyle, getLineWidth, getLocallyRequestedEventTypes, getManipulator, getMargins, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumPickAreaSize, getMinimumSize, getMinimumWidth, getName, getNumberOfActionHandlers, getNumberOfAttachments, getNumberOfConnections, getNumberOfContainers, getNumberOfDeepConnections, getNumberOfEventHandlers, getNumberOfItems, getNumberOfParts, getNumberOfResources, getOutgoingInvalidLayoutNotificationsEnabled, getPart, getPart, getPreferredSize, getPrototypeManipulator, getResource, getResourceName, getRootWindow, getRotation, getSelectionGraphics, getShadowColor, getShadowDirection, getShadowLength, getShadowRenderer, getShadowShape, getShadowStyle, getSize, getSnapPointManager, getStatusHelp, getSupportedExportFormats, getSupportedImportFormats, getThisOrPartHasInvalidArea, getToolHintHelp, getTotalNumberOfPartsCreated, getTransform, getTransparency, getValidatingLayout, getVisibilityAnimator, getWhiteColor, getWidth, getWriteMode, getXmax, getXmin, getXorColor, getYmax, getYmin, hasAttachment, hasAttribute, hasEnterKeyFocus, hasEventHandler, hasEventHandlers, hasFixedAspectRatio, hasFixedHeight, hasFixedWidth, hasKeyboardFocus, hasMouseFocus, hasOverriddenMinimumSize, hasOverriddenPreferredSize, hasProperty, hasTotallyInvalidArea, hasValidCachedEventHandlerInfo, hasValidLayout, insertActionHandler, insertActionHandler, insertActionHandler, insertConnection, insertContainer, insertEventHandler, insertItem, insertPart, insertPoint, invalidateArea, invalidateArea, invalidateLayout, isAcceptingEnterKeyFocus, isAcceptingKeyboardFocus, isAcceptingMouseFocus, isAcceptingTabKeys, isActionDispatchingEnabled, isConnectable, isConnectedTo, isContainerOf, isContainerOf, isContainerOfWithAttachments, isCopyable, isCopyableAsPartOfCopyable, isDeletable, isDoubleBuffered, isDragAndDropSource, isDragAndDropTarget, isFilled, isFontBold, isFontItalic, isFontUnderlined, isHidden, isMovable, isOpaqueRectangle, isPickable, isPickableWhenTransparent, isPrintable, isSavable, isSelectable, isSelected, isSensitive, isShowing, isSnappable, isUngroupable, isValidConnectionDestination, isValidConnectionSource, isVisible, layoutParts, makeImageFromArea, makeLayoutManipulator, optimizedInvalidateArea, optimizedInvalidateDrawBoundsArea, overrideAttributes, overrideEventHandlingDisabledByContainer, packLayout, pickDeepList, pickDeepListContents, pickObject, preRenderToDoubleBuffer, refreshBounds, refreshLookAndFeel, refreshLookAndFeel, removeActionHandler, removeActionHandler, removeActionHandlers, removeAllActionHandlers, removeAllAttachments, removeAllConnections, removeAllEventHandlers, removeAllItems, removeAllManipulators, removeAllParts, removeAttachment, removeAttachment, removeCommandHandler, removeCommandHandler, removeConnection, removeConnection, removeContainer, removeContainer, removeEventHandler, removeFromAllContainers, removeItem, removeItem, removePart, removePart, removeResource, removeSelf, replaceDrawBounds, replaceSelf, requestEnterKeyFocus, requestKeyboardFocus, rotate, rotate, rotateTo, scale, scale, scale, select, set1DShapeStrokeBackgroundColor, set1DShapeStrokesFilled, setAcceptingEnterKeyFocus, setAcceptingKeyboardFocus, setAcceptingMouseFocus, setAcceptingTabKeys, setActionDispatchingEnabled, setAfterRenderer, setAlphaCompositeRenderMode, setAnnotationPointManager, setAttachmentDrawnAfter, setAttachmentMargins, setAttachmentsVisibility, setAttributeLockMask, setAttributePublicMask, setAttributes, setAttributeValue, setAttributeValue, setAttributeValue, setAttributeValue, setAttributeValue, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundRenderer, setBackgroundTile, setBalloonHelp, setBalloonHelpMessage, setBeforeRenderer, setBlackColor, setBorderHiliteColor, setBorderHiliteWidth, setBorderLook, setBorderRenderer, setBounds, setBounds, setCenter, setCenter, setCenterX, setCenterY, setColor, setColor, setConnectable, setConnectionPointManager, setContextCursor, setContextMenu, setControlPointManager, setCopyable, setCopyableAsPartOfCopyable, setCustomLookAndFeels, setCustomLookAndFeels, setDarkColor, setDeeplyInvalidateAreas, setDefaultAttributes, setDeletable, setDialogHelp, setDialogHelpMessage, setDoubleBuffer, setDoubleBuffered, setDragAndDropBehavior, setEventHandlingEnabled, setFilled, setFixedAspectRatio, setFixedHeight, setFixedWidth, setFont, setFontBold, setFontHorizontalJustification, setFontItalic, setFontPointSize, setFontUnderlined, setFontVerticalJustification, setHasBorderHilite, setHasShadow, setHeight, setHidden, setIncomingInvalidLayoutNotificationsEnabled, setInvalidAreaNotificationsEnabled, setInvalidLayoutNotificationsEnabled, setIsDragAndDropSource, setIsDragAndDropTarget, setIsOpaqueRectangle, setItem, setKeyFocusTraversalGroup, setLayout, setLightColor, setLineEndSize, setLineEndSizeFnOfLineWidth, setLineEndsRenderer, setLineEndStyle, setLineStartSize, setLineStartStyle, setLineStyle, setLineWidth, setMargins, setMaximumHeight, setMaximumWidth, setMinimumHeight, setMinimumPickAreaSize, setMinimumSize, setMinimumWidth, setMouseFocus, setMovable, setName, setOutgoingInvalidLayoutNotificationsEnabled, setPart, setPickable, setPickableWhenTransparent, setPoint, setPreferredSize, setPrintable, setPropertyValues, setPrototypeManipulator, setResource, setSavable, setSelectable, setSelectionGraphics, setSensitive, setShadowColor, setShadowDirection, setShadowLength, setShadowRenderer, setShadowStyle, setSize, setSize, setSnappable, setSnapPointManager, setStatusHelp, setStatusHelpMessage, setSupportedImportFormats, setToolHintHelp, setToolHintMessage, setTransparency, setTransparency, setUngroupable, setVisibilityAnimator, setVisible, setWhiteColor, setWidth, setWriteMode, setXmax, setXmin, setXorColor, setYmax, setYmin, supportsImportOfSpecificInstance, translate, translate, validateLayout, validatePropertyValue, waitUntilRedrawn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Mi3PointArc

public Mi3PointArc()

Mi3PointArc

public Mi3PointArc(MiPoint startPt,
                   MiPoint ctlPt)

Mi3PointArc

public Mi3PointArc(double x1,
                   double y1,
                   double x2,
                   double y2)
Method Detail

getStartAngle

public double getStartAngle()

getEndAngle

public double getEndAngle()

getSweptAngle

public double getSweptAngle()

setOrthoDistance

public void setOrthoDistance(double d)

getOrthoDistance

public double getOrthoDistance()

getPointExitAngle

public double getPointExitAngle(int pointNumber)
Get the angle of the shape as it exits the point with the given number. Points are numbered from 0.

Overrides:
getPointExitAngle in class MiMultiPointShape
Returns:
the angle in radians

getPointEntryAngle

public double getPointEntryAngle(int pointNumber)
Get the angle of the shape as it enters the point with the given number. Points are numbered from 0. Mi_LAST_POINT_NUMBER is also a valid point number.

Overrides:
getPointEntryAngle in class MiMultiPointShape
Returns:
the angle in radians

render

public void render(MiRenderer renderer)
Parameters:
renderer - the renderer to use for drawing

getRelativeLocation

public MiPoint getRelativeLocation(int pointNumber,
                                   MiBounds boundsToPosition,
                                   MiPoint pt,
                                   MiMargins margins)
Description copied from class: MiPart
Gets location into given point and positions given bounds as specified by the given location. This method is useful for finding points relative to any shape and for positioning objects relative to another (for example text relative to the top edge of a line).

Overrides:
getRelativeLocation in class MiPart
Parameters:
pointNumber - The location can be one of the locations below, the number of a point (i.e. a value of 2 would attach the given part to the 3rd point of a polyline), or Mi_LAST_POINT_NUMBER. Mi_CENTER_LOCATION Mi_LEFT_LOCATION Mi_RIGHT_LOCATION Mi_BOTTOM_LOCATION Mi_TOP_LOCATION Mi_LOWER_LEFT_LOCATION Mi_LOWER_RIGHT_LOCATION Mi_UPPER_LEFT_LOCATION Mi_UPPER_RIGHT_LOCATION Mi_OUTSIDE_LEFT_LOCATION Mi_OUTSIDE_RIGHT_LOCATION Mi_OUTSIDE_BOTTOM_LOCATION Mi_OUTSIDE_TOP_LOCATION Mi_END_LOCATION Mi_WNW_LOCATION Mi_WSW_LOCATION Mi_ENE_LOCATION Mi_ESE_LOCATION Mi_NWN_LOCATION Mi_NEN_LOCATION Mi_SWS_LOCATION Mi_START_LOCATION Mi_END_LOCATION Mi_LINE_CENTER_LOCATION Mi_LINE_CENTER_TOP_OR_RIGHT_LOCATION Mi_LINE_CENTER_BOTTOM_OR_LEFT_LOCATION Mi_LINE_START_LOCATION Mi_LINE_START_TOP_OR_RIGHT_LOCATION Mi_LINE_START_BOTTOM_OR_LEFT_LOCATION Mi_LINE_END_LOCATION Mi_LINE_END_TOP_OR_RIGHT_LOCATION Mi_LINE_END_BOTTOM_OR_LEFT_LOCATION Mi_LINE_AT_START_LOCATION Mi_LINE_AT_END_LOCATION Mi_SURROUND_LOCATION
boundsToPosition - the bounds to position with respect to target at the location specified by pointNumber.
pt - the location specified by the pointNumber plus the margins (if any).
Returns:
pt

pick

public boolean pick(MiBounds area)
Description copied from class: MiPart
Gets whether the given area intersects the bounds of this MiPart.

Overrides:
pick in class MiPart
Parameters:
area - the area
Returns:
true if the given area overlaps the bounds of this MiPart.

calcPreferredSize

public void calcPreferredSize(MiSize size)
Description copied from class: MiPart
Gets the preferred size of this MiPart. Override this, if desired, as it implements the core functionality. The default behavior is to return the current bounds, or, if reversed, a zero size.

Overrides:
calcPreferredSize in class MiPart
Parameters:
size - the (returned) preferred size

copy

public void copy(MiPart source)
Copies the given MiPart. This MiPart will have the same attributes, bounds, resources, attachments, layouts, action handlers, and event handlers as the given MiPart.

Overrides:
copy in class MiMultiPointShape
Parameters:
source - the part to copy
See Also:
MiPart.copy()

toString

public java.lang.String toString()
Returns information about this MiPart.

Overrides:
toString in class MiMultiPointShape
Returns:
textual information (class name + unique numerical id + name)