com.swfm.mica.shapes
Class MiCircle

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

public class MiCircle
extends MiPart

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

Field Summary
                 
Constructor Summary
MiCircle()
           
MiCircle(double radius)
           
MiCircle(double x, double y, double radius)
           
MiCircle(MiBounds b)
           
 
Method Summary
 boolean getIntersectionWithLine(MiPoint insidePoint, MiPoint otherPoint, MiPoint returnedIntersectionPoint)
          Gets whether there is an intersection between the line formed by the given points and the outer bounds of this MiPart.
 MiPropertyDescriptions getPropertyDescriptions()
          Gets the descriptions of all of the properties.
 java.lang.String getPropertyValue(java.lang.String name)
          Gets the textual value of the property with the given name.
 double getRadius()
           
 void render(MiRenderer renderer)
           
 void set1DShapeStrokeBackgroundColor(java.awt.Color c)
          Sets the background (fill) color of the (wide) lines of a shape unless it is a rectangle, circle, etc, whose stroke fill color is always the foreground color.
 void set1DShapeStrokesFilled(boolean flag)
          Sets whether the graphic will always be 'solid', i.e.
 void setPropertyValue(java.lang.String name, java.lang.String value)
          Sets the property with the given name to the given value.
 void setRadius(double r)
           
 
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, appendPoint, applyCustomLookAndFeel, calcMinimumSize, calcPreferredSize, containsItem, containsOpaqueRectangles, containsPart, copy, 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, 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, getNumberOfPoints, getNumberOfResources, getOutgoingInvalidLayoutNotificationsEnabled, getPart, getPart, getPoint, getPoint, getPointEntryAngle, getPointExitAngle, getPointX, getPointY, getPreferredSize, getPrototypeManipulator, getRelativeLocation, 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, 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, makeManipulator, optimizedInvalidateArea, optimizedInvalidateDrawBoundsArea, overrideAttributes, overrideEventHandlingDisabledByContainer, packLayout, pick, 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, removePoint, removeResource, removeSelf, replaceDrawBounds, replaceSelf, requestEnterKeyFocus, requestKeyboardFocus, rotate, rotate, rotateTo, scale, scale, scale, select, 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, setNumberOfPoints, setOutgoingInvalidLayoutNotificationsEnabled, setPart, setPickable, setPickableWhenTransparent, setPoint, 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, toString, translate, translate, translatePoint, validateLayout, validatePropertyValue, waitUntilRedrawn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MiCircle

public MiCircle()

MiCircle

public MiCircle(double radius)

MiCircle

public MiCircle(double x,
                double y,
                double radius)

MiCircle

public MiCircle(MiBounds b)
Method Detail

setRadius

public void setRadius(double r)

getRadius

public double getRadius()

getIntersectionWithLine

public boolean getIntersectionWithLine(MiPoint insidePoint,
                                       MiPoint otherPoint,
                                       MiPoint returnedIntersectionPoint)
Description copied from class: MiPart
Gets whether there is an intersection between the line formed by the given points and the outer bounds of this MiPart. If, there is, also returns the point of intersection. This method is most usefull when insidePoint is inside these bounds.

Overrides:
getIntersectionWithLine in class MiPart
Parameters:
insidePoint - the point inside this MiPart's outer bounds
otherPoint - the point outside this MiPart's outer bounds
returnedIntersectionPoint - the (returned) point of intersection of the line between the two given points and the outer bounds of this MiPart
Returns:
true if there was an intersection

render

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

setPropertyValue

public void setPropertyValue(java.lang.String name,
                             java.lang.String value)
Sets the property with the given name to the given value.

Overrides:
setPropertyValue in class MiPart
Parameters:
name - the name of an property
value - the value of the property

set1DShapeStrokeBackgroundColor

public void set1DShapeStrokeBackgroundColor(java.awt.Color c)
Description copied from class: MiPart
Sets the background (fill) color of the (wide) lines of a shape unless it is a rectangle, circle, etc, whose stroke fill color is always the foreground color.

Overrides:
set1DShapeStrokeBackgroundColor in class MiPart
Parameters:
c - the color

set1DShapeStrokesFilled

public void set1DShapeStrokesFilled(boolean flag)
Description copied from class: MiPart
Sets whether the graphic will always be 'solid', i.e. the background color will always be drawn with the (foreground) color for shapes except for rectangle, circle, etc, whose strokes are always filled.

Overrides:
set1DShapeStrokesFilled in class MiPart
Parameters:
flag - true if solid, false if the graphic shape is to be filled with whatever the background color is. The default is 'false'.
See Also:
MiPart.isFilled(), MiPart.setBackgroundColor(java.awt.Color), MiPart.setFilled(boolean)

getPropertyValue

public java.lang.String getPropertyValue(java.lang.String name)
Gets the textual value of the property with the given name. If the value is null then MiiTypes.Mi_NULL_VALUE_NAME is returned.

Overrides:
getPropertyValue in class MiPart
Parameters:
name - the name of a property
Returns:
the string value of the property

getPropertyDescriptions

public MiPropertyDescriptions getPropertyDescriptions()
Gets the descriptions of all of the properties. These can be used to see if an property is different from the default value or if a proposed value is valid or to get a list of all of the valid values of a property.

Overrides:
getPropertyDescriptions in class MiPart
Returns:
the list of property descriptions