Class SwimlaneView
- java.lang.Object
-
- com.nomagic.magicdraw.uml.MDElementImpl
-
- com.nomagic.magicdraw.uml.ElementImpl
-
- com.nomagic.magicdraw.uml.symbols.PresentationElement
-
- com.nomagic.magicdraw.uml.symbols.paths.PathConnector
-
- com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
-
- com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
- com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneView
-
- All Implemented Interfaces:
BaseElement,MDElement,ModelElementProvider,com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape,StereotypesDisplayModeOwner,com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderOwner,com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider,NameOwner,java.beans.PropertyChangeListener,java.lang.Cloneable,java.lang.Comparable,java.util.EventListener
@OpenApi public class SwimlaneView extends com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView implements com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderOwner, StereotypesDisplayModeOwner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement.OnEdgeBounds
-
Nested classes/interfaces inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.PresentationElement.SmartListenerConfigData, com.nomagic.magicdraw.uml.symbols.PresentationElement.StructureCache
-
-
Field Summary
Fields Modifier and Type Field Description private static UnmodifiableDimensionDEFAULT_SIZEstatic intDEFAULT_SWIMLANE_SIZEprivate booleandrawClosingBorderIndicates whether swimlane should be open or a closing border should be drawn.private java.util.Map<ActivityPartition,java.util.List<SwimlaneCellView>>headerToCellsMapprivate java.util.Map<ActivityPartition,java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>>headerToInnerSwimlanesMapprivate java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>horizontalSwimlanesprivate booleanlockLayoutprivate java.util.Map<ActivityPartition,com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>partitionToHeaderMapstatic java.lang.StringSHOW_BOTHstatic java.util.ListSHOW_NAME_MODESstatic java.lang.StringSHOW_PARTITION_NAMEstatic java.lang.StringSHOW_REPRESENTEDstatic java.lang.StringSHOW_REPRESENTED_IF_EXISTSprivate java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>verticalSwimlanes-
Fields inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
CONTAINER_SHAPE_INSETS
-
Fields inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
BORDER_ELEMENT_MARGIN_ALL, BORDER_ELEMENT_MARGIN_BOTTOM, BORDER_ELEMENT_MARGIN_LEFT, BORDER_ELEMENT_MARGIN_LEFT_RIGHT, BORDER_ELEMENT_MARGIN_MODES, BORDER_ELEMENT_MARGIN_NONE, BORDER_ELEMENT_MARGIN_RIGHT, BORDER_ELEMENT_MARGIN_TOP, BORDER_ELEMENT_MARGIN_TOP_BOTTOM, BOTTOM_EDGE, INSIDE_EDGE_POSITION, LEFT_EDGE, NEED_AUTOSIZE_FULL, NEED_AUTOSIZE_LAYOUT, NEED_AUTOSIZE_NONE, NO_EDGE, NULL_INSETS, ON_EDGE_POSITION, OUTSIDE_EDGE_POSITION, RIGHT_EDGE, SPACE, SPACE_INSETS, SPACE_INSETS_EMPTY_TOP_BOTTOM, SUSPEND_SHAPE_AUTO_RESIZE_FALSE, SUSPEND_SHAPE_AUTO_RESIZE_MODES, SUSPEND_SHAPE_AUTO_RESIZE_SAME_AS_DIAGRAM, SUSPEND_SHAPE_AUTO_RESIZE_TRUE, TOP_EDGE
-
Fields inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathConnector
showsProxy
-
Fields inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
DASHED_STROKE, DEFAULT_LINE_WIDTH, DOTTED_STROKE, HANDLE_SIZE, MAX_LINE_WIDTH, MIN_LINE_WIDTH, SHADOW_WIDTH, SOLID_STROKE
-
Fields inherited from interface com.nomagic.magicdraw.uml.symbols.shapes.StereotypesDisplayModeOwner
DSL_STEREOTYPE_DISPLAY_MODE_ALL, DSL_STEREOTYPE_DISPLAY_MODE_LAST, DSL_STEREOTYPE_DISPLAY_MODE_NONE, DSL_STEREOTYPE_DISPLAY_MODES, STEREOTYPE_DISPLAY_MODE_DO_NOT_DISPLAY_STEREOTYPES, STEREOTYPE_DISPLAY_MODE_ICON, STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE, STEREOTYPE_DISPLAY_MODE_SHAPE_IMAGE_AND_TEXT, STEREOTYPE_DISPLAY_MODE_TEXT, STEREOTYPE_DISPLAY_MODE_TEXT_AND_ICON, STEREOTYPES_DISPLAY_MODES, STEREOTYPES_DISPLAY_MODES_SIMPLE
-
-
Constructor Summary
Constructors Constructor Description SwimlaneView()SwimlaneView(PresentationElement parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor visitor)Method accepts visitor, and calls method visit<class name>(this) of visitor .private voidadjustSizeByHeadersAndCells(java.awt.Dimension pref, java.util.function.Function<ShapeElement,UnmodifiableDimension> sizeSupplier)private static UnmodifiableDimensioncalculateAndGetPreferredOrMinimumShrinkingSize(ShapeElement shape, int locationX, int locationY)booleancanAddInstance(PresentationElement o)Object view has no children.protected booleancanBeAutosized()SwimlaneViewclone()Returns a copy of theElement.private static voidcollectSwimlanesRecursively(java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> allSwimlanes, java.lang.Iterable<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> swimlanes, boolean onlyLeafNodes)private voiddrawClosingBorder(java.awt.Graphics2D g)Draws a closing order for a swimlane.ElementfindParentForData(PresentationElement parent, com.nomagic.uml2.ElementAddContext addContext)java.util.Collection<SwimlaneCellView>getAllCells()Gets all swimlane cells recursively.java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>getAllSwimlanes()java.util.List<SwimlaneCellView>getCellsForHeader(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)java.util.List<com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape>getCenterlineableInnerParts(int orientation)com.nomagic.ui.UnmodifiableInsetsgetChildrenInsets(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)protected UnmodifiableDimensiongetDefaultDimension()java.lang.StringgetDSLStereotypesDisplayMode()Gets DSL stereotype display mode.intgetHeaderPosition(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)java.util.Map<ActivityPartition,java.util.List<SwimlaneCellView>>getHeaderToCellsMap()java.util.Map<ActivityPartition,java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>>getHeaderToInnerSwimlanesMap()com.nomagic.magicdraw.uml.symbols.shapes.TextObject.VerticalPositiongetHeaderVerticalPosition()java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>getHorizontalSwimlanes()java.util.Map<ActivityPartition,com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>getPartitionToHeaderMap()static intgetPositionOfHeaderBounds(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView current, java.awt.Rectangle bounds, boolean vertical)intgetPreferredManipulationHeightForHorizontalSwimlane(ActivityPartition partition)intgetPreferredManipulationWidthForVerticalSwimlane(ActivityPartition partition)protected java.util.stream.Stream<PresentationElement>getProxyPresentationElementsStream()java.util.List<PresentationElement>getRemovableChildren()java.lang.StringgetSecondaryImageAndStereotypeDisplayMode()java.lang.StringgetShowPartitionNameMode()java.lang.StringgetStereotypesDisplayMode()Gets stereotype display mode.java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>getSwimlanes(boolean vertical)java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>getSwimlanesRecursively(boolean onlyLeafNodes)java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>getSwimlanesRecursively(boolean vertical, boolean onlyLeafNodes)static java.awt.BasicStrokegetSwimlaneStroke(int width)java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>getVerticalSwimlanes()voidinitializeByChildren(boolean addCovered)Initializes all maps by children positions used after loadprivate static booleaninsertSwimlane(java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> swimlanes, com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, int position)voidinsertSwimlaneAt(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, int position)protected booleaninternalAppendChildRect(PresentationElement view)voidinternalApplyProperties(PropertyManager man)Applies properties from given property managerjava.awt.BasicStrokeinternalGetPresentationElementStroke(int width)Return a stroke used to paint symbol's main partvoidinternalLayoutChildren(boolean calculatePrefSize)voidinternalSilentApply()Silently applies all properties after initializationprotected voidinternalUpdatePresentationElement()Internal symbol update method for subclassing.booleanintersects(int x, int y, int width, int height)checks whether object intersects with given rectanglebooleanisCenterlineInner()booleanisChildLayoutable(PresentationElement child)Check if given child is "layoutable" - it means this shape controls bounds of child inside layoutChildren() method.booleanisDrawClosingBorder()Indicates if closing border should be drawn for a swimlane.booleanisHorizontalCenterlineProvider()Indicates whether this shape provides horizontal centerlines to other shapes.booleanisLastHeader(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, boolean vertical)booleanisLockLayout()booleanisShowElementProperties()booleanisShowTaggedValues()booleanisUseFullRepresentedElementSignature()booleanisVerticalCenterlineProvider()Indicates whether this shape provides vertical centerlines to other shapes.private voidlayoutHorizontalCells(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, java.awt.Rectangle swimlaneBounds, int maxWidth)private voidlayoutHorizontalSwimlanes(int deltaY, int width)private voidlayoutVerticalCells(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, java.awt.Rectangle swimlaneBounds, int maxHeight)private voidlayoutVerticalSwimlanes(int deltaX, int height)voidminimumDimensionForShrinking(java.awt.Dimension size, int locationX, int locationY)voidpaintSelf(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)protected voidpreferredDimension(java.awt.Dimension pref, int locationX, int locationY)private voidprintHeaderStructure(java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> swimlanes)private voidprintSwimlaneStructure()private voidremoveCellsFromMaps(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)private voidremoveCellViewFromHeader(SwimlaneCellView cellView, boolean vertical)voidremoveHeaderFromMaps(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)voidremovePresentationElement(PresentationElement element, boolean resizeParent)voidremoveSwimlaneHeader(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)voidremoveSwimlaneHeaderFromStructures(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)voidresetMaps()voidsetDrawClosingBorder(boolean drawClosingBorder)Sets draw closing border flag value.voidsetDSLStereotypesDisplayMode(java.lang.String mode)Sets DSL stereotype display mode value.voidsetHeaderVerticalPosition(com.nomagic.magicdraw.uml.symbols.shapes.TextObject.VerticalPosition headerVerticalPosition)Set header vertical position on Y axisvoidsetLockLayout(boolean lockLayout)voidsetSecondaryImageAndStereotypeDisplayMode(java.lang.String mode)voidsetShowElementProperties(boolean showElementProperties)voidsetShowPartitionNameMode(java.lang.String mode)voidsetShowTaggedValues(boolean show)voidsetStereotypesDisplayMode(java.lang.String mode)Sets stereotype display mode value.voidsetUseFullRepresentedElementSignature(boolean value)booleansnapsToCenterlines()voidsSetDSLStereotypesDisplayMode(java.lang.String mode)Simple sets (no updates) DSL stereotypes display mode.voidsSetHeaderVerticalPosition(com.nomagic.magicdraw.uml.symbols.shapes.TextObject.VerticalPosition headerVerticalPosition)Set header vertical position on Y axisvoidsSetSecondaryImageAndStereotypeDisplayMode(java.lang.String mode)voidsSetShowElementProperties(boolean showElementProperties)voidsSetShowPartitionNameMode(java.lang.String mode)voidsSetShowTaggedValues(boolean show)voidsSetStereotypesDisplayMode(java.lang.String mode)Simple sets (no updates) stereotypes display mode.voidsSetUseFullRepresentedElementSignature(boolean value)-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
addPresentationElement, addPresentationElement, addPresentationElementWithoutResize, adjustBoundsForMoving, adjustChildBoundsForMoving, autosize, autosizeByChildren, calculateAutosizeDimension, calculateAutosizeDimension, canAddChild, canMoveChildOutside, checkShowsProxy, childrenBoundsForReshape, clearShowsProxy, constructLayoutHelper, correctChildrenVector, getChildrenBounds, getChildrenOnBorderBounds, getContainerBounds, getLayoutHelper, getLayoutHelperClone, getManipulatedElementAt, getManipulationPreferredDimension, getPresentationElementAt, getPresentationElementIndex, getPresentationElements, hasManipulatedChildrenIncludingIndirect, hasManipulatedShapesNotOnEdge, hasManipulatedShapesOnEdge, hasManipulatedShapesOnEdge, internalAddIndirectManipulatedChildrenRect, internalGetChildAt, internalGetIndirectManipulatedChildrenRect, internalGetManipulatedChildrenRect, internalGetManipulatedChildrenRect, internalGetSelfManipulationPreferredSize, internalRecursiveAutosizeForChildren, internalSetChildren, isCanChildrenChangeEdge, isCanMoveChildren, isChildMovable, layoutChildren, moveChild, moveChildren, needAdjustToPreferred, paintChildren, paintChildrenBackground, prefDimensionByManipulatedChildren, recursiveAutosize, removePresentationElement, sAddPresentationElement, setBounds, setBounds, setCanMoveChildren, setDummyResizeMode, setFillColor, setLayoutHelper, setPresentationElements, showPathElements, simpleSetBounds, simpleSetBounds, sRemovePresentationElement, sSetPresentationElements
-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement
addBreakPoints, adjustBounds, adjustOnEdge, adjustOnEdge, adjustOnEdgeChildren, autosize, autosizeAndResizeParent, calculateAdjustOnEdgeLocation, calculateAndGetMinimumShrinkingDimension, calculateAndGetPreferredDimension, calculateEdge, calculateMinimumDimension, calculateOnEdgeBounds, calculatePreferredDimension, calculatePreferredDimension, canHavePaths, clearOldRect, coversPoint, createBoundsShape, edgeChanged, ensureDimension, ensurePreferredDimensionIfShrinkable, ensurePreferredDimensionIfShrinkable, findFreePlaceForShapeOnBorder, getBorderElementMargin, getBounds, getDimensionForShrinking, getEdgeLine, getFixedConnectionPoints, getHeaderInsetReduce, getInsetsForOnEdgeShapes, getIntersection, getIntersection, getIntersection, getLoadedDimension, getMiddlePoint, getMiddlePoint, getMiddlePointX, getMiddlePointX, getMiddlePointY, getMiddlePointY, getMinimumDimension, getNearestEdge, getNearestEdge, getNeedAutosizeFlag, getNotCopyBounds, getOnEdge, getOnEdgeCornerDistance, getOnEdgePosition, getPreferredDimension, getPreferredDimensionForAutosize, getReshapeMode, getSuspendShapeAutoResizeMode, hasManipulator, initialize, internalGetBoundsShape, isAutosized, isOnEdge, isShrinkable, isSnapShapesOnBorderToGrid, isSnapToGrid, isUseFixedConnectionPoints, layoutChildren, maximumDimension, minimumDimension, minimumOrMinimumShrinkableDimension, moveLinksToSelf, movePathElement, movePathElements, needAdjustToMaximumDimension, onChildEdgeChange, prepareForShadowDrawing, providesHorizontalCenterline, providesVerticalCenterline, resetCalculatePreferredRegardingChildren, setAutosize, setBorderElementMargin, setCalculatePreferredRegardingChildren, setLoadedDimension, setMinimumDimension, setNeedAutosizeFlag, setOldRect, setOnEdge, setPreferredDimension, setReshapeMode, setSnapShapesOnBorderToGrid, setSuspendShapeAutoResizeMode, setUseFixedConnectionPoints, shouldDrawShadow, simpleSetBounds, simpleSetBounds, sSetAutosize, sSetBorderElementMargin, sSetBounds, sSetSuspendShapeAutoResizeMode, sSetVisibility, toString, updateLater
-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.paths.PathConnector
addConnectedPathElement, createSmartListenerConfig, dispose, disposeConnectedPaths, findSymbolForEnd, findSymbolForEnd, getConnectedPathElement, getConnectedPathElementCount, getConnectedPathElements, getConnectedPathElements, getConnectedPathElements, getPreferredArrowLength, isShowsProxy, movePathElement, removeConnectedPathElement, sAddConnectedPathElement, selectPathsForMoving, setParent, setVisibility, sRemoveConnectedPathElement, sSetConnectedPathElements
-
Methods inherited from class com.nomagic.magicdraw.uml.symbols.PresentationElement
addPresentationElement, addProperty, adjustChildBounds, alwaysShowTooltip, applyProperties, askDeleteDataConfirmation, atInsert, atInsertChildren, autosizeAndResizeManipulatedParent, beforeDelete, boundsChanged, boundsChanged, canAddChild, canAddInstance, canBeDisposedOnUpdate, canChangeElementParent, canChangeParent, canChangeParent, canFill, changeProperties, changeProperty, changePropertyManager, checkElementParentOnAdd, checkProxyVisibility, childrenForMoving, clearAntialiasingState, collectSubManipulatedElements, collectSubPresentationElements, collectSubPresentationElements, collectSubShowingPresentationElements, constructChangePropertyCommand, createPropertyChangeListener, createPropertyManager, disposeChildren, disposeListener, draw, drawBackground, drawSymbol, drawSymbolBackground, dynamicFillColor, dynamicLineColor, dynamicLineWidth, dynamicLineWidth, dynamicPaintShadow, dynamicStroke, dynamicStroke, dynamicStroke, dynamicStyleFillColor, dynamicStyleFillPaint, dynamicStyleLineColor, dynamicStyleTextColor, dynamicStyleTransparency, dynamicStyleTransparency, dynamicStyleValue, dynamicTextAlignment, dynamicTextColor, editName, editName, findPresentationElement, firePropertyChange, generateID, getActualElement, getActualProperty, getAdditionalRenderersToNotify, getAssignableModelElementsClasses, getBooleanPropertyValue, getBoundsShape, getBoundsToRepaint, getBoundsWithChildrenOnEdge, getCenterlinePoint, getCenterlinePointX, getCenterlinePointY, getChildPresentationElementForContextMenu, getChildrenWithSymbolProperties, getConfiguration, getDiagramPresentationElement, getDiagramSurface, getDrawComparator, getDynamicConfigurations, getDynamicStyleOwner, getElement, getElementNumberDisplayMode, getElementsForLinkConnecting, getElementToConnectLink, getElementToMove, getExpectedDataParent, getFillColor, getFont, getFontHeight, getFontRenderContext, getHumanName, getHumanType, getLineColor, getLineWidth, getManipulatedElementAt, getManipulatedIntersectionWith, getManipulatedIntersectionWith, getManipulatedParent, getManipulatedPresentationElements, getManipulationBounds, getNotZoomedTolerance, getObjectParent, getParent, getParentSymbolPropertyOwner, getPreferredBounds, getPreferredSize, getPresentationElementAt, getPresentationElementAt, getPresentationElementCount, getPresentationElementsAt, getPresentationElementsAt, getPresentationElementStroke, getPresentationElementStroke, getProjectImpl, getProperty, getPropertyManager, getPropertyManagerName, getRealPropertyManager, getRenderer, getSelected, getStereotypeColor, getStereotypeFont, getStringPropertyValue, getStroke, getStroke, getStroke, getStroke, getStroke, getStroke, getSymbolRenderer, getTextColor, getTolerance, getVisibility, getVisiblePresentationElements, handleModelDelete, hasDiagramSurface, hasManipulatedPresentationElements, hasSharedData, initializeAndAutosize, internalBeforeUpdate, internalCreatePropertyChangeListener, internalGetElementsForLinkConnecting, internalGetElementToConnectLink, internalSnapToGrid, internalSnapToGrid, invalidate, isChildVisible, isContentHidden, isCreateElementListener, isDetectable, isDisposed, isLayouting, isMovableByMoveManager, isNotNull, isParentOf, isParentOf, isPreserveProportionsWhenGrowing, isSelected, isShowElementTypeAsLabel, isSortable, isTestUpdateFlag, isTextEditable, isUseFillColor, isUseFillColorByProperty, isUseGradientForFill, isVisible, isVisibleInDiagram, isVisibleOrShrunken, movePathElementsRecursively, mustShowContextMenu, notifyCreated, notifyDiagramFrameSizeChange, notifyRepaintManager, onFind, onFind, onFontChange, paintAdornments, paintAdornmentsBackground, paintChildrenAndAdornments, paintSelfBackground, preDisposeOnUpdate, prepareForFillDrawing, prepareForLineDrawing, prepareForTextDrawing, propertyChange, recreateListeners, registerInSortManager, rememberBounds, rememberBounds, removeFromSortManager, removeItSelfOnUpdate, resizeParent, sAddPresentationElement, selectChildrenForMoving, selectObjectsForMoving, setAllSelected, setBounds, setCreateElementListener, setDiagramSurface, setElement, setFont, setFontProperty, setLayouting, setLineColor, setLineWidth, setLoadedVisibility, setLocation, setLocation, setNeedRecreateListeners, setPropertyManager, setPropertyManagerName, setSelected, setSelected, setSize, setSize, setSize, setStereotypeColor, setStereotypeFont, setStrokeIfNotTheSame, setTestUpdateFlag, setTextColor, setTextColorProperty, setTextEditable, setUseFillColor, setVisible, silentApply, silentApply, simpleSetBounds, snapToGrid, snapToGrid, snapViewToGrid, sortObjectsByX, sortObjectsByY, sSetBounds, sSetElement, sSetLineWidth, sSetLocation, sSetLocation, sSetParent, sSetParentForAll, sSetSize, sSetSize, sSetSize, sSetVisible, tryToDeleteModelElementUponRemoval, update, updateAfterLoad, updateLabelsIgnoringSuspendableLater, updateModelByView, updateModelByViewInternal, updateViewAfterPropertyChange, useParentProperties
-
Methods inherited from class com.nomagic.magicdraw.uml.MDElementImpl
accept, addPropertyChangeListener, canAdd, canAdd, canAddChild, canBeDeleted, canDeleteChild, compareTo, createSortKeys, getClassType, getCommandForAppending, getID, getName, getProject, getProjectProvider, getResourceID, getSortKeys, hasListeners, isEditable, removeAllChildren, removeAllParents, removeAllPropertyChangeListeners, removePropertyChangeListener, setID, setProjectProvider, sGetID
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
SHOW_PARTITION_NAME
public static final java.lang.String SHOW_PARTITION_NAME
- See Also:
- Constant Field Values
-
SHOW_REPRESENTED
public static final java.lang.String SHOW_REPRESENTED
- See Also:
- Constant Field Values
-
SHOW_REPRESENTED_IF_EXISTS
public static final java.lang.String SHOW_REPRESENTED_IF_EXISTS
- See Also:
- Constant Field Values
-
SHOW_BOTH
public static final java.lang.String SHOW_BOTH
- See Also:
- Constant Field Values
-
SHOW_NAME_MODES
public static final java.util.List SHOW_NAME_MODES
-
DEFAULT_SIZE
private static final UnmodifiableDimension DEFAULT_SIZE
-
partitionToHeaderMap
private java.util.Map<ActivityPartition,com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> partitionToHeaderMap
-
headerToCellsMap
private java.util.Map<ActivityPartition,java.util.List<SwimlaneCellView>> headerToCellsMap
-
verticalSwimlanes
private java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> verticalSwimlanes
-
horizontalSwimlanes
private java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> horizontalSwimlanes
-
headerToInnerSwimlanesMap
private java.util.Map<ActivityPartition,java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>> headerToInnerSwimlanesMap
-
lockLayout
private boolean lockLayout
-
DEFAULT_SWIMLANE_SIZE
public static final int DEFAULT_SWIMLANE_SIZE
- See Also:
- Constant Field Values
-
drawClosingBorder
private boolean drawClosingBorder
Indicates whether swimlane should be open or a closing border should be drawn.
-
-
Constructor Detail
-
SwimlaneView
public SwimlaneView(@CheckForNull PresentationElement parent)
-
SwimlaneView
public SwimlaneView()
-
-
Method Detail
-
resetMaps
public void resetMaps()
-
getHeaderToCellsMap
public java.util.Map<ActivityPartition,java.util.List<SwimlaneCellView>> getHeaderToCellsMap()
-
getSwimlaneStroke
public static java.awt.BasicStroke getSwimlaneStroke(int width)
-
internalLayoutChildren
public void internalLayoutChildren(boolean calculatePrefSize)
- Overrides:
internalLayoutChildrenin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
layoutHorizontalSwimlanes
private void layoutHorizontalSwimlanes(int deltaY, int width)
-
layoutVerticalSwimlanes
private void layoutVerticalSwimlanes(int deltaX, int height)
-
layoutHorizontalCells
private void layoutHorizontalCells(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, java.awt.Rectangle swimlaneBounds, int maxWidth)
-
layoutVerticalCells
private void layoutVerticalCells(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, java.awt.Rectangle swimlaneBounds, int maxHeight)
-
getSwimlanesRecursively
public java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> getSwimlanesRecursively(boolean vertical, boolean onlyLeafNodes)
-
getSwimlanesRecursively
public java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> getSwimlanesRecursively(boolean onlyLeafNodes)
-
collectSwimlanesRecursively
private static void collectSwimlanesRecursively(java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> allSwimlanes, java.lang.Iterable<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> swimlanes, boolean onlyLeafNodes)
-
internalUpdatePresentationElement
protected void internalUpdatePresentationElement()
Description copied from class:PresentationElementInternal symbol update method for subclassing. It is called from update as part of full update action.- Overrides:
internalUpdatePresentationElementin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView- See Also:
PresentationElement.update()
-
findParentForData
public Element findParentForData(PresentationElement parent, com.nomagic.uml2.ElementAddContext addContext)
-
accept
public void accept(Visitor visitor) throws java.lang.Exception
Description copied from interface:MDElementMethod accepts visitor, and calls method visit<class name>(this) of visitor . See Visitor pattern for more details.
-
printSwimlaneStructure
private void printSwimlaneStructure()
-
printHeaderStructure
private void printHeaderStructure(java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> swimlanes)
-
preferredDimension
protected void preferredDimension(java.awt.Dimension pref, int locationX, int locationY)- Overrides:
preferredDimensionin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
minimumDimensionForShrinking
public void minimumDimensionForShrinking(java.awt.Dimension size, int locationX, int locationY)- Parameters:
size- sizelocationX- location XlocationY- location Y
-
calculateAndGetPreferredOrMinimumShrinkingSize
private static UnmodifiableDimension calculateAndGetPreferredOrMinimumShrinkingSize(ShapeElement shape, int locationX, int locationY)
-
adjustSizeByHeadersAndCells
private void adjustSizeByHeadersAndCells(java.awt.Dimension pref, java.util.function.Function<ShapeElement,UnmodifiableDimension> sizeSupplier)
-
getDefaultDimension
protected UnmodifiableDimension getDefaultDimension()
-
internalAppendChildRect
protected boolean internalAppendChildRect(PresentationElement view)
- Overrides:
internalAppendChildRectin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
removeSwimlaneHeader
public void removeSwimlaneHeader(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
- Specified by:
removeSwimlaneHeaderin interfacecom.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderOwner
-
removeSwimlaneHeaderFromStructures
public void removeSwimlaneHeaderFromStructures(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
-
removeHeaderFromMaps
public void removeHeaderFromMaps(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
-
removeCellsFromMaps
private void removeCellsFromMaps(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
-
removeCellViewFromHeader
private void removeCellViewFromHeader(SwimlaneCellView cellView, boolean vertical)
-
removePresentationElement
public void removePresentationElement(PresentationElement element, boolean resizeParent)
- Overrides:
removePresentationElementin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
getHorizontalSwimlanes
public java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> getHorizontalSwimlanes()
-
getPartitionToHeaderMap
public java.util.Map<ActivityPartition,com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> getPartitionToHeaderMap()
-
getVerticalSwimlanes
public java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> getVerticalSwimlanes()
-
getSwimlanes
public java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> getSwimlanes(boolean vertical)
- Specified by:
getSwimlanesin interfacecom.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderOwner
-
isLastHeader
public boolean isLastHeader(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, boolean vertical)
-
getPreferredManipulationWidthForVerticalSwimlane
public int getPreferredManipulationWidthForVerticalSwimlane(ActivityPartition partition)
-
getPreferredManipulationHeightForHorizontalSwimlane
public int getPreferredManipulationHeightForHorizontalSwimlane(ActivityPartition partition)
-
getCellsForHeader
public java.util.List<SwimlaneCellView> getCellsForHeader(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
-
initializeByChildren
public void initializeByChildren(boolean addCovered)
Initializes all maps by children positions used after load- Parameters:
addCovered- add covered symbols
-
getAllCells
public java.util.Collection<SwimlaneCellView> getAllCells()
Gets all swimlane cells recursively.- Returns:
- all swimlane cells recursively.
-
intersects
public boolean intersects(int x, int y, int width, int height)Description copied from class:PresentationElementchecks whether object intersects with given rectangle- Returns:
- true if object and rectangle intersects
-
canAddInstance
public boolean canAddInstance(PresentationElement o)
Description copied from class:PresentationElementObject view has no children.- Overrides:
canAddInstancein classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
canBeAutosized
protected boolean canBeAutosized()
-
insertSwimlaneAt
public void insertSwimlaneAt(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, int position)
-
insertSwimlane
private static boolean insertSwimlane(java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> swimlanes, com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, int position)
-
clone
public SwimlaneView clone()
Description copied from class:ElementImplReturns a copy of theElement.- Specified by:
clonein interfaceBaseElement- Overrides:
clonein classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView- Returns:
- the cloned object
-
getHeaderPosition
public int getHeaderPosition(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
- Specified by:
getHeaderPositionin interfacecom.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderOwner
-
getPositionOfHeaderBounds
public static int getPositionOfHeaderBounds(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView current, java.awt.Rectangle bounds, boolean vertical)
-
getProxyPresentationElementsStream
protected java.util.stream.Stream<PresentationElement> getProxyPresentationElementsStream()
- Overrides:
getProxyPresentationElementsStreamin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
setLockLayout
public void setLockLayout(boolean lockLayout)
-
isLockLayout
public boolean isLockLayout()
-
getHeaderToInnerSwimlanesMap
public java.util.Map<ActivityPartition,java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>> getHeaderToInnerSwimlanesMap()
-
getChildrenInsets
public com.nomagic.ui.UnmodifiableInsets getChildrenInsets(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)
- Overrides:
getChildrenInsetsin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView- Parameters:
insetsLevel- describes the level of insets- Returns:
- shape insets for children
-
getAllSwimlanes
public java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> getAllSwimlanes()
-
getRemovableChildren
public java.util.List<PresentationElement> getRemovableChildren()
- Overrides:
getRemovableChildrenin classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
internalApplyProperties
public void internalApplyProperties(PropertyManager man)
Description copied from class:PresentationElementApplies properties from given property manager- Parameters:
man- new properties
-
internalSilentApply
public void internalSilentApply()
Description copied from class:PresentationElementSilently applies all properties after initialization
-
isShowElementProperties
public boolean isShowElementProperties()
-
setShowElementProperties
public void setShowElementProperties(boolean showElementProperties)
-
sSetShowElementProperties
public void sSetShowElementProperties(boolean showElementProperties)
-
getStereotypesDisplayMode
public java.lang.String getStereotypesDisplayMode()
Description copied from interface:StereotypesDisplayModeOwnerGets stereotype display mode.- Specified by:
getStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Returns:
- stereotype display mode.
-
sSetStereotypesDisplayMode
public void sSetStereotypesDisplayMode(java.lang.String mode)
Description copied from interface:StereotypesDisplayModeOwnerSimple sets (no updates) stereotypes display mode.- Specified by:
sSetStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Parameters:
mode- stereotypes display mode value.
-
setStereotypesDisplayMode
public void setStereotypesDisplayMode(java.lang.String mode)
Description copied from interface:StereotypesDisplayModeOwnerSets stereotype display mode value.- Specified by:
setStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Parameters:
mode- stereotype display mode.
-
getDSLStereotypesDisplayMode
public java.lang.String getDSLStereotypesDisplayMode()
Description copied from interface:StereotypesDisplayModeOwnerGets DSL stereotype display mode.- Specified by:
getDSLStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Returns:
- stereotype display mode.
-
sSetDSLStereotypesDisplayMode
public void sSetDSLStereotypesDisplayMode(java.lang.String mode)
Description copied from interface:StereotypesDisplayModeOwnerSimple sets (no updates) DSL stereotypes display mode.- Specified by:
sSetDSLStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Parameters:
mode- stereotypes display mode value.
-
setDSLStereotypesDisplayMode
public void setDSLStereotypesDisplayMode(java.lang.String mode)
Description copied from interface:StereotypesDisplayModeOwnerSets DSL stereotype display mode value.- Specified by:
setDSLStereotypesDisplayModein interfaceStereotypesDisplayModeOwner- Parameters:
mode- stereotype display mode.
-
isVerticalCenterlineProvider
public boolean isVerticalCenterlineProvider()
Description copied from class:ShapeElementIndicates whether this shape provides vertical centerlines to other shapes.- Returns:
- true if this shape provides vertical centerlines, false otherwise.
-
isHorizontalCenterlineProvider
public boolean isHorizontalCenterlineProvider()
Description copied from class:ShapeElementIndicates whether this shape provides horizontal centerlines to other shapes.- Returns:
- true if this shape provides horizontal centerlines, false otherwise.
-
isShowTaggedValues
public boolean isShowTaggedValues()
-
sSetShowTaggedValues
public void sSetShowTaggedValues(boolean show)
-
setShowTaggedValues
public void setShowTaggedValues(boolean show)
-
getShowPartitionNameMode
public java.lang.String getShowPartitionNameMode()
-
isUseFullRepresentedElementSignature
public boolean isUseFullRepresentedElementSignature()
-
setShowPartitionNameMode
public void setShowPartitionNameMode(java.lang.String mode)
-
sSetShowPartitionNameMode
public void sSetShowPartitionNameMode(java.lang.String mode)
-
setUseFullRepresentedElementSignature
public void setUseFullRepresentedElementSignature(boolean value)
-
sSetUseFullRepresentedElementSignature
public void sSetUseFullRepresentedElementSignature(boolean value)
-
getSecondaryImageAndStereotypeDisplayMode
public java.lang.String getSecondaryImageAndStereotypeDisplayMode()
-
sSetSecondaryImageAndStereotypeDisplayMode
public void sSetSecondaryImageAndStereotypeDisplayMode(java.lang.String mode)
-
setSecondaryImageAndStereotypeDisplayMode
public void setSecondaryImageAndStereotypeDisplayMode(java.lang.String mode)
-
snapsToCenterlines
public boolean snapsToCenterlines()
- Specified by:
snapsToCenterlinesin interfacecom.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
-
getCenterlineableInnerParts
public java.util.List<com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape> getCenterlineableInnerParts(int orientation)
- Specified by:
getCenterlineableInnerPartsin interfacecom.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
-
isCenterlineInner
public boolean isCenterlineInner()
- Specified by:
isCenterlineInnerin interfacecom.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
-
isChildLayoutable
public boolean isChildLayoutable(PresentationElement child)
Description copied from class:ShapeElementCheck if given child is "layoutable" - it means this shape controls bounds of child inside layoutChildren() method. Not "layoutable" children are just moved together with parent, but layoutChildren() does not control their location.- Parameters:
child- child- Returns:
- true if given child is layed out inside autosize method of this shape. False here
-
paintSelf
public void paintSelf(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
-
drawClosingBorder
private void drawClosingBorder(java.awt.Graphics2D g)
Draws a closing order for a swimlane.- Parameters:
g- graphics on which to draw.
-
internalGetPresentationElementStroke
public java.awt.BasicStroke internalGetPresentationElementStroke(int width)
Description copied from class:PresentationElementReturn a stroke used to paint symbol's main part- Parameters:
width- a custom stroke width. Other stroke parameters will be specific to symbol- Returns:
- a stroke used to paint symbol's main part
-
isDrawClosingBorder
public boolean isDrawClosingBorder()
Indicates if closing border should be drawn for a swimlane.- Returns:
- draw closing border flag value.
-
setDrawClosingBorder
public void setDrawClosingBorder(boolean drawClosingBorder)
Sets draw closing border flag value.- Parameters:
drawClosingBorder- draw closing border flag value.
-
getHeaderVerticalPosition
public com.nomagic.magicdraw.uml.symbols.shapes.TextObject.VerticalPosition getHeaderVerticalPosition()
- Returns:
- header vertical position on Y axis
-
setHeaderVerticalPosition
public void setHeaderVerticalPosition(com.nomagic.magicdraw.uml.symbols.shapes.TextObject.VerticalPosition headerVerticalPosition)
Set header vertical position on Y axis- Parameters:
headerVerticalPosition- position
-
sSetHeaderVerticalPosition
public void sSetHeaderVerticalPosition(com.nomagic.magicdraw.uml.symbols.shapes.TextObject.VerticalPosition headerVerticalPosition)
Set header vertical position on Y axis- Parameters:
headerVerticalPosition- position
-
-