Package com.jgoodies.forms.builder

Examples of com.jgoodies.forms.builder.ButtonStackBuilder


        builder.add(getButtonStackPanel(), constraints.xy(3, 1));
        return builder.getPanel();
    }

    private JPanel getButtonStackPanel() {
        ButtonStackBuilder buttonStack = new ButtonStackBuilder();
        buttonStack.addButtons(new JButton[] { addButton, editButton, removeButton });
        return buttonStack.getPanel();
    }
View Full Code Here


            public void actionPerformed(ActionEvent e) {
                testsPanel.showTestTree(testCreator.getTest("AllTests"));
                testSuitesPanel.showTestTree(testCreator.getAllSuites());
            }
        });
        ButtonStackBuilder builder = new ButtonStackBuilder();
        ArrayList<JButton> buttons = new ArrayList<JButton>();
        buttons.add(btnAdd);
        buttons.add(btnRemove);
        buttons.add(btnUp);
        buttons.add(btnDown);
        buttons.add(btnRefresh);
        JButton[] aButtons = new JButton[buttons.size()];
        buttons.toArray(aButtons);
        builder.addButtons(aButtons);
        return builder.getPanel();

    }
View Full Code Here

  private void initComponents() {
    list.addListSelectionListener(editAction);
    list.addListSelectionListener(removeAction);
    list.setVisibleRowCount(8)
   
    ButtonStackBuilder buttonBuilder = new ButtonStackBuilder();
    buttonBuilder.addGridded(new JButton(addAction));
    buttonBuilder.addRelatedGap();
    buttonBuilder.addGridded(new JButton(editAction));
    buttonBuilder.addGlue();
    buttonBuilder.addGridded(new JButton(removeAction));

    FormLayout formLayout = new FormLayout("pref:grow, 4dlu, pref", "fill:pref:grow");
    PanelBuilder panelBuilder = new PanelBuilder(this, formLayout);
    panelBuilder.add(new JScrollPane(list), "1,1");
    panelBuilder.add(buttonBuilder.getPanel(), "3,1");
   
    getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("INSERT"), "add");
    getActionMap().put("add", new AbstractAction() {
      public void actionPerformed(ActionEvent e) {
        addAction.actionPerformed(e);
View Full Code Here

    fileChooser.addChoosableFileFilter(jxlFilter);
    fileChooser.setFileFilter(jxlFilter);
    fileChooser.setAcceptAllFileFilterUsed(false);
    fileChooser.setFileHidingEnabled(false);*/

    ButtonStackBuilder buttonBuilder = new ButtonStackBuilder();
    buttonBuilder.addGridded(new JButton(new AddAction()));
    buttonBuilder.addRelatedGap();
    buttonBuilder.addGridded(new JButton(removeAction));
    buttonBuilder.addUnrelatedGap();
    buttonBuilder.addGridded(new JButton(moveUpAction));
    buttonBuilder.addRelatedGap();
    buttonBuilder.addGridded(new JButton(moveDownAction));
   
    FormLayout formLayout = new FormLayout("fill:150dlu:grow, 4dlu, pref", "fill:pref:grow");
    setLayout(formLayout);
    add(scrollPane, "1,1");
    add(buttonBuilder.getPanel(), "3,1");
  }
View Full Code Here

TOP

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

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.