Package javax.swing.event

Examples of javax.swing.event.ChangeListener


    {
      inUpdate = true;
      final ChangeEvent event = new ChangeEvent(this);
      for (int i = 0; i < internalChangeListeners.size(); i++)
      {
        final ChangeListener changeListener = internalChangeListeners.get(i);
        changeListener.stateChanged(event);
      }
    }
    finally
    {
      inUpdate = false;
View Full Code Here


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

        addTabs();

        restoreLastTab();

        //add a listener so we can store the current tab when it changes.
        tabbedPane.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent e) {
                int selection = tabbedPane.getSelectedIndex();
                if (selection >= 0 && selection < gradleTabs.size()) {
                    SettingsNode rootNode = settings.addChildIfNotPresent(MAIN_PANEL);
                    rootNode.setValueOfChild(CURRENT_TAB, gradleTabs.get(selection).getName());
View Full Code Here

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

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

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

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

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

            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()) {
                        fireRequestInfoLine(getName()
                                + " - Contrast Slider value = "
                                + slider.getValue());
                        slopeAdjust = slider.getValue();
                        if (cache != null) {
                            DTEDFrameSubframeInfo dfsi = cache.getSubframeInfo();
                            dfsi.slopeAdjust = slopeAdjust;
                            //                          cache.setSubframeInfo(dfsi);
                        }
                    }
                }
            });
            contrastPanel.add(contrastSlide);

            // The DTED Band Height Adjuster
            JPanel bandPanel = PaletteHelper.createPaletteJPanel("Band Elevation Spacing");
            JSlider bandSlide = new JSlider(JSlider.HORIZONTAL, 0/* min */, 1000/* max */, bandHeight/* inital */);
            bandSlide.setLabelTable(bandSlide.createStandardLabels(250));
            bandSlide.setPaintLabels(true);
            bandSlide.setMajorTickSpacing(250);
            bandSlide.setMinorTickSpacing(50);
            bandSlide.setPaintTicks(true);
            bandSlide.addChangeListener(new ChangeListener() {
                public void stateChanged(ChangeEvent ce) {
                    JSlider slider = (JSlider) ce.getSource();
                    if (slider.getValueIsAdjusting()) {
                        fireRequestInfoLine(getName()
                                + " - Band Slider value = " + slider.getValue());
View Full Code Here

                        "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()) {
                    OMGraphicHandlerLayer.this.setTransparency((float) slider.getValue() / 255f);
                    repaint();
View Full Code Here

TOP

Related Classes of javax.swing.event.ChangeListener

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.