java.lang.Object
com.iamsoft.util.ui.javafx.guideline.GuideLine<T>
- Type Parameters:
T- Axis' type.
- Direct Known Subclasses:
HorizontalGuideLine,VerticalGuideLine
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color> javafx.beans.property.ObjectProperty<javafx.scene.shape.Rectangle> javafx.beans.property.ObjectProperty<javafx.scene.shape.Rectangle> javafx.beans.property.ReadOnlyBooleanPropertyjavafx.beans.property.ObjectProperty<GuideLineValueConverter<T>> javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> javafx.beans.property.ObjectProperty<Double> Line position as a fraction of available space (i.e.javafx.beans.property.ObjectProperty<javafx.scene.shape.Line> javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> javafx.beans.property.ObjectProperty<T> Max drag position.javafx.beans.property.ObjectProperty<T> Min drag position.javafx.beans.property.ObjectProperty<BiFunction<javafx.scene.input.MouseEvent, javafx.geometry.Orientation, Double>> Used by updateValue(MouseEvent) to transform mouse position before recalculating guide-line's value.javafx.beans.property.BooleanPropertyjavafx.beans.property.ObjectProperty<T> Value drag position. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color> javafx.beans.property.ObjectProperty<javafx.scene.shape.Rectangle> javafx.beans.property.ObjectProperty<javafx.scene.shape.Rectangle> javafx.beans.property.ReadOnlyBooleanPropertyjavafx.scene.paint.ColorGets the value of theaboveColorproperty.javafx.scene.shape.RectangleGets the value of theaboveRectangleproperty.static javafx.scene.layout.RegiongetAncestorRegion(javafx.scene.Node pNode) javafx.scene.paint.Colorjavafx.scene.shape.RectangleGets the value of thebelowRectangleproperty.Gets the value of theguideLineValueConverterproperty.javafx.scene.shape.LinegetLine()Gets the value of thelineproperty.javafx.scene.paint.ColorGets the value of thelineColorproperty.Gets the value of thelinePositionproperty.getMax()Gets the value of themaxproperty.getMin()Gets the value of theminproperty.BiFunction<javafx.scene.input.MouseEvent, javafx.geometry.Orientation, Double> Gets the value of themousePositionTransformerproperty.javafx.geometry.OrientationbooleanGets the value of thepreserveLinePositionproperty.getValue()Gets the value of thevalueproperty.javafx.beans.property.ObjectProperty<GuideLineValueConverter<T>> booleanGets the value of thedraggableproperty.javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> javafx.beans.property.ObjectProperty<Double> Line position as a fraction of available space (i.e.javafx.beans.property.ObjectProperty<javafx.scene.shape.Line> javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> javafx.beans.property.ObjectProperty<T> Max drag position.javafx.beans.property.ObjectProperty<T> Min drag position.javafx.beans.property.ObjectProperty<BiFunction<javafx.scene.input.MouseEvent, javafx.geometry.Orientation, Double>> Used by updateValue(MouseEvent) to transform mouse position before recalculating guide-line's value.javafx.beans.property.BooleanPropertyvoidrefresh()voidsetAboveColor(javafx.scene.paint.Color pAboveColor) Sets the value of theaboveColorproperty.voidsetAboveRectangle(javafx.scene.shape.Rectangle pAboveRectangle) Sets the value of theaboveRectangleproperty.voidsetBelowColor(javafx.scene.paint.Color pBelowColor) voidsetBelowRectangle(javafx.scene.shape.Rectangle pBelowRectangle) Sets the value of thebelowRectangleproperty.voidsetGuideLineValueConverter(GuideLineValueConverter<T> pConverter) Sets the value of theguideLineValueConverterproperty.voidsetLine(javafx.scene.shape.Line pLine) Sets the value of thelineproperty.voidsetLineColor(javafx.scene.paint.Color pLineColor) Sets the value of thelineColorproperty.final voidsetLinePosition(Double pPosition) Sets the value of thelinePositionproperty.voidsetLineTransformer(BiFunction<javafx.geometry.Bounds, javafx.geometry.Orientation, javafx.geometry.Bounds> pTransformer) voidSets the value of themaxproperty.voidSets the value of theminproperty.final voidsetMousePositionTransformer(BiFunction<javafx.scene.input.MouseEvent, javafx.geometry.Orientation, Double> pTransformer) Sets the value of themousePositionTransformerproperty.voidsetPreserveLinePosition(boolean pPreserve) Sets the value of thepreserveLinePositionproperty.voidsetRectangleTransformer(BiFunction<javafx.geometry.Bounds, javafx.geometry.VPos, javafx.geometry.Bounds> pTransformer) final voidSets the value of thevalueproperty.voidtoBack()Moves above/below rectangles to the back of its sibling nodes in terms of z-order.static javafx.geometry.Point2Dtransform(javafx.scene.Node pSrcNode, double pX, double pY, javafx.scene.Node pDestNode) static javafx.geometry.Boundstransform(javafx.scene.Node pSrcNode, javafx.geometry.Bounds pBounds, javafx.scene.Node pDestNode) voidvoidupdateValue(javafx.scene.input.MouseEvent pEvent) javafx.beans.property.ObjectProperty<T> Value drag position.
-
Property Details
-
lineColor
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> lineColorProperty- See Also:
-
aboveColor
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> aboveColorProperty- See Also:
-
lineStroke
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> lineStrokeProperty- See Also:
-
aboveRectangle
public javafx.beans.property.ObjectProperty<javafx.scene.shape.Rectangle> aboveRectangleProperty- See Also:
-
belowRectangle
public javafx.beans.property.ObjectProperty<javafx.scene.shape.Rectangle> belowRectangleProperty- See Also:
-
value
Value drag position.- See Also:
-
min
Min drag position.- See Also:
-
max
Max drag position.- See Also:
-
linePosition
Line position as a fraction of available space (i.e. 0..1) or null if line is hidden.- See Also:
-
preserveLinePosition
public javafx.beans.property.BooleanProperty preserveLinePositionProperty- See Also:
-
mousePositionTransformer
public javafx.beans.property.ObjectProperty<BiFunction<javafx.scene.input.MouseEvent,javafx.geometry.Orientation, mousePositionTransformerPropertyDouble>> 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.- See Also:
-
line
public javafx.beans.property.ObjectProperty<javafx.scene.shape.Line> lineProperty- See Also:
-
draggable
public javafx.beans.property.ReadOnlyBooleanProperty draggableProperty- See Also:
-
guideLineValueConverter
public javafx.beans.property.ObjectProperty<GuideLineValueConverter<T>> guideLineValueConverterProperty- See Also:
-
-
Constructor Details
-
GuideLine
-
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
lineColorproperty - See Also:
-
getLineColor
public javafx.scene.paint.Color getLineColor()Gets the value of thelineColorproperty.- Property description:
- Returns:
- the value of the
lineColorproperty - See Also:
-
setLineColor
public void setLineColor(javafx.scene.paint.Color pLineColor) Sets the value of thelineColorproperty.- Property description:
- Parameters:
pLineColor- the value for thelineColorproperty- See Also:
-
aboveColorProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> aboveColorProperty()- Returns:
- the
aboveColorproperty - See Also:
-
getAboveColor
public javafx.scene.paint.Color getAboveColor()Gets the value of theaboveColorproperty.- Property description:
- Returns:
- the value of the
aboveColorproperty - See Also:
-
setAboveColor
public void setAboveColor(javafx.scene.paint.Color pAboveColor) Sets the value of theaboveColorproperty.- Property description:
- Parameters:
pAboveColor- the value for theaboveColorproperty- See Also:
-
lineStrokeProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> lineStrokeProperty()- Returns:
- the
lineStrokeproperty
-
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
aboveRectangleproperty - See Also:
-
getAboveRectangle
public javafx.scene.shape.Rectangle getAboveRectangle()Gets the value of theaboveRectangleproperty.- Property description:
- Returns:
- the value of the
aboveRectangleproperty - See Also:
-
setAboveRectangle
public void setAboveRectangle(javafx.scene.shape.Rectangle pAboveRectangle) Sets the value of theaboveRectangleproperty.- Property description:
- Parameters:
pAboveRectangle- the value for theaboveRectangleproperty- See Also:
-
belowRectangleProperty
public javafx.beans.property.ObjectProperty<javafx.scene.shape.Rectangle> belowRectangleProperty()- Returns:
- the
belowRectangleproperty - See Also:
-
getBelowRectangle
public javafx.scene.shape.Rectangle getBelowRectangle()Gets the value of thebelowRectangleproperty.- Property description:
- Returns:
- the value of the
belowRectangleproperty - See Also:
-
setBelowRectangle
public void setBelowRectangle(javafx.scene.shape.Rectangle pBelowRectangle) Sets the value of thebelowRectangleproperty.- Property description:
- Parameters:
pBelowRectangle- the value for thebelowRectangleproperty- See Also:
-
valueProperty
Value drag position.- Returns:
- the
valueproperty - See Also:
-
getValue
Gets the value of thevalueproperty.- Property description:
- Value drag position.
- Returns:
- the value of the
valueproperty - See Also:
-
setValue
Sets the value of thevalueproperty.- Property description:
- Value drag position.
- Parameters:
pValue- the value for thevalueproperty- See Also:
-
minProperty
Min drag position.- Returns:
- the
minproperty - See Also:
-
getMin
Gets the value of theminproperty.- Property description:
- Min drag position.
- Returns:
- the value of the
minproperty - See Also:
-
setMin
Sets the value of theminproperty.- Property description:
- Min drag position.
- Parameters:
pMin- the value for theminproperty- See Also:
-
maxProperty
Max drag position.- Returns:
- the
maxproperty - See Also:
-
getMax
Gets the value of themaxproperty.- Property description:
- Max drag position.
- Returns:
- the value of the
maxproperty - See Also:
-
setMax
Sets the value of themaxproperty.- Property description:
- Max drag position.
- Parameters:
pMax- the value for themaxproperty- See Also:
-
linePositionProperty
Line position as a fraction of available space (i.e. 0..1) or null if line is hidden.- Returns:
- the
linePositionproperty - See Also:
-
getLinePosition
Gets the value of thelinePositionproperty.- 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
linePositionproperty - See Also:
-
setLinePosition
Sets the value of thelinePositionproperty.- 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 thelinePositionproperty- See Also:
-
preserveLinePositionProperty
public javafx.beans.property.BooleanProperty preserveLinePositionProperty()- Returns:
- the
preserveLinePositionproperty - See Also:
-
getPreserveLinePosition
public boolean getPreserveLinePosition()Gets the value of thepreserveLinePositionproperty.- Property description:
- Returns:
- the value of the
preserveLinePositionproperty - See Also:
-
setPreserveLinePosition
public void setPreserveLinePosition(boolean pPreserve) Sets the value of thepreserveLinePositionproperty.- Property description:
- Parameters:
pPreserve- the value for thepreserveLinePositionproperty- See Also:
-
mousePositionTransformerProperty
public javafx.beans.property.ObjectProperty<BiFunction<javafx.scene.input.MouseEvent,javafx.geometry.Orientation, mousePositionTransformerProperty()Double>> 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
mousePositionTransformerproperty - See Also:
-
getMousePositionTransformer
public BiFunction<javafx.scene.input.MouseEvent,javafx.geometry.Orientation, getMousePositionTransformer()Double> Gets the value of themousePositionTransformerproperty.- 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
mousePositionTransformerproperty - See Also:
-
setMousePositionTransformer
public final void setMousePositionTransformer(BiFunction<javafx.scene.input.MouseEvent, javafx.geometry.Orientation, Double> pTransformer) Sets the value of themousePositionTransformerproperty.- 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 themousePositionTransformerproperty- See Also:
-
lineProperty
public javafx.beans.property.ObjectProperty<javafx.scene.shape.Line> lineProperty()- Returns:
- the
lineproperty - See Also:
-
getLine
public javafx.scene.shape.Line getLine()Gets the value of thelineproperty.- Property description:
- Returns:
- the value of the
lineproperty - See Also:
-
setLine
public void setLine(javafx.scene.shape.Line pLine) Sets the value of thelineproperty.- Property description:
- Parameters:
pLine- the value for thelineproperty- See Also:
-
draggableProperty
public javafx.beans.property.ReadOnlyBooleanProperty draggableProperty()- Returns:
- the
draggableproperty - See Also:
-
isDraggable
public boolean isDraggable()Gets the value of thedraggableproperty.- Property description:
- Returns:
- the value of the
draggableproperty - See Also:
-
guideLineValueConverterProperty
public javafx.beans.property.ObjectProperty<GuideLineValueConverter<T>> guideLineValueConverterProperty()- Returns:
- the
guideLineValueConverterproperty - See Also:
-
getGuideLineValueConverter
Gets the value of theguideLineValueConverterproperty.- Property description:
- Returns:
- the value of the
guideLineValueConverterproperty - See Also:
-
setGuideLineValueConverter
Sets the value of theguideLineValueConverterproperty.- Property description:
- Parameters:
pConverter- the value for theguideLineValueConverterproperty- 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)
-