Example usage for com.jgoodies.forms.layout CellConstraints FILL

List of usage examples for com.jgoodies.forms.layout CellConstraints FILL

Introduction

In this page you can find the example usage for com.jgoodies.forms.layout CellConstraints FILL.

Prototype

Alignment FILL

To view the source code for com.jgoodies.forms.layout CellConstraints FILL.

Click Source Link

Document

Fill the cell either horizontally or vertically.

Usage

From source file:com.salas.bb.dialogs.ReadingListUpdateConfirmationDialog.java

License:Open Source License

/**
 * Creates body part./*from ww  w. j  a v  a2s  . com*/
 *
 * @return body part.
 */
private Component buildBody() {
    BBFormBuilder builder = new BBFormBuilder("p, 4dlu, 100dlu, 0, p");

    JComponent wording = ComponentsFactory
            .createWrappedMultilineLabel(Strings.message("readinglist.updates.wording"));

    builder.append(wording, 5);
    builder.appendUnrelatedComponentsGapRow(2);

    StandardGuide guide = list.getParentGuide();
    if (guide != null) {
        builder.append(Strings.message("readinglist.updates.guide"), new JLabel(guide.getTitle()), 3);
    }
    builder.append(Strings.message("readinglist.updates.readinglist"), new JLabel(list.getTitle()), 3);
    builder.appendUnrelatedComponentsGapRow(2);

    if (addFeeds.size() > 0) {
        builder.append(Strings.message("readinglist.updates.feeds.should.be.added"), 3,
                CheckBoxList.createAllNonePanel(lstAddFeeds), 1);
        builder.appendRow("50dlu:grow");
        builder.append(new JScrollPane(lstAddFeeds), 5, CellConstraints.FILL, CellConstraints.FILL);

        if (removeFeeds.size() > 0)
            builder.appendUnrelatedComponentsGapRow(2);
    }

    if (removeFeeds.size() > 0) {
        builder.append(Strings.message("readinglist.updates.feeds.should.be.removed"), 3,
                CheckBoxList.createAllNonePanel(lstRemoveFeeds), 1);
        builder.appendRow("50dlu:grow");
        builder.append(new JScrollPane(lstRemoveFeeds), 5, CellConstraints.FILL, CellConstraints.FILL);
    }

    return builder.getPanel();
}

From source file:com.salas.bb.dialogs.SendFeedbackDialog.java

License:Open Source License

private Component createMainPanel() {
    JScrollPane pane = new JScrollPane(taMessage);
    pane.setPreferredSize(new Dimension(500, 20));

    BBFormBuilder builder = new BBFormBuilder("p, 2dlu, max(p;100dlu), 4dlu, p, 2dlu, max(p;150dlu), 0:grow");

    builder.append(wording, 8);/*from   www  .  j a v a  2s .  c o m*/
    builder.appendUnrelatedComponentsGapRow(2);
    builder.append(Strings.message("sendfeedback.forum"), cbForum, btnReload);
    builder.nextLine();
    builder.append(Strings.message("sendfeedback.name"), tfName);
    builder.append(Strings.message("sendfeedback.email"), tfEmail, 2);
    builder.append(Strings.message("sendfeedback.subject"), tfSubject, 6);
    builder.append(Strings.message("sendfeedback.message"), 1).setLabelFor(taMessage);
    builder.appendRelatedComponentsGapRow(2);
    builder.appendRow("pref:grow");
    builder.append(pane, 8, CellConstraints.FILL, CellConstraints.FILL);
    builder.append(Strings.message("sendfeedback.notice"), 7);

    return builder.getPanel();
}

From source file:com.salas.bb.dialogs.ShowDuplicateFeeds.java

License:Open Source License

/**
 * Creates body part./*from   www .  ja v  a  2 s . co m*/
 *
 * @return body part.
 */
private Component buildBody() {
    BBFormBuilder builder = new BBFormBuilder("p, 4dlu, max(p;150dlu):grow");

    JComponent wording = ComponentsFactory.createWrappedMultilineLabel(
            MessageFormat.format(Strings.message("duplicate.feeds.wording"), new Object[] { feedTitle }));

    builder.append(Strings.message("duplicate.feeds.and.guides"), 3);
    builder.appendRow("50dlu:grow");
    builder.append(new JScrollPane(lstGuides), 3, CellConstraints.FILL, CellConstraints.FILL);
    builder.appendUnrelatedComponentsGapRow(2);

    builder.append(wording, 3);

    return builder.getPanel();
}

From source file:com.salas.bb.dialogs.SmartFeedDialog.java

License:Open Source License

/**
 * Creates basic configuration tab available both to free/basic and advanced users.
 *
 * @return tab./* w ww  . ja  v a  2s  .c om*/
 */
public Component createBasicTab() {
    BBFormBuilder b = new BBFormBuilder(LABEL_COL_WIDTH + "dlu, 4dlu, 120dlu, 75dlu:grow");
    b.setDefaultDialogBorder();

    b.append(Strings.message("create.smartfeed.source"), cbService);
    b.setLeadingColumnOffset(2);
    b.appendRelatedComponentsGapRow(2);
    b.appendRow("40dlu");
    b.append(lbDescription, 2, CellConstraints.FILL, CellConstraints.TOP);

    b.setLeadingColumnOffset(0);
    b.appendUnrelatedComponentsGapRow(2);
    b.append(createTitlePanel(), 4);

    b.appendUnrelatedComponentsGapRow(2);
    b.append(pnlOptions, 4, CellConstraints.FILL, CellConstraints.FILL);

    return b.getPanel();
}

From source file:com.salas.bb.imageblocker.ImageBlockerDialog.java

License:Open Source License

/**
 * Builds content component.//  w w w.  j  a  v  a2 s.  c  o  m
 *
 * @return main content component.
 */
protected JComponent buildMainPanel() {
    // Configure patterns section
    taPatterns = new JTextArea();
    taPatterns.setLineWrap(false);
    taPatterns.setText(getCurrentPatternsText());

    BBFormBuilder builder = new BBFormBuilder("min:grow, 4dlu, p");

    // Configure offer section
    if (url != null) {
        tfURL = new JTextField(url.toString());
        tfURL.setCaretPosition(0);

        builder.append(new JLabel(Strings.message("imageblocker.dialog.link")), 3);
        builder.append(tfURL);
        builder.append(new JButton(new BlockAction()));
        builder.appendRelatedComponentsGapRow(2);
    }

    builder.appendRow("min:grow");
    builder.append(new JScrollPane(taPatterns), 3, CellConstraints.FILL, CellConstraints.FILL);

    builder.appendRelatedComponentsGapRow(2);
    builder.appendRow("min");
    builder.append(
            ComponentsFactory.createWrappedMultilineLabel(Strings.message("imageblocker.dialog.disclaimer")));

    return builder.getPanel();
}

From source file:com.salas.bb.installation.wizard.LicensePage.java

License:Open Source License

/**
 * Builds the panel.//from   ww w  . j a  v a2s. c  o m
 */
public void build(JComponent buttonBar) {
    buttonBar.setBorder(Borders.createEmptyBorder("6dlu, 6dlu, 6dlu, 6dlu"));

    BBFormBuilder builder = new BBFormBuilder("15dlu, left:min:grow, 15dlu", this);

    builder.append(buildHeader(), 3);

    builder.setLeadingColumnOffset(1);
    builder.appendRow("15dlu");
    builder.appendRow("min:grow");
    builder.nextLine(2);
    builder.append(buildLicensePanel(), 1, CellConstraints.FILL, CellConstraints.FILL);
    builder.append(rbAccept);
    builder.append(rbDecline);
    builder.setLeadingColumnOffset(0);
    builder.append(buttonBar, 3);
}

From source file:com.salas.bb.installation.wizard.StartingPointsPage.java

License:Open Source License

private Component buildDataPage() {
    BBFormBuilder builder = new BBFormBuilder("pref:grow");

    builder.appendRow("100px:grow");
    builder.append(picker, 1, CellConstraints.FILL, CellConstraints.FILL);

    return builder.getPanel();
}

From source file:com.salas.bb.installation.wizard.WelcomePage.java

License:Open Source License

/**
 * Builds the panel using the specified button bar.
 * /*from www .ja  v a  2s  . com*/
 * @param buttonBar button bar to use.
 */
public void build(JComponent buttonBar) {
    initComponents();

    JScrollPane sp = new JScrollPane(welcomeText);

    BBFormBuilder builder = new BBFormBuilder("0, pref:grow, 0", this);
    builder.setDefaultDialogBorder();

    builder.append(logo, 3, CellConstraints.CENTER, CellConstraints.DEFAULT);
    builder.appendUnrelatedComponentsGapRow(2);
    builder.appendRow("50dlu:grow");
    builder.append(sp, 3, CellConstraints.FILL, CellConstraints.FILL);
    builder.appendUnrelatedComponentsGapRow(2);
    builder.append(buttonBar, 3, CellConstraints.RIGHT, CellConstraints.DEFAULT);
}

From source file:com.salas.bb.plugins.gui.ManagerDialog.java

License:Open Source License

/**
 * Returns main panel.//from  ww  w .j a  va2s  . com
 *
 * @return panel.
 */
private Component buildMainPanel() {
    tblPackages = new PluginsTable();
    tblPackages.setInstalledPackages(Manager.getInstalledPackages());
    tblPackages.setSelectedPackages(Manager.getEnabledPackages());
    tblPackages.addListSelectionListener(new PluginTableListener());

    taDescription = new JTextArea();
    Color bg = taDescription.getBackground();
    taDescription.setEditable(false);
    taDescription.setBackground(bg);
    UifUtilities.smallerFont(taDescription);

    BBFormBuilder b = new BBFormBuilder("p:grow");
    b.setDefaultDialogBorder();

    b.append(Strings.message("plugin.manager.plugins"), 1);
    b.appendRelatedComponentsGapRow(2);
    b.appendRow("100dlu:grow");
    b.append(new JScrollPane(tblPackages), 1, CellConstraints.FILL, CellConstraints.FILL);

    b.appendUnrelatedComponentsGapRow(2);
    b.append(Strings.message("plugin.manager.details"), 1);
    b.appendRelatedComponentsGapRow(2);
    b.appendRow("50dlu");
    b.append(new JScrollPane(taDescription), 1, CellConstraints.FILL, CellConstraints.FILL);

    JTextArea lbNote = ComponentsFactory.createWrappedMultilineLabel(Strings.message("plugin.manager.warning"));
    UifUtilities.smallerFont(lbNote);
    b.append(lbNote);
    b.appendRelatedComponentsGapRow();

    return b.getPanel();
}

From source file:com.salas.bb.remixfeeds.editor.AbstractPostEditor.java

License:Open Source License

/**
 * Creates main content panel.//  www .j  a v  a  2  s  .c om
 *
 * @return main panel.
 */
protected Component buildMainPanel() {
    Component controlPanel = buildControlPanel();

    BBFormBuilder builder = new BBFormBuilder("max(p;150dlu):grow, 0");
    builder.setDefaultDialogBorder();

    builder.append(tfTitle, 2);
    builder.appendUnrelatedComponentsGapRow(2);

    builder.append(controlPanel, 2);
    builder.appendRelatedComponentsGapRow(2);
    builder.appendRow("50dlu:grow");
    builder.append(new JScrollPane(tfText), 2, CellConstraints.FILL, CellConstraints.FILL);

    addCustomPanels(builder);

    return builder.getPanel();
}