viewList.setSelectedIndex(viewType);
viewPanel.add(viewList);
// The ETOPO Contrast Adjuster
JPanel contrastPanel = PaletteHelper.createPaletteJPanel("Contrast Adjustment");
JSlider contrastSlide = new JSlider(JSlider.HORIZONTAL, 1/* min */, 5/* max */, 3/* inital */);
java.util.Hashtable dict = new java.util.Hashtable();
dict.put(new Integer(1), new JLabel("min"));
dict.put(new Integer(5), new JLabel("max"));
contrastSlide.setLabelTable(dict);
contrastSlide.setPaintLabels(true);
contrastSlide.setMajorTickSpacing(1);
contrastSlide.setPaintTicks(true);
contrastSlide.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent ce) {
JSlider slider = (JSlider) ce.getSource();
if (slider.getValueIsAdjusting()) {
Debug.output("ETOPOLayer - Contrast Slider value = "
+ slider.getValue());
slopeAdjust = slider.getValue();
}
}
});
contrastPanel.add(contrastSlide);
// The ETOPO Opaqueness
JPanel opaquenessPanel = PaletteHelper.createPaletteJPanel("Opaqueness");
JSlider opaquenessSlide = new JSlider(JSlider.HORIZONTAL, 0/* min */, 255/* max */, opaqueness/* inital */);
opaquenessSlide.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent ce) {
JSlider slider = (JSlider) ce.getSource();
if (slider.getValueIsAdjusting()) {
fireRequestInfoLine("ETOPOLayer - Opaqueness Slider value = "
+ slider.getValue());
opaqueness = slider.getValue();
}
}
});
opaquenessPanel.add(opaquenessSlide);