Class BoundComponents
java.lang.Object
cz.fidentis.analyst.gui.elements.histogram.components.bounds.BoundComponents
Class for grouping together components that make up a bound.
However, the components aren't linked together.
-
Constructor Summary
ConstructorsConstructorDescriptionBoundComponents
(JButton handle, JPanel indicator, JPanel ghost) Creates a BoundComponent instance. -
Method Summary
Modifier and TypeMethodDescriptiongetGhost()
int
Equivalent togetIndicator.getX()
void
Alignsghost
withindicator
.void
setPosition
(int position) Set the position of the BoundComponent.void
setPositionForHandleIndicator
(int position) Set position ofhandle
andindicator
.void
setVisible
(boolean shouldBeVisible) Convenient method for makinghandle
,indicator
andghost
visible or hidden.
-
Constructor Details
-
BoundComponents
Creates a BoundComponent instance.- Parameters:
handle
- draggable handleindicator
- indicatorghost
- ghost
-
-
Method Details
-
getHandle
- Returns:
- handle
- See Also:
-
getIndicator
- Returns:
- indicator
- See Also:
-
getGhost
- Returns:
- ghost
- See Also:
-
getPosition
public int getPosition()Equivalent togetIndicator.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 ofhandle
andindicator
. Leavesghost
behind.- Parameters:
position
- new position- See Also:
-
ghostCatchUp
public void ghostCatchUp()Alignsghost
withindicator
. -
setVisible
public void setVisible(boolean shouldBeVisible) Convenient method for makinghandle
,indicator
andghost
visible or hidden.- Parameters:
shouldBeVisible
-true
if components should be visible
-