private void showInformationDialog(String title, Component component) { final ModalDialog modalDialog = new ModalDialog(UIUtils.getRootWindow(parentComponent), title, AbstractDialog.ID_OK, null); /*I18N*/ modalDialog.setContent(component); modalDialog.show(); } }
@Override protected void onOK() { updateCodeHistory(); super.onOK(); }
public boolean showDialog(Window parent, String title, String helpId) { ModalDialog modalDialog = new ModalDialog(parent, title, ModalDialog.ID_OK_CANCEL_HELP, helpId); modalDialog.setContent(this); final int status = modalDialog.show(); modalDialog.getJDialog().dispose(); return status == ModalDialog.ID_OK; }
/** * This method is called, when the user clicks the "cancel" button or the "close" button of * the top bar of the dialog window. It can also be called directly. * The method sets the button identifier to {@link #ID_CANCEL} and calls {@link #onCancel()}. */ @Override public void close() { setButtonID(ID_CANCEL); onCancel(); }
wktArea.setText(wkt); final JScrollPane scrollPane = new JScrollPane(wktArea); final ModalDialog dialog = new ModalDialog(appContext.getApplicationWindow(), "Coordinate reference system as well known text", scrollPane, ModalDialog.ID_OK, null); dialog.show(); }); wktButton.setEnabled(false);
contentPanel.add(new JLabel("Geometry CRS: " + targetCrs.getName().toString()), BorderLayout.SOUTH); ModalDialog modalDialog = new ModalDialog(SnapApp.getDefault().getMainFrame(), DLG_TITLE, ModalDialog.ID_OK, null); modalDialog.setContent(contentPanel); modalDialog.center(); modalDialog.show();
@Override public int show() { strategy.updateCheckBoxStates(); return super.show(); }
final ModalDialog outputParametersDialog = new OutputParametersDialog(appContext.getApplicationWindow(), sourceProduct, workCopy); outputParametersDialog.setContent(form); if (outputParametersDialog.show() == ModalDialog.ID_OK) { outputGeometryModel = workCopy; updateProductSize();
final ModalDialog dialog = new ModalDialog(getParent(), SnapApp.getDefault().getInstanceName() + " - Colour Legend Preview", imageDisplay, ID_OK, null); dialog.getJDialog().setResizable(false); dialog.show();
content.setPreferredSize(new Dimension(300, 150)); final ModalDialog detailsWindow = new ModalDialog(parentWindow, TITLE + " - Details", ModalDialog.ID_OK, null); detailsWindow.setContent(content); return detailsWindow;
public ModalDialog(Window parent, String title, Object content, int buttonMask, Object[] otherButtons, String helpID) { this(parent, title, buttonMask, otherButtons, helpID); setContent(content); }
@Override protected void onCancel() { selectedLatBand = null; selectedLonBand = null; super.onCancel(); }
super.getJDialog().setMinimumSize(contentPanel.getPreferredSize()); EscapeAction.register(super.getJDialog());
wktArea.setText(wkt); final JScrollPane scrollPane = new JScrollPane(wktArea); final ModalDialog dialog = new ModalDialog(appContext.getApplicationWindow(), "Coordinate reference system as well known text", scrollPane, ModalDialog.ID_OK, null); dialog.show(); }); wktButton.setEnabled(false);
ModalDialog modalDialog = new ModalDialog(snapApp.getMainFrame(), Bundle.CTL_InsertWktGeometryAction_DialogTitle(), ModalDialog.ID_OK_CANCEL, null); modalDialog.setContent(contentPanel); modalDialog.center(); if (modalDialog.show() == ModalDialog.ID_OK) { String wellKnownText = textArea.getText(); if (wellKnownText == null || wellKnownText.isEmpty()) {
@Override public int show() { updateUI(); return super.show(); }
final ModalDialog outputParametersDialog = new OutputParametersDialog(appContext.getApplicationWindow(), sourceProduct, workCopy); outputParametersDialog.setContent(form); if (outputParametersDialog.show() == ModalDialog.ID_OK) { outputGeometryModel = workCopy; updateProductSize();
@Override protected void onCancel() { super.onCancel(); resultProduct = null; }
private void showInformationDialog(String title, Component component) { final ModalDialog modalDialog = new ModalDialog(UIUtils.getRootWindow(parentComponent), title, AbstractDialog.ID_OK, null); /*I18N*/ modalDialog.setContent(component); modalDialog.show(); }
new CrsInfoListModel(CrsInfo.generateCRSList())); crsButton.addActionListener(e -> { final ModalDialog dialog = new ModalDialog(null, "Select Coordinate Reference System", predefinedCrsForm, ModalDialog.ID_OK_CANCEL, null); if (dialog.show() == ModalDialog.ID_OK) { selectedCrsInfo = predefinedCrsForm.getSelectedCrsInfo(); if (selectedCrsInfo != null) {