com.swfm.mica.shapes
Class MiVeryLightweightShape

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

public class MiVeryLightweightShape
extends MiPart

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

Field Summary
 java.awt.Color[] colors
           
                 
Constructor Summary
MiVeryLightweightShape()
           
 
Method Summary
 void appendBackgroundColor(java.awt.Color color)
           
 void appendBackgroundColor(int color)
           
 void appendCircle(MiPoint pt1, double radius)
           
 void appendColor(java.awt.Color color)
           
 void appendColor(int color)
           
 void appendEllipse(MiBounds bounds)
           
 void appendEllipse(MiPoint pt1, double hRadius, double vRadius)
           
 void appendImage(MiBounds bounds, java.awt.Image image)
           
 void appendLine(MiPoint pt1, MiPoint pt2)
           
 void appendPolygon(MiPoint[] pts)
           
 void appendPolyline(MiPoint[] pts)
           
 void appendRectangle(MiBounds b)
           
 void appendRoundRectangle(MiBounds b, double arcWidth, double arcHeight)
           
 void appendTag(int tag)
           
 void calcMinimumSize(MiSize size)
          Gets the minimum size of this MiPart.
 void calcPreferredSize(MiSize size)
          Gets the preferred size of this MiPart.
 boolean findClosestConnPtOfTaggedPrim(int[] tags, MiBounds area, MiPoint closestPt)
           
 boolean findClosestTaggedPrim(int tag, MiBounds area, MiPoint closestPt)
           
 int getColorValue(java.awt.Color c)
           
 boolean getPickListOfTaggedPrimsInArea(int[] tags, MiBounds area, IntVector offsetsToPrims)
           
 boolean getTagListOfPrimsInArea(MiBounds area, IntVector tagList)
           
 void invalidateNewArea(MiBounds area)
           
 void overrideColorTaggedPrims(int tag, java.awt.Color color)
           
 void removeOverrideColorTaggedPrims(int tag)
           
 void removeTaggedPrims(int tag)
           
 void render(MiRenderer renderer)
           
 void setBlockSize(int size)
           
 
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, 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, 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, getNumberOfPoints, getNumberOfResources, getOutgoingInvalidLayoutNotificationsEnabled, getPart, getPart, getPoint, getPoint, getPointEntryAngle, getPointExitAngle, getPointX, getPointY, getPreferredSize, getPropertyDescriptions, getPropertyValue, 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, 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, setNumberOfPoints, setOutgoingInvalidLayoutNotificationsEnabled, setPart, setPickable, setPickableWhenTransparent, setPoint, setPoint, setPreferredSize, setPrintable, setPropertyValue, 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
 

Field Detail

colors

public java.awt.Color[] colors
Constructor Detail

MiVeryLightweightShape

public MiVeryLightweightShape()
Method Detail

render

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

appendTag

public void appendTag(int tag)

appendLine

public void appendLine(MiPoint pt1,
                       MiPoint pt2)

appendPolyline

public void appendPolyline(MiPoint[] pts)

appendRectangle

public void appendRectangle(MiBounds b)

appendRoundRectangle

public void appendRoundRectangle(MiBounds b,
                                 double arcWidth,
                                 double arcHeight)

appendCircle

public void appendCircle(MiPoint pt1,
                         double radius)

appendEllipse

public void appendEllipse(MiPoint pt1,
                          double hRadius,
                          double vRadius)

appendEllipse

public void appendEllipse(MiBounds bounds)

appendPolygon

public void appendPolygon(MiPoint[] pts)

appendImage

public void appendImage(MiBounds bounds,
                        java.awt.Image image)

getColorValue

public int getColorValue(java.awt.Color c)

appendColor

public void appendColor(java.awt.Color color)

appendColor

public void appendColor(int color)

appendBackgroundColor

public void appendBackgroundColor(java.awt.Color color)

appendBackgroundColor

public void appendBackgroundColor(int color)

overrideColorTaggedPrims

public void overrideColorTaggedPrims(int tag,
                                     java.awt.Color color)

removeOverrideColorTaggedPrims

public void removeOverrideColorTaggedPrims(int tag)

setBlockSize

public void setBlockSize(int size)

removeTaggedPrims

public void removeTaggedPrims(int tag)

findClosestTaggedPrim

public boolean findClosestTaggedPrim(int tag,
                                     MiBounds area,
                                     MiPoint closestPt)

findClosestConnPtOfTaggedPrim

public boolean findClosestConnPtOfTaggedPrim(int[] tags,
                                             MiBounds area,
                                             MiPoint closestPt)

getPickListOfTaggedPrimsInArea

public boolean getPickListOfTaggedPrimsInArea(int[] tags,
                                              MiBounds area,
                                              IntVector offsetsToPrims)

getTagListOfPrimsInArea

public boolean getTagListOfPrimsInArea(MiBounds area,
                                       IntVector tagList)

calcMinimumSize

public void calcMinimumSize(MiSize size)
Description copied from class: MiPart
Gets the minimum size of this MiPart. Override this, if desired, as it implements the core functionality. The default behavior is to return the minimum width and/or height, or, if not specified, a zero size.

Overrides:
calcMinimumSize in class MiPart
Parameters:
size - the (returned) minimum size

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

invalidateNewArea

public void invalidateNewArea(MiBounds area)