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;
}
Aggregations