Package javax.swing.event

Examples of javax.swing.event.ChangeListener


            moveRadioButton.setEnabled(true);
            renameToTextBox.setEnabled(true);
            renameCheckBox.setEnabled(true);
        }
       
        ChangeListener cl = new ChangeListener() {
      public void stateChanged(ChangeEvent arg0) {
        renameCheckBox.setEnabled(!linkInPlace.isSelected()
            &&  (!multipleEntries));
        renameToTextBox.setEnabled(!linkInPlace.isSelected()
            &&  (!multipleEntries));
        if (multipleEntries) { renameToTextBox.setText("Multiple entries"); }
      }
    };

    if (multipleEntries) {
      linkInPlace.setText(Globals
          .lang("Leave files in their current directory."));
      copyRadioButton.setText(Globals.lang("Copy files to file directory."));

      moveRadioButton.setText(Globals.lang("Move files to file directory."));
    } else {
      linkInPlace.setText(Globals
          .lang("Leave file in its current directory."));
      copyRadioButton.setText(Globals.lang("Copy file to file directory."));
      moveRadioButton.setText(Globals.lang("Move file to file directory."));
    }
   
        renameCheckBox.setText(Globals.lang("Rename file to") + ": ");
        renameToTextBox.setText(citeKey == null ? "default" : citeKey + "." + fileType.extension);
        linkInPlace.addChangeListener(cl);
        cl.stateChanged(new ChangeEvent(linkInPlace));

        try {
          Object[] messages = {"How would you like to link to " + linkFileName + "?", optionsPanel};
            return JOptionPane.showConfirmDialog(frame, messages, dialogTitle,
                JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
View Full Code Here


        autoCompFields = new JTextField(40);
        Insets marg = new Insets(0,12,3,0);
        editSource.setMargin(marg);
        defSource.setMargin(marg);
        // We need a listener on showSource to enable and disable the source panel-related choices:
        showSource.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                defSource.setEnabled(showSource.isSelected());
                editSource.setEnabled(showSource.isSelected());
            }
        }
        );
        // We need a listener on autoComplete to enable and disable the
        // autoCompFields text field:
        autoComplete.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                autoCompFields.setEnabled(autoComplete.isSelected());
            }
        }
        );
View Full Code Here

    filechooserDisableRename = new JCheckBox(Globals.lang("Disable file renaming in non-native file dialog"));
    useIEEEAbrv = new JCheckBox(Globals.lang("Use IEEE LaTeX abbreviations"));
    remoteServerPort = new JTextField();
    className = new JTextField(50);
    final JTextField clName = className;
    useDefault.addChangeListener(new ChangeListener() {
        public void stateChanged(ChangeEvent e) {
            clName.setEnabled(((JCheckBox)e.getSource()).isSelected());
        }
        });
View Full Code Here

        autoDoubleBraces = new JCheckBox(
                //+ Globals.lang("Store fields with double braces, and remove extra braces when loading.<BR>"
                //+ "Double braces signal that BibTeX should preserve character case.") + "</HTML>");
                Globals.lang("Remove double braces around BibTeX fields when loading."));

        autoSave.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent changeEvent) {
                autoSaveInterval.setEnabled(autoSave.isSelected());
                promptBeforeUsingAutoSave.setEnabled(autoSave.isSelected());
            }
        });
View Full Code Here

    initButtonPanel() ;
    initSourcePanel() ;

    JTabbedPane tabbed = new JTabbedPane() ;
    tabbed.addChangeListener(
        new ChangeListener()
    {
      public void stateChanged( ChangeEvent e )
      {
        if ( inputChanged )
        {
View Full Code Here

    /*
     * Change by Morten Alver 2005.12.04: By postponing the updating of the
     * side pane components, we get rid of the annoying latency when
     * switching tabs:
     */
    frame.tabbedPane.addChangeListener(new ChangeListener() {
      public void stateChanged(ChangeEvent event) {
        SwingUtilities.invokeLater(new Runnable() {
          public void run() {
            setActiveBasePanel((BasePanel) SidePaneManager.this.frame.tabbedPane
              .getSelectedComponent());
View Full Code Here

        con.weightx = 1;
        con.fill = GridBagConstraints.BOTH;
        gbl.setConstraints(builder.getPanel(), con);
        add(builder.getPanel());

        dontOverwrite.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                // Warning before overwriting is only relevant if overwriting can happen:
                warnBeforeOverwriting.setEnabled(!dontOverwrite.isSelected());
            }
        });
View Full Code Here

        selected = new JRadioButton(Globals.lang("Selected entries"));
        clear = new JRadioButton(Globals.lang("Clear fields"));
        set = new JRadioButton(Globals.lang("Set fields"));
        rename = new JRadioButton(Globals.lang("Rename field to:"));
        rename.setToolTipText(Globals.lang("Move contents of a field into a field with a different name"));
        set.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent e) {
                // Entering a text is only relevant if we are setting, not clearing:
                text.setEnabled(set.isSelected());
            }
        });
        clear.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                // Overwrite protection makes no sense if we are clearing the field:
                overwrite.setEnabled(!clear.isSelected());
            }
        });
        rename.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent e) {
                // Entering a text is only relevant if we are renaming
                renameTo.setEnabled(rename.isSelected());
            }
        });
View Full Code Here

                !Globals.prefs.getBoolean("grayOutNonHits"));
        grayOut = new JRadioButtonMenuItem(Globals.lang("Gray out non-hits"),
                Globals.prefs.getBoolean("grayOutNonHits"));
        nonHits.add(hideNonHits);
        nonHits.add(grayOut);
        floatCb.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                Globals.prefs.putBoolean("groupFloatSelections", floatCb.isSelected());
            }
        });
        andCb.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                Globals.prefs.putBoolean("groupIntersectSelections", andCb
                        .isSelected());
            }
        });
        invCb.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                Globals.prefs.putBoolean("groupInvertSelections", invCb.isSelected());
            }
        });
        showOverlappingGroups.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                Globals.prefs.putBoolean("groupShowOverlapping",
                                showOverlappingGroups.isSelected());
                if (!showOverlappingGroups.isSelected())
                    groupsTree.setHighlight2Cells(null);
            }
        });

        select.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                Globals.prefs.putBoolean("groupSelectMatches", select.isSelected());
            }
        });
        grayOut.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent event) {
                Globals.prefs.putBoolean("grayOutNonHits", grayOut.isSelected());
            }
        });
View Full Code Here

    buttonPanel.add(cancel);

    getContentPane().add(pane, BorderLayout.CENTER);
    getContentPane().add(buttonPanel, BorderLayout.SOUTH);

    cb.addChangeListener(new ChangeListener() {
      public void stateChanged(ChangeEvent e) {
        if (selected != null)
          selected.setAccepted(cb.isSelected());
      }
    });
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.