com.swfm.mica.layouts
Class MiCrossBarGraphLayout

java.lang.Object
  extended bycom.swfm.mica.core.MiPart
      extended bycom.swfm.mica.core.MiContainer
          extended bycom.swfm.mica.layouts.MiLayout
              extended bycom.swfm.mica.layouts.MiManipulatableLayout
                  extended bycom.swfm.mica.layouts.MiCrossBarGraphLayout
All Implemented Interfaces:
MiiActionHandler, MiiActionTypes, MiiAttributeTypes, MiiCopyable, MiiDragAndDropParticipant, MiiEventTypes, MiiLayout, MiiManipulatableLayout, MiiNames, MiiOrientablePart, MiiPropertyTypes, MiiTypes

public class MiCrossBarGraphLayout
extends MiManipulatableLayout

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

Field Summary
                 
Constructor Summary
MiCrossBarGraphLayout()
          Constructs a new instance of MiCrossBarGraphLayout.
 
Method Summary
 MiParts appendNode(MiPart node, int index)
          Appends the given node after the given index.
 void calcMinimumSize(MiSize size)
          Gets the minimum size of this MiPart.
 void cycleOrientation()
          Changes to the next supported orientation.
 void formatTarget(java.lang.String connectionType)
          Remove all of the connections and create a random network of connections of the nodes in the target.
 int getOrientation()
          Gets the orientation.
 void insertANode(MiPart node, int index)
           
 MiParts insertNode(MiPart node, int index)
          Inserts the given node at the given index.
 boolean isOrientationFixed()
          Gets whether the orientation can be changed.
 void setOrientation(int orientation)
          Sets the orientation.
 
Methods inherited from class com.swfm.mica.layouts.MiManipulatableLayout
appendNeighboringNode, attachManipulatorToTarget, calcPreferredSize, copy, deepCopy, deleteNode, formatEmptyTarget, getDefaultSelectionGraphics, getEdge, getEdgeConnectionType, getLayoutContainerPartRelations, getLayoutElementsBasedOnAverageElementSize, getLayoutElementsBasedOnSizeOfElementRadii, getLayoutManipulator, getMinimumNumberOfTargetNodes, getNeighboringNode, getNode, getNodeBounds, getNodes, getNodesInTarget, getNumberOfEdges, getNumberOfNodes, getPreferredEdgeLength, getPropertyDescriptions, getPropertyValue, getPrototypeEdge, getPrototypePlaceHolder, getSupportedImportFormats, insertNeighboringNode, insertNode, makeEdge, makeLayoutManipulator, makePlaceHolder, processAction, removeNode, setDefaultSelectionGraphics, setEdgeConnectionType, setLayoutContainerPartRelations, setLayoutElementsBasedOnAverageElementSize, setLayoutElementsBasedOnSizeOfElementRadii, setLayoutManipulator, setMinimumNumberOfTargetNodes, setPreferredEdgeLength, setPropertyValue, setPrototypeEdge, setPrototypePlaceHolder, setTarget, stripTargetOfConnections
 
Methods inherited from class com.swfm.mica.layouts.MiLayout
determinesPreferredAndMinimumSizes, getAlleyHSpacing, getAlleyMargins, getAlleyVSpacing, getCellMargins, getCellMargins, getElementHJustification, getElementHSizing, getElementVJustification, getElementVSizing, getInsetMargins, getInsetMargins, getLastElementJustification, getTarget, getUniqueElementIndex, getUniqueElementSizing, isEnabled, isIndependantOfTargetPosition, isScalingOfPartsWhenBoundsChangesHandledDuringLayout, layoutParts, makeCopy, setAlleyHSpacing, setAlleySpacing, setAlleyVSpacing, setCellMargins, setCellMargins, setElementHJustification, setElementHSizing, setElementJustification, setElementSizing, setElementVJustification, setElementVSizing, setEnabled, setInsetMargins, setInsetMargins, setLastElementJustification, setScalingOfPartsWhenBoundsChangesHandledDuringLayout, setUniqueElementIndex, setUniqueElementSizing, toString
 
Methods inherited from class com.swfm.mica.core.MiContainer
appendPart, containsPart, doImport, getIndexOfPart, getIntersectionWithLine, getKeepConnectionsBelowNodes, getNumberOfParts, getPart, getPart, hasEventHandlers, hasValidCachedEventHandlerInfo, insertPart, 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, deleteAllConnections, deleteAllParts, deleteSelf, dispatchAction, dispatchAction, dispatchAction, dispatchActionRequest, dispatchActionRequest, dispatchActionRequest, dispatchEvent, doExport, 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, getInnerBounds, getInnerBounds, getInvalidAreaNotificationsEnabled, getInvalidLayoutNotificationsEnabled, getItem, getItem, getKeyFocusTraversalGroup, getLayout, 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, getPrototypeManipulator, getRelativeLocation, getResource, getResourceName, getRootWindow, getRotation, getSelectionGraphics, getShadowColor, getShadowDirection, getShadowLength, getShadowRenderer, getShadowShape, getShadowStyle, getSize, getSnapPointManager, getStatusHelp, getSupportedExportFormats, getThisOrPartHasInvalidArea, getToolHintHelp, getTotalNumberOfPartsCreated, getTransform, 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, makeImageFromArea, 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, 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, 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, translate, translate, translatePoint, validateLayout, validatePropertyValue, waitUntilRedrawn
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.swfm.mica.layouts.MiiLayout
determinesPreferredAndMinimumSizes, getMinimumSize, getPreferredSize, getTarget, invalidateLayout, isEnabled, isIndependantOfTargetPosition, layoutParts, setEnabled
 
Methods inherited from interface com.swfm.mica.core.MiiCopyable
makeCopy
 

Constructor Detail

MiCrossBarGraphLayout

public MiCrossBarGraphLayout()
Constructs a new instance of MiCrossBarGraphLayout.

Method Detail

isOrientationFixed

public boolean isOrientationFixed()
Gets whether the orientation can be changed.

Specified by:
isOrientationFixed in interface MiiOrientablePart
Overrides:
isOrientationFixed in class MiManipulatableLayout
Returns:
true if the orientation cannot be changed

setOrientation

public void setOrientation(int orientation)
Sets the orientation. Typically the valid values are: Mi_HORIZONTAL Mi_VERTICAL However, the implementation is free to define it's own, custom orientations.

Specified by:
setOrientation in interface MiiOrientablePart
Overrides:
setOrientation in class MiManipulatableLayout
Parameters:
orientation - the orientation

getOrientation

public int getOrientation()
Gets the orientation. Typically the valid values are: Mi_HORIZONTAL Mi_VERTICAL However, the implementation is free to define it's own, custom orientations.

Specified by:
getOrientation in interface MiiOrientablePart
Overrides:
getOrientation in class MiManipulatableLayout
Returns:
the orientation

cycleOrientation

public void cycleOrientation()
Changes to the next supported orientation.

Specified by:
cycleOrientation in interface MiiOrientablePart
Overrides:
cycleOrientation in class MiManipulatableLayout

insertNode

public MiParts insertNode(MiPart node,
                          int index)
Inserts the given node at the given index.

Overrides:
insertNode in class MiManipulatableLayout
Parameters:
node - the node to insert
index - the index of the node that the given node will be inserted before
Returns:
the list of nodes that were inserted (the given node and any placeholders that may have to be added).

insertANode

public void insertANode(MiPart node,
                        int index)

appendNode

public MiParts appendNode(MiPart node,
                          int index)
Appends the given node after the given index.

Overrides:
appendNode in class MiManipulatableLayout
Parameters:
node - the node to append
index - the index of the node that the given node will be appended after (-1 indicates that this should append the given node after the last node)
Returns:
the list of nodes that were inserted (the given node and any placeholders that may have to be added).

calcMinimumSize

public void calcMinimumSize(MiSize size)
Gets the minimum size of this MiPart.

Overrides:
calcMinimumSize in class MiContainer
Parameters:
size - the (returned) minimum size
See Also:
MiPart.getMinimumSize(com.swfm.mica.core.MiSize)

formatTarget

public void formatTarget(java.lang.String connectionType)
Remove all of the connections and create a random network of connections of the nodes in the target.

Specified by:
formatTarget in class MiManipulatableLayout
Parameters:
connectionType - the type of connection that defines the graph