Example usage for javax.swing JOptionPane PLAIN_MESSAGE

List of usage examples for javax.swing JOptionPane PLAIN_MESSAGE

Introduction

In this page you can find the example usage for javax.swing JOptionPane PLAIN_MESSAGE.

Prototype

int PLAIN_MESSAGE

To view the source code for javax.swing JOptionPane PLAIN_MESSAGE.

Click Source Link

Document

No icon is used.

Usage

From source file:org.monome.pages.MIDISequencerPage.java

public void actionPerformed(ActionEvent e) {
    System.out.println(e.getActionCommand());
    if (e.getActionCommand().equals("Set MIDI Output")) {
        String[] midiOutOptions = this.monome.getMidiOutOptions();
        String deviceName = (String) JOptionPane.showInputDialog(this.monome, "Choose a MIDI Output to use",
                "Set MIDI Output", JOptionPane.PLAIN_MESSAGE, null, midiOutOptions, "");

        if (deviceName == null) {
            return;
        }//from  w  ww .j av  a2  s  .  c  o  m

        this.addMidiOutDevice(deviceName);
    }
    if (e.getActionCommand().equals("Update Preferences")) {
        this.noteNumbers[0] = this.noteToMidiNumber(this.row1tf.getText());
        this.noteNumbers[1] = this.noteToMidiNumber(this.row2tf.getText());
        this.noteNumbers[2] = this.noteToMidiNumber(this.row3tf.getText());
        this.noteNumbers[3] = this.noteToMidiNumber(this.row4tf.getText());
        this.noteNumbers[4] = this.noteToMidiNumber(this.row5tf.getText());
        this.noteNumbers[5] = this.noteToMidiNumber(this.row6tf.getText());
        this.noteNumbers[6] = this.noteToMidiNumber(this.row7tf.getText());
        this.noteNumbers[7] = this.noteToMidiNumber(this.row8tf.getText());
        this.noteNumbers[8] = this.noteToMidiNumber(this.row9tf.getText());
        this.noteNumbers[9] = this.noteToMidiNumber(this.row10tf.getText());
        this.noteNumbers[10] = this.noteToMidiNumber(this.row11tf.getText());
        this.noteNumbers[11] = this.noteToMidiNumber(this.row12tf.getText());
        this.noteNumbers[12] = this.noteToMidiNumber(this.row13tf.getText());
        this.noteNumbers[13] = this.noteToMidiNumber(this.row14tf.getText());
        this.noteNumbers[14] = this.noteToMidiNumber(this.row15tf.getText());
        this.midiChannel = this.channelTF.getText();
        try {
            this.setBankSize(Integer.parseInt(this.bankSizeTF.getText()));
        } catch (NumberFormatException nfe) {
            nfe.printStackTrace();
        }
    }
}

From source file:org.monome.pages.MIDISequencerPagePoly.java

public void actionPerformed(ActionEvent e) {
    //System.out.println(e.getActionCommand());
    if (e.getActionCommand().equals("Set MIDI Output")) {
        String[] midiOutOptions = this.monome.getMidiOutOptions();
        String deviceName = (String) JOptionPane.showInputDialog(this.monome, "Choose a MIDI Output to use",
                "Set MIDI Output", JOptionPane.PLAIN_MESSAGE, null, midiOutOptions, "");

        if (deviceName == null) {
            return;
        }/*from w ww .  j  a  v a  2  s  .c  o  m*/

        this.addMidiOutDevice(deviceName);
    }
    if (e.getActionCommand().equals("Update Preferences")) {
        this.noteNumbers[0] = this.noteToMidiNumber(this.row1tf.getText());
        this.noteNumbers[1] = this.noteToMidiNumber(this.row2tf.getText());
        this.noteNumbers[2] = this.noteToMidiNumber(this.row3tf.getText());
        this.noteNumbers[3] = this.noteToMidiNumber(this.row4tf.getText());
        this.noteNumbers[4] = this.noteToMidiNumber(this.row5tf.getText());
        this.noteNumbers[5] = this.noteToMidiNumber(this.row6tf.getText());
        this.noteNumbers[6] = this.noteToMidiNumber(this.row7tf.getText());
        this.noteNumbers[7] = this.noteToMidiNumber(this.row8tf.getText());
        this.noteNumbers[8] = this.noteToMidiNumber(this.row9tf.getText());
        this.noteNumbers[9] = this.noteToMidiNumber(this.row10tf.getText());
        this.noteNumbers[10] = this.noteToMidiNumber(this.row11tf.getText());
        this.noteNumbers[11] = this.noteToMidiNumber(this.row12tf.getText());
        this.noteNumbers[12] = this.noteToMidiNumber(this.row13tf.getText());
        this.noteNumbers[13] = this.noteToMidiNumber(this.row14tf.getText());
        this.noteNumbers[14] = this.noteToMidiNumber(this.row15tf.getText());
        this.midiChannel = this.channelTF.getText();
        if (Integer.parseInt(this.midiChannel) < 1) {
            this.midiChannel = "1";
            this.channelTF.setText("1");
        }

        try {
            this.setBankSize(Integer.parseInt(this.bankSizeTF.getText()));
        } catch (NumberFormatException nfe) {
            nfe.printStackTrace();
        }
    }
}

From source file:org.monome.pages.MIDITriggersPage.java

public void actionPerformed(ActionEvent e) {
    System.out.println(e.getActionCommand());
    if (e.getActionCommand().equals("Set MIDI Output")) {
        String[] midiOutOptions = this.monome.getMidiOutOptions();
        String deviceName = (String) JOptionPane.showInputDialog(this.monome, "Choose a MIDI Output to add",
                "Add MIDI Output", JOptionPane.PLAIN_MESSAGE, null, midiOutOptions, "");

        if (deviceName == null) {
            return;
        }/*  ww  w .j  a  v a  2 s.  c o m*/

        this.addMidiOutDevice(deviceName);
    } else if (e.getActionCommand().equals("Columns")) {
        row1Label.setText("Col 1");
        row2Label.setText("Col 2");
        row3Label.setText("Col 3");
        row4Label.setText("Col 4");
        row5Label.setText("Col 5");
        row6Label.setText("Col 6");
        row7Label.setText("Col 7");
        row8Label.setText("Col 8");
        row9Label.setText("Col 9");
        row10Label.setText("Col 10");
        row11Label.setText("Col 11");
        row12Label.setText("Col 12");
        row13Label.setText("Col 13");
        row14Label.setText("Col 14");
        row15Label.setText("Col 15");
        row16Label.setText("Col 16");
        this.redrawMonome();
    } else if (e.getActionCommand().equals("Rows")) {
        row1Label.setText("Row 1");
        row2Label.setText("Row 2");
        row3Label.setText("Row 3");
        row4Label.setText("Row 4");
        row5Label.setText("Row 5");
        row6Label.setText("Row 6");
        row7Label.setText("Row 7");
        row8Label.setText("Row 8");
        row9Label.setText("Row 9");
        row10Label.setText("Row 10");
        row11Label.setText("Row 11");
        row12Label.setText("Row 12");
        row13Label.setText("Row 13");
        row14Label.setText("Row 14");
        row15Label.setText("Row 15");
        row16Label.setText("Row 16");
        this.redrawMonome();
    }
}

From source file:org.monome.pages.PageTemplate.java

public void actionPerformed(ActionEvent e) {
    if (e.getActionCommand().equals("Add MIDI Output")) {
        String[] midiOutOptions = this.monome.getMidiOutOptions();
        String deviceName = (String) JOptionPane.showInputDialog(this.monome, "Choose a MIDI Output to add",
                "Add MIDI Output", JOptionPane.PLAIN_MESSAGE, null, midiOutOptions, "");

        if (deviceName == null) {
            return;
        }/*www  .  j  ava 2 s .  co  m*/
        this.addMidiOutDevice(deviceName);
    }
}

From source file:org.myrobotlab.service.MarySpeech.java

private void showProgressPanel(List<ComponentDescription> comps, boolean install) {
    final ProgressPanel pp = new ProgressPanel(comps, install);
    final JOptionPane optionPane = new JOptionPane(pp, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION,
            null, new String[] { "Abort" }, "Abort");
    // optionPane.setPreferredSize(new Dimension(640,480));
    final JDialog dialog = new JDialog((Frame) null, "Progress", false);
    dialog.setContentPane(optionPane);/*from ww  w  .  j a va  2s .c  o m*/
    optionPane.addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent e) {
            String prop = e.getPropertyName();

            if (dialog.isVisible() && (e.getSource() == optionPane)
                    && (prop.equals(JOptionPane.VALUE_PROPERTY))) {
                pp.requestExit();
                dialog.setVisible(false);
            }
        }
    });
    dialog.pack();
    dialog.setVisible(true);
    new Thread(pp).start();
}

From source file:org.nuclos.client.main.MainController.java

public static void cmdOpenSettings() {
    NuclosSettingsContainer panel = new NuclosSettingsContainer(frm);

    JOptionPane p = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null);
    JDialog dlg = p.createDialog(Main.getInstance().getMainFrame(),
            SpringLocaleDelegate.getInstance().getMessage("R00022927", "Einstellungen"));
    dlg.pack();/*from  ww w. j  a va 2s  .c o  m*/
    dlg.setResizable(true);
    dlg.setVisible(true);
    Object o = p.getValue();
    int res = ((o instanceof Integer) ? ((Integer) o).intValue() : JOptionPane.CANCEL_OPTION);

    if (res == JOptionPane.OK_OPTION) {
        try {
            panel.save();
        } catch (PreferencesException e) {
            Errors.getInstance().showExceptionDialog(frm, e);
        }
    }
}

From source file:org.nuclos.client.ui.collect.searcheditor.AtomicNodeController.java

private ValidatingJOptionPane newOptionPane(String sTitle, final AtomicNodePanel pnl) {
    return new ValidatingJOptionPane(getParent(), sTitle, pnl, JOptionPane.PLAIN_MESSAGE,
            JOptionPane.OK_CANCEL_OPTION) {

        @Override//w ww .  j  ava2 s  . c  o  m
        protected void validateInput() throws ValidatingJOptionPane.ErrorInfo {
            try {
                pnl.getSearchCondition();
            } catch (CommonBusinessException ex) {
                throw new ErrorInfo(ex.getMessage(), null);
            }
        }
    };
}

From source file:org.openmrs.module.muzimabiometrics.panels.EnrollFromScanner.java

private void identifyPatient() throws IOException, JSONException {

    service = new JavaScriptCallerService(
            (Applet) this.getParent().getParent().getParent().getParent().getParent().getParent().getParent());

    // String fingerprint = DatatypeConverter.printBase64Binary(subject.getTemplateBuffer().toByteArray());
    String fingerprint = "TlQAEBMWAAAKAU5GVBAJFgAACgFORlIl/xUZQAHgAfQB9AEAAP9/AQEfAAAAB/8tB4XtABA3BWwMPmEdLQdvf0FhCkQNd4NB4RgwB28BWUEUTgVsemKBDE8HbITOYRstBnJx3cEMUAtvBPWBGTsDcIIKIhdSBHByVWIQXQtzaZliA0kFaefmQgZLCHBk/sIKWAZzBxLjGVcEdxMdAyRDCnCIJWMfSAV4ZzGDD1wGcIOR4xtZCH1tJoQYUwx4XTUkFFgQeVlaRARRB21keiQaVBd1hIWEHksSclSNhApPBHZQveQPWAl7UdmEDFkHgpghJSJEEGxZKQUDTgV9LC5FHERzdlVJZQRWBoAnhYUbQRJ/NIqlFU4PdUKRZQ9QCnjKlYUNTwZ9S71FCFUGhkPBxQpUBYJT4eUDQgeFNgUmDTkIhAQOpiE6D3A/FQYJUgiWtlomDjQIfLdqxgwWCYY+kYYHSA2NAa6mIyIMdQYcAv///////wQKOQUCM/8O+wYDMf////////////8A8wUHFQv/bwD/L/8B8f8G8wkEUQgJRAoFcQD/P/8D8QL/H/8A8wQKFgcLNAQDIwH/P/8Q+A4Igf8C9QUANgkKFA0MYw8OZxEJcQQDRQEGUQcEFAMIURAOZhEKYgsHRAAElwkOJRENUv////8C9gcMExX/jwoNEhgVpf8L8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oIR8r/y86/x//LfEsLxQ2/18uIf8wN/////8zJ/////84KjcuKBIrMl8oI/8wNf87//83Mv87/y84NF8oIxYw/y8qJxc5/0//OvcxL1E7//84M/8yIf80Nf8pMzMyO/P///85Nib/////NvQqJyQ4OyT/////JPUxNhc5/6////////80NfIj/58=";
    PatientFingerPrintModel patient = service.identifyPatient(fingerprint);

    if (patient != null) {

    } else {/*ww w.j av a  2 s. c o  m*/
        btnRegisterPatient.setEnabled(true);
        JOptionPane.showMessageDialog(this, "Patient Not Found", "Identification", JOptionPane.PLAIN_MESSAGE);

    }
}

From source file:org.openmrs.module.muzimabiometrics.panels.ScanFingerprint.java

@Override
public void actionPerformed(ActionEvent actionEvent) {

    try {/*w w w .  ja  v  a  2 s  . c  o m*/
        if (actionEvent.getSource() == btnTryAgain) {
            btnTryAgain.setVisible(false);
            RunFingerprintScanProcess();
        } else if (actionEvent.getSource() == btnLaunchApplet) {
            btnLaunchApplet.setVisible(false);
            RunFingerprintScanProcess();
        }
    } catch (IOException e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(this, e.getMessage(), "Applet Error", JOptionPane.PLAIN_MESSAGE);
    } catch (JSONException e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(this, e.getMessage(), "Applet Error", JOptionPane.PLAIN_MESSAGE);
    }
}

From source file:org.openmrs.module.muzimabiometrics.panels.ScanFingerprint.java

protected boolean obtainLicenses() {

    try {/*  w  w w  . j a v  a  2  s  .c  o m*/
        boolean status = FingersTools.getInstance().obtainLicenses(getRequiredLicenses());
        FingersTools.getInstance().obtainLicenses(getOptionalLicenses());
        return status;
    } catch (IOException e) {
        e.printStackTrace();
        JOptionPane.showMessageDialog(this, e.getMessage(), "Licenses Error", JOptionPane.PLAIN_MESSAGE);
        return false;
    }
}