Class ExtShape

  • All Implemented Interfaces:
    Visual, javafx.css.Styleable, javafx.event.EventTarget
    Direct Known Subclasses:
    ExtEllip, ExtLine, ExtPolygon, ExtRect

    public abstract class ExtShape
    extends javafx.scene.Group
    implements Visual
    Author:
    Group 3
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.Double DEFAULT_TEXT_PAD  
      protected java.lang.Double height  
      protected java.util.function.Consumer<javafx.scene.input.MouseEvent> hrefClickHandlerConsumer
      href click handler.
      protected java.util.function.Consumer<javafx.scene.input.MouseEvent> hrefHovEntHandlerConsumer
      href mouse roll-over (hover) enter handler.
      protected java.util.function.Consumer<javafx.scene.input.MouseEvent> hrefHovExHandlerConsumer
      href mouse roll-over (hover) exit handler.
      protected java.lang.Double rot  
      protected javafx.scene.shape.Shape shape  
      protected ExtShapeFactory.ShapeType shapeType
      My Enumerated Type.
      protected javafx.scene.layout.StackPane stack  
      protected java.util.function.Consumer<javafx.scene.input.MouseEvent> textClickHandlerConsumer
      text click handler.
      protected javafx.scene.text.TextFlow textFlow  
      protected javafx.scene.layout.VBox textVbox  
      protected java.lang.Double width  
      • Fields inherited from class javafx.scene.Node

        BASELINE_OFFSET_SAME_AS_HEIGHT
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Double getHeight()
      Getter for height.
      java.lang.Double getRot()
      Getter for rotation.
      javafx.scene.shape.Shape getShape()
      Getter for Shape.
      ExtShapeFactory.ShapeType getShapeType()
      Get the shape type Enum value.
      javafx.scene.layout.StackPane getStack()
      Getter for Stack.
      javafx.scene.text.TextFlow getTextFlow()
      Getter for TextFlow.
      javafx.scene.layout.VBox getTextVBox()
      Getter for textVbox.
      java.lang.Double getWidth()
      Getter for width.
      void setFill​(javafx.scene.paint.Color fill)
      Set the shape fill colour.
      void setHrefClickHandler​(java.util.function.Consumer<javafx.scene.input.MouseEvent> handler)
      Set the href click handler.
      void setHrefHoverEnterHandler​(java.util.function.Consumer<javafx.scene.input.MouseEvent> handler)
      Set the href hover entry handler.
      void setHrefHoverExitHandler​(java.util.function.Consumer<javafx.scene.input.MouseEvent> handler)
      Set the href hover exit handler.
      abstract void setSize​(SizeObj size)
      Set the shape size.
      void setStroke​(StrokeProps stroke)
      Configure shape stroke.
      void setText​(java.util.ArrayList<StyledTextSeg> text, javafx.scene.text.TextAlignment align, javafx.geometry.Pos textVertAlign)
      Set text and style in element.
      void setTextClickHandler​(java.util.function.Consumer<javafx.scene.input.MouseEvent> handler)
      Set the text click handler.
      void setVisualProps​(VisualProps visualProps)
      Set visual properties.
      • Methods inherited from class javafx.scene.Group

        autoSizeChildrenProperty, getChildren, isAutoSizeChildren, layoutChildren, minHeight, minWidth, prefHeight, prefWidth, setAutoSizeChildren
      • Methods inherited from class javafx.scene.Parent

        computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
      • Methods inherited from class javafx.scene.Node

        accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClassCssMetaData, getClip, getContentBias, getCssMetaData, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isResizable, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, maxHeight, maxWidth, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javafx.css.Styleable

        getStyleableNode
    • Field Detail

      • stack

        protected javafx.scene.layout.StackPane stack
      • shape

        protected javafx.scene.shape.Shape shape
      • textFlow

        protected javafx.scene.text.TextFlow textFlow
      • textVbox

        protected javafx.scene.layout.VBox textVbox
      • DEFAULT_TEXT_PAD

        protected static final java.lang.Double DEFAULT_TEXT_PAD
      • width

        protected java.lang.Double width
      • height

        protected java.lang.Double height
      • rot

        protected java.lang.Double rot
      • textClickHandlerConsumer

        protected java.util.function.Consumer<javafx.scene.input.MouseEvent> textClickHandlerConsumer
        text click handler.
      • hrefClickHandlerConsumer

        protected java.util.function.Consumer<javafx.scene.input.MouseEvent> hrefClickHandlerConsumer
        href click handler.
      • hrefHovEntHandlerConsumer

        protected java.util.function.Consumer<javafx.scene.input.MouseEvent> hrefHovEntHandlerConsumer
        href mouse roll-over (hover) enter handler.
      • hrefHovExHandlerConsumer

        protected java.util.function.Consumer<javafx.scene.input.MouseEvent> hrefHovExHandlerConsumer
        href mouse roll-over (hover) exit handler.
    • Constructor Detail

      • ExtShape

        public ExtShape​(javafx.scene.shape.Shape myShape,
                        ExtShapeFactory.ShapeType myType)
        Constructor.
        Parameters:
        myShape - Shape to display.
        myType - My extShape type.
    • Method Detail

      • setTextClickHandler

        public final void setTextClickHandler​(java.util.function.Consumer<javafx.scene.input.MouseEvent> handler)
        Set the text click handler.
        Parameters:
        handler - Handler to set.
      • setHrefClickHandler

        public final void setHrefClickHandler​(java.util.function.Consumer<javafx.scene.input.MouseEvent> handler)
        Set the href click handler.
        Parameters:
        handler - Handler to set.
      • setHrefHoverEnterHandler

        public final void setHrefHoverEnterHandler​(java.util.function.Consumer<javafx.scene.input.MouseEvent> handler)
        Set the href hover entry handler.
        Parameters:
        handler - Handler to set.
      • setHrefHoverExitHandler

        public final void setHrefHoverExitHandler​(java.util.function.Consumer<javafx.scene.input.MouseEvent> handler)
        Set the href hover exit handler.
        Parameters:
        handler - Handler to set.
      • setSize

        public abstract void setSize​(SizeObj size)
        Set the shape size.
        Specified by:
        setSize in interface Visual
        Parameters:
        size - Size.
      • setFill

        public final void setFill​(javafx.scene.paint.Color fill)
        Set the shape fill colour.
        Parameters:
        fill - Fill colour.
      • getStack

        public javafx.scene.layout.StackPane getStack()
        Getter for Stack.
        Returns:
        stack
      • getShape

        public javafx.scene.shape.Shape getShape()
        Getter for Shape.
        Returns:
        shape
      • getTextFlow

        public javafx.scene.text.TextFlow getTextFlow()
        Getter for TextFlow.
        Returns:
        textFlow
      • getTextVBox

        public javafx.scene.layout.VBox getTextVBox()
        Getter for textVbox.
        Returns:
        textVbox
      • getWidth

        public java.lang.Double getWidth()
        Getter for width.
        Returns:
        width
      • getHeight

        public java.lang.Double getHeight()
        Getter for height.
        Returns:
        height
      • getRot

        public java.lang.Double getRot()
        Getter for rotation.
        Returns:
        rotation
      • setStroke

        public final void setStroke​(StrokeProps stroke)
        Configure shape stroke.
        Parameters:
        stroke - stroke properties.
      • setVisualProps

        public final void setVisualProps​(VisualProps visualProps)
        Set visual properties.
        Specified by:
        setVisualProps in interface Visual
        Parameters:
        visualProps - properties.
      • setText

        public final void setText​(java.util.ArrayList<StyledTextSeg> text,
                                  javafx.scene.text.TextAlignment align,
                                  javafx.geometry.Pos textVertAlign)
        Set text and style in element.
        Parameters:
        text - Text to set.
        align - Text horizontal alignment.
        textVertAlign - Text vertical alignment.