Package javax.swing

Examples of javax.swing.BoxLayout


  }


  protected void initComponents() {
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
    setContentPane(mainPanel);

    OptionPanel dialogPanel = new OptionPanel(2);

    JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS));

    mainPanel.add(dialogPanel);
    mainPanel.add(buttonPanel);

    /**
 
View Full Code Here


  }


  protected void initComponents() {
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
    setContentPane(mainPanel);

    OptionPanel dialogPanel = new OptionPanel(2);

    JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS));

    mainPanel.add(dialogPanel);
    mainPanel.add(buttonPanel);

    /** Dialog panel **/
 
View Full Code Here

  }


  protected void initComponents() {
    JPanel mainPanel = new JPanel();
    mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
    setContentPane(mainPanel);

    OptionPanel dialogPanel = new OptionPanel(2);

    JPanel buttonPanel = new JPanel();
    buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.X_AXIS));

    mainPanel.add(dialogPanel);
    mainPanel.add(buttonPanel);

    /**
 
View Full Code Here

    }

    availableDefaultTargets.get(selectedIndex).setSelected(true);

    ScrollableJPanel buttonPanel = new ScrollableJPanel();
    buttonPanel.setLayout(new BoxLayout(buttonPanel,BoxLayout.Y_AXIS));
    buttonPanel.setOpaque(false);

    for(InternalRadioButton<?> button : availableDefaultTargets) {
      buttonPanel.add(button);
    }
View Full Code Here

    buttonPanel.add(mCancelBtn);

    contentPane.add(buttonPanel, BorderLayout.SOUTH);

    JPanel northPanel = new JPanel();
    northPanel.setLayout(new BoxLayout(northPanel, BoxLayout.Y_AXIS));
   
    // first show reason of update
    if (reason != null && !reason.isEmpty()) {
      String question = mLocalizer.msg("question", "Do you want to update now?");
      JLabel lbReason = new JLabel("<html>" + reason + "<br>" + question + "</html>");
      JPanel panelReason = new JPanel(new BorderLayout(7, 0));
      panelReason.add(lbReason, BorderLayout.WEST);
      northPanel.add(panelReason);
      northPanel.add(new JLabel(" "));
    }

    // then time selection
    JPanel panel1 = new JPanel(new BorderLayout(7, 0));
    msg = mLocalizer.msg("period", "Update program for");
    panel1.add(new JLabel(msg), BorderLayout.WEST);
    mComboBox = new JComboBox(PeriodItem.getPeriodItems());
    panel1.add(mComboBox, BorderLayout.EAST);
    northPanel.add(panel1);

    // channel selection
    TvDataServiceProxy[] serviceArr = getActiveDataServices();
    if (serviceArr.length > 1) {
      panel1.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
      JPanel dataServicePanel = new JPanel();
      dataServicePanel.setLayout(new BoxLayout(dataServicePanel,
          BoxLayout.Y_AXIS));
      dataServicePanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
      mDataServiceCbArr = new TvDataServiceCheckBox[serviceArr.length];

      String[] checkedServiceNames = Settings.propDataServicesForUpdate
View Full Code Here

    addMouseAdapterForHandCursorToComponent(pane);

    // Initialize the Panel for selecting toolBars visibility
    final JPanel tVisPanel = new JPanel();
    tVisPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
    tVisPanel.setLayout(new BoxLayout(tVisPanel, BoxLayout.X_AXIS));
    tVisPanel.setBorder(new CompoundBorder(BorderFactory.createMatteBorder(0,
        0, 1, 0, Color.GRAY), BorderFactory.createEmptyBorder(10, 5, 9, 5)));

    mShowToolbarCb = new JCheckBox(mLocalizer
        .msg("showToolbar", "Show toolbar"));
    mShowToolbarCb.setSelected(Settings.propIsToolbarVisible.getBoolean());

    tVisPanel.add(mShowToolbarCb);
    tVisPanel.add(Box.createHorizontalGlue());

    mShowSearchFieldCb = new JCheckBox(mLocalizer.msg("showSearchField",
        "Show Search field"));
    mShowSearchFieldCb.setSelected(Settings.propIsSearchFieldVisible
        .getBoolean());

    tVisPanel.add(mShowSearchFieldCb);

    // Initialize the panel for the ToolBar settings
    JPanel tSetPanel = new JPanel(new FormLayout("default,5dlu,default,0dlu:grow,default,5dlu,default,5dlu,default","default"));
    tSetPanel.setAlignmentX(Component.LEFT_ALIGNMENT);

    mLocationCB = new JComboBox(new String[] { mLocalizer.msg("top", "top"),
        Localizer.getLocalization(Localizer.I18N_LEFT), });

    if ("west".equals(Settings.propToolbarLocation.getString())) {
      mLocationCB.setSelectedIndex(1);
      mWest = true;
    } else {
      mWest = false;
    }

    mShowCB = new JComboBox(new String[] {
        ContextMenu.mLocalizer.msg("text.and.icon", "text and icon"),
        ContextMenu.mLocalizer.msg("text", "text"),
        ContextMenu.mLocalizer.msg("icon", "icon") });

    String style = Settings.propToolbarButtonStyle.getString();
    if ("text".equals(style)) {
      mShowCB.setSelectedIndex(1);
    } else if ("icon".equals(style)) {
      mShowCB.setSelectedIndex(2);
    }
    mShowCB.setAlignmentX(Component.CENTER_ALIGNMENT);
    mShowCB.setMaximumSize(mShowCB.getPreferredSize());

    mUseBigIconsCb = new JCheckBox(ContextMenu.mLocalizer.msg("bigIcons",
        "Use big icons"));
    mUseBigIconsCb.setSelected(Settings.propToolbarUseBigIcons.getBoolean());

    CellConstraints cc = new CellConstraints();

    tSetPanel.add(new JLabel(mLocalizer.msg("location", "Location")),cc.xy(1,1));
    tSetPanel.add(mLocationCB,cc.xy(3,1));
    tSetPanel.add(new JLabel(mLocalizer.msg("icons", "Icons")),cc.xy(5,1));
    tSetPanel.add(mShowCB,cc.xy(7,1));
    tSetPanel.add(mUseBigIconsCb,cc.xy(9,1));

    tSetPanel.setBorder(new CompoundBorder(BorderFactory.createMatteBorder(1,
        0, 1, 0, Color.GRAY), BorderFactory.createEmptyBorder(10, 5, 9, 5)));

    // The panel for the OK button
    JPanel okButtonPanel = new JPanel();
    okButtonPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
    okButtonPanel.setLayout(new BoxLayout(okButtonPanel, BoxLayout.X_AXIS));
    okButtonPanel.setBorder(BorderFactory.createEmptyBorder(10, 5, 5, 5));

    JButton ok = new JButton("OK");
    ok.addActionListener(this);
View Full Code Here

  }

  public void setLayout(LayoutManager manager) {
    if(mLocation != null) {
      if(mLocation.equals(BorderLayout.NORTH)) {
        super.setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
      } else {
        super.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS));
      }
    }
  }
View Full Code Here

      super();
      setLayout(new BorderLayout());
      setBorder(Borders.DIALOG_BORDER);

      JPanel content = new JPanel();
      content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));
      mDatePanel = new DateRangePanel();
      mTimePanel = new TimeRangePanel();
      mChannelPanel = new ChannelSelectionPanel(parentFrame, new Channel[]{});
      mFilterPanel = new FilterSelectionPanel();
View Full Code Here

   
    JPanel shapePanel = new JPanel();
    shapePanel.add(gateShape.getJLabel());
    shapePanel.add(gateShape.getJComboBox());
   
    setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
    add(Box.createGlue());
    add(shapePanel);
    add(localePanel);
    add(replAccents);
    add(Box.createGlue());
View Full Code Here

      position = BorderLayout.NORTH;
    } else {
      throw new IllegalArgumentException();
    }
    this.remove(subpanel);
    subpanel.setLayout(new BoxLayout(subpanel, axis));
    this.add(subpanel, position);
    this.orientation = value;
  }
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.