public final class AnchorFactory extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AnchorFactory.DirectionalAnchorKind
Represents possible orthogonal directions used by directional anchor.
|
Modifier and Type | Method and Description |
---|---|
static Anchor |
createCenterAnchor(Widget widget)
Creates an anchor with always computes a point in the center of specified widget.
|
static Anchor |
createCircularAnchor(Widget widget,
int radius)
Creates an anchor which computes a point as the one on a circle around specified widget.
|
static Anchor |
createDirectionalAnchor(Widget widget,
AnchorFactory.DirectionalAnchorKind kind)
Creates a directional anchor with computes a point as the one in the middle of the boundary side of specified widget.
|
static Anchor |
createDirectionalAnchor(Widget widget,
AnchorFactory.DirectionalAnchorKind kind,
int gap)
Creates a directional anchor with computes a point as the one in the middle of the boundary side of specified widget.
|
static Anchor |
createFixedAnchor(Point location)
Creates a anchor with fixed scene location.
|
static Anchor |
createFreeRectangularAnchor(Widget widget,
boolean includeBorders)
Creates a free rectangular anchor.
|
static Anchor |
createProxyAnchor(StateModel model,
Anchor... anchors)
Creates a proxy anchor with delegates the computation one of specified anchors based on state in a model.
|
static Anchor |
createRectangularAnchor(Widget widget)
Creates an anchor which computes a point as the one on the boundary of spacified widget.
|
static Anchor |
createRectangularAnchor(Widget widget,
boolean includeBorders)
Creates an anchor which computes a point as the one on the boundary of spacified widget.
|
public static Anchor createFixedAnchor(Point location)
location
- the scene locationpublic static Anchor createProxyAnchor(StateModel model, Anchor... anchors)
model
- the model with stateanchors
- the slave anchorspublic static Anchor createCenterAnchor(Widget widget)
widget
- the widgetpublic static Anchor createCircularAnchor(Widget widget, int radius)
widget
- the widgetradius
- the radius of the circlepublic static Anchor createRectangularAnchor(Widget widget)
widget
- the widgetpublic static Anchor createRectangularAnchor(Widget widget, boolean includeBorders)
widget
- the widgetincludeBorders
- if true, then the boundary is widget bounds;
if null then the boundary is widget client-area (bounds without borders)public static Anchor createDirectionalAnchor(Widget widget, AnchorFactory.DirectionalAnchorKind kind)
widget
- the widgetkind
- the kind of directional anchorpublic static Anchor createDirectionalAnchor(Widget widget, AnchorFactory.DirectionalAnchorKind kind, int gap)
widget
- the widgetkind
- the kind of directional anchorgap
- the gap between the widget and the anchor locationpublic static Anchor createFreeRectangularAnchor(Widget widget, boolean includeBorders)
widget
- the widgetincludeBorders
- true if borders has to be included in the boundary