Class Bound
java.lang.Object
cz.fidentis.analyst.gui.elements.histogram.utils.EventDispatcher
cz.fidentis.analyst.gui.elements.histogram.components.bounds.Bound
- All Implemented Interfaces:
EventGenerator
Class for BoundComponents
related logic.
It connects them logically through a Bound.DragInputHandler
that makes the components draggable along the X axis and provides other related convenient methods.
Dispatches ActionEvent
with the following action commands:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBound
(BoundComponents boundComponents, FunctionScale positioningScale, int minPosition, int maxPosition) Creates a Bound from givenboundComponents
and enables dragging. -
Method Summary
Modifier and TypeMethodDescriptionint
Get position of a Bound.double
Get the raw position of a Bound.void
Set the Bound value to its initial value at the time of instantiation.void
Updates position ofboundComponent
.Methods inherited from class cz.fidentis.analyst.gui.elements.histogram.utils.EventDispatcher
addActionListener, dispatch, removeActionListener
-
Field Details
-
ACTION_COMMAND_BOUND_MOVED
- See Also:
-
-
Constructor Details
-
Bound
public Bound(BoundComponents boundComponents, FunctionScale positioningScale, int minPosition, int maxPosition) Creates a Bound from givenboundComponents
and enables dragging. Zooming and panning onpositioningScale
automatically repositionsboundComponent
. Bound dragging is limited byminPosition
andmaxPosition
.- Parameters:
boundComponents
- bound componentpositioningScale
- scale for positioningminPosition
- minimal value this bound can havemaxPosition
- maximal value this bound can have- See Also:
-
-
Method Details
-
getPosition
public int getPosition()Get position of a Bound. Equal toBoundComponents.getPosition()
.- Returns:
- position
- See Also:
-
getRawPosition
public double getRawPosition()Get the raw position of a Bound. A raw position is a projection of a position from range back to domain.- Returns:
- raw position
- See Also:
-
updatePosition
public void updatePosition()Updates position ofboundComponent
. Update reacts primarily to changes made topositioningScale
.- See Also:
-
resetPosition
public void resetPosition()Set the Bound value to its initial value at the time of instantiation.
-