Package com.salas.bb.utils.uif

Examples of com.salas.bb.utils.uif.BBFormBuilder


    }

    // Builds the content pane
    protected JComponent buildContent()
    {
        BBFormBuilder builder = new BBFormBuilder("7dlu, pref, 2dlu, pref:grow");

        builder.append(lbWording, 4);

        builder.setLeadingColumnOffset(1);
        if (lbContext != null) builder.append(lbContext, 3);
        if (lbHost != null) builder.append(lbHost, 3);

        builder.setLeadingColumnOffset(1);
        builder.appendUnrelatedComponentsGapRow(2);
        builder.append(Strings.message("net.authentication.username"), 1, tfUsername, 1);
        builder.append(Strings.message("net.authentication.password"), 1, tfPassword, 1);

        builder.appendRelatedComponentsGapRow(2);
        builder.append(chSave, 3);

        builder.setLeadingColumnOffset(0);
        builder.appendUnrelatedComponentsGapRow(2);
        builder.append(buildButtonBar(), 4);

        return builder.getPanel();
    }
View Full Code Here


        buttons.addFixed(btnCopy);
        buttons.addRelatedGap();
        buttons.addFixed(btnDelete);

        // --- Panel construction
        BBFormBuilder builder = new BBFormBuilder("p, 2dlu, max(50dlu;p):grow, 7dlu, p, 0dlu:grow");

        // First row
        builder.append(STR_TEMPLATE, cbTemplates);
        builder.append(buttons.getPanel());

        // Editor
        builder.appendRelatedComponentsGapRow();
        builder.appendRow("200px:grow");
        builder.nextLine(2);
        builder.append(new JScrollPane(taEditor), 6,
            CellConstraints.FILL, CellConstraints.FILL);

        // Help section
        builder.appendUnrelatedComponentsGapRow(2);
        builder.append(STR_HELP, 6);
        builder.appendRelatedComponentsGapRow();
        builder.appendRow("150px");
        builder.nextLine(2);
        builder.append(ComponentsFactory.createInstructionsBox(STR_HELP_TEXT), 6,
            CellConstraints.FILL, CellConstraints.FILL);

        builder.appendUnrelatedComponentsGapRow(2);

        return builder.getPanel();
    }
View Full Code Here

                this.forumId = forumId;
            }

            protected JComponent buildContent()
            {
                BBFormBuilder builder = new BBFormBuilder("p, 8dlu, p:grow");
                builder.setDefaultDialogBorder();
               
                builder.append(new JLabel(ResourceUtils.getIcon("application.64.icon")),
                    1, CellConstraints.DEFAULT, CellConstraints.TOP);
                builder.append(buildMainPanel());

                builder.appendUnrelatedComponentsGapRow(2);
                builder.append(ButtonBarFactory.buildCenteredBar(createOKButton(true)), 3);

                return builder.getPanel();
            }
View Full Code Here

        cbBlogs.addItemListener(new BlogSelectionListener());
        onBlogSelected(null);
        populateListAndSelect(prefs.getDefaultBlog());

        // Layout
        BBFormBuilder builder = new BBFormBuilder("max(p;100dlu), 2dlu, p, 2dlu, p, 2dlu, p, 0:grow", this);
        builder.setDefaultDialogBorder();

        builder.append(tfWording, 8);
        builder.appendUnrelatedComponentsGapRow(2);
        builder.append(buildPostTextEditorOptionsPanel(), 8);

        builder.appendUnrelatedComponentsGapRow(2);
        builder.append(cbBlogs, btnAdd);
        builder.append(btnDelete);

        builder.append(UifUtilities.makePublisherPlanIcon(!ptbAdvanced));
        builder.appendUnrelatedComponentsGapRow(2);
        builder.append(pnlBlogDetails, 8);
    }
View Full Code Here

    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);
        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();
    }
View Full Code Here

        if (NotificationArea.isSupported())
        {
            pane.addTab(Strings.message("guide.dialog.notifications"), buildNotificationsTab());
        }

        BBFormBuilder builder = new BBFormBuilder("pref, 4dlu, pref:grow, 7dlu, pref");

        builder.append(Strings.message("guide.dialog.title"), tfTitle, iconsList);
        builder.appendUnrelatedComponentsGapRow(2);
        builder.appendRow("min:grow");
        builder.append(pane, 5, CellConstraints.FILL, CellConstraints.FILL);

        return builder.getPanel();
    }
View Full Code Here

     *
     * @return component.
     */
    private JComponent buildFeedsTab()
    {
        BBFormBuilder builder = new BBFormBuilder("pref:grow");
        builder.setDefaultDialogBorder();

        builder.append(Strings.message("add.guide.feeds.wording"), 1);
        builder.appendRelatedComponentsGapRow(2);
        builder.appendRow("min:grow");
        builder.append(pane, 1, CellConstraints.FILL, CellConstraints.FILL);

        return builder.getPanel();
    }
View Full Code Here

     */
    private Component createBasicTab()
    {
        JScrollPane spDescription = new JScrollPane(taDescription);

        BBFormBuilder builder = new BBFormBuilder("pref, 4dlu, 0:grow, 2dlu, p");
        builder.setDefaultDialogBorder();

        builder.append(Strings.message("show.feed.properties.tab.basic.title"), tfTitle, 3);
        builder.appendRelatedComponentsGapRow(2);
        builder.appendRow("50dlu");
        JLabel label = builder.append(Strings.message("show.feed.properties.tab.basic.description"), 1,
            CellConstraints.FILL, CellConstraints.TOP);
        label.setLabelFor(taDescription);
        builder.append(spDescription, 3, CellConstraints.FILL, CellConstraints.FILL);
        builder.append(Strings.message("show.feed.properties.tab.basic.author"), tfAuthor);
        builder.append(btnSendEmail);
        builder.append(Strings.message("show.feed.properties.tab.basic.siteurl"), tfSiteUrl, 3);
        builder.append(Strings.message("show.feed.properties.tab.basic.xmlurl"), tfXmlUrl, 3);
        builder.append(Strings.message("show.feed.properties.tab.basic.language"),
            new JLabel(convertLang2String(feed.getLanguage())), 3);
        builder.appendUnrelatedComponentsGapRow(2);
        builder.append(ButtonBarFactory.buildCenteredBar(createRevertButton()), 5);
        builder.appendRow("14dlu:grow");

        return builder.getPanel();
    }
View Full Code Here

    public CLoadingProgressPage()
    {
        lbStatus = new JLabel();
        pbProgress = new JProgressBar();

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

        builder.appendRow("0:grow");
        builder.appendRow("p");
        builder.appendRelatedComponentsGapRow();
        builder.appendRow("p");
        builder.appendRow("0:grow");

        builder.nextLine();
        builder.append(lbStatus);
        builder.nextLine(2);
        builder.append(pbProgress);

        pbProgress.setMinimum(0);
        pbProgress.setMaximum(100);
        pbProgress.setVisible(false);
        lbStatus.setText(Strings.message("collections.loading.please.wair"));
View Full Code Here

     *
     * @return top bar component.
     */
    private Component buildTopBar()
    {
        BBFormBuilder builder = new BBFormBuilder("p, 5px, p, 5px, p, 5px:grow, p");

        builder.append(starz);
        builder.append(cbTimeOptions);

        if (SystemUtils.IS_OS_MAC)
        {
            CellConstraints cc = new CellConstraints();
            JPanel p1 = new JPanel(new FormLayout("p", "p"));
            p1.add(chOnlyUnread, cc.xy(1, 1));
            builder.append(p1);

            p1 = new JPanel(new FormLayout("p", "p, 4px"));
            p1.add(btnSetup, cc.xy(1, 1));
            builder.append(p1);
        } else
        {
            builder.append(chOnlyUnread);
            builder.append(btnSetup);
        }

        builder.appendUnrelatedComponentsGapRow();

        return builder.getPanel();
    }
View Full Code Here

TOP

Related Classes of com.salas.bb.utils.uif.BBFormBuilder

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.