public class AnchorShapeFactory extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AnchorShapeFactory.ConnectionEnd |
Modifier and Type | Method and Description |
---|---|
static AnchorShape |
createAdjustableAnchorShape(AnchorShape shape,
AnchorShapeLocationResolver resolver)
Creates a proxy AnchorShape that is used to adjust the location of an AnchorShape.
|
static AnchorShape |
createAdjustableAnchorShape(AnchorShape shape,
ConnectionWidget owner,
AnchorShapeFactory.ConnectionEnd referencingEnd,
Widget attachedWidget)
Creates a proxy AnchorShape that is used to adjust the location of an AnchorShape.
|
static AnchorShape |
createArrowAnchorShape(int degrees,
int size)
Creates an arrow anchor shape.
|
static AnchorShape |
createImageAnchorShape(Image image)
Creates an image anchor shape.
|
static AnchorShape |
createImageAnchorShape(Image image,
boolean lineOriented)
Creates an image anchor shape with ability to specify line orientation.
|
static AnchorShape |
createTriangleAnchorShape(int size,
boolean filled,
boolean output)
Creates a triangular anchor shape.
|
static AnchorShape |
createTriangleAnchorShape(int size,
boolean filled,
boolean output,
int cutDistance)
Creates a triangular anchor shape.
|
static AnchorShapeLocationResolver |
createWidgetResolver(ConnectionWidget owner,
AnchorShapeFactory.ConnectionEnd referencingEnd,
Widget attachedWidget)
Creates a AnchorShapeLocationResolver that uses a widget to resolve the
AnchorsShapes location.
|
public static AnchorShape createImageAnchorShape(Image image)
image
- the imagepublic static AnchorShape createImageAnchorShape(Image image, boolean lineOriented)
image
- the imagelineOriented
- if true, then the image is line orientedpublic static AnchorShape createTriangleAnchorShape(int size, boolean filled, boolean output)
size
- the size of trianglefilled
- if true, then the triangle is filledoutput
- if true, then it is output trianglepublic static AnchorShape createTriangleAnchorShape(int size, boolean filled, boolean output, int cutDistance)
size
- the size of trianglefilled
- if true, then the triangle is filledoutput
- if true, then it is output trianglecutDistance
- the distance where the related line is cut (usually 1px smaller than the size)public static AnchorShape createArrowAnchorShape(int degrees, int size)
degrees
- the angle of the arrow in degrees (not radians)size
- the size of the arrowpublic static AnchorShape createAdjustableAnchorShape(AnchorShape shape, ConnectionWidget owner, AnchorShapeFactory.ConnectionEnd referencingEnd, Widget attachedWidget)
shape
- The shape that will be adjusted.owner
- The owner of the AnchorShape.referencingEnd
- The end of the connection to place the shape.attachedWidget
- The widget on the shapes end.public static AnchorShape createAdjustableAnchorShape(AnchorShape shape, AnchorShapeLocationResolver resolver)
shape
- The shape that will be adjusted.resolver
- The AnchorShapeLocationResolver used to determine where to place the shape.public static AnchorShapeLocationResolver createWidgetResolver(ConnectionWidget owner, AnchorShapeFactory.ConnectionEnd referencingEnd, Widget attachedWidget)
owner
- The owner of the AnchorShape.referencingEnd
- The end of the connection to place the shape.attachedWidget
- The widget on the shapes end.