Package javax.swing

Examples of javax.swing.JButton.addKeyListener()


      Index index = new Index(i, j);
      index2Argument.put(index, a);
      argument2Index.put(a, index);
      index2Button.put(index, button);
      button.addActionListener(this);
      button.addKeyListener(this);
      if (j==0) {
        if (panel!=null) {
          add(panel);
        }
        panel = new JPanel();
View Full Code Here


      @Override
      public void actionPerformed(ActionEvent e) {
        script.pushChar(key);
      }
    });
    button.addKeyListener(handler);
    panel.add(button);
  }

  private static class AgiClientScriptImpl implements AgiClientScript {
View Full Code Here

          }
        });
      }
    });

    clickButton.addKeyListener(new KeyAdapter() {
      @Override
      public void keyPressed(KeyEvent e) {
        sim.invokeSimulationThread(new Runnable() {

          @Override
View Full Code Here

        JButton pathDirButton = new JButton();
        pathDirButton.setText("...");
        pathDirButton.addActionListener(
                new SaveFileButtonActionListener(this,pathDataDir, fileType, fileType));
        pathDirButton.addKeyListener(keyListener);
        resultContainer.add(pathDirButton, "wrap");

        // Progress Bar to show while the statistics graphics are loaded
        UIManager.put("ProgressBar.selectionBackground", Color.black);
        UIManager.put("ProgressBar.selectionForeground", Color.black);
View Full Code Here

        resultContainer.add(progressBar, "span 2, wrap");

        JButton saveButton = new JButton();
        saveButton.setText("Save");
        saveButton.setAction(getActionSavePdf());
        saveButton.addKeyListener(keyListener);
        resultContainer.add(saveButton, "span, align right");
        resultContainer.setTitle("Export to PDF");
        resultContainer.setResizable(false);

        resultContainer.pack();
View Full Code Here

          pathDataDir.setText(fileChooser.getSelectedFile()
              .getPath());
        }
            }
        });
    pathDirButton.addKeyListener(keyListener);
    resultContainer.add(pathDirButton, "wrap");

        // Action done while the statistics graphics are loaded
        progressStream = new JLabel();
        progressStream.setVisible(false);
View Full Code Here

                // If the file doesn't exists or exits and the user want to replace it
                exportToHtml(file.getAbsolutePath());
            }
        });

        saveButton.addKeyListener(keyListener);
    resultContainer.add(saveButton, "span, align right, wrap");

        resultContainer.setTitle("Export to html");
        resultContainer.pack();
    resultContainer.setResizable(false);
View Full Code Here

        }

        JButton  buttonOk = new JButton();
    buttonOk.setText("OK");
    buttonOk.setAction(getAbstractActionCloseAbout());
    buttonOk.addKeyListener(keyListener);
    add(buttonOk, "center");


    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.