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 UnmodifiableDimension
DEFAULT_SIZE
static int
DEFAULT_SWIMLANE_SIZE
private boolean
drawClosingBorder
Indicates whether swimlane should be open or a closing border should be drawn.private java.util.Map<ActivityPartition,java.util.List<SwimlaneCellView>>
headerToCellsMap
private java.util.Map<ActivityPartition,java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>>
headerToInnerSwimlanesMap
private java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>
horizontalSwimlanes
private boolean
lockLayout
private java.util.Map<ActivityPartition,com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>
partitionToHeaderMap
static java.lang.String
SHOW_BOTH
static java.util.List
SHOW_NAME_MODES
static java.lang.String
SHOW_PARTITION_NAME
static java.lang.String
SHOW_REPRESENTED
static java.lang.String
SHOW_REPRESENTED_IF_EXISTS
private 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 void
accept(Visitor visitor)
Method accepts visitor, and calls method visit<class name>(this) of visitor .private void
adjustSizeByHeadersAndCells(java.awt.Dimension pref, java.util.function.Function<ShapeElement,UnmodifiableDimension> sizeSupplier)
private static UnmodifiableDimension
calculateAndGetPreferredOrMinimumShrinkingSize(ShapeElement shape, int locationX, int locationY)
boolean
canAddInstance(PresentationElement o)
Object view has no children.protected boolean
canBeAutosized()
SwimlaneView
clone()
Returns a copy of theElement
.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)
private void
drawClosingBorder(java.awt.Graphics2D g)
Draws a closing order for a swimlane.Element
findParentForData(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.UnmodifiableInsets
getChildrenInsets(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel insetsLevel)
protected UnmodifiableDimension
getDefaultDimension()
java.lang.String
getDSLStereotypesDisplayMode()
Gets DSL stereotype display mode.int
getHeaderPosition(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.VerticalPosition
getHeaderVerticalPosition()
java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>
getHorizontalSwimlanes()
java.util.Map<ActivityPartition,com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>
getPartitionToHeaderMap()
static int
getPositionOfHeaderBounds(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView current, java.awt.Rectangle bounds, boolean vertical)
int
getPreferredManipulationHeightForHorizontalSwimlane(ActivityPartition partition)
int
getPreferredManipulationWidthForVerticalSwimlane(ActivityPartition partition)
protected java.util.stream.Stream<PresentationElement>
getProxyPresentationElementsStream()
java.util.List<PresentationElement>
getRemovableChildren()
java.lang.String
getSecondaryImageAndStereotypeDisplayMode()
java.lang.String
getShowPartitionNameMode()
java.lang.String
getStereotypesDisplayMode()
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.BasicStroke
getSwimlaneStroke(int width)
java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView>
getVerticalSwimlanes()
void
initializeByChildren(boolean addCovered)
Initializes all maps by children positions used after loadprivate static boolean
insertSwimlane(java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> swimlanes, com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, int position)
void
insertSwimlaneAt(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, int position)
protected boolean
internalAppendChildRect(PresentationElement view)
void
internalApplyProperties(PropertyManager man)
Applies properties from given property managerjava.awt.BasicStroke
internalGetPresentationElementStroke(int width)
Return a stroke used to paint symbol's main partvoid
internalLayoutChildren(boolean calculatePrefSize)
void
internalSilentApply()
Silently applies all properties after initializationprotected void
internalUpdatePresentationElement()
Internal symbol update method for subclassing.boolean
intersects(int x, int y, int width, int height)
checks whether object intersects with given rectangleboolean
isCenterlineInner()
boolean
isChildLayoutable(PresentationElement child)
Check if given child is "layoutable" - it means this shape controls bounds of child inside layoutChildren() method.boolean
isDrawClosingBorder()
Indicates if closing border should be drawn for a swimlane.boolean
isHorizontalCenterlineProvider()
Indicates whether this shape provides horizontal centerlines to other shapes.boolean
isLastHeader(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, boolean vertical)
boolean
isLockLayout()
boolean
isShowElementProperties()
boolean
isShowTaggedValues()
boolean
isUseFullRepresentedElementSignature()
boolean
isVerticalCenterlineProvider()
Indicates whether this shape provides vertical centerlines to other shapes.private void
layoutHorizontalCells(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, java.awt.Rectangle swimlaneBounds, int maxWidth)
private void
layoutHorizontalSwimlanes(int deltaY, int width)
private void
layoutVerticalCells(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header, java.awt.Rectangle swimlaneBounds, int maxHeight)
private void
layoutVerticalSwimlanes(int deltaX, int height)
void
minimumDimensionForShrinking(java.awt.Dimension size, int locationX, int locationY)
void
paintSelf(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
protected void
preferredDimension(java.awt.Dimension pref, int locationX, int locationY)
private void
printHeaderStructure(java.util.List<com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView> swimlanes)
private void
printSwimlaneStructure()
private void
removeCellsFromMaps(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
private void
removeCellViewFromHeader(SwimlaneCellView cellView, boolean vertical)
void
removeHeaderFromMaps(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
void
removePresentationElement(PresentationElement element, boolean resizeParent)
void
removeSwimlaneHeader(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
void
removeSwimlaneHeaderFromStructures(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
void
resetMaps()
void
setDrawClosingBorder(boolean drawClosingBorder)
Sets draw closing border flag value.void
setDSLStereotypesDisplayMode(java.lang.String mode)
Sets DSL stereotype display mode value.void
setHeaderVerticalPosition(com.nomagic.magicdraw.uml.symbols.shapes.TextObject.VerticalPosition headerVerticalPosition)
Set header vertical position on Y axisvoid
setLockLayout(boolean lockLayout)
void
setSecondaryImageAndStereotypeDisplayMode(java.lang.String mode)
void
setShowElementProperties(boolean showElementProperties)
void
setShowPartitionNameMode(java.lang.String mode)
void
setShowTaggedValues(boolean show)
void
setStereotypesDisplayMode(java.lang.String mode)
Sets stereotype display mode value.void
setUseFullRepresentedElementSignature(boolean value)
boolean
snapsToCenterlines()
void
sSetDSLStereotypesDisplayMode(java.lang.String mode)
Simple sets (no updates) DSL stereotypes display mode.void
sSetHeaderVerticalPosition(com.nomagic.magicdraw.uml.symbols.shapes.TextObject.VerticalPosition headerVerticalPosition)
Set header vertical position on Y axisvoid
sSetSecondaryImageAndStereotypeDisplayMode(java.lang.String mode)
void
sSetShowElementProperties(boolean showElementProperties)
void
sSetShowPartitionNameMode(java.lang.String mode)
void
sSetShowTaggedValues(boolean show)
void
sSetStereotypesDisplayMode(java.lang.String mode)
Simple sets (no updates) stereotypes display mode.void
sSetUseFullRepresentedElementSignature(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:
internalLayoutChildren
in 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:PresentationElement
Internal symbol update method for subclassing. It is called from update as part of full update action.- Overrides:
internalUpdatePresentationElement
in 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:MDElement
Method 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:
preferredDimension
in 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:
internalAppendChildRect
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
removeSwimlaneHeader
public void removeSwimlaneHeader(com.nomagic.magicdraw.uml.symbols.shapes.SwimlaneHeaderView header)
- Specified by:
removeSwimlaneHeader
in 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:
removePresentationElement
in 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:
getSwimlanes
in 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:PresentationElement
checks whether object intersects with given rectangle- Returns:
- true if object and rectangle intersects
-
canAddInstance
public boolean canAddInstance(PresentationElement o)
Description copied from class:PresentationElement
Object view has no children.- Overrides:
canAddInstance
in 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:ElementImpl
Returns a copy of theElement
.- Specified by:
clone
in interfaceBaseElement
- Overrides:
clone
in 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:
getHeaderPosition
in 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:
getProxyPresentationElementsStream
in 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:
getChildrenInsets
in 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:
getRemovableChildren
in classcom.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
-
internalApplyProperties
public void internalApplyProperties(PropertyManager man)
Description copied from class:PresentationElement
Applies properties from given property manager- Parameters:
man
- new properties
-
internalSilentApply
public void internalSilentApply()
Description copied from class:PresentationElement
Silently 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:StereotypesDisplayModeOwner
Gets stereotype display mode.- Specified by:
getStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Returns:
- stereotype display mode.
-
sSetStereotypesDisplayMode
public void sSetStereotypesDisplayMode(java.lang.String mode)
Description copied from interface:StereotypesDisplayModeOwner
Simple sets (no updates) stereotypes display mode.- Specified by:
sSetStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Parameters:
mode
- stereotypes display mode value.
-
setStereotypesDisplayMode
public void setStereotypesDisplayMode(java.lang.String mode)
Description copied from interface:StereotypesDisplayModeOwner
Sets stereotype display mode value.- Specified by:
setStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Parameters:
mode
- stereotype display mode.
-
getDSLStereotypesDisplayMode
public java.lang.String getDSLStereotypesDisplayMode()
Description copied from interface:StereotypesDisplayModeOwner
Gets DSL stereotype display mode.- Specified by:
getDSLStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Returns:
- stereotype display mode.
-
sSetDSLStereotypesDisplayMode
public void sSetDSLStereotypesDisplayMode(java.lang.String mode)
Description copied from interface:StereotypesDisplayModeOwner
Simple sets (no updates) DSL stereotypes display mode.- Specified by:
sSetDSLStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Parameters:
mode
- stereotypes display mode value.
-
setDSLStereotypesDisplayMode
public void setDSLStereotypesDisplayMode(java.lang.String mode)
Description copied from interface:StereotypesDisplayModeOwner
Sets DSL stereotype display mode value.- Specified by:
setDSLStereotypesDisplayMode
in interfaceStereotypesDisplayModeOwner
- Parameters:
mode
- stereotype display mode.
-
isVerticalCenterlineProvider
public boolean isVerticalCenterlineProvider()
Description copied from class:ShapeElement
Indicates 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:ShapeElement
Indicates 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:
snapsToCenterlines
in 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:
getCenterlineableInnerParts
in interfacecom.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
-
isCenterlineInner
public boolean isCenterlineInner()
- Specified by:
isCenterlineInner
in interfacecom.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape
-
isChildLayoutable
public boolean isChildLayoutable(PresentationElement child)
Description copied from class:ShapeElement
Check 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:PresentationElement
Return 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
-
-