Package javax.swing

Examples of javax.swing.JSlider$AccessibleJSlider


      bgroup.add(formatPng);
      bgroup.add(formatGif);
      bgroup.add(formatJpg);
      formatPng.setSelected(true);

      slider = new JSlider(JSlider.HORIZONTAL,
          -3 * SLIDER_DIVISIONS, 3 * SLIDER_DIVISIONS, 0);
      slider.setMajorTickSpacing(10);
      slider.addChangeListener(this);
      curScale = new JLabel("222%");
      curScale.setHorizontalAlignment(SwingConstants.RIGHT);
View Full Code Here


     * Creates a Slider
     *
     * @return Slider
     */
    private JSlider createSlider() {
        JSlider ret = new JSlider(0, 255, 100);
        ret.setMinorTickSpacing(25);
        ret.setPaintTicks(true);
        return ret;
    }
View Full Code Here

    icon.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));

    valueMessage = new JLabel();
    valueMessage.setVisible(false);

    valueSlider = new JSlider();
    textField = new JTextField();
    textField.setDocument(new NumericDocument());
    textField.setColumns(10);
    textField.setHorizontalAlignment(SwingConstants.TRAILING);
View Full Code Here

    Box vbox = Box.createVerticalBox();
    cl = new JLabel( "Actual cache size", JLabel.CENTER );
    cl.setAlignmentX( Component.CENTER_ALIGNMENT );
    vbox.add( cl );

    js = new JSlider( JSlider.HORIZONTAL, 0, q * ( 1 << h ), cache );
    js.setMajorTickSpacing( 10 );
    js.setMinorTickSpacing( 1 );
    js.setPaintTicks( true );
    js.setPaintLabels( true );
    js.setBorder( BorderFactory.createEmptyBorder( 0, 0, 10, 0) );
    js.addChangeListener( new ChangeListener() {
        public void stateChanged( ChangeEvent e ) {
          JSlider source = (JSlider)e.getSource();
          //  if ( source.getValueIsAdjusting() ) return;
          try {
            int q, h, cache;
            q = Integer.parseInt( qtf.getText() );
            h = Integer.parseInt( htf.getText() );
            cache = source.getValue();
            dp.setValues( q, h, cache );
            dp.repaint();
          } catch ( Exception exc ) {
            JOptionPane.showMessageDialog( null, exc.getMessage(), "Alert", JOptionPane.ERROR_MESSAGE );
          }
View Full Code Here

        }

        // jtb.add(timerRateControl);
        rightBox.add(timerRateControl);

        timeSlider = new JSlider(SwingConstants.HORIZONTAL, 0, 100, 0);
        timeSliderSupport = new TimeSliderSupport(timeSlider, this, startTime, endTime);
        // jtb.add(timeSlider);
        leftBox.add(timeSlider);

        timeLabel = new JLabel(" ", SwingConstants.CENTER);
View Full Code Here

    public Component getGUI() {
        JPanel panel = new JPanel();
        // The DTED Contrast Adjuster
        JPanel contrastPanel = PaletteHelper.createPaletteJPanel("Contrast Adjustment");
        JSlider contrastSlide = new JSlider(JSlider.HORIZONTAL, 1/* min */, 10/* max */, getContrast()/* inital */);
        java.util.Hashtable dict = new java.util.Hashtable();
        dict.put(new Integer(1), new JLabel("min"));
        dict.put(new Integer(10), new JLabel("max"));
        contrastSlide.setLabelTable(dict);
        contrastSlide.setPaintLabels(true);
        contrastSlide.setMajorTickSpacing(1);
        contrastSlide.setPaintTicks(true);
        contrastSlide.setSnapToTicks(true);
        contrastSlide.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent ce) {
                JSlider slider = (JSlider) ce.getSource();
                if (!slider.getValueIsAdjusting()) {
                    setContrast(slider.getValue());
                }
            }
        });
        contrastPanel.add(contrastSlide);
        panel.add(contrastPanel);
View Full Code Here

        gridbag.setConstraints(unitPanel, c);
        panel.add(unitPanel);

        // The DTED Bandheight Adjuster
        JPanel contrastPanel = PaletteHelper.createPaletteJPanel(getValueAdjustmentTitle());
        JSlider contrastSlide = new JSlider(JSlider.HORIZONTAL, 1/* min */, 500/* max */, getBandHeight()/* inital */);
        java.util.Hashtable dict = new java.util.Hashtable();
        dict.put(new Integer(1), new JLabel("1"));
        dict.put(new Integer(500), new JLabel("500"));
        dict.put(sliderLabelKey, new JLabel("(" + getBandHeight() + ")"));
        contrastSlide.setLabelTable(dict);
        contrastSlide.setPaintLabels(true);
        contrastSlide.setMajorTickSpacing(50);
        contrastSlide.setPaintTicks(true);
        contrastSlide.setSnapToTicks(false);
        contrastSlide.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent ce) {
                JSlider slider = (JSlider) ce.getSource();
                if (!slider.getValueIsAdjusting()) {
                    int value = slider.getValue();
                    JLabel label = (JLabel) slider.getLabelTable()
                            .get(sliderLabelKey);
                    label.setText("(" + value + ")");
                    setBandHeight(value);
                }
            }
View Full Code Here

        // This sets initial transparency effect in preview...
        setPreviewColor(preview.getColor());
        JPanel slidePanel = new JPanel();
        Box slideBox = Box.createHorizontalBox();

        JSlider opaqueSlide = new JSlider(JSlider.HORIZONTAL, 0/* min */, 255/* max */, initialValue/* inital */);
        java.util.Hashtable dict = new java.util.Hashtable();
        String opaqueLabel = i18n.get(ColorTracker.class, "opaque", "opaque");
        String clearLabel = i18n.get(ColorTracker.class, "clear", "clear");
        if (opaqueLabel == null || opaqueLabel.length() == 0) {
            // translations are too long :(
            dict.put(new Integer(126), new JLabel(clearLabel));           
        } else {       
            dict.put(new Integer(50), new JLabel(clearLabel));
            dict.put(new Integer(200), new JLabel(opaqueLabel));
        }
        //commented because polish translations are too long
        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()) {
                    transparency = slider.getValue();
                }
                // This sets transparency in preview...
                setPreviewColor(preview.getColor());
            }
        });
View Full Code Here

            modePanel.add(profileModeButton);
            modePanel.add(losModeButton);

            // The LOS Height Adjuster
            JPanel centerHeightPanel = PaletteHelper.createPaletteJPanel("LOS Center Object Height");
            JSlider centerHeightSlide = new JSlider(JSlider.HORIZONTAL, 0/* min */, 500/* max */, 0/* inital */);
            java.util.Hashtable dict = new java.util.Hashtable();
            dict.put(new Integer(0), new JLabel("0 ft"));
            dict.put(new Integer(500), new JLabel("500 ft"));
            centerHeightSlide.setLabelTable(dict);
            centerHeightSlide.setPaintLabels(true);
            centerHeightSlide.setMajorTickSpacing(50);
            centerHeightSlide.setPaintTicks(true);
            centerHeightSlide.setSnapToTicks(false);
            centerHeightSlide.addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent ce) {
                    JSlider slider = (JSlider) ce.getSource();
                    if (slider.getValueIsAdjusting()) {
                        fireRequestInfoLine("TerrainLayer - center height value = "
                                + slider.getValue());
                        LOSTool.setLOSobjectHeight(slider.getValue());
                    }
                }
            });
            centerHeightPanel.add(centerHeightSlide);

View Full Code Here

            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);
View Full Code Here

TOP

Related Classes of javax.swing.JSlider$AccessibleJSlider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.