Package com.jgoodies.forms.builder

Examples of com.jgoodies.forms.builder.ButtonBarBuilder


  fieldNamePan.add(fieldNameField);
  gbl.setConstraints(wordEditField, con);
  wordEditPan.add(wordEditField);

  // Add buttons:
        ButtonBarBuilder bsb = new ButtonBarBuilder(buttonPan);
        bsb.addGlue();
        bsb.addGridded(ok);
      bsb.addGridded(apply);
        bsb.addGridded(cancel);
        bsb.addRelatedGap();
        bsb.addGridded(help);
        bsb.addGlue();

    // Add panels to dialog:
  con.fill = GridBagConstraints.BOTH;
  getContentPane().setLayout(gbl);
  con.weightx = 1;
View Full Code Here


        // popup.add(new AttachFile("pdf"));
        // popup.add(new AttachFile("ps"));
        popup.add(new AttachUrl());
        getContentPane().add(centerPan, BorderLayout.CENTER);

        ButtonBarBuilder bb = new ButtonBarBuilder();
        bb.addGlue();
        bb.addGridded(ok);
        bb.addGridded(stop);
        bb.addGridded(cancel);
        bb.addRelatedGap();
        bb.addGridded(help);
        bb.addGlue();
        bb.getPanel().setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));

        ButtonStackBuilder builder = new ButtonStackBuilder();
        builder.addGridded(selectAll);
        builder.addGridded(deselectAll);
        builder.addGridded(deselectAllDuplicates);
        builder.addRelatedGap();
        builder.addGridded(delete);
        builder.addRelatedGap();
        builder.addGridded(autoGenerate);
        builder.addGridded(generate);
        builder.getPanel().setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
        centerPan.add(builder.getPanel(), BorderLayout.WEST);

        ok.setEnabled(false);
        generate.setEnabled(false);
        ok.addActionListener(new OkListener());
        cancel.addActionListener(new CancelListener());
        generate.addActionListener(new GenerateListener());
        stop.addActionListener(new StopListener());
        selectAll.addActionListener(new SelectionButton(true));
        deselectAll.addActionListener(new SelectionButton(false));
        deselectAllDuplicates.addActionListener(new DeselectDuplicatesButtonListener());
        deselectAllDuplicates.setEnabled(false);
        delete.addActionListener(deleteListener);
        help.addActionListener(new HelpAction(frame.helpDiag, GUIGlobals.importInspectionHelp));
        getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);

        // Remember and default to last size:
        setSize(new Dimension(Globals.prefs.getInt("importInspectionDialogWidth"), Globals.prefs
            .getInt("importInspectionDialogHeight")));
        addWindowListener(new WindowAdapter() {
View Full Code Here

        setLayout(new BorderLayout());
        builder.getPanel().setBorder(BorderFactory.createEmptyBorder(5,5,5,5));//createMatteBorder(1,1,1,1,Color.green));
        add(builder.getPanel(), BorderLayout.NORTH);
        add(externalFilesPanel, BorderLayout.CENTER);
        ButtonBarBuilder bb = new ButtonBarBuilder();
        bb.addGlue();
        bb.addGridded(ok);
        bb.addGridded(cancel);
        bb.addUnrelatedGap();
        bb.addGridded(help);
        bb.addGlue();
        bb.getPanel().setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
        dialog = new JDialog(frame, Globals.lang("Journal abbreviations"), false);
        dialog.getContentPane().add(this, BorderLayout.CENTER);
        dialog.getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);

        //add(new JScrollPane(builtInTable), BorderLayout.CENTER);

        // Set up panel for editing a single journal, to be used in a dialog box:
        FormLayout layout2 = new FormLayout
View Full Code Here

        b.append(authors, 5);
        b.nextLine();
        b.append(editors, 5);
        b.nextLine();
       
        ButtonBarBuilder bb = new ButtonBarBuilder(opt);
        bb.addGlue();
        bb.addGridded(ok);
        bb.addGridded(cancel);
        bb.addGlue();


        // Layout starts here.
        /*main.setLayout(gbl);
        opt.setLayout(gbl);
View Full Code Here

        builder.append(browsePs);
        builder.nextLine();
        builder.appendSeparator(Globals.lang("Database protection"));
        builder.nextLine();
        builder.append(protect,3);
        ButtonBarBuilder bb = new ButtonBarBuilder();
        bb.addGlue();
        bb.addGridded(ok);
        bb.addGridded(cancel);
        bb.addGlue();

        getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
        getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
        pack();

        AbstractAction closeAction = new AbstractAction() {
          public void actionPerformed(ActionEvent e) {
            dispose();
View Full Code Here

     

      // progressArea.setPreferredSize(new Dimension(300, 300));

      ButtonBarBuilder bb = new ButtonBarBuilder();
      bb.addGlue();
      bb.addGridded(okButton);
      bb.addRelatedGap();
      bb.addGridded(cancelButton);
      bb.addGlue();
      JPanel bbPanel = bb.getPanel();
      bbPanel.setBorder(BorderFactory.createEmptyBorder(0, 3, 3, 3));
      getContentPane().add(panel, BorderLayout.CENTER);
      getContentPane().add(bbPanel, BorderLayout.SOUTH);

      pack();
View Full Code Here

        bs.addGridded(edit);
        bs.addRelatedGap();
        bs.addGridded(toDefaults);
        upper.add(bs.getPanel(), BorderLayout.EAST);

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

        // Key bindings:
        ActionMap am = upper.getActionMap();
        InputMap im = upper.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
        im.put(Globals.prefs.getKey("Close dialog"), "close");
        am.put("close", cancelAction);
        am = bb.getPanel().getActionMap();
        im = bb.getPanel().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
        im.put(Globals.prefs.getKey("Close dialog"), "close");
        am.put("close", cancelAction);

        if (frame != null)
            setLocationRelativeTo(frame);
View Full Code Here

  cancel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
      .put(baseFrame_.prefs.getKey("Close dialog"), "close");
  cancel.getActionMap().put("close", cancelAction);

  //buttons.add(ok);
    ButtonBarBuilder bb = new ButtonBarBuilder(buttons);
    //buttons.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
    bb.addGlue();
    bb.addGridded(cancel);
    bb.addGlue();

    getContentPane().add(buttons, BorderLayout.SOUTH);
  GridBagLayout gbl = new GridBagLayout();
  pan.setLayout(gbl);
  GridBagConstraints con = new GridBagConstraints();
View Full Code Here

    okButton.setText( Globals.lang( "Accept" ) ) ;
    okButton.addActionListener( this ) ;
    cancelButton.setText( Globals.lang( "Cancel" ) ) ;
    cancelButton.addActionListener( this ) ;

    ButtonBarBuilder bb = new ButtonBarBuilder(buttons);
    buttons.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));
    bb.addGlue();
    bb.addGridded(okButton);
    bb.addGridded(cancelButton);
    bb.addGlue();

  }
View Full Code Here

        // add the panel to the CENTER of your dialog:
        getContentPane().add(builder.getPanel(), BorderLayout.CENTER);

        // add buttons are added in a similar way:
        ButtonBarBuilder bb = new ButtonBarBuilder();
        bb.addGlue();
        bb.addGridded(btnConnect);
        bb.addGridded(btnCancel);
        bb.addGlue();

        // add the buttons to the SOUTH of your dialog:
        getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
        pack();

        ActionListener connectAction = new ActionListener() {
            public void actionPerformed(ActionEvent e) {
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.