Package javax.swing

Examples of javax.swing.JDialog


    s_log.info("showing progress dialog");
    GUIUtils.processOnSwingEventThread(new Runnable()
    {
      public void run()
      {
        currentDialog = new JDialog((Frame) null, title);
        currentMessage = new JLabel(msg);
        detailMessage = new JLabel("...");
        currentProgressBar = new JProgressBar(0, total - 1);
       
        JPanel panel = new JPanel(new BorderLayout());
View Full Code Here


    }
   
  public static void run(Frame parent)
  {
   
    final JDialog d = new JDialog(parent);
    final Component p = new AboutPanel();
   
    d.getContentPane().add(p, java.awt.BorderLayout.CENTER);
   
   
        JPanel panelButtons = new javax.swing.JPanel();
        JButton buttonOK = new javax.swing.JButton();
       
        panelButtons.setLayout(new java.awt.GridBagLayout());

        buttonOK.setText("OK");
        buttonOK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
             
              d.dispose();
            }
        });

        GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        panelButtons.add(buttonOK, gridBagConstraints);

       
        d.getContentPane().add(panelButtons, java.awt.BorderLayout.SOUTH);

        d.setTitle("About FMJ");
        d.setModal(true);
        d.pack();
    d.setLocationRelativeTo(parent);

        d.setVisible(true);
     
  }
View Full Code Here

  }
 
  public static MediaLocator run(Frame parent)
  {
    // TODO: parent of dialog?
    JDialog frame = new JDialog();
    frame.setTitle("Select Capture Device");
    frame.setModal(true);
    //frame.setSize(new Dimension(640, 480));
    //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   
    Container contentPane = frame.getContentPane();
    CaptureDeviceBrowser panel = new CaptureDeviceBrowser();
    contentPane.add(panel);
    frame.pack();
    if (parent != null)
      frame.setLocationRelativeTo(parent);
    frame.setVisible(true);
    MediaLocator result = panel.okClicked ? panel.getSelectedMediaLocator() : null;
    return result;
  }
View Full Code Here

  {
   
    objEditor.setObjectAndUpdateControl(o);
   
    // TODO: center on parent
    final JDialog d = new JDialog(parent);
    d.setTitle(title);
    final Component p = objEditor.getComponent();
   
    d.getContentPane().add(p, java.awt.BorderLayout.CENTER);
   
        JPanel panelButtons = new javax.swing.JPanel();
        JButton buttonOK = new javax.swing.JButton();
        JButton buttonCancel = new javax.swing.JButton();

        panelButtons.setLayout(new java.awt.GridBagLayout());

        final Object[] result = new Object[1]// primitive object holder
       
        buttonOK.setText("OK");
        buttonOK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                //buttonOKActionPerformed(evt);
              if (!objEditor.validateAndUpdateObj())
                return;
              result[0] = objEditor.getObject();
              d.dispose();
            }
        });

        GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        panelButtons.add(buttonOK, gridBagConstraints);

        buttonCancel.setText("Cancel");
        buttonCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                //buttonCancelActionPerformed(evt);
              d.dispose();
            }
        });

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
        panelButtons.add(buttonCancel, gridBagConstraints);

        d.getContentPane().add(panelButtons, java.awt.BorderLayout.SOUTH);

        d.setModal(true);
        d.pack();
    d.setLocationRelativeTo(parent);

        d.setVisible(true);
       
        return result[0];
   
  }
View Full Code Here

     * parent.
     * @param owner The java.awt.Dialog object that is the owner of this dialog.
     */   
    public Wizard(Dialog owner) {
        wizardModel = new WizardModel();
        wizardDialog = new JDialog(owner);        
        initComponents();
    }
View Full Code Here

     * parent.
     * @param owner The java.awt.Frame object that is the owner of the javax.swing.JDialog.
     */   
    public Wizard(Frame owner) {
        wizardModel = new WizardModel();
        wizardDialog = new JDialog(owner);        
        initComponents();
    }
View Full Code Here

                "Do you want to overwrite the value '" + oldValue
                        + "' \nwith the value '" + newValue + "' \nfor the "
                        + fieldName + " field?", JOptionPane.QUESTION_MESSAGE,
                JOptionPane.DEFAULT_OPTION, null, possibilities, "No");

        final JDialog dialog = new JDialog(panel.frame(), "Overwrite Value",
                true);
        dialog.setContentPane(optionPane);
        dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);

        optionPane.addPropertyChangeListener(new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent e) {
                String prop = e.getPropertyName();

                if (dialog.isVisible() && (e.getSource() == optionPane)
                        && (prop.equals(JOptionPane.VALUE_PROPERTY))) {
                    //If you were going to check something
                    //before closing the window, you'd do
                    //it here.
                    dialog.setVisible(false);
                }
            }
        });
        dialog.pack();
        dialog.setVisible(true);

        String userChoice = (String) optionPane.getValue();
        if (userChoice.equals("Yes to All")) {
            overwriteAll.setValue(true);
            retval = true;
View Full Code Here

    }

    private void autoSetLinks() {
        auto.setEnabled(false);
        BibtexEntry entry = entryEditor.getEntry();
        JDialog diag = new JDialog(frame, true);
        autoSetLinks(entry, tableModel, metaData, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                auto.setEnabled(true);
                if (e.getID() > 0) {
                    entryEditor.updateField(FileListEditor.this);
View Full Code Here

                System.out.println("Link: " + entry.getLink());
            }

            final JProgressBar prog = new JProgressBar();
            prog.setIndeterminate(true);
            final JDialog diag = new JDialog(panel.frame(), false);
            diag.getContentPane().add(prog, BorderLayout.CENTER);
            diag.pack();
            diag.setLocationRelativeTo(panel.frame());
            diag.setVisible(true);
            Thread t = new Thread(new Runnable() {
                public void run() {
                    AccessLinksForEntries.copyExternalLinksToDirectory(links,
                            new File("/home/alver/tmp"), panel.metaData(), prog, false,
                            new ActionListener() {
                                public void actionPerformed(ActionEvent actionEvent) {
                                    diag.dispose();
                                }
                            });
                }
            });
            t.start();
View Full Code Here

            String oldVal = entry.getField(GUIGlobals.FILE_FIELD);
            if (oldVal != null)
                model.setContent(oldVal);
            // We have a static utility method for searching for all relevant
            // links:
            JDialog diag = new JDialog(ImportInspectionDialog.this, true);
            FileListEditor.autoSetLinks(entry, model, metaData, new ActionListener() {

                public void actionPerformed(ActionEvent e) {
                    if (e.getID() > 0) {
                        entries.getReadWriteLock().writeLock().lock();
View Full Code Here

TOP

Related Classes of javax.swing.JDialog

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.