java.lang.Object
cz.fidentis.analyst.gui.elements.histogram.utils.EventDispatcher
cz.fidentis.analyst.gui.elements.histogram.components.bounds.Bound
All Implemented Interfaces:
EventGenerator

public class Bound extends EventDispatcher

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 Details

  • Constructor Details

    • Bound

      public Bound(BoundComponents boundComponents, FunctionScale positioningScale, int minPosition, int maxPosition)
      Creates a Bound from given boundComponents and enables dragging. Zooming and panning on positioningScale automatically repositions boundComponent. Bound dragging is limited by minPosition and maxPosition.
      Parameters:
      boundComponents - bound component
      positioningScale - scale for positioning
      minPosition - minimal value this bound can have
      maxPosition - maximal value this bound can have
      See Also:
      • DragInputHandler
  • Method Details

    • getPosition

      public int getPosition()
      Get position of a Bound. Equal to BoundComponents.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 of boundComponent. Update reacts primarily to changes made to positioningScale.
      See Also:
    • resetPosition

      public void resetPosition()
      Set the Bound value to its initial value at the time of instantiation.