Package com.jgoodies.forms.builder

Examples of com.jgoodies.forms.builder.ButtonBarBuilder


        builder.append(renameTo);
        builder.nextLine();
        builder.append(overwrite, 3);


        ButtonBarBuilder bb = new ButtonBarBuilder();
        bb.addGlue();
        bb.addGridded(ok);
        bb.addGridded(cancel);
        bb.addGlue();
        builder.getPanel().setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
        bb.getPanel().setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
        diag.getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
        diag.getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
        diag.pack();

        ok.addActionListener(new ActionListener() {
           public void actionPerformed(ActionEvent e) {
               // Check if the user tries to rename multiple fields:
View Full Code Here


        pan.add(lab, BorderLayout.NORTH);
        pan.add(new JScrollPane(tableOther), BorderLayout.CENTER);

        diag.getContentPane().add(pan, BorderLayout.CENTER);
       
        ButtonBarBuilder b = new ButtonBarBuilder();
        b.addGlue();
        b.addGridded(install);
        b.addGridded(download);
        b.addGridded(remove);
        b.addGridded(close);
        b.addRelatedGap();
        b.addGridded(help);
       
        b.addGlue();
        b.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        diag.getContentPane().add(b.getPanel(), BorderLayout.SOUTH);
        diag.pack();
        diag.setLocationRelativeTo(frame);
       
        install.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                installPlugin();
            }
        });
       
        download.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                downloadPlugin();
            }
        });
       
        Action closeListener = new AbstractAction() {
            public void actionPerformed(ActionEvent arg0) {
                diag.dispose();
            }
        };
        close.addActionListener(closeListener);
       
        remove.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                removeSelected();
            }
        });
       
        // Key bindings:
        ActionMap am = b.getPanel().getActionMap();
        InputMap im = b.getPanel().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
        im.put(Globals.prefs.getKey("Close dialog"), "close");
        am.put("close", closeListener);

    }
View Full Code Here

    InputMap im = mainPanel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
    im.put(frame.prefs().getKey("Close dialog"), "close");
    am.put("close", closeAction);
    mainPanel.setLayout(new BorderLayout());
    mainPanel.add(sp, BorderLayout.CENTER);
    ButtonBarBuilder bb = new ButtonBarBuilder(buttons);
    buttons.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
    bb.addGlue();
    bb.addGridded(addFromFolderButton);
    bb.addGridded(addFromJarButton);
    bb.addGridded(showDescButton);
    bb.addGridded(removeButton);
    bb.addGridded(closeButton);
    bb.addUnrelatedGap();
    bb.addGridded(helpButton);
    bb.addGlue();

    getContentPane().add(mainPanel, BorderLayout.CENTER);
    getContentPane().add(buttons, BorderLayout.SOUTH);
    this.setSize(getSize());
    pack();
View Full Code Here

        cancel = new JButton(Globals.lang("Cancel"));
        apply = new JButton(Globals.lang("Apply"));
        ok.addActionListener(this);
        apply.addActionListener(this);
        cancel.addActionListener(this);
        ButtonBarBuilder bb = new ButtonBarBuilder(buttons);
        buttons.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
        bb.addGlue();
        bb.addGridded(ok);
        bb.addGridded(apply);
        bb.addGridded(cancel);
        bb.addGlue();
               
        AbstractAction closeAction = new AbstractAction() {
          public void actionPerformed(ActionEvent e) {
            dispose();
          }
View Full Code Here


            JPanel main = builder.getPanel();
            main.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

            ButtonBarBuilder bb = new ButtonBarBuilder();
            bb.addGlue();
            bb.addGridded(ok);
            bb.addGridded(cancel);
            bb.addGlue();
            getContentPane().add(main, BorderLayout.CENTER);
            getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);

            pack();
        }
View Full Code Here

            public void actionPerformed(ActionEvent actionEvent) {
                dispose();
            }
        });

        ButtonBarBuilder builder = new ButtonBarBuilder();
        builder.addGlue();
        builder.addGridded(ok);
        builder.addGridded(cancel);
        builder.addGlue();
        return builder.getPanel();
    }
View Full Code Here

        con.gridx = 1;
    con.gridy = 2;
    gbl.setConstraints(extension, con);
    main.add(extension);

    ButtonBarBuilder bb = new ButtonBarBuilder(buttons);
    buttons.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
    bb.addGlue();
    bb.addGridded(ok);
    bb.addGridded(cancel);
    bb.addGlue();
   
    getContentPane().add(main, BorderLayout.CENTER);
    getContentPane().add(buttons, BorderLayout.SOUTH);

    //pack();
View Full Code Here

    //im = table.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
    //im.put(frame.prefs().getKey("Close dialog"), "close");
    //am.put("close", closeAction);
    main.setLayout(new BorderLayout());
    main.add(sp, BorderLayout.CENTER);
    ButtonBarBuilder bb = new ButtonBarBuilder(buttons);
    buttons.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
    bb.addGlue();
    bb.addGridded(addExport);
    bb.addGridded(modify);
    bb.addGridded(remove);
    bb.addGridded(close);
    bb.addUnrelatedGap();
    bb.addGridded(help);
    bb.addGlue();

    getContentPane().add(main, BorderLayout.CENTER);
    getContentPane().add(buttons, BorderLayout.SOUTH);
    pack();
    Util.placeDialog(this, frame);
View Full Code Here

        btnExit = createOKButton(false);
        btnExit.setText(Strings.message("updates.downloading.exit"));
        btnExit.setVisible(false);
        btnCancel = createCancelButton();

        ButtonBarBuilder builder = new ButtonBarBuilder();

        builder.getPanel().setBorder(Constants.DIALOG_BUTTON_BAR_BORDER);
        builder.addGlue();
        builder.addFixed(btnExit);
        builder.addRelatedGap();
        builder.addFixed(btnCancel);

        return builder.getPanel();
    }
View Full Code Here

      {
        setVisible(false);
      }
    });

    final ButtonBarBuilder builder = new ButtonBarBuilder();
    builder.addGlue();
//    builder.addGridded(new JButton("Alter"));
//    builder.addRelatedGap();
    builder.addGridded(_closeBtn);

    return builder.getPanel();
  }
View Full Code Here

TOP

Related Classes of com.jgoodies.forms.builder.ButtonBarBuilder

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.