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
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
Should figure be closed (none is the same as opened) in some cases this mask is not used, example drawing circlestatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
should be filled, this field is already combined with CLOSEDstatic final int
static final int
static final int
static final int
no drawings, just simple linestatic final int
static final int
static final int[]
-
Constructor Summary
-
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, com.nomagic.magicdraw.ui.pathicon.PathIcon icon, boolean left, int x, int y, int x2, int y2, int size, Rectangle shapeBounds, Function<ResizableIcon, ResizableIcon> iconTransformer) static Point
drawConnection
(Graphics2D g, com.nomagic.magicdraw.ui.pathicon.PathIcon icon, boolean left, int x, int y, int x2, int y2, int size, Shape boundingShape, boolean fixOverlapping, Function<ResizableIcon, ResizableIcon> iconTransformer) Paints connection end.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 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 GENERALIZATION- See Also:
-
GENERALIZATION2
public static final int GENERALIZATION2- See Also:
-
CIRCLE
public static final int CIRCLE- See Also:
-
SQUARE
public static final int SQUARE- See Also:
-
DIAMOND_SQUARE
public static final int DIAMOND_SQUARE- See Also:
-
DIAMOND_1
public static final int DIAMOND_1- 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_CIRCLE- See Also:
-
ARROW_SMALL
public static final int ARROW_SMALL- See Also:
-
CROSSED_CIRCLE_DIAG
public static final int CROSSED_CIRCLE_DIAG- See Also:
-
SLASH
public static final int SLASH- See Also:
-
HALF_CIRCLE
public static final int HALF_CIRCLE- See Also:
-
CLOSED_ARROW_AND_LINE
public static final int CLOSED_ARROW_AND_LINE- See Also:
-
CLOSED_ARROW_AND_COLON
public static final int CLOSED_ARROW_AND_COLON- See Also:
-
CLOSED_ARROW_AND_DOUBLE_COLON
public static final int CLOSED_ARROW_AND_DOUBLE_COLON- 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 context.type
- path end draw style.x
- from point.y
- from point.x2
- to point.y2
- to point.preferredSize
- preferred size of path end shape.boundingShape
- client bounding shape.useCorrecting
- 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
- client shape bounds- Returns:
- Point where path line should begin
- See Also:
-
drawConnection
public static Point drawConnection(Graphics2D g, com.nomagic.magicdraw.ui.pathicon.PathIcon icon, boolean left, int x, int y, int x2, int y2, int size, @CheckForNull Shape boundingShape, boolean fixOverlapping, Function<ResizableIcon, ResizableIcon> iconTransformer) Paints connection end.- Parameters:
g
- graphics context.icon
- icon of the end.left
- left connection.x
- x coordinate of the intersection with the shape point.y
- y coordinate of the intersection with the shape point.x2
- x coordinate of the next link segment point.y2
- y coordinate of the next link segment point.size
- size of the icon.boundingShape
- bounding shape.fixOverlapping
- if true then correcting of the link end shape covering client or supplier shape should be used.- Returns:
- connection point from which link must be painted.
-
drawConnection
public static Point drawConnection(Graphics2D g, com.nomagic.magicdraw.ui.pathicon.PathIcon icon, boolean left, int x, int y, int x2, int y2, int size, @CheckForNull Rectangle shapeBounds, Function<ResizableIcon, ResizableIcon> iconTransformer) -
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)
-