List of usage examples for com.jgoodies.forms.layout CellConstraints FILL
Alignment FILL
To view the source code for com.jgoodies.forms.layout CellConstraints FILL.
Click Source Link
From source file:com.salas.bb.dialogs.CleanupWizardDialog.java
License:Open Source License
/** * Appends 'Delete feed that:' selection subcomponent to content panel. * // w w w . jav a 2 s.c om * @param formBuilder form builder. */ private void appendDeleteFeedSelection(BBFormBuilder formBuilder) { formBuilder.appendRow("16dlu"); formBuilder.appendSeparator(Strings.message("cleanup.wizard.delete.feeds.that")); formBuilder.append(this.chRating, 3, CellConstraints.FILL, CellConstraints.CENTER); formBuilder.append(this.cRating, 1, CellConstraints.FILL, CellConstraints.CENTER); formBuilder.append(Strings.message("cleanup.wizard.starz"), 1); formBuilder.append(this.chArticlePublishPeriod, 3, CellConstraints.FILL, CellConstraints.CENTER); formBuilder.append(this.spArticlePublishPeriod, 1, CellConstraints.FILL, CellConstraints.CENTER); formBuilder.append(Strings.message("cleanup.wizard.days"), 1); formBuilder.append(this.chFeedNonAttendancePeriod, 3, CellConstraints.FILL, CellConstraints.CENTER); formBuilder.append(this.spFeedNonAttendancePeriod, 1, CellConstraints.FILL, CellConstraints.CENTER); formBuilder.append(Strings.message("cleanup.wizard.days"), 1); }
From source file:com.salas.bb.dialogs.CleanupWizardDialog.java
License:Open Source License
/** * Appends 'Delete feed that:' selection subcomponent to content panel. * /*w ww . jav a 2 s . co m*/ * @param formBuilder form builder. */ private void appendResultTable(BBFormBuilder formBuilder) { formBuilder.appendSeparator(""); formBuilder.appendRow("120dlu"); formBuilder.append(createScrollPane(createFeedsTable(modelFeeds)), 7, CellConstraints.FILL, CellConstraints.FILL); formBuilder.append(lblInfo, 7); }
From source file:com.salas.bb.dialogs.DirectFeedPropertiesDialog.java
License:Open Source License
/** * Creates basic tab component.//from ww w. java2s . c o m * * @return basic tab. */ 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(); }
From source file:com.salas.bb.dialogs.DirectFeedPropertiesDialog.java
License:Open Source License
/** * Creates blog starz tab.//from w w w .j av a2 s . c o m * * @return tab. */ private Component createBlogStarzTab() { ScoresCalculator calc = GlobalModel.SINGLETON.getScoreCalculator(); double activity = calc.calcActivity(feed); double inlinks = calc.calcInlinksScore(feed); double views = calc.calcFeedViewsScore(feed); double clickthroughs = calc.calcClickthroughsScore(feed); blogStarzScore = calc.calcBlogStarzScore(feed); rating = feed.getRating(); StarzPreferences prefs = GlobalModel.SINGLETON.getStarzPreferences(); int activityWeight = prefs.getActivityWeight(); int inlinksWeight = prefs.getInlinksWeight(); int viewsWeight = prefs.getFeedViewsWeight(); int clickthroughsWeight = prefs.getClickthroughsWeight(); String msg = feed.getTextualInboundLinks(); lbFinalScore = new JLabel(); lbFinalScore.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); lbFinalScore.addMouseListener(new FinalScoreStarzListener()); updateFinalScoreIcon(); JLabel lbTechnoratiInlinks = new JLabel(msg); JLabel lbActivity = new JLabel( MessageFormat.format(Strings.message("show.feed.properties.tab.blogstarz.0.weight.1"), DECIMAL_FORMAT.format(activity), activityWeight)); JLabel lbInLinks = new JLabel( MessageFormat.format(Strings.message("show.feed.properties.tab.blogstarz.0.weight.1"), DECIMAL_FORMAT.format(inlinks), inlinksWeight)); JLabel lbViews = new JLabel( MessageFormat.format(Strings.message("show.feed.properties.tab.blogstarz.0.weight.1"), DECIMAL_FORMAT.format(views), viewsWeight)); JLabel lbClickthroughs = new JLabel( MessageFormat.format(Strings.message("show.feed.properties.tab.blogstarz.0.weight.1"), DECIMAL_FORMAT.format(clickthroughs), clickthroughsWeight)); JLabel lbRecommendation = new JLabel(FeedFormatter.getStarzIcon(blogStarzScore, true)); BBFormBuilder builder = new BBFormBuilder("pref, 4dlu, pref, 4dlu, pref:grow"); builder.setDefaultDialogBorder(); builder.append(Strings.message("show.feed.properties.tab.blogstarz.technorati.inlinks"), lbTechnoratiInlinks, 3); builder.append(Strings.message("show.feed.properties.tab.blogstarz.activity"), lbActivity, 3); builder.append(Strings.message("show.feed.properties.tab.blogstarz.inlinks"), lbInLinks, 3); builder.append(Strings.message("show.feed.properties.tab.blogstarz.views"), lbViews, 3); builder.append(Strings.message("show.feed.properties.tab.blogstarz.clickthroughs"), lbClickthroughs, 3); builder.append(Strings.message("show.feed.properties.tab.blogstarz.recommendation"), 1); builder.append(lbRecommendation, 1, CellConstraints.LEFT, CellConstraints.CENTER); builder.appendUnrelatedComponentsGapRow(2); builder.append(Strings.message("show.feed.properties.tab.blogstarz.final.rating"), 1); builder.append(lbFinalScore, 1, CellConstraints.LEFT, CellConstraints.CENTER); builder.append(new JButton(new RevertAction()), 1, CellConstraints.RIGHT, CellConstraints.CENTER); builder.appendRow("pref:grow"); builder.append( ComponentsFactory .createWrappedMultilineLabel(Strings.message("show.feed.properties.tab.blogstarz.notes")), 5, CellConstraints.FILL, CellConstraints.BOTTOM); return builder.getPanel(); }
From source file:com.salas.bb.dialogs.guide.AddGuideDialog.java
License:Open Source License
/** * Main dialog body.//from w ww. j av a 2s . com * * @return body. */ private JComponent buildBody() { JTabbedPane pane = new JTabbedPane(); pane.addTab(Strings.message("add.guide.feeds"), buildFeedsTab()); pane.addTab(Strings.message("guide.dialog.readinglists"), buildReadingListsTab()); pane.addTab(Strings.message("guide.dialog.publishing"), buildPublishingTab()); 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(); }
From source file:com.salas.bb.dialogs.guide.AddGuideDialog.java
License:Open Source License
/** * Creates feeds tab.//from w w w . ja v a 2s . co m * * @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(); }
From source file:com.salas.bb.dialogs.guide.BasicGuideDialog.java
License:Open Source License
/** * Builds panel for publishing tab when publishing is available. * * @param aWording wording to put on the page. * * @return component./*from w w w. j ava 2s .c o m*/ */ private JPanel buildPublishingTabAvailable(JComponent aWording) { JPanel sscPanel = new JPanel(new BorderLayout()); sscPanel.add(sscPublishingRating, BorderLayout.WEST); // Panel BBFormBuilder builder = new BBFormBuilder("7dlu, p, 2dlu, 100dlu, 0:grow, 2dlu, p"); builder.setDefaultDialogBorder(); builder.append(aWording, 7); builder.appendUnrelatedComponentsGapRow(2); builder.append(chPublishingEnabled, 7); builder.setLeadingColumnOffset(1); builder.append(lbPublishingTitle, tfPublishingTitle); builder.nextLine(); builder.append(lbPublishingTags, tfPublishingTags); builder.nextLine(); builder.append(lbPublishingPublic, chPublishingPublic); builder.nextLine(); builder.append(lbPublishingRating, sscPanel); builder.appendUnrelatedComponentsGapRow(2); builder.append(lbPublishingURL); builder.append(lnkPublishingURL, 2); builder.append(btnCopyToClipboard); builder.append(lbLastPublishingDate, tfLastPublishingDate); builder.setLeadingColumnOffset(0); builder.appendUnrelatedComponentsGapRow(2); builder.appendRow("min:grow"); JComponent instructionsBox = ComponentsFactory .createInstructionsBox(Strings.message("guide.dialog.publishing.instructions")); builder.append(instructionsBox, 7, CellConstraints.FILL, CellConstraints.FILL); return builder.getPanel(); }
From source file:com.salas.bb.dialogs.guide.BasicGuideDialog.java
License:Open Source License
/** * Builds reading lists tab.//from ww w . j av a 2 s. co m * * @return component. */ protected JComponent buildReadingListsTab() { // Wording JComponent wording = msg(Strings.message("guide.dialog.readinglists.wording")); // Buttons Dimension btnSize = new Dimension(20, 20); btnAddReadingList.setPreferredSize(btnSize); btnRemoveList.setPreferredSize(btnSize); FlowLayout layout = new FlowLayout(FlowLayout.LEFT); JPanel bbar = new JPanel(layout); bbar.add(btnAddReadingList); bbar.add(btnRemoveList); layout.setHgap(0); layout.setVgap(0); // Panel BBFormBuilder builder = new BBFormBuilder("0:grow"); builder.setDefaultDialogBorder(); builder.append(wording); builder.appendUnrelatedComponentsGapRow(2); builder.appendRow("min:grow"); builder.append(new JScrollPane(tblReadingLists), 1, CellConstraints.FILL, CellConstraints.FILL); builder.append(bbar); return builder.getPanel(); }
From source file:com.salas.bb.dialogs.guide.EditGuideDialog.java
License:Open Source License
/** * Builds general tab./* ww w . j a v a 2 s . com*/ * * @return tab. */ private JComponent buildGeneralTab() { BBFormBuilder builder = new BBFormBuilder("p, 4dlu, 30dlu, 7dlu, p:grow"); builder.setDefaultDialogBorder(); builder.append(Strings.message("guide.dialog.title"), tfTitle, 3); builder.append(Strings.message("edit.guide.general.position"), tfPosition, chAutoFeedsDiscovery); builder.appendRelatedComponentsGapRow(2); builder.appendRow("70dlu:grow"); builder.append(Strings.message("edit.guide.general.icon"), 1, CellConstraints.FILL, CellConstraints.TOP) .setLabelFor(iconsList); builder.append(new JScrollPane(iconsList), 3, CellConstraints.FILL, CellConstraints.FILL); return builder.getPanel(); }
From source file:com.salas.bb.dialogs.PlanWarningsDialog.java
License:Open Source License
/** * Builds the main pane.// w w w . j a va 2 s . co m * * @return pane. */ private Component buildMainPanel() { LinkLabel link = new LinkLabel(Strings.message("spw.learn.more"), ResourceUtils.getString("server.plans.url")); BBFormBuilder builder = new BBFormBuilder("0:grow"); builder.setDefaultDialogBorder(); builder.append(new JLabel(MessageFormat.format(Strings.message("spw.your.current.plan"), plan))); builder.appendUnrelatedComponentsGapRow(2); builder.appendRow("100dlu:grow"); builder.append(new JScrollPane(txMessages), 1, CellConstraints.FILL, CellConstraints.FILL); builder.append(link); return builder.getPanel(); }