com.swfm.mica.core
Class MiReference

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

public class MiReference
extends MiContainer

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

Field Summary
                 
Constructor Summary
MiReference()
           
MiReference(MiPart obj)
           
 
Method Summary
 void appendPart(MiPart obj)
          Appends the given part to this container.
 void draw(MiRenderer renderer)
          Draws this MiPart.
 void flip(double radians)
          Flips this MiPart about the axis specified by the given number of radians about the parts center.
 void flip(MiPoint center, double radians)
          Flips this MiPart about the axis specified by the given number of radians about the given point.
 MiBounds getInnerBounds(MiBounds b)
          Gets the inner bounds of this MiPart.
 MiSnapPointManager getSnapPointManager()
          Gets the MiSnapPointManager, if any, assigned to the referenced MiPart.
 MiiTransform getTransform()
          Gets the transform, if any, assigned to this MiPart.
 boolean getUseRotateTransform()
           
 boolean getUseScaleTransform()
           
 boolean getUseTranslateTransform()
           
 void insertPart(MiPart obj, int index)
          Inserts the given part at the given index into this container.
 void reCalcBounds(MiBounds bounds)
           
 void rotate(double radians)
          Rotates this MiPart the given number of radians about it's center.
 void rotate(MiPoint center, double radians)
          Rotates this MiPart the given number of radians about the given point.
 void scale(MiPoint center, MiScale scale)
          Scales the bounds of this MiPart by the given scale factor (multipliers).
 void setBounds(MiBounds newBounds)
          Sets the bounds of this MiPart to have the given bounds.
 void setClipBounds(MiBounds b)
           
 void setTransform(MiiTransform t)
           
 void setUseRotateTransform(boolean flag)
          Set this to false if moving something because center of rotation needs to move and rotation transform does not do that
 void setUseScaleTransform(boolean flag)
           
 void setUseTranslateTransform(boolean flag)
           
 void translate(double x, double y)
          Translates the bounds of this MiPart by the given x and y distances.
 
Methods inherited from class com.swfm.mica.core.MiContainer
calcMinimumSize, calcPreferredSize, containsPart, deepCopy, doImport, getIndexOfPart, getIntersectionWithLine, getKeepConnectionsBelowNodes, getNumberOfParts, getPart, getPart, getSupportedImportFormats, hasEventHandlers, hasValidCachedEventHandlerInfo, invalidateCachedEventHandlerInfo, isContainerOf, isContainerOf, isContainerOfWithAttachments, pick, pickDeepListContents, pickObject, removeAllParts, removePart, removePart, setKeepConnectionsBelowNodes, setPart, translate
 
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, appendPoint, appendPoint, applyCustomLookAndFeel, containsItem, containsOpaqueRectangles, copy, copy, deleteAllConnections, deleteAllParts, deleteSelf, dispatchAction, dispatchAction, dispatchAction, dispatchActionRequest, dispatchActionRequest, dispatchActionRequest, dispatchEvent, doExport, drawNow, drawNow, 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, 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, getNumberOfPoints, getNumberOfResources, getOutgoingInvalidLayoutNotificationsEnabled, getPoint, getPoint, getPointEntryAngle, getPointExitAngle, getPointX, getPointY, getPreferredSize, getPropertyDescriptions, getPropertyValue, getPrototypeManipulator, getRelativeLocation, getResource, getResourceName, getRootWindow, getRotation, getSelectionGraphics, getShadowColor, getShadowDirection, getShadowLength, getShadowRenderer, getShadowShape, getShadowStyle, getSize, getStatusHelp, getSupportedExportFormats, getThisOrPartHasInvalidArea, getToolHintHelp, getTotalNumberOfPartsCreated, getTransparency, getValidatingLayout, getVisibilityAnimator, getWhiteColor, getWidth, getWriteMode, getXmax, getXmin, getXorColor, getYmax, getYmin, hasAttachment, hasAttribute, hasEnterKeyFocus, hasEventHandler, hasFixedAspectRatio, hasFixedHeight, hasFixedWidth, hasKeyboardFocus, hasMouseFocus, hasOverriddenMinimumSize, hasOverriddenPreferredSize, hasProperty, hasTotallyInvalidArea, hasValidLayout, insertActionHandler, insertActionHandler, insertActionHandler, insertConnection, insertContainer, insertEventHandler, insertItem, insertPoint, insertPoint, invalidateArea, invalidateArea, invalidateLayout, isAcceptingEnterKeyFocus, isAcceptingKeyboardFocus, isAcceptingMouseFocus, isAcceptingTabKeys, isActionDispatchingEnabled, isConnectable, isConnectedTo, 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, pickDeepList, preRenderToDoubleBuffer, refreshBounds, refreshLookAndFeel, refreshLookAndFeel, removeActionHandler, removeActionHandler, removeActionHandlers, removeAllActionHandlers, removeAllAttachments, removeAllConnections, removeAllEventHandlers, removeAllItems, removeAllManipulators, removeAttachment, removeAttachment, removeCommandHandler, removeCommandHandler, removeConnection, removeConnection, removeContainer, removeContainer, removeEventHandler, removeFromAllContainers, removeItem, removeItem, removePoint, removeResource, removeSelf, replaceDrawBounds, replaceSelf, requestEnterKeyFocus, requestKeyboardFocus, rotateTo, 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, 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, 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, translatePoint, validateLayout, validatePropertyValue, waitUntilRedrawn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MiReference

public MiReference()

MiReference

public MiReference(MiPart obj)
Method Detail

setTransform

public void setTransform(MiiTransform t)

getTransform

public MiiTransform getTransform()
Description copied from class: MiPart
Gets the transform, if any, assigned to this MiPart.

Overrides:
getTransform in class MiPart
Returns:
the transform

setUseScaleTransform

public void setUseScaleTransform(boolean flag)

getUseScaleTransform

public boolean getUseScaleTransform()

setUseTranslateTransform

public void setUseTranslateTransform(boolean flag)

getUseTranslateTransform

public boolean getUseTranslateTransform()

setUseRotateTransform

public void setUseRotateTransform(boolean flag)
Set this to false if moving something because center of rotation needs to move and rotation transform does not do that


getUseRotateTransform

public boolean getUseRotateTransform()

draw

public void draw(MiRenderer renderer)
Description copied from class: MiPart
Draws this MiPart. First checks for whether it is visible and not hidden and not clipped. This should rarely, if ever, be called from outside Mica. This is used here, and by advanced widgets from their own render() methods. Mica takes care of calling this automatically when a part needs to be redrawn.

Overrides:
draw in class MiPart
Parameters:
renderer - the renderer to use for drawing

setClipBounds

public void setClipBounds(MiBounds b)

translate

public void translate(double x,
                      double y)
Description copied from class: MiPart
Translates the bounds of this MiPart by the given x and y distances. Any parts of this MiPart are also translated in kind. Override this, if desired, as it implements the core functionality.

Overrides:
translate in class MiPart
Parameters:
x - the x distance to translate
y - the y distance to translate

scale

public void scale(MiPoint center,
                  MiScale scale)
Description copied from class: MiPart
Scales the bounds of this MiPart by the given scale factor (multipliers). Any parts of this MiPart are also scaled in kind. Override this, if desired, as it implements the core functionality.

Overrides:
scale in class MiPart
Parameters:
center - the center of the scaling
scale - the scale factor

rotate

public void rotate(double radians)
Description copied from class: MiPart
Rotates this MiPart the given number of radians about it's center.

Overrides:
rotate in class MiPart
Parameters:
radians - the angle to rotate

rotate

public void rotate(MiPoint center,
                   double radians)
Description copied from class: MiPart
Rotates this MiPart the given number of radians about the given point.

Overrides:
rotate in class MiPart
Parameters:
center - the center of rotation
radians - the angle to rotate

flip

public void flip(double radians)
Description copied from class: MiPart
Flips this MiPart about the axis specified by the given number of radians about the parts center.

Overrides:
flip in class MiPart
Parameters:
radians - the angle of the axis of reflection

flip

public void flip(MiPoint center,
                 double radians)
Description copied from class: MiPart
Flips this MiPart about the axis specified by the given number of radians about the given point.

Overrides:
flip in class MiPart
Parameters:
center - the center of flip
radians - the angle of the axis of reflection

setBounds

public void setBounds(MiBounds newBounds)
Description copied from class: MiPart
Sets the bounds of this MiPart to have the given bounds. Any parts of this MiPart are also scaled and translated in kind. Override this, if desired, as it implements the core functionality.

Overrides:
setBounds in class MiPart
Parameters:
newBounds - the new bounds

appendPart

public void appendPart(MiPart obj)
Description copied from class: MiContainer
Appends the given part to this container.

Overrides:
appendPart in class MiContainer
Parameters:
obj - the part to append

insertPart

public void insertPart(MiPart obj,
                       int index)
Description copied from class: MiContainer
Inserts the given part at the given index into this container.

Overrides:
insertPart in class MiContainer
Parameters:
obj - the part to insert
index - where to insert the part

getInnerBounds

public MiBounds getInnerBounds(MiBounds b)
Description copied from class: MiPart
Gets the inner bounds of this MiPart. Override this, if desired, as it implements the core functionality.

Overrides:
getInnerBounds in class MiPart
Parameters:
b - the (returned) inner bounds
Returns:
the inner bounds

reCalcBounds

public void reCalcBounds(MiBounds bounds)
Parameters:
bounds - the (returned) outer bounds

getSnapPointManager

public MiSnapPointManager getSnapPointManager()
Gets the MiSnapPointManager, if any, assigned to the referenced MiPart.

Overrides:
getSnapPointManager in class MiPart
Returns:
the snap point manager or null