Package org.eclipse.gef.mvc.fx.parts
Class DefaultSelectionHandlePartFactory
java.lang.Object
org.eclipse.gef.mvc.fx.parts.DefaultSelectionHandlePartFactory
- All Implemented Interfaces:
IHandlePartFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final double
The minimum segment length so that creation handles are shown.static final String
An adapter role for the fill color of connected handles.static final Color
Defines the defaultColor
for connected handles.static final Color
Defines the defaultColor
for insertion handles.static final Color
Defines the defaultColor
for movement handles.static final String
A binding key for the fill color of intra segment handles.static final String
An adapter role for the fill color of segment end handles.static final String
The role name for theProvider<IGeometry>
that will be used to generate selection handles for a multi selection.protected static final double
The minimum segment length for creation of segment create handlesprotected static final double
The minimum segment length for the creation of segment bend handles.static final String
The role name for theProvider<IGeometry>
that will be used to generate selection handles. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<IHandlePart<? extends Node>>
createHandleParts
(List<? extends IVisualPart<? extends Node>> targets, Map<Object, Object> contextMap) Creates specificIHandlePart
s for the given targets.protected List<IHandlePart<? extends Node>>
createMultiSelectionHandleParts
(List<? extends IVisualPart<? extends Node>> targets, Map<Object, Object> contextMap) Creates handle parts for a multi selection.protected List<IHandlePart<? extends Node>>
createSingleSelectionHandleParts
(IVisualPart<? extends Node> target, Map<Object, Object> contextMap) Creates handle parts for a single selection.protected List<IHandlePart<? extends Node>>
createSingleSelectionHandlePartsForCurve
(IVisualPart<? extends Node> target, Map<Object, Object> contextMap, Provider<BezierCurve[]> segmentsProvider) Creates handle parts for a single selection of which the handle geometry is anICurve
.protected List<IHandlePart<? extends Node>>
createSingleSelectionHandlePartsForPolygonalOutline
(IVisualPart<? extends Node> target, Map<Object, Object> contextMap, Provider<BezierCurve[]> segmentsProvider) protected List<IHandlePart<? extends Node>>
createSingleSelectionHandlePartsForRectangularOutline
(IVisualPart<? extends Node> target, Map<Object, Object> contextMap, Provider<BezierCurve[]> segmentsProvider) Creates handle parts for a single selection of which the handle geometry is aRectangle
.
-
Field Details
-
INSERT_HANDLE_COLOR_PROVIDER
A binding key for the fill color of intra segment handles.- See Also:
-
DEFAULT_INSERT_HANDLE_COLOR
Defines the defaultColor
for insertion handles. -
MOVE_HANDLE_COLOR_PROVIDER
An adapter role for the fill color of segment end handles.- See Also:
-
DEFAULT_MOVE_HANDLE_COLOR
Defines the defaultColor
for movement handles. -
CONNECTED_HANDLE_COLOR_PROVIDER
An adapter role for the fill color of connected handles.- See Also:
-
DEFAULT_CONNECTED_HANDLE_COLOR
Defines the defaultColor
for connected handles. -
SELECTION_HANDLES_GEOMETRY_PROVIDER
The role name for theProvider<IGeometry>
that will be used to generate selection handles.- See Also:
-
MULTI_SELECTION_HANDLES_GEOMETRY_PROVIDER
The role name for theProvider<IGeometry>
that will be used to generate selection handles for a multi selection.- See Also:
-
BENDPOINT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTH
protected static final double BENDPOINT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTHThe minimum segment length so that creation handles are shown.- See Also:
-
SEGMENT_MOVE_HANDLE_MINIMUM_SEGMENT_LENGTH
protected static final double SEGMENT_MOVE_HANDLE_MINIMUM_SEGMENT_LENGTHThe minimum segment length for the creation of segment bend handles.- See Also:
-
SEGMENT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTH
protected static final double SEGMENT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTHThe minimum segment length for creation of segment create handles- See Also:
-
-
Constructor Details
-
DefaultSelectionHandlePartFactory
public DefaultSelectionHandlePartFactory()
-
-
Method Details
-
createHandleParts
public List<IHandlePart<? extends Node>> createHandleParts(List<? extends IVisualPart<? extends Node>> targets, Map<Object, Object> contextMap) Description copied from interface:IHandlePartFactory
Creates specificIHandlePart
s for the given targets. As additional information might be needed by theIHandlePartFactory
to identify the creation context, an additional contextMap is passed in upon creation.- Specified by:
createHandleParts
in interfaceIHandlePartFactory
- Parameters:
targets
- The targetIVisualPart
s for which handles are to be created.contextMap
- A map in which additional context information for the creation process can be placed.- Returns:
- A list of
IHandlePart
s that can be used to manipulate the given targets.
-
createMultiSelectionHandleParts
protected List<IHandlePart<? extends Node>> createMultiSelectionHandleParts(List<? extends IVisualPart<? extends Node>> targets, Map<Object, Object> contextMap) Creates handle parts for a multi selection.- Parameters:
targets
- The targetIVisualPart
s for which handles are to be created.contextMap
- A map in which the state-less contextIBehavior
) may place additional context information for the creation process. It may either directly contain additional information needed by theIHandlePartFactory
, or may be passed back by theIHandlePartFactory
to the calling contextIBehavior
to query such kind of information (in which case it will allow the contextIBehavior
to identify the creation context).- Returns:
- A list of
IHandlePart
s that can be used to manipulate the given targets.
-
createSingleSelectionHandleParts
protected List<IHandlePart<? extends Node>> createSingleSelectionHandleParts(IVisualPart<? extends Node> target, Map<Object, Object> contextMap) Creates handle parts for a single selection.- Parameters:
target
- The targetIVisualPart
for which handles are to be created.contextMap
- A map in which the state-less contextIBehavior
) may place additional context information for the creation process. It may either directly contain additional information needed by theIHandlePartFactory
, or may be passed back by theIHandlePartFactory
to the calling contextIBehavior
to query such kind of information (in which case it will allow the contextIBehavior
to identify the creation context).- Returns:
- A list of
IHandlePart
s that can be used to manipulate the given targets.
-
createSingleSelectionHandlePartsForCurve
protected List<IHandlePart<? extends Node>> createSingleSelectionHandlePartsForCurve(IVisualPart<? extends Node> target, Map<Object, Object> contextMap, Provider<BezierCurve[]> segmentsProvider) Creates handle parts for a single selection of which the handle geometry is anICurve
.- Parameters:
target
- The targetIVisualPart
for which handles are to be created.contextMap
- A map in which the state-less contextIBehavior
) may place additional context information for the creation process. It may either directly contain additional information needed by theIHandlePartFactory
, or may be passed back by theIHandlePartFactory
to the calling contextIBehavior
to query such kind of information (in which case it will allow the contextIBehavior
to identify the creation context).segmentsProvider
- A provider for the segments of the handle geometry for which handles are to be created.- Returns:
- A list of
IHandlePart
s that can be used to manipulate the given targets.
-
createSingleSelectionHandlePartsForPolygonalOutline
protected List<IHandlePart<? extends Node>> createSingleSelectionHandlePartsForPolygonalOutline(IVisualPart<? extends Node> target, Map<Object, Object> contextMap, Provider<BezierCurve[]> segmentsProvider) Creates handle parts for a single selection of which the handle geometry is anIShape
but not aRectangle
.- Parameters:
target
- The targetIVisualPart
for which handles are to be created.contextMap
- A map in which the state-less contextIBehavior
) may place additional context information for the creation process. It may either directly contain additional information needed by theIHandlePartFactory
, or may be passed back by theIHandlePartFactory
to the calling contextIBehavior
to query such kind of information (in which case it will allow the contextIBehavior
to identify the creation context).segmentsProvider
- A provider for the segments of the handle geometry for which handles are to be created.- Returns:
- A list of
IHandlePart
s that can be used to manipulate the given targets.
-
createSingleSelectionHandlePartsForRectangularOutline
protected List<IHandlePart<? extends Node>> createSingleSelectionHandlePartsForRectangularOutline(IVisualPart<? extends Node> target, Map<Object, Object> contextMap, Provider<BezierCurve[]> segmentsProvider) Creates handle parts for a single selection of which the handle geometry is aRectangle
.- Parameters:
target
- The targetIVisualPart
for which handles are to be created.contextMap
- A map in which the state-less contextIBehavior
) may place additional context information for the creation process. It may either directly contain additional information needed by theIHandlePartFactory
, or may be passed back by theIHandlePartFactory
to the calling contextIBehavior
to query such kind of information (in which case it will allow the contextIBehavior
to identify the creation context).segmentsProvider
- A provider for the segments of the handle geometry for which handles are to be created.- Returns:
- A list of
IHandlePart
s that can be used to manipulate the given targets.
-