ucar.unidata.idv.control
Class ValueSliderWidget

java.lang.Object
  extended by ucar.unidata.idv.control.ValueSliderWidget

public class ValueSliderWidget
extends Object

A class for holding a text field and a slider for setting the some integer value

Version:
$Revision: 1.8 $
Author:
IDV Development Team

Constructor Summary
ValueSliderWidget(DisplayControlImpl dc, int min, int max, String property, String label)
          Create a ValueSliderWidget
ValueSliderWidget(DisplayControlImpl dc, int min, int max, String property, String label, float scale)
          Create a ValueSliderWidget
 
Method Summary
 void doRemove()
          Remove the reference to the displayControl
 JComponent getContents(boolean withLabel)
          Get the GUI contents
 void setEnabled(boolean enable)
          Enable or disable the widget.
 void setPaintLabels(boolean value)
          Set the property on the slider
 void setPaintTicks(boolean value)
          Set the property on the slider
 void setSnapToTicks(boolean value)
          Set the property on the slider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueSliderWidget

public ValueSliderWidget(DisplayControlImpl dc,
                         int min,
                         int max,
                         String property,
                         String label)
Create a ValueSliderWidget

Parameters:
dc - the display control to use
min - minimum slider value
max - maximum slider value
property - DisplayControl property to set
label - label for the widget

ValueSliderWidget

public ValueSliderWidget(DisplayControlImpl dc,
                         int min,
                         int max,
                         String property,
                         String label,
                         float scale)
Create a ValueSliderWidget

Parameters:
dc - the display control to use
min - minimum slider value
max - maximum slider value
property - DisplayControl property to set
label - label for the widget
scale - _more_
Method Detail

getContents

public JComponent getContents(boolean withLabel)
Get the GUI contents

Parameters:
withLabel - true if the component should include the label
Returns:
the component

setEnabled

public void setEnabled(boolean enable)
Enable or disable the widget.

Parameters:
enable - true to enable

doRemove

public void doRemove()
Remove the reference to the displayControl


setSnapToTicks

public void setSnapToTicks(boolean value)
Set the property on the slider

Parameters:
value - true to snap slider to ticks

setPaintTicks

public void setPaintTicks(boolean value)
Set the property on the slider

Parameters:
value - true to paint slider ticks

setPaintLabels

public void setPaintLabels(boolean value)
Set the property on the slider

Parameters:
value - true to paint slider labels