Package com.jgoodies.forms.layout

Examples of com.jgoodies.forms.layout.FormLayout


    content.setBorder(Borders.DLU4_BORDER);

    CellConstraints cc = new CellConstraints();

    content
        .setLayout(new FormLayout("5dlu, 15dlu, fill:pref:grow, 3dlu, 100dlu",
            "pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, 3dlu,pref, fill:3dlu:grow ,pref, 3dlu,pref"));

    content.add(new JLabel(mLocalizer.msg("select", "Select Calendar")), cc.xyw(2, 3, 2));
    mCalendarChooser = new JTextField();
    content.add(mCalendarChooser, cc.xy(5, 3));
View Full Code Here


  }

  public TimePeriodChooser(int from, int to, int alignment) {
    FlowLayout layout = new FlowLayout(FlowLayout.LEFT, 0, 0);
   
    JPanel content = new JPanel(new FormLayout("pref, 3dlu, pref, 3dlu, pref, 3dlu, pref", "pref"));
   
    mTimeFromSp = new JSpinner(new SpinnerDateModel());
    JSpinner.DateEditor dateEditor = new JSpinner.DateEditor(mTimeFromSp, Settings.getTimePattern());
    mTimeFromSp.setEditor(dateEditor);
    CaretPositionCorrector.createCorrector(dateEditor.getTextField(), new char[] {':'}, -1);
View Full Code Here

        calculateSize();
      }
    });
   
    CellConstraints cc = new CellConstraints();
    FormLayout layout = new FormLayout("pref,3dlu:grow,pref","pref");
    layout.setColumnGroups(new int[][] {{1,3}});
   
    JPanel p3 = new JPanel(layout);
   
    mSelectAllBt = new JButton(mLocalizer.msg("addAll", "Select all items"));
    mSelectAllBt.setToolTipText(mLocalizer.msg("tooltip.all", "Select all items in the list."));
View Full Code Here

    super(MainFrame.getInstance());
    mInstance = this;

    UiUtilities.registerForClosing(this);

    this.getContentPane().setLayout(new FormLayout("fill:pref:grow", "pref, 3dlu, fill:min:grow, 3dlu, pref, 3dlu, pref"));
    ((JPanel) this.getContentPane()).setBorder(BorderFactory.createEmptyBorder(
        0, 6, 2, 6));

    // Initialize the buttonPanel and fill the vectors with the actions.
    final DefaultToolBarModel toolbarModel = DefaultToolBarModel.getInstance();
    Action[] currentActions = toolbarModel.getActions();

    ArrayList<Action> notSelectedActionsList = new ArrayList<Action>(Arrays.asList(toolbarModel
        .getAvailableActions()));

    for (Action a : currentActions) {
      mCurrentActions.addElement(a);
    }

    for (Action a : currentActions) {
      if (notSelectedActionsList.contains(a)) {
        notSelectedActionsList.remove(a);
      }
    }

    Action[] availableActions = new Action[notSelectedActionsList.size()];
    notSelectedActionsList.toArray(availableActions);

    for (Action a : availableActions) {
      mAvailableActions.addElement(a);
    }

    mAvailableActions.insertElementAt(toolbarModel.getSeparatorAction(), 0);
    mAvailableActions.insertElementAt(toolbarModel.getGlueAction(), 1);
    mAvailableActions.insertElementAt(toolbarModel.getSpaceAction(), 2);

    // Initialize the Panel with the available Buttons
    mButtonPanel = new JPanel();
    mButtonPanel.setLayout(new GridLayout(0, 4, 2, 2));
    mButtonPanel.setAlignmentX(Component.LEFT_ALIGNMENT);


    // Make the buttonPanel scrollable
    JScrollPane pane = new JScrollPane(mButtonPanel);
    pane.setAlignmentX(Component.LEFT_ALIGNMENT);
    pane.getVerticalScrollBar().setUnitIncrement(73);
    pane.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
    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), });
View Full Code Here

    }

    private void initUI() {
      String toolbarLocation = getToolBar().getToolbarLocation();
      if(BorderLayout.NORTH.equals(toolbarLocation)) {
        setLayout(new FormLayout("0dlu:grow,default,0dlu:grow","fill:default:grow"));
      } else {
        setLayout(new FormLayout("default:grow","0dlu:grow,default,0dlu:grow"));
      }

      setOpaque(false);
      setBorder(BorderFactory.createEmptyBorder());
      setAlignmentX(Component.CENTER_ALIGNMENT);
View Full Code Here

  /**
   * Creates the settings panel for this tab.
   */
  public JPanel createSettingsPanel() {

    mSettingsPn = new JPanel(new FormLayout("5dlu, pref, fill:pref:grow", "pref, 5dlu, fill:pref:grow, pref"));
    mSettingsPn.setBorder(Borders.DIALOG_BORDER);
   
    CellConstraints cc = new CellConstraints();

    mSettingsPn.add(DefaultComponentFactory.getInstance().createSeparator(
View Full Code Here

    private JPanel mListPn;

    public TimesListPanel(int[] times) {
      mRows = new ArrayList<Row>();
      setLayout(new FormLayout("right:pref, fill:pref:grow", "pref, 3dlu, pref"));

      CellConstraints cc = new CellConstraints();

      mListPn = new JPanel();
      mListPn.setLayout(new BoxLayout(mListPn, BoxLayout.Y_AXIS));
View Full Code Here

  private JLabel mInfoFontLabel;

  private JLabel mTitleFontLabel;

  public JPanel createSettingsPanel() {
    PanelBuilder mainPanel = new PanelBuilder(new FormLayout("5dlu, 10dlu, pref, 3dlu, pref, fill:3dlu:grow",
        "pref, 5dlu, pref, 10dlu, pref, 5dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu, pref, 3dlu, pref"));
    mainPanel.setBorder(Borders.DIALOG_BORDER);
   
    CellConstraints cc = new CellConstraints();
   
View Full Code Here

    setCursor(new Cursor(Cursor.WAIT_CURSOR));

    JPanel panel = (JPanel) getContentPane();
    panel.setBorder(BorderFactory.createLineBorder(Color.BLACK));

    panel.setLayout(new FormLayout("3dlu, pref, 3dlu", "3dlu, pref, 3dlu, pref, 3dlu"));
    CellConstraints cc = new CellConstraints();

    JLabel header = new JLabel(mLocalizer.msg("waitingHeader", "Listing the not subscribed channels"));
    header.setFont(header.getFont().deriveFont(Font.BOLD));
View Full Code Here

    setCursor(new Cursor(Cursor.WAIT_CURSOR));
   
    JPanel panel = (JPanel) getContentPane();
    panel.setBorder(BorderFactory.createLineBorder(Color.BLACK));

    panel.setLayout(new FormLayout("3dlu, pref, 3dlu", "3dlu, pref, 3dlu, pref, 3dlu"));
    CellConstraints cc = new CellConstraints();

    Localizer localizer = Localizer.getLocalizerFor(CopyWaitingDlg.class);
   
    String msg = localizer.msg("waitingHeader", "Importing TV data (this can take some minutes).");
View Full Code Here

TOP

Related Classes of com.jgoodies.forms.layout.FormLayout

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.