List of usage examples for com.google.gwt.user.client.ui Label Label
public Label()
From source file:cc.kune.gspace.client.licensewizard.pages.LicenseWizardTrdForm.java
License:GNU Affero Public License
/** * Instantiates a new license wizard trd form. * //from ww w. ja v a 2 s . c o m * @param i18n * the i18n * @param res * the res * @param commonRes * the common res */ @Inject public LicenseWizardTrdForm(final I18nTranslationService i18n, final IconicResources res, final CommonResources commonRes) { super.setFrame(true); super.setPadding(10); super.setAutoHeight(true); final Label intro = new Label(); intro.setText(i18n.t( "With a Creative Commons license, you keep your copyright but allow people to copy and distribute your work provided they give you credit and only on the conditions you specify here. What do you want to do?")); intro.addStyleName("kune-Margin-10-b"); final FieldSet commercialfieldSet = new FieldSet(); commercialfieldSet.setHeadingHtml(i18n.t("Allow any uses of your work, including commercial?")); commercialfieldSet.setCollapsible(false); commercialfieldSet.setAutoHeight(true); final FieldSet modificationsfieldSet = new FieldSet(); modificationsfieldSet.setHeadingHtml(i18n.t("Allow modifications of your work?")); modificationsfieldSet.setCollapsible(false); modificationsfieldSet.setAutoHeight(true); createRadios(i18n, commercialfieldSet, modificationsfieldSet); createRadioListeners(); info = new LicenseWizardFlags(res, commonRes, i18n); add(intro); add(commercialfieldSet); add(modificationsfieldSet); add(info); }
From source file:cc.kune.gspace.client.options.general.EntityOptGeneralPanel.java
License:GNU Affero Public License
/** * Instantiates a new entity opt general panel. * // ww w . j a va2 s. co m * @param maskWidget * the mask widget * @param img * the img * @param title * the title * @param introMessage * the intro message */ public EntityOptGeneralPanel(final MaskWidgetView maskWidget, final ImageResource img, final String title, final String introMessage) { this.maskWidget = maskWidget; tabTitle = TabTitleGenerator.generate(img, title, MAX_TABTITLE_LENGTH, TAB_ID); super.setWidth(EntityOptionsView.WIDTH); super.setFrame(true); super.getFormPanel().setLabelWidth(100); super.addStyleName("k-overflow-y-auto"); final Label label = new Label(); label.setText(introMessage); label.addStyleName("kune-Margin-10-tb"); super.add(label); }
From source file:cc.kune.gspace.client.options.license.EntityOptDefLicensePanel.java
License:GNU Affero Public License
/** * Instantiates a new entity opt def license panel. * * @param i18n/* w w w .j av a 2s. com*/ * the i18n * @param res * the res */ public EntityOptDefLicensePanel(final I18nTranslationService i18n, final IconicResources res) { tabTitle = TabTitleGenerator.generate(res.copyleftWhite(), i18n.t("License"), MAX_TABTITLE_LENGTH, TAB_ID); final FlowPanel flow = new FlowPanel(); intro = new Label(); intro.setWordWrap(true); intro.setText(i18n.t( "This is the default license for all the contents of this group (although you can choose a different license for specific contents):")); intro.addStyleName("kune-Margin-20-tb"); flow.add(intro); licenseImage = new Image(); flow.add(licenseImage); licenseImage.addStyleName("kune-pointer"); licenseImage.addStyleName("kune-Margin-10-r"); change = new CustomButton(i18n.t("Change")); flow.add(change); initWidget(flow); // flow.setHeight(String.valueOf(EntityOptionsView.HEIGHT) + "px"); flow.setWidth(String.valueOf(EntityOptionsView.WIDTH_WOUT_MARGIN) + "px"); flow.addStyleName("k-overflow-y-auto"); flow.addStyleName("k-tab-panel"); }
From source file:cc.kune.gspace.client.options.tools.EntityOptToolsPanel.java
License:GNU Affero Public License
@Override public void clear() { super.getFormPanel().removeAll(); fields.clear();//ww w . j a va 2 s.co m final Label label = new Label(); label.setText(i18n.t("Here you can select the tools used:")); label.addStyleName("kune-Margin-10-tb"); super.add(label); }
From source file:cc.kune.gspace.client.share.ShareDialogPanel.java
License:Open Source License
@Inject public ShareDialogPanel(final ShareToListView listView, final ShareToTheNetPanel shareToTheNetPanel, final ShareToOthersPanel shareToOthersPanel) { final Builder builder = new BasicTopDialog.Builder(DIALOG_ID, false, false, I18n.getDirection()) .autoscroll(true).width(420); // builder.icon(icon); builder.firstButtonTitle(I18n.t("Close")).firstButtonId(FIRSTBUTTON_ID); dialog = builder.build();//from w w w . jav a2 s.c o m dialog.getFirstBtn().addClickHandler(new ClickHandler() { @Override public void onClick(final ClickEvent event) { dialog.hide(); } }); vp = new VerticalPanel(); dialogIntro = new Label(); dialogIntro.addStyleName("k-dialog-intro"); vp.add(dialogIntro); vp.add(listView.getView()); vp.add(shareToOthersPanel); vp.add(shareToTheNetPanel); dialog.getInnerPanel().add(vp); }
From source file:cc.kune.gspace.client.share.ShareToListPanel.java
License:Open Source License
/** * Instantiates a new abstract share to list panel. * /*w w w . j a va2s .c o m*/ * @param titleText * the title text */ public ShareToListPanel() { title = new Label(); title.setStyleName("k-sharelist-title"); final VerticalPanel vp = new VerticalPanel(); itemsPanel = new VerticalPanel(); scroll = new ScrollPanel(); scroll.setWidth(SCROLLWIDTH); DOM.setStyleAttribute(scroll.getElement(), "maxHeight", SCROLL_HEIGHT); scroll.setStyleName("k-sharelist-scroll"); scroll.add(itemsPanel); vp.add(title); vp.add(scroll); initWidget(vp); }
From source file:cc.kune.gspace.client.viewers.ContentTitleWidget.java
License:GNU Affero Public License
/** * Instantiates a new content title widget. * * @param i18n//from www . j a v a2 s . co m * the i18n * @param gsArmor * the gs armor * @param iconRegistry * the icon registry */ public ContentTitleWidget(final I18nTranslationService i18n, final GSpaceArmor gsArmor, final IconsRegistry iconRegistry) { this.i18n = i18n; this.gsArmor = gsArmor; this.iconRegistry = iconRegistry; final FlowPanel flow = new FlowPanel(); PolymerUtils.addLayout(flow.getElement(), HORIZONTAL, LAYOUT); titleIcon = new Label(); titleIcon.setStyleName("k-content-title-icon"); editableTitle = new EditableLabel(); flow.add(titleIcon); flow.add(editableTitle); initWidget(flow); this.getElement().setId(ID); }
From source file:cc.kune.wave.client.kspecific.WaveUnsaveNotificator.java
License:GNU Affero Public License
/** * Instantiates a new wave unsave notificator. *///from w ww. ja v a2 s .c o m public WaveUnsaveNotificator() { msg = new Label(); msg.addStyleName("k-unsave-popup"); msg.setHeight("14px"); }
From source file:ch.amaba.client.ResponseView.java
License:Apache License
@Inject public ResponseView() { closeButton = new Button("Close"); // We can set the id of a widget by accessing its Element closeButton.getElement().setId("closeButton"); textToServerLabel = new Label(); serverResponseLabel = new HTML(); // Add the nameField and sendButton to the RootPanel // Use RootPanel.get() to get the entire body element panel.add(closeButton, "closeButton"); panel.add(textToServerLabel, "textToServerContainer"); panel.add(serverResponseLabel, "serverResponseContainer"); }
From source file:ch.heftix.mailxel.client.MailDetailGrid.java
License:Open Source License
public void displayMailDetail(final int id) { mailxelService.get(id, new AsyncCallback<MailTO>() { final StatusItem si = mailxelPanel.statusStart("getting mail detail"); public void onSuccess(MailTO result) { categorizationToolbar.setCurrentMessageId(result.id); if (null != mailxelTab) { mailxelTab.setTabText(result.subject); }//from www . ja v a2 s .co m initWidgets(); AddressLabel lFrom = new AddressLabel(result.fromATO); grid.setText(0, 0, "From"); grid.setWidget(0, 1, lFrom); AddressBar toBar = new AddressBar(); toBar.add(result.toATOs); grid.setText(1, 0, "To"); grid.setWidget(1, 1, toBar); int cursor = 2; if (null != result.ccATOs && result.ccATOs.size() > 0) { grid.setText(cursor, 0, "Cc"); AddressBar ccBar = new AddressBar(); ccBar.add(result.ccATOs); grid.setWidget(cursor, 1, ccBar); cursor++; } if (null != result.bccATOs && result.bccATOs.size() > 0) { grid.setText(cursor, 0, "Bcc"); AddressBar bccBar = new AddressBar(); bccBar.add(result.bccATOs); grid.setWidget(cursor, 1, bccBar); cursor++; } // date grid.setText(cursor, 0, "Date"); String zDate = result.date; if (null != result.time && null != cTO && cTO.displayTime) { zDate = zDate + " " + result.time; } zDate = zDate + " (access count: " + Integer.toString(result.count) + ")"; Label lDate = new Label(); lDate.setText(zDate); lDate.setTitle(result.time); grid.setWidget(cursor, 1, lDate); cursor++; grid.setText(cursor, 0, "Subject"); grid.setText(cursor, 1, result.subject); cursor++; bodyArea.setText(result.body); contentTabPanel.add(bodyArea); if (null != result.attachments && result.attachments.size() > 0) { grid.setText(cursor, 0, "A"); grid.setWidget(cursor, 1, attachementBar); cursor++; for (AttachmentTO attachement : result.attachments) { attachementBar.addAttachement(attachement, mailxelPanel, contentTabPanel); } } mailTO = result; cursor = 0; if (null != result.categories && result.categories.size() > 0) { for (AttachedCategoryTO aCat : result.categories) { categoryHistory.setText(cursor, 0, "C"); categoryHistory.setText(cursor, 1, aCat.date); categoryHistory.setText(cursor, 2, aCat.category.name); cursor++; } } si.done(); } public void onFailure(Throwable caught) { si.error(caught); } }); }