Package com.salas.bb.utils.uif

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


         *
         * @return panel.
         */
        private Component buildMainPanel()
        {
            BBFormBuilder builder = new BBFormBuilder("min(p;200dlu)");
            builder.setDefaultDialogBorder();

            builder.append(new JLabel(Strings.message("whatshot.source.guides")));
            builder.append(cbGuides);

            builder.appendUnrelatedComponentsGapRow(2);
            builder.append(new JLabel(Strings.message("whatshot.ignore.links")));
            builder.appendRelatedComponentsGapRow(2);
            builder.appendRow("100dlu");
            builder.append(new JScrollPane(taIgnorePatterns), 1, CellConstraints.FILL, CellConstraints.FILL);

            builder.appendUnrelatedComponentsGapRow(2);
            builder.append(chDontCountSelfLinks);
            builder.append(chSuppressSameSource);

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


                return builder.getPanel();
            }

            private Component buildMainPanel()
            {
                BBFormBuilder builder = new BBFormBuilder("p");

                builder.append(sent
                    ? Strings.message("feedback.success")
                    : Strings.message("feedback.failure"));

                if (sent)
                {
                    LinkLabel linkLabel = new LinkLabel(Strings.message("feedback.forum"),
                        "http://forum.blogbridge.com/viewforum.php?id=" + forumId);
                    linkLabel.setForeground(LinkLabel.HIGHLIGHT_COLOR);

                    builder.appendUnrelatedComponentsGapRow(2);
                    builder.append(Strings.message("feedback.please.visit"));
                    builder.append(linkLabel, 1, CellConstraints.CENTER, CellConstraints.DEFAULT);
                }

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

        lbPostEditor.setEnabled(ptbAdvanced);
        rbRichEditor.setEnabled(ptbAdvanced);
        rbPlainEditor.setEnabled(ptbAdvanced);
       
        BBFormBuilder builder = new BBFormBuilder("max(60dlu;p), 4dlu, p, 2dlu, p, 2dlu, p");
        builder.append(lbPostEditor);
        builder.append(rbRichEditor);
        builder.append(rbPlainEditor);
        builder.append(UifUtilities.makePublisherPlanIcon(!ptbAdvanced));

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

         *
         * @return pane.
         */
        protected JComponent buildMain()
        {
            BBFormBuilder builder = new BBFormBuilder("p, 4dlu, max(50dlu;p), 4dlu, max(100dlu;p):grow, 4dlu, p");
            builder.setDefaultDialogBorder();

            builder.append(Strings.message("guide.dialog.readinglists.add.address"), 1, tfAddress, 3);
            builder.append(new JButton(new SuggestAction()));
            builder.setLeadingColumnOffset(2);
            builder.append(Strings.message("guide.dialog.readinglists.add.status"), lbStatus);
            builder.appendUnrelatedComponentsGapRow(2);

            builder.setLeadingColumnOffset(0);
            builder.append(rbExistingGuide, 3);
            builder.append(cbGuides);
            builder.nextLine();

            builder.setLeadingColumnOffset(0);
            builder.append(rbNewGuide, 3);
            builder.append(tfGuideTitle);
            builder.nextLine();

            updateRadioStatus();

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

            btnSend = createOKButton(true);
            btnSend.setText(Strings.message("tweetthis.send"));
            btnPasteLink = new JButton(new PasteLinkAction());
            btnPasteLink.setEnabled(StringUtils.isNotEmpty(link));

            BBFormBuilder b = new BBFormBuilder("p, 4dlu:grow, p, 2dlu, p");
            b.append(btnPasteLink);
            b.append(btnSend);
            b.append(createCancelButton());
            bar = b.getPanel();
        } else
        {
            bar = buildButtonBarWithClose();
        }
View Full Code Here

     *
     * @return component.
     */
    private Component buildBody()
    {
        BBFormBuilder builder = TwitterFeature.isAvaiable() ? buildAvailableBody() : buildUnavailableBody();
        builder.appendUnrelatedComponentsGapRow();
        return builder.getPanel();
    }
View Full Code Here

     *
     * @return panel.
     */
    private BBFormBuilder buildUnavailableBody()
    {
        BBFormBuilder builder = new BBFormBuilder("7dlu, pref:grow");
        builder.setDefaultDialogBorder();

        // Service link
        LinkLabel lnkService = new LinkLabel(
            Strings.message("spw.learn.more"),
            ResourceUtils.getString("server.plans.url"));
        lnkService.setForeground(LinkLabel.HIGHLIGHT_COLOR);

        String message = Strings.message("tweetthis.unavailable.1");
        builder.append(ComponentsFactory.createWrappedMultilineLabel(message), 2);

        builder.appendUnrelatedComponentsGapRow(2);
        builder.append(new JLabel(Strings.message("tweetthis.unavailable.2")), 2);

        builder.setLeadingColumnOffset(1);
        builder.append(lnkService);

        return builder;
    }
View Full Code Here

     */
    private BBFormBuilder buildAvailableBody()
    {
        initComponents();

        BBFormBuilder builder = new BBFormBuilder("pref, 10dlu, 20dlu:grow, 2dlu, pref");

        // Build shifted label
        builder.append(Strings.message("tweetthis.your.message"), 1, CellConstraints.LEFT, CellConstraints.BOTTOM);
        builder.append(lbCharsLeft, 1, CellConstraints.LEFT, CellConstraints.BOTTOM);
        builder.append(new JLabel(IconSource.getIcon(ResourceID.ICON_TWITTER)));
        builder.append(spMessage, 5);

        return builder;
    }
View Full Code Here

        builder.add(buttonBar, cc.xyw(1, 5, 3));
    }

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

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

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

     */
    public void build(JComponent buttonBar)
    {
        buttonBar.setBorder(Borders.createEmptyBorder("6dlu, 6dlu, 6dlu, 6dlu"));

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

        builder.append(buildHeader(), 3);
        builder.setLeadingColumnOffset(1);
        builder.appendRow("15dlu");
        builder.nextLine(2);
        builder.append(taWording);
        builder.appendUnrelatedComponentsGapRow(2);
        builder.append(buildMainPanel());
        builder.setLeadingColumnOffset(0);
        builder.appendRow("min:grow");
        builder.nextLine(2);
        builder.append(buttonBar, 3);
    }
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.