java.lang.Object
cz.fidentis.analyst.gui.elements.histogram.components.bounds.BoundComponents

public class BoundComponents extends Object
Class for grouping together components that make up a bound. However, the components aren't linked together.
  • Constructor Details

    • BoundComponents

      public BoundComponents(JButton handle, JPanel indicator, JPanel ghost)
      Creates a BoundComponent instance.
      Parameters:
      handle - draggable handle
      indicator - indicator
      ghost - ghost
  • Method Details

    • getHandle

      public JButton getHandle()
      Returns:
      handle
      See Also:
    • getIndicator

      public JPanel getIndicator()
      Returns:
      indicator
      See Also:
    • getGhost

      public JPanel getGhost()
      Returns:
      ghost
      See Also:
    • getPosition

      public int getPosition()
      Equivalent to getIndicator.getX()
      Returns:
      value
      See Also:
    • setPosition

      public void setPosition(int position)
      Set the position of the BoundComponent.
      Parameters:
      position - new position
      See Also:
    • setPositionForHandleIndicator

      public void setPositionForHandleIndicator(int position)
      Set position of handle and indicator. Leaves ghost behind.
      Parameters:
      position - new position
      See Also:
    • ghostCatchUp

      public void ghostCatchUp()
      Aligns ghost with indicator.
    • setVisible

      public void setVisible(boolean shouldBeVisible)
      Convenient method for making handle, indicator and ghost visible or hidden.
      Parameters:
      shouldBeVisible - true if components should be visible