java.lang.Object
org.jhotdraw8.draw.handle.AbstractHandle
org.jhotdraw8.draw.handle.AbstractConnectorHandle
org.jhotdraw8.draw.handle.LabelConnectorHandle
- All Implemented Interfaces:
Handle
Handle for the start or end point of a connection figure.
Pressing the alt or the control key while dragging the handle prevents connecting the point.
- Author:
- Werner Randelshofer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jhotdraw8.draw.handle.AbstractConnectorHandle
AbstractConnectorHandle.ConnectorAndConnectedFigure -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable javafx.geometry.Point2Dprotected final javafx.scene.Groupprotected final javafx.scene.shape.Lineprotected final NonNullMapAccessor<CssPoint2D> protected final javafx.scene.layout.Backgroundprotected static final javafx.scene.shape.Circleprotected javafx.scene.layout.Backgroundprotected final javafx.scene.layout.RegionFields inherited from class org.jhotdraw8.draw.handle.AbstractConnectorHandle
connectorKey, connectorLocation, pickLocation, pointKey, targetKeyFields inherited from class org.jhotdraw8.draw.handle.AbstractHandle
owner -
Constructor Summary
ConstructorsConstructorDescriptionLabelConnectorHandle(ConnectingFigure figure, NonNullMapAccessor<CssPoint2D> originKey, NonNullMapAccessor<CssPoint2D> pointKey, MapAccessor<Connector> connectorKey, MapAccessor<Figure> targetKey) -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.GroupgetNode(DrawingView view) Returns the node which is used to visualize the handle.voidupdateNode(DrawingView view) Updates the node.Methods inherited from class org.jhotdraw8.draw.handle.AbstractConnectorHandle
contains, find, getCursor, getLocationInView, getOwner, isEditable, isSelectable, onMouseDragged, onMousePressed, onMouseReleased, onPopupTriggered, setEditableMethods inherited from class org.jhotdraw8.draw.handle.AbstractHandle
dispose, isCompatibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.draw.handle.Handle
onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked
-
Field Details
-
regionBackgroundConnected
protected javafx.scene.layout.Background regionBackgroundConnected -
REGION_BACKGROUND_DISCONNECTED
protected final javafx.scene.layout.Background REGION_BACKGROUND_DISCONNECTED -
REGION_SHAPE
protected static final javafx.scene.shape.Circle REGION_SHAPE -
groupNode
protected final javafx.scene.Group groupNode -
targetNode
protected final javafx.scene.layout.Region targetNode -
lineNode
protected final javafx.scene.shape.Line lineNode -
originKey
-
connectorDerivative
protected @Nullable javafx.geometry.Point2D connectorDerivative
-
-
Constructor Details
-
LabelConnectorHandle
public LabelConnectorHandle(ConnectingFigure figure, NonNullMapAccessor<CssPoint2D> originKey, NonNullMapAccessor<CssPoint2D> pointKey, MapAccessor<Connector> connectorKey, MapAccessor<Figure> targetKey)
-
-
Method Details
-
getNode
Description copied from interface:HandleReturns the node which is used to visualize the handle. The node is rendered byDrawingViewin a pane which uses view coordinates. The node should useDrawingView.viewToDrawingProperty()to transform its coordinates.A
Handlecan only reside in oneDrawingViewat any given time. The JavaFX node returned by this method is use to render the handle in theDrawingView. This is why, unlikeFigure, we only need this method instead of acreateNodeand anupdateNodemethod.A
HandleTrackerwill use theNode.accessibleTextProperty()andNode.accessibleHelpProperty()to provide a help text to the user.- Parameters:
view- the drawing view- Returns:
- the node
-
updateNode
Description copied from interface:HandleUpdates the node.- Parameters:
view- the drawing view
-