/** packs the dialog */ void packDialog() { if (cancellationDialog != null) { cancellationDialog.pack(); } }
/** packs the dialog */ void packDialog() { if (cancellationDialog != null) { cancellationDialog.pack(); } } /** Marks this job as cancelled.
/** packs the dialog */ void packDialog() { if (cancellationDialog != null) { cancellationDialog.pack(); } } /** Marks this job as cancelled.
private void redoLayout(Container container) { Component parent = container.getParent(); while (parent != null) { if (parent instanceof Dialog) { break; } parent = parent.getParent(); } if (parent != null) { ((Dialog) parent).pack(); } }
/** @param <tt>d</tt> New value of <tt>cancellationDialog</tt>*/ void setDialog(Dialog d) { d.setVisible(true); d.pack(); cancellationDialog = d; }
/** @param <tt>d</tt> New value of <tt>cancellationDialog</tt>*/ void setDialog(Dialog d) { d.show(); d.pack(); cancellationDialog = d; } /** packs the dialog */
/** @param <tt>d</tt> New value of <tt>cancellationDialog</tt>*/ void setDialog(Dialog d) { d.show(); d.pack(); cancellationDialog = d; } /** packs the dialog */
/** * Main for testing. * @param args The arguments. */ public static void main(String[] args) { Dialog dia = new AlarmSettingsDialog(null,new JFrame(), null); dia.pack(); dia.setVisible(true); } }
public void run() { if (progressLabel == null) initComponents(); DialogDescriptor dd = createDialogDescriptor(caption, message, controller); Dialog d = DialogDisplayer.getDefault().createDialog(dd); d.pack(); owner = d; if (owner instanceof JDialog) { ((JDialog)owner).setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); } d.setVisible(true); } });
/** * Main for testing. * @param args The arguments. */ public static void main(String[] args) { Dialog dia = new AlarmSettingsDialog(null,new JFrame(), null); dia.pack(); dia.setVisible(true); } }
public void showEditor() { String title = NbBundle.getMessage(MappingEditor.class, "TITLE_filter_mapping"); //NOI18N editDialog = new DialogDescriptor(this, title, true, DialogDescriptor.OK_CANCEL_OPTION, DialogDescriptor.CANCEL_OPTION, DialogDescriptor.BOTTOM_ALIGN, null, this); dialog = DialogDisplayer.getDefault().createDialog(editDialog); dialog.pack(); dialog.setVisible(true); }
KeyStroke[] getKeySequence() { dial.pack(); panel.requestFocus(); dial.show(); return retVal; }
KeyStroke[] getKeySequence() { dial.pack(); panel.requestFocus(); dial.show(); return retVal; }
@Override public void propertyChange(PropertyChangeEvent evt) { if (ExplorerManager.PROP_SELECTED_NODES.equals (evt.getPropertyName())) { Node[] nodes = (Node[]) evt.getNewValue(); if (nodes.length!=1) { selectPlatform (null); } else { selectPlatform (nodes[0]); Dialog dialog = (Dialog) SwingUtilities.getAncestorOfClass (Dialog.class, this); if (dialog != null) dialog.pack (); } } }
private void loadBounds(Dialog d, String key) { d.pack(); // Position the dialog according to the history Rectangle lastBounds = (Rectangle) EditorState.get(key); if (lastBounds != null) { d.setBounds(lastBounds); } else { // no history, center it on the screen Dimension dim = d.getPreferredSize(); Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); int x = Math.max(0, (screen.width - dim.width) / 2); int y = Math.max(0, (screen.height - dim.height) / 2); d.setLocation(x, y); } }
public static void setDialogMinimumSize(final Dialog dlg) { dlg.pack(); dlg.setSize( dlg.getPreferredSize()); dlg.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { int w = dlg.getWidth(); int h = dlg.getHeight(); final Dimension minSize = dlg.getPreferredSize(); int _w = Math.max( w, minSize.width); int _h = Math.max( h, minSize.height); if ( w != _w || h != _h) { dlg.setSize( new Dimension(_w, _h)); } } }); }
private void msgBox(String title, String message) { warning_label.setText(message); warning_label.invalidate(); warning_dialog.setTitle(title); warning_dialog.pack(); warning_dialog.setVisible(true); }
public void showMacroDialog() { macroDialog = DialogSupport.createDialog(LocaleSupport.getString("MDS_title"), // NOI18N panel, true, new JButton[] { okButton, cancelButton }, false, 0, 1, this); macroDialog.pack(); panel.popupNotify(); macroDialog.requestFocus(); macroDialog.show(); }
public void showMacroDialog() { macroDialog = DialogSupport.createDialog( LocaleSupport.getString("MDS_title"), // NOI18N panel, true, new JButton[] { okButton, cancelButton }, false, 0, 1, this ); macroDialog.pack(); panel.popupNotify(); macroDialog.requestFocus(); macroDialog.show(); }
public static void showMessageDialog(Component parentComponent, String message, String title, int messageType) { final Dialog dialog = new Dialog(getFrame(parentComponent), title); dialog.setModal(true); dialog.setLayout(new BorderLayout()); dialog.add(new Label(message), BorderLayout.CENTER); Panel panel = new Panel(); Button btOk = new Button("OK"); panel.add(btOk); dialog.add(panel, BorderLayout.SOUTH); dialog.pack(); dialog.addWindowListener(windowListener); btOk.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ev) { dialog.hide(); } }); dialog.show(); }