Class Connection
java.lang.Object
com.nomagic.magicdraw.ui.pathicon.Connection
Constants defining the kind of connection using for painting the path icons
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Equilateral triangle.static final int
Arrow small.static final int
Thin arrow.static final int
Arrow.static final int
Circle.static final int
Should a figure be closed (none is the same as opened)? In some cases this mask is not used, example drawing circle.static final int
Closed arrow and colon like line.static final int
Closed arrow and double colon like line.static final int
Closed arrow and additional line.static final int
Circle with cross.static final int
Circle with diagonal cross.static final int
Diamond.static final int
Diamond.static final int
Square.static final int
Should be filled? This field is already combined with CLOSED.static final int
Basic generalization (closed).static final int
Basic generalization (filled).static final int
Half of circle.static final int
No drawings, just simple line.static final int
"Pacman" like shape.static final int
Slash on the line.static final int
Square.static final int[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Point
drawConnection
(Graphics2D g, int type, int x, int y, int x2, int y2, int preferredSize, Rectangle shapeBounds) Method for Path end shape drawing.static Point
drawConnection
(Graphics2D g, int type, int x, int y, int x2, int y2, int preferredSize, Shape boundingShape, boolean useCorrecting) Method for Path end shape drawing.static Point
drawConnection
(Graphics2D g, ResizableIcon icon, int x, int y, int x2, int y2, int size, Rectangle shapeBounds, Function<ResizableIcon, ResizableIcon> iconTransformer)
-
Field Details
-
CLOSED
public static final int CLOSEDShould a figure be closed (none is the same as opened)? In some cases this mask is not used, example drawing circle.- See Also:
-
FILLED
public static final int FILLEDShould be filled? This field is already combined with CLOSED.- See Also:
-
NONE
public static final int NONENo drawings, just simple line.- See Also:
-
ARROW
public static final int ARROW- See Also:
-
GENERALIZATION
public static final int GENERALIZATIONBasic generalization (closed).- See Also:
-
GENERALIZATION2
public static final int GENERALIZATION2Basic generalization (filled).- See Also:
-
CIRCLE
public static final int CIRCLECircle. Can be used withFILLED
- See Also:
-
SQUARE
public static final int SQUARESquare. Connected to the line at border. Can be used withFILLED
- See Also:
-
DIAMOND_SQUARE
public static final int DIAMOND_SQUARESquare. Connected to line at the corner. Can be used withFILLED
- See Also:
-
DIAMOND_1
public static final int DIAMOND_1Diamond. Can be used withFILLED
- See Also:
-
ARROW_WIDE
public static final int ARROW_WIDE- See Also:
-
ARROW_THIN
public static final int ARROW_THIN- See Also:
-
CROSSED_CIRCLE
public static final int CROSSED_CIRCLECircle with cross. Can be used withFILLED
- See Also:
-
ARROW_SMALL
public static final int ARROW_SMALL- See Also:
-
CROSSED_CIRCLE_DIAG
public static final int CROSSED_CIRCLE_DIAGCircle with diagonal cross. Can be used withFILLED
- See Also:
-
SLASH
public static final int SLASH- See Also:
-
HALF_CIRCLE
public static final int HALF_CIRCLEHalf of circle. Can be used withFILLED
- See Also:
-
CLOSED_ARROW_AND_LINE
public static final int CLOSED_ARROW_AND_LINEClosed arrow and additional line.- See Also:
-
CLOSED_ARROW_AND_COLON
public static final int CLOSED_ARROW_AND_COLONClosed arrow and colon like line.- See Also:
-
CLOSED_ARROW_AND_DOUBLE_COLON
public static final int CLOSED_ARROW_AND_DOUBLE_COLONClosed arrow and double colon like line.- See Also:
-
DIAMOND_2
public static final int DIAMOND_2Diamond. Can be used withFILLED
- See Also:
-
PACMAN
public static final int PACMAN"Pacman" like shape. Can be used withFILLED
- See Also:
-
STYLES
public static final int[] STYLES
-
-
Constructor Details
-
Connection
public Connection()
-
-
Method Details
-
drawConnection
public static Point drawConnection(Graphics2D g, int type, int x, int y, int x2, int y2, int preferredSize, @CheckForNull Shape boundingShape, boolean useCorrecting) Method for Path end shape drawing.- Parameters:
g
- graphics contexttype
- path end draw stylex
- from pointy
- from pointx2
- to pointy2
- to pointpreferredSize
- preferred size of path end shapeboundingShape
- client bounding shapeuseCorrecting
- use correcting in case the link end symbol covers specified bounds- Returns:
- Point where path line should begin
- See Also:
-
drawConnection
public static Point drawConnection(Graphics2D g, int type, int x, int y, int x2, int y2, int preferredSize, @CheckForNull Rectangle shapeBounds) Method for Path end shape drawing.- Parameters:
g
- graphics contexttype
- path end draw stylex
- from pointy
- from pointx2
- to pointy2
- to pointpreferredSize
- preferred size of path end shapeshapeBounds
- connected shape bounds- Returns:
- Point where path line should begin
- See Also:
-
drawConnection
public static Point drawConnection(Graphics2D g, ResizableIcon icon, int x, int y, int x2, int y2, int size, @CheckForNull Rectangle shapeBounds, Function<ResizableIcon, ResizableIcon> iconTransformer)
-