Examples of BoxLayout


Examples of javax.swing.BoxLayout

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

Examples of javax.swing.BoxLayout

        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

Examples of javax.swing.BoxLayout

    }


    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

Examples of javax.swing.BoxLayout

    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

Examples of javax.swing.BoxLayout

        gradlePluginLord.addSettingsObserver( this, true );
    }

    private void setupUI() {
        mainPanel = new JPanel();
        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));

        mainPanel.add(createCurrentDirectoryPanel());
        mainPanel.add(Box.createVerticalStrut(10));
        mainPanel.add(createLogLevelPanel());
        mainPanel.add(Box.createVerticalStrut(10));
View Full Code Here

Examples of javax.swing.BoxLayout

                }
            }
        });

        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Current Directory")));
        panel.add(createSideBySideComponent(currentDirectoryTextField, browseButton));

        return panel;
View Full Code Here

Examples of javax.swing.BoxLayout

    * this creates a panel where the right component is its preferred size. This is useful for putting on
    * a button on the right and a text field on the left.
    */
    public static JComponent createSideBySideComponent(Component leftComponent, Component rightComponent) {
        JPanel xLayoutPanel = new JPanel();
        xLayoutPanel.setLayout(new BoxLayout(xLayoutPanel, BoxLayout.X_AXIS));

        Dimension preferredSize = leftComponent.getPreferredSize();
        leftComponent.setMaximumSize(new Dimension(Integer.MAX_VALUE, preferredSize.height));

        xLayoutPanel.add(leftComponent);
View Full Code Here

Examples of javax.swing.BoxLayout

    /**
     * Creates a panel that has a combo box to select a log level
    */
    private Component createLogLevelPanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        logLevelComboBox = new JComboBox(getLogLevelWrappers());

        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Log Level")));
        panel.add(Utility.addLeftJustifiedComponent(logLevelComboBox));
View Full Code Here

Examples of javax.swing.BoxLayout

     * Creates a panel with stack trace level radio buttons that allow you to specify how much info is given when an
     * error occurs.
    */
    private Component createStackTracePanel() {
        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));

        panel.setBorder(BorderFactory.createTitledBorder("Stack Trace Output"));

        showNoStackTraceRadioButton = new JRadioButton("Exceptions Only");
        showStackTrackRadioButton = new JRadioButton("Standard Stack Trace (-" + DefaultCommandLineConverter.STACKTRACE + ")")//add the command line character to the end (so if an error message says use a stack trace level, you can easily translate)
View Full Code Here

Examples of javax.swing.BoxLayout

        return StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
    }

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

        onlyShowOutputOnErrorCheckBox = new JCheckBox("Only Show Output When Errors Occur");

        onlyShowOutputOnErrorCheckBox.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.