Class GuideLine<T>

java.lang.Object
com.iamsoft.util.ui.javafx.guideline.GuideLine<T>
Type Parameters:
T - Axis' type.
Direct Known Subclasses:
HorizontalGuideLine, VerticalGuideLine

public abstract class GuideLine<T> extends Object
If getMin() == getMax(), line not draggable.
  • Property Details

  • Constructor Details

    • GuideLine

      public GuideLine(T pValue, javafx.geometry.Orientation pOrientation)
    • GuideLine

      public GuideLine(T pValue, javafx.scene.paint.Color pLineColor, javafx.scene.paint.Color pAboveColor, javafx.scene.paint.Color pBelowColor, javafx.geometry.Orientation pOrientation)
  • Method Details

    • lineColorProperty

      public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> lineColorProperty()
      Returns:
      the lineColor property
      See Also:
    • getLineColor

      public javafx.scene.paint.Color getLineColor()
      Gets the value of the lineColor property.
      Property description:
      Returns:
      the value of the lineColor property
      See Also:
    • setLineColor

      public void setLineColor(javafx.scene.paint.Color pLineColor)
      Sets the value of the lineColor property.
      Property description:
      Parameters:
      pLineColor - the value for the lineColor property
      See Also:
    • aboveColorProperty

      public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> aboveColorProperty()
      Returns:
      the aboveColor property
      See Also:
    • getAboveColor

      public javafx.scene.paint.Color getAboveColor()
      Gets the value of the aboveColor property.
      Property description:
      Returns:
      the value of the aboveColor property
      See Also:
    • setAboveColor

      public void setAboveColor(javafx.scene.paint.Color pAboveColor)
      Sets the value of the aboveColor property.
      Property description:
      Parameters:
      pAboveColor - the value for the aboveColor property
      See Also:
    • lineStrokeProperty

      public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> lineStrokeProperty()
      Returns:
      the lineStroke property
    • getBelowColor

      public javafx.scene.paint.Color getBelowColor()
    • setBelowColor

      public void setBelowColor(javafx.scene.paint.Color pBelowColor)
    • aboveRectangleProperty

      public javafx.beans.property.ObjectProperty<javafx.scene.shape.Rectangle> aboveRectangleProperty()
      Returns:
      the aboveRectangle property
      See Also:
    • getAboveRectangle

      public javafx.scene.shape.Rectangle getAboveRectangle()
      Gets the value of the aboveRectangle property.
      Property description:
      Returns:
      the value of the aboveRectangle property
      See Also:
    • setAboveRectangle

      public void setAboveRectangle(javafx.scene.shape.Rectangle pAboveRectangle)
      Sets the value of the aboveRectangle property.
      Property description:
      Parameters:
      pAboveRectangle - the value for the aboveRectangle property
      See Also:
    • belowRectangleProperty

      public javafx.beans.property.ObjectProperty<javafx.scene.shape.Rectangle> belowRectangleProperty()
      Returns:
      the belowRectangle property
      See Also:
    • getBelowRectangle

      public javafx.scene.shape.Rectangle getBelowRectangle()
      Gets the value of the belowRectangle property.
      Property description:
      Returns:
      the value of the belowRectangle property
      See Also:
    • setBelowRectangle

      public void setBelowRectangle(javafx.scene.shape.Rectangle pBelowRectangle)
      Sets the value of the belowRectangle property.
      Property description:
      Parameters:
      pBelowRectangle - the value for the belowRectangle property
      See Also:
    • valueProperty

      public javafx.beans.property.ObjectProperty<T> valueProperty()
      Value drag position.
      Returns:
      the value property
      See Also:
    • getValue

      public T getValue()
      Gets the value of the value property.
      Property description:
      Value drag position.
      Returns:
      the value of the value property
      See Also:
    • setValue

      public final void setValue(T pValue)
      Sets the value of the value property.
      Property description:
      Value drag position.
      Parameters:
      pValue - the value for the value property
      See Also:
    • minProperty

      public javafx.beans.property.ObjectProperty<T> minProperty()
      Min drag position.
      Returns:
      the min property
      See Also:
    • getMin

      public T getMin()
      Gets the value of the min property.
      Property description:
      Min drag position.
      Returns:
      the value of the min property
      See Also:
    • setMin

      public void setMin(T pMin)
      Sets the value of the min property.
      Property description:
      Min drag position.
      Parameters:
      pMin - the value for the min property
      See Also:
    • maxProperty

      public javafx.beans.property.ObjectProperty<T> maxProperty()
      Max drag position.
      Returns:
      the max property
      See Also:
    • getMax

      public T getMax()
      Gets the value of the max property.
      Property description:
      Max drag position.
      Returns:
      the value of the max property
      See Also:
    • setMax

      public void setMax(T pMax)
      Sets the value of the max property.
      Property description:
      Max drag position.
      Parameters:
      pMax - the value for the max property
      See Also:
    • linePositionProperty

      public javafx.beans.property.ObjectProperty<Double> linePositionProperty()
      Line position as a fraction of available space (i.e. 0..1) or null if line is hidden.
      Returns:
      the linePosition property
      See Also:
    • getLinePosition

      public Double getLinePosition()
      Gets the value of the linePosition property.
      Property description:
      Line position as a fraction of available space (i.e. 0..1) or null if line is hidden.
      Returns:
      the value of the linePosition property
      See Also:
    • setLinePosition

      public final void setLinePosition(Double pPosition)
      Sets the value of the linePosition property.
      Property description:
      Line position as a fraction of available space (i.e. 0..1) or null if line is hidden.
      Parameters:
      pPosition - the value for the linePosition property
      See Also:
    • preserveLinePositionProperty

      public javafx.beans.property.BooleanProperty preserveLinePositionProperty()
      Returns:
      the preserveLinePosition property
      See Also:
    • getPreserveLinePosition

      public boolean getPreserveLinePosition()
      Gets the value of the preserveLinePosition property.
      Property description:
      Returns:
      the value of the preserveLinePosition property
      See Also:
    • setPreserveLinePosition

      public void setPreserveLinePosition(boolean pPreserve)
      Sets the value of the preserveLinePosition property.
      Property description:
      Parameters:
      pPreserve - the value for the preserveLinePosition property
      See Also:
    • mousePositionTransformerProperty

      public javafx.beans.property.ObjectProperty<BiFunction<javafx.scene.input.MouseEvent,javafx.geometry.Orientation,Double>> mousePositionTransformerProperty()
      Used by updateValue(MouseEvent) to transform mouse position before recalculating guide-line's value. Primary usage is for implementing 'Snap to' support on mouse over.
      Returns:
      the mousePositionTransformer property
      See Also:
    • getMousePositionTransformer

      public BiFunction<javafx.scene.input.MouseEvent,javafx.geometry.Orientation,Double> getMousePositionTransformer()
      Gets the value of the mousePositionTransformer property.
      Property description:
      Used by updateValue(MouseEvent) to transform mouse position before recalculating guide-line's value. Primary usage is for implementing 'Snap to' support on mouse over.
      Returns:
      the value of the mousePositionTransformer property
      See Also:
    • setMousePositionTransformer

      public final void setMousePositionTransformer(BiFunction<javafx.scene.input.MouseEvent,javafx.geometry.Orientation,Double> pTransformer)
      Sets the value of the mousePositionTransformer property.
      Property description:
      Used by updateValue(MouseEvent) to transform mouse position before recalculating guide-line's value. Primary usage is for implementing 'Snap to' support on mouse over.
      Parameters:
      pTransformer - the value for the mousePositionTransformer property
      See Also:
    • lineProperty

      public javafx.beans.property.ObjectProperty<javafx.scene.shape.Line> lineProperty()
      Returns:
      the line property
      See Also:
    • getLine

      public javafx.scene.shape.Line getLine()
      Gets the value of the line property.
      Property description:
      Returns:
      the value of the line property
      See Also:
    • setLine

      public void setLine(javafx.scene.shape.Line pLine)
      Sets the value of the line property.
      Property description:
      Parameters:
      pLine - the value for the line property
      See Also:
    • draggableProperty

      public javafx.beans.property.ReadOnlyBooleanProperty draggableProperty()
      Returns:
      the draggable property
      See Also:
    • isDraggable

      public boolean isDraggable()
      Gets the value of the draggable property.
      Property description:
      Returns:
      the value of the draggable property
      See Also:
    • guideLineValueConverterProperty

      public javafx.beans.property.ObjectProperty<GuideLineValueConverter<T>> guideLineValueConverterProperty()
      Returns:
      the guideLineValueConverter property
      See Also:
    • getGuideLineValueConverter

      public GuideLineValueConverter<T> getGuideLineValueConverter()
      Gets the value of the guideLineValueConverter property.
      Property description:
      Returns:
      the value of the guideLineValueConverter property
      See Also:
    • setGuideLineValueConverter

      public void setGuideLineValueConverter(GuideLineValueConverter<T> pConverter)
      Sets the value of the guideLineValueConverter property.
      Property description:
      Parameters:
      pConverter - the value for the guideLineValueConverter property
      See Also:
    • getOrientation

      public javafx.geometry.Orientation getOrientation()
    • setLineTransformer

      public void setLineTransformer(BiFunction<javafx.geometry.Bounds,javafx.geometry.Orientation,javafx.geometry.Bounds> pTransformer)
    • setRectangleTransformer

      public void setRectangleTransformer(BiFunction<javafx.geometry.Bounds,javafx.geometry.VPos,javafx.geometry.Bounds> pTransformer)
    • updateValue

      public void updateValue(javafx.scene.input.MouseEvent pEvent)
    • refresh

      public void refresh()
    • updateLine

      public void updateLine()
    • toBack

      public void toBack()
      Moves above/below rectangles to the back of its sibling nodes in terms of z-order.
    • getAncestorRegion

      public static javafx.scene.layout.Region getAncestorRegion(javafx.scene.Node pNode)
    • transform

      public static javafx.geometry.Point2D transform(javafx.scene.Node pSrcNode, double pX, double pY, javafx.scene.Node pDestNode)
    • transform

      public static javafx.geometry.Bounds transform(javafx.scene.Node pSrcNode, javafx.geometry.Bounds pBounds, javafx.scene.Node pDestNode)