dict.put(new Integer(255), new JLabel("opaque"));
opaqueSlide.setLabelTable(dict);
opaqueSlide.setPaintLabels(true);
opaqueSlide.setMajorTickSpacing(50);
opaqueSlide.setPaintTicks(true);
opaqueSlide.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent ce) {
JSlider slider = (JSlider) ce.getSource();
if (!slider.getValueIsAdjusting()) {
getViewAttributes().opaqueness = slider.getValue();
// Notify the server...
getFrameProvider().setViewAttributes(getViewAttributes());
fireRequestInfoLine("RPF Opaqueness set to "
+ getViewAttributes().opaqueness
+ " for future requests.");
}
}
});
opaquePanel.add(opaqueSlide);
box.add(opaquePanel);
if (getViewAttributes().colorModel == com.bbn.openmap.omGraphics.OMRasterObject.COLORMODEL_DIRECT) {
JPanel qualityPanel = PaletteHelper.createPaletteJPanel("Image JPEG Quality/Time");
JSlider qualitySlide = new JSlider(JSlider.HORIZONTAL, 0/* min */, 100/* max */, (int) (((CRFPClient) frameProvider).jpegQuality * 100)/* inital */);
java.util.Hashtable dict2 = new java.util.Hashtable();
dict2.put(new Integer(0), new JLabel("Less"));
dict2.put(new Integer(100), new JLabel("More"));
qualitySlide.setLabelTable(dict2);
qualitySlide.setPaintLabels(true);
qualitySlide.setMajorTickSpacing(20);
qualitySlide.setPaintTicks(true);
qualitySlide.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent ce) {
JSlider slider = (JSlider) ce.getSource();
if (!slider.getValueIsAdjusting()) {
((CRFPClient) getFrameProvider()).jpegQuality = (float) (slider.getValue()) / 100f;
fireRequestInfoLine("RPF Image JPEG Quality set to "