Package javax.swing

Examples of javax.swing.BoxLayout


     * another BorderLayout. This is to make each of them as large as they can be and divide the space evenly between
     * them.
     */
    private Component createCenterPanel() {
        JPanel outterPanel = new JPanel();
        outterPanel.setLayout(new BoxLayout(outterPanel, BoxLayout.Y_AXIS));

        JPanel projectPanel = new JPanel(new BorderLayout());
        JPanel taskPanel = new JPanel(new BorderLayout());

        projectPanel.add(createProjectPanel(), BorderLayout.CENTER);
View Full Code Here


    else
      throw new GUIException("Unknown layout ["+type+"]");
  }

  private LayoutManager constructBoxLayout(Widget widget, Element layoutNode) {
    return new BoxLayout((Container) widget.getWidget(), layoutNode.getAttribute("type").equals("vbox") ? BoxLayout.Y_AXIS : BoxLayout.X_AXIS);
  }
View Full Code Here

        return gradleOutputTextPanel;
    }

    private Component createInfoPanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        panel.add(createStatusPanel());
        panel.add(createProgressPanel());

        return panel;
View Full Code Here

        return progressPanel;
    }

    private Component createStatusPanel() {
        statusPanel = new JPanel();
        statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.X_AXIS));
        statusLabel = new JLabel();
       executeAgainButton = Utility.createButton( OutputPanel.class, "/org/gradle/gradleplugin/userinterface/swing/generic/tabs/execute.png", "Execute Again", new AbstractAction()
        {
           public void actionPerformed( ActionEvent e )
           {
View Full Code Here

        setupPopupMenu();
    }

    private Component createTopPanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        refreshButton = Utility.createButton(getClass(), "refresh.png", "Refreshes the task tree", new AbstractAction("Refresh") {
            public void actionPerformed(ActionEvent e) {
                refresh();
            }
View Full Code Here

    */
    private void showTextInViewport(String text) {
        treeScrollPane.getViewport().removeAll();

        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
        panel.add(Box.createHorizontalGlue());
        panel.add(new JLabel(text));
        panel.add(Box.createHorizontalGlue());

        treeScrollPane.getViewport().add(panel);
View Full Code Here

public class JCascade extends JPanel {
  private ArrayList panels = null;

  public JCascade() {
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    setBorder(BorderFactory.createLoweredBevelBorder());
    panels = new ArrayList();
  }
View Full Code Here

        return mainPanel;
    }

    private Component createCommandLinePanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        commandLineField = new JTextField();

        //make Enter execute the command line.
        commandLineField.registerKeyboardAction(new ExecuteAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);

        //we'll put 'gradle' in from the command line to make it more obvious that its not needed.
        JPanel commandLinePanel = new JPanel();
        commandLinePanel.setLayout(new BoxLayout(commandLinePanel, BoxLayout.X_AXIS));
        commandLinePanel.add(new JLabel("gradle "));
        commandLinePanel.add(commandLineField);

        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Command Line:")));
        panel.add(Box.createVerticalStrut(5));
View Full Code Here

    }


    private Component createButtonPanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        executeButton = new JButton(new ExecuteAction());

        addToFavoritesButton = new JButton(new AbstractAction("Add To Favorites") {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

    pagesByName = new HashMap();
    componentPanel = new JPanel();
    componentPanel.setLayout(layout);

    JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS));
    buttonPanel.add(Box.createGlue());
    backButton = new JButton(InternationalizationManager.getString("xmlgui.wizard.back"));
    backButton.setActionCommand("wizard.back");
    backButton.setEnabled(false);
    backButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        back();
      }
    });
    buttonPanel.add(backButton);
    buttonPanel.add(Box.createRigidArea(new Dimension(5, 0)));

    nextButton = new JButton(InternationalizationManager.getString("xmlgui.wizard.next"));
    nextButton.setActionCommand("wizard.next");
    nextButton.setEnabled(false);
    nextButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        next();
      }
    });
    buttonPanel.add(nextButton);
    buttonPanel.add(Box.createRigidArea(new Dimension(15, 0)));
    cancelButton = new JButton(InternationalizationManager.getString("xmlgui.wizard.cancel"));
    cancelButton.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent evt) {
        fireCancel();
      }
    });
    buttonPanel.add(cancelButton);
    JPanel lowerPanel = new JPanel();
    lowerPanel.setLayout(new BoxLayout(lowerPanel, BoxLayout.Y_AXIS));
    lowerPanel.add(new JHorizontalSeparator(10));
    lowerPanel.add(Box.createVerticalStrut(5));
    lowerPanel.add(buttonPanel);
    lowerPanel.add(Box.createVerticalStrut(10));
View Full Code Here

TOP

Related Classes of javax.swing.BoxLayout

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.