Package javax.swing.event

Examples of javax.swing.event.ChangeListener


                        }
                    }
                }
            }
        });
        rbResize.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent e) {
                if (rbResize.isSelected()) {
                    if (currentFile != null) {
                        try {
                            BufferedImage img = ImageIO.read(currentFile);
View Full Code Here


                                    PropertiesPanel.Editor<T,Boolean>{

    PropertyEdit<T, Boolean> _editor;

    public CheckBox(){
        addChangeListener(new ChangeListener(){

            @Override
            public void stateChanged(ChangeEvent e) {
                _editor.setNewValue(isSelected());
            }
View Full Code Here

  * of progress slider and update media time   
  * accordingly.
  */
    @Override
  protected EventListener createControlListener() {
  return new ChangeListener() {
       public void stateChanged(ChangeEvent e) {
             ProgressBar s = (ProgressBar) e.getSource();
             int value = s.getValue();
             long mediaNanos = ((value * duration) /
                      (s.getMaximum() - s.getMinimum()));
View Full Code Here

  * Create ChangeListener. Tracks user movement 
  * of progress slider and update media time   
  * accordingly.
  */
    protected EventListener createControlListener() {
  return new ChangeListener() {
       public void stateChanged(ChangeEvent e) {
             ProgressBar s = (ProgressBar) e.getSource();
             int value = s.getValue();
             long mediaNanos = (long)((value * duration) /
                      (s.getMaximum() - s.getMinimum()));
View Full Code Here

      String pnlTitle = pnl.getTitle();
      String hint = pnl.getHint();
      tabPane.addTab(pnlTitle, null, pnl.getPanelComponent(), hint);
    }

    tabPane.addChangeListener(new ChangeListener()
    {
      public void stateChanged(ChangeEvent event)
      {
        setButtonLabel(
          ((JTabbedPane)event.getSource()).getSelectedIndex());
View Full Code Here

      final int overViewIx = _tp.getTabCount();
      final OverwiewCtrl ctrl = new OverwiewCtrl(_session);
      _tp.addTab(ctrl.getTitle(), ctrl.getPanel());

      _tp.addChangeListener(new ChangeListener()
      {
      @Override
         public void stateChanged(ChangeEvent e)
         {
            if (overViewIx == _tp.getSelectedIndex())
View Full Code Here

        main.setLayout(new BorderLayout());
        main.setBorder(BorderFactory.createTitledBorder(resources
                .getString("profileEditor")));
        main.add(pane, BorderLayout.CENTER);

        pane.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent e) {
                if (pane.getSelectedIndex() == 2) {
                    if (!JBotherLoader.isGPGEnabled()) {
                        if (Settings.getInstance().getProperty(
                                "gnupgSecretKeyID") != null) {
View Full Code Here

        controls.setVisible(false);
       
        //
        // Add a listener to update the media position label
        //
        positionModel.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent e) {
                BoundedRangeModel m = (BoundedRangeModel)e.getSource();
                int value = m.getValue();
                String text = String.format("%02d:%02d:%02d", value / 3600, (value / 60) % 60, value % 60);
                positionLabel.setText(text);
View Full Code Here

     {

       /* set up the controls */
       // checkbox for Java default/non-default format
       useJavaDefaultFormatChk.setSelected(useJavaDefaultFormat);
       useJavaDefaultFormatChk.addChangeListener(new ChangeListener()
       {
         public void stateChanged(ChangeEvent e)
         {
           dateFormatTypeDrop.setEnabled(! useJavaDefaultFormatChk.isSelected());
           dateFormatTypeDropLabel.setEnabled(! useJavaDefaultFormatChk.isSelected());
View Full Code Here

      // checkbox for using LONG in WHERE clause
      _useLongInWhereChk.setSelected(_useLongInWhere);

      // checkbox for limit/no-limit on data read during initial table load
      _limitReadChk.setSelected(_limitRead);
      _limitReadChk.addChangeListener(new ChangeListener(){
        public void stateChanged(ChangeEvent e) {
          _limitReadLengthTextField.setEnabled(_limitReadChk.isSelected());
          _limitReadOnSpecificColumnsChk.setEnabled(_limitReadChk.isSelected());
          _limitReadColumnNameTextArea.setEnabled(_limitReadChk.isSelected() &&
            (_limitReadOnSpecificColumnsChk.isSelected()));
        }
      });


      // fill in the current limit length
      _limitReadLengthTextField.setInt(_limitReadLength);

      // set the flag for whether or not to limit only on specific fields
      _limitReadOnSpecificColumnsChk.setSelected(_limitReadOnSpecificColumns);
      _limitReadOnSpecificColumnsChk.addChangeListener(new ChangeListener(){
        public void stateChanged(ChangeEvent e) {
          _limitReadColumnNameTextArea.setEnabled(
            _limitReadOnSpecificColumnsChk.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.