Package javax.swing

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


                }
            }
        });

        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

    * 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

    /**
     * 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

     * 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

        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

        else {
           setCustomGradleExecutor(new File(customExecutorPath));
        }

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

        panel.add(Utility.addLeftJustifiedComponent(useCustomGradleExecutorCheckBox));
        JComponent sideBySideComponent = createSideBySideComponent(customGradleExecutorField, browseForCustomGradleExecutorButton);
        sideBySideComponent.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); //indent it
        panel.add(sideBySideComponent);
View Full Code Here

        panel.add(widget.getWidget(), constraints.rc(i * 2 + 1, 3, "rtb"));
      }
    }
    if (buttons.size() > 0) {
      JPanel buttonLayout = new JPanel();
      buttonLayout.setLayout(new BoxLayout(buttonLayout, BoxLayout.X_AXIS));
      buttonLayout.add(Box.createHorizontalGlue());
      for (int i = 0; i < buttons.size(); i++) {
        buttonLayout.add(Box.createHorizontalStrut(COMPONENT_SPACING));
        buttonLayout.add(((Button) buttons.get(i)).getWidget());
      }
View Full Code Here

    final Icon landscapeIcon = guiContext.getIconTheme().getLargeIcon(getLocale(), "pagesetup.landscape");
    final JLabel landscapeLabel = new JLabel(messages.getString("PageSetupDialog.Landscape"), landscapeIcon, SwingConstants.LEFT);
    landscapeLabel.setLabelFor(landscapeModeBox);

    final JPanel contentPane = new JPanel();
    contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.X_AXIS));
    contentPane.setBorder(BorderFactory.createCompoundBorder
        (BorderFactory.createTitledBorder(messages.getString("PageSetupDialog.Orientation")),
            BorderFactory.createEmptyBorder(5, 5, 5, 5)));
    contentPane.add(portraitModeBox);
    contentPane.add(portraitLabel);
View Full Code Here

      super(parent, title, true);

      this.isPassword = isPassword;

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

      for (int i = 0; i < content.length; i++)
      {
        if ((content[i] == null) || (content[i] == ""))
          continue;
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.