Package org.eclipse.gef.mvc.fx.parts
Class DefaultSelectionHandlePartFactory
- java.lang.Object
-
- org.eclipse.gef.mvc.fx.parts.DefaultSelectionHandlePartFactory
-
- All Implemented Interfaces:
IHandlePartFactory
public class DefaultSelectionHandlePartFactory extends java.lang.Object implements IHandlePartFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected static doubleBENDPOINT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTHThe minimum segment length so that creation handles are shown.static java.lang.StringCONNECTED_HANDLE_COLOR_PROVIDERAn adapter role for the fill color of connected handles.static javafx.scene.paint.ColorDEFAULT_CONNECTED_HANDLE_COLORDefines the defaultColorfor connected handles.static javafx.scene.paint.ColorDEFAULT_INSERT_HANDLE_COLORDefines the defaultColorfor insertion handles.static javafx.scene.paint.ColorDEFAULT_MOVE_HANDLE_COLORDefines the defaultColorfor movement handles.static java.lang.StringINSERT_HANDLE_COLOR_PROVIDERA binding key for the fill color of intra segment handles.static java.lang.StringMOVE_HANDLE_COLOR_PROVIDERAn adapter role for the fill color of segment end handles.static java.lang.StringMULTI_SELECTION_HANDLES_GEOMETRY_PROVIDERThe role name for theProvider<IGeometry>that will be used to generate selection handles for a multi selection.protected static doubleSEGMENT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTHThe minimum segment length for creation of segment create handlesprotected static doubleSEGMENT_MOVE_HANDLE_MINIMUM_SEGMENT_LENGTHThe minimum segment length for the creation of segment bend handles.static java.lang.StringSELECTION_HANDLES_GEOMETRY_PROVIDERThe role name for theProvider<IGeometry>that will be used to generate selection handles.
-
Constructor Summary
Constructors Constructor Description DefaultSelectionHandlePartFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<IHandlePart<? extends javafx.scene.Node>>createHandleParts(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> targets, java.util.Map<java.lang.Object,java.lang.Object> contextMap)Creates specificIHandleParts for the given targets.protected java.util.List<IHandlePart<? extends javafx.scene.Node>>createMultiSelectionHandleParts(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> targets, java.util.Map<java.lang.Object,java.lang.Object> contextMap)Creates handle parts for a multi selection.protected java.util.List<IHandlePart<? extends javafx.scene.Node>>createSingleSelectionHandleParts(IVisualPart<? extends javafx.scene.Node> target, java.util.Map<java.lang.Object,java.lang.Object> contextMap)Creates handle parts for a single selection.protected java.util.List<IHandlePart<? extends javafx.scene.Node>>createSingleSelectionHandlePartsForCurve(IVisualPart<? extends javafx.scene.Node> target, java.util.Map<java.lang.Object,java.lang.Object> contextMap, Provider<BezierCurve[]> segmentsProvider)Creates handle parts for a single selection of which the handle geometry is anICurve.protected java.util.List<IHandlePart<? extends javafx.scene.Node>>createSingleSelectionHandlePartsForPolygonalOutline(IVisualPart<? extends javafx.scene.Node> target, java.util.Map<java.lang.Object,java.lang.Object> contextMap, Provider<BezierCurve[]> segmentsProvider)protected java.util.List<IHandlePart<? extends javafx.scene.Node>>createSingleSelectionHandlePartsForRectangularOutline(IVisualPart<? extends javafx.scene.Node> target, java.util.Map<java.lang.Object,java.lang.Object> contextMap, Provider<BezierCurve[]> segmentsProvider)Creates handle parts for a single selection of which the handle geometry is aRectangle.
-
-
-
Field Detail
-
INSERT_HANDLE_COLOR_PROVIDER
public static final java.lang.String INSERT_HANDLE_COLOR_PROVIDER
A binding key for the fill color of intra segment handles.- See Also:
- Constant Field Values
-
DEFAULT_INSERT_HANDLE_COLOR
public static final javafx.scene.paint.Color DEFAULT_INSERT_HANDLE_COLOR
Defines the defaultColorfor insertion handles.
-
MOVE_HANDLE_COLOR_PROVIDER
public static final java.lang.String MOVE_HANDLE_COLOR_PROVIDER
An adapter role for the fill color of segment end handles.- See Also:
- Constant Field Values
-
DEFAULT_MOVE_HANDLE_COLOR
public static final javafx.scene.paint.Color DEFAULT_MOVE_HANDLE_COLOR
Defines the defaultColorfor movement handles.
-
CONNECTED_HANDLE_COLOR_PROVIDER
public static final java.lang.String CONNECTED_HANDLE_COLOR_PROVIDER
An adapter role for the fill color of connected handles.- See Also:
- Constant Field Values
-
DEFAULT_CONNECTED_HANDLE_COLOR
public static final javafx.scene.paint.Color DEFAULT_CONNECTED_HANDLE_COLOR
Defines the defaultColorfor connected handles.
-
SELECTION_HANDLES_GEOMETRY_PROVIDER
public static final java.lang.String SELECTION_HANDLES_GEOMETRY_PROVIDER
The role name for theProvider<IGeometry>that will be used to generate selection handles.- See Also:
- Constant Field Values
-
MULTI_SELECTION_HANDLES_GEOMETRY_PROVIDER
public static final java.lang.String 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:
- Constant Field Values
-
BENDPOINT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTH
protected static final double BENDPOINT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTH
The minimum segment length so that creation handles are shown.- See Also:
- Constant Field Values
-
SEGMENT_MOVE_HANDLE_MINIMUM_SEGMENT_LENGTH
protected static final double SEGMENT_MOVE_HANDLE_MINIMUM_SEGMENT_LENGTH
The minimum segment length for the creation of segment bend handles.- See Also:
- Constant Field Values
-
SEGMENT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTH
protected static final double SEGMENT_CREATE_HANDLE_MINIMUM_SEGMENT_LENGTH
The minimum segment length for creation of segment create handles- See Also:
- Constant Field Values
-
-
Method Detail
-
createHandleParts
public java.util.List<IHandlePart<? extends javafx.scene.Node>> createHandleParts(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> targets, java.util.Map<java.lang.Object,java.lang.Object> contextMap)
Description copied from interface:IHandlePartFactoryCreates specificIHandleParts for the given targets. As additional information might be needed by theIHandlePartFactoryto identify the creation context, an additional contextMap is passed in upon creation.- Specified by:
createHandlePartsin interfaceIHandlePartFactory- Parameters:
targets- The targetIVisualParts 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
IHandleParts that can be used to manipulate the given targets.
-
createMultiSelectionHandleParts
protected java.util.List<IHandlePart<? extends javafx.scene.Node>> createMultiSelectionHandleParts(java.util.List<? extends IVisualPart<? extends javafx.scene.Node>> targets, java.util.Map<java.lang.Object,java.lang.Object> contextMap)
Creates handle parts for a multi selection.- Parameters:
targets- The targetIVisualParts 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 theIHandlePartFactoryto the calling contextIBehaviorto query such kind of information (in which case it will allow the contextIBehaviorto identify the creation context).- Returns:
- A list of
IHandleParts that can be used to manipulate the given targets.
-
createSingleSelectionHandleParts
protected java.util.List<IHandlePart<? extends javafx.scene.Node>> createSingleSelectionHandleParts(IVisualPart<? extends javafx.scene.Node> target, java.util.Map<java.lang.Object,java.lang.Object> contextMap)
Creates handle parts for a single selection.- Parameters:
target- The targetIVisualPartfor 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 theIHandlePartFactoryto the calling contextIBehaviorto query such kind of information (in which case it will allow the contextIBehaviorto identify the creation context).- Returns:
- A list of
IHandleParts that can be used to manipulate the given targets.
-
createSingleSelectionHandlePartsForCurve
protected java.util.List<IHandlePart<? extends javafx.scene.Node>> createSingleSelectionHandlePartsForCurve(IVisualPart<? extends javafx.scene.Node> target, java.util.Map<java.lang.Object,java.lang.Object> contextMap, Provider<BezierCurve[]> segmentsProvider)
Creates handle parts for a single selection of which the handle geometry is anICurve.- Parameters:
target- The targetIVisualPartfor 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 theIHandlePartFactoryto the calling contextIBehaviorto query such kind of information (in which case it will allow the contextIBehaviorto 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
IHandleParts that can be used to manipulate the given targets.
-
createSingleSelectionHandlePartsForPolygonalOutline
protected java.util.List<IHandlePart<? extends javafx.scene.Node>> createSingleSelectionHandlePartsForPolygonalOutline(IVisualPart<? extends javafx.scene.Node> target, java.util.Map<java.lang.Object,java.lang.Object> contextMap, Provider<BezierCurve[]> segmentsProvider)
Creates handle parts for a single selection of which the handle geometry is anIShapebut not aRectangle.- Parameters:
target- The targetIVisualPartfor 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 theIHandlePartFactoryto the calling contextIBehaviorto query such kind of information (in which case it will allow the contextIBehaviorto 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
IHandleParts that can be used to manipulate the given targets.
-
createSingleSelectionHandlePartsForRectangularOutline
protected java.util.List<IHandlePart<? extends javafx.scene.Node>> createSingleSelectionHandlePartsForRectangularOutline(IVisualPart<? extends javafx.scene.Node> target, java.util.Map<java.lang.Object,java.lang.Object> contextMap, Provider<BezierCurve[]> segmentsProvider)
Creates handle parts for a single selection of which the handle geometry is aRectangle.- Parameters:
target- The targetIVisualPartfor 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 theIHandlePartFactoryto the calling contextIBehaviorto query such kind of information (in which case it will allow the contextIBehaviorto 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
IHandleParts that can be used to manipulate the given targets.
-
-