Example #1
0
  /** @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */
  @Override
  public void actionPerformed(final ActionEvent aEvent) {
    final Window owner = SwingComponentUtils.getOwningWindow(aEvent);

    if (!getController().isDeviceSelected()) {
      JOptionPane.showMessageDialog(
          owner, "No capturing device found!", "Capture error", JOptionPane.ERROR_MESSAGE);
      return;
    }
    if (!getController().isDeviceSetup()) {
      JOptionPane.showMessageDialog(
          owner, "Capturing device is not setup!", "Capture error", JOptionPane.ERROR_MESSAGE);
      return;
    }

    getController().repeatCaptureData();
  }
Example #2
0
  /** @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */
  @Override
  public void actionPerformed(final ActionEvent aEvent) {
    final Window parent = SwingComponentUtils.getOwningWindow(aEvent);

    final ClientController controller = getController();

    // Issue #62: in case the user does NOT confirm to lose its changes, we
    // should bail out immediately, otherwise continue normally...
    if (controller.isProjectChanged()
        && //
        !SwingComponentUtils.askConfirmation(
            parent,
            "Current project has been changed.\nDo you really want to lose your changes?")) {
      return;
    }

    controller.createNewProject();
  }
Example #3
0
 /** @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) */
 @Override
 public void actionPerformed(final ActionEvent aEvent) {
   final Window owner = SwingComponentUtils.getOwningWindow(aEvent);
   getController().showBundlesDialog(owner);
 }