Search in sources :

Example 1 with PartitionClockModel

use of dr.app.beauti.options.PartitionClockModel in project beast-mcmc by beast-dev.

the class CloneModelDialog method showDialog.

public int showDialog(List<PartitionClockModel> sourceModels) {
    JOptionPane optionPane = new JOptionPane(optionPanel, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, null, null);
    optionPane.setBorder(new EmptyBorder(12, 12, 12, 12));
    sourceModelCombo.removeAllItems();
    for (PartitionClockModel model : sourceModels) {
        sourceModelCombo.addItem(model);
    }
    final JDialog dialog = optionPane.createDialog(frame, "Clone model settings");
    dialog.pack();
    dialog.setVisible(true);
    int result = JOptionPane.CANCEL_OPTION;
    Integer value = (Integer) optionPane.getValue();
    if (value != null && value != -1) {
        result = value;
    }
    return result;
}
Also used : PartitionClockModel(dr.app.beauti.options.PartitionClockModel) EmptyBorder(javax.swing.border.EmptyBorder)

Aggregations

PartitionClockModel (dr.app.beauti.options.PartitionClockModel)1 EmptyBorder (javax.swing.border.EmptyBorder)1