Package javafx.scene.shape
Class SVGPath
java.lang.Object
javafx.scene.Node
javafx.scene.shape.Shape
javafx.scene.shape.SVGPath
- All Implemented Interfaces:
LayoutMeasurable,LayoutMeasurableMixin,HasBlendModeProperty,HasClipProperty,HasEffectProperty,HasFillProperty,HasLayoutXProperty,HasLayoutYProperty,HasManagedProperty,HasMouseTransparentProperty,HasOnMouseClickedProperty,HasOpacityProperty,HasParentProperty,HasSmoothProperty,HasStrokeDashOffsetProperty,HasStrokeLineCapProperty,HasStrokeLineJoinProperty,HasStrokeMiterLimitProperty,HasStrokeProperty,HasStrokeTypeProperty,HasStrokeWidthProperty,HasVisibleProperty,Styleable,EventTarget,INode
The
SVGPath class represents a simple shape that is constructed by
parsing SVG path data from a String.
import javafx.scene.shape.*;
SVGPath svg = new SVGPath();
svg.setContent("M40,60 C42,48 44,30 25,32");
- Since:
- JavaFX 2.0
-
Property Summary
PropertiesTypePropertyDescriptionfinal StringPropertyDefines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.final ObjectProperty<FillRule>Defines the filling rule constant for determining the interior of the path.Properties inherited from class javafx.scene.shape.Shape
fill, smooth, strokeDashOffset, strokeLineCap, strokeLineJoin, strokeMiterLimit, stroke, strokeType, strokeWidthProperties inherited from class javafx.scene.Node
blendMode, cacheHint, cache, clip, cursor, disabled, disable, effect, eventDispatcher, focused, focusTraversable, hover, id, layoutBounds, layoutX, layoutY, managed, mouseTransparent, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onScroll, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, opacity, parent, pressed, rotate, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, visible -
Field Summary
Fields inherited from interface javafx.scene.INode
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringPropertyDefines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.final ObjectProperty<FillRule>Defines the filling rule constant for determining the interior of the path.final StringGets the value of thecontentproperty.final FillRuleGets the value of thefillRuleproperty.impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx) Computes the geometric bounds for this Node.final voidsetContent(String value) Sets the value of thecontentproperty.final voidsetFillRule(FillRule value) Sets the value of thefillRuleproperty.toString()Returns a string representation of thisSVGPathobject.Methods inherited from class javafx.scene.shape.Shape
fillProperty, getStrokeDashArray, smoothProperty, strokeDashOffsetProperty, strokeLineCapProperty, strokeLineJoinProperty, strokeMiterLimitProperty, strokeProperty, strokeTypeProperty, strokeWidthProperty, subtractMethods inherited from class javafx.scene.Node
addEventFilter, addEventHandler, autosize, blendModeProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, createLayoutMeasurable, cursorProperty, disabledProperty, disableProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAllNodeTransforms, getBoundsInLocal, getCacheHint, getCursor, getEventDispatcher, getId, getLayoutMeasurable, getNodePeer, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseDragged, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnScroll, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOrCreateAndBindNodePeer, getProperties, getRotate, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleClass, getTransforms, getTranslateX, getTranslateY, getUserData, hasProperties, hoverProperty, idProperty, impl_computeLayoutBounds, impl_getLayoutBounds, impl_isTreeVisible, impl_maxHeight, impl_maxWidth, impl_minHeight, impl_minWidth, impl_prefHeight, impl_prefWidth, impl_traverse, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isPressed, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToScene, localToScene, localToScreen, localToScreen, localToScreen, localToScreen, managedProperty, mouseTransparentProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDraggedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onNodePeerReady, onPeerSizeChanged, onScrollProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, opacityProperty, parentProperty, parentToLocal, pressedProperty, removeEventFilter, removeEventHandler, requestFocus, requestPeerFocus, rotateProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, setCache, setCacheHint, setCursor, setDisable, setDisabled, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setNodePeer, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseDragged, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnScroll, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setPressed, setRotate, setScaleX, setScaleY, setScaleZ, setScene, setStyle, setTranslateX, setTranslateY, setUserData, shouldUseLayoutMeasurable, snapshot, startDragAndDrop, styleProperty, toBack, toFront, translateXProperty, translateYProperty, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBlendModeProperty
getBlendMode, setBlendModeMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasClipProperty
getClip, setClipMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasEffectProperty
getEffect, setEffectMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasFillProperty
getFill, setFillMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutXProperty
getLayoutX, setLayoutXMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutYProperty
getLayoutY, setLayoutYMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasManagedProperty
isManaged, setManagedMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMouseTransparentProperty
isMouseTransparent, setMouseTransparentMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOnMouseClickedProperty
getOnMouseClicked, setOnMouseClickedMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOpacityProperty
getOpacity, setOpacityMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasParentProperty
getParent, setParentMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasSmoothProperty
isSmooth, setSmoothMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasStrokeDashOffsetProperty
getStrokeDashOffset, setStrokeDashOffsetMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasStrokeLineCapProperty
getStrokeLineCap, setStrokeLineCapMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasStrokeLineJoinProperty
getStrokeLineJoin, setStrokeLineJoinMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasStrokeMiterLimitProperty
getStrokeMiterLimit, setStrokeMiterLimitMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasStrokeProperty
getStroke, setStrokeMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasStrokeTypeProperty
getStrokeType, setStrokeTypeMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasStrokeWidthProperty
getStrokeWidth, setStrokeWidthMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasVisibleProperty
isVisible, setVisibleMethods inherited from interface javafx.scene.INode
getBaselineOffset, getContentBias, isResizable, relocate, resize, resizeRelocateMethods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.emul_coupling.LayoutMeasurableMixin
clearCache, getLayoutBounds, maxHeight, maxWidth, minHeight, minWidth, prefHeight, prefWidth
-
Property Details
-
fillRule
Defines the filling rule constant for determining the interior of the path. The value must be one of the following constants:FillRile.EVEN_ODDorFillRule.NON_ZERO. The default value isFillRule.NON_ZERO.- Default value:
- FillRule.NON_ZERO
- See Also:
-
content
Defines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.- Default value:
- empty string
- See Also:
-
-
Constructor Details
-
SVGPath
public SVGPath()Creates an empty instance of SVGPath.
-
-
Method Details
-
setFillRule
Sets the value of thefillRuleproperty.- Property description:
- Defines the filling rule constant for determining the interior of the path.
The value must be one of the following constants:
FillRile.EVEN_ODDorFillRule.NON_ZERO. The default value isFillRule.NON_ZERO. - Default value:
- FillRule.NON_ZERO
- Parameters:
value- the value for thefillRuleproperty- See Also:
-
getFillRule
Gets the value of thefillRuleproperty.- Property description:
- Defines the filling rule constant for determining the interior of the path.
The value must be one of the following constants:
FillRile.EVEN_ODDorFillRule.NON_ZERO. The default value isFillRule.NON_ZERO. - Default value:
- FillRule.NON_ZERO
- Returns:
- the value of the
fillRuleproperty - See Also:
-
fillRuleProperty
Defines the filling rule constant for determining the interior of the path. The value must be one of the following constants:FillRile.EVEN_ODDorFillRule.NON_ZERO. The default value isFillRule.NON_ZERO.- Default value:
- FillRule.NON_ZERO
- Returns:
- the
fillRuleproperty - See Also:
-
setContent
Sets the value of thecontentproperty.- Property description:
- Defines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.
- Default value:
- empty string
- Parameters:
value- the value for thecontentproperty- See Also:
-
getContent
Gets the value of thecontentproperty.- Property description:
- Defines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.
- Default value:
- empty string
- Returns:
- the value of the
contentproperty - See Also:
-
contentProperty
Defines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.- Default value:
- empty string
- Returns:
- the
contentproperty - See Also:
-
impl_computeGeomBounds
Description copied from class:NodeComputes the geometric bounds for this Node. This method is abstract and must be implemented by each Node subclass.- Specified by:
impl_computeGeomBoundsin classNode
-
toString
Returns a string representation of thisSVGPathobject.
-