@Override public void onMouseOver(MouseOverEvent event) { exportBtn.addStyleName("export-over"); } });
@Override public void onMouseOver(MouseOverEvent event) { helpBtn.addStyleName("help-over"); } });
@Override public void onMouseOver(MouseOverEvent event) { openBtn.addStyleName("open-over"); } });
@Override public void onMouseOver(MouseOverEvent event) { importBtn.addStyleName("import-over"); } });
public void setDisplayValue (boolean display) { if (display) { _label.removeStyleName("Hide"); } else { _label.addStyleName("Hide"); } }
public Positioner() { widget.addStyleName(FormDesignerStyles.INSTANCE.spacer()); widget.setHeight(FormDesignerConstants.SOURCE_CONTROL_HEIGHT_PX + "px"); }
@Override protected Widget newPositioner(DragContext context) { HTML positioner = new HTML("※"); positioner.addStyleName(DragClientBundle.INSTANCE.css().flowPanelPositioner()); return positioner; } }
private void setStyle() { widget.removeStyleName(FormDesignerStyles.INSTANCE.spacerNormal()); widget.removeStyleName(FormDesignerStyles.INSTANCE.spacerForbidden()); if (forbidded) { widget.addStyleName(FormDesignerStyles.INSTANCE.spacerForbidden()); } else { widget.addStyleName(FormDesignerStyles.INSTANCE.spacerNormal()); } }
public ApiPane(TableViewModel viewModel) { this.panel = new HTML(""); this.panel.addStyleName(TableBundle.INSTANCE.style().detailPane()); viewModel.getApiViewModel().subscribe(this::render); }
public void setContentWarning(String info) { header.getInfoLabel().setHTML(info); header.getInfoLabel().removeStyleName("content-info"); header.getInfoLabel().addStyleName("content-warning"); }
public void setContentInfo(String info) { header.getInfoLabel().setHTML(info); header.getInfoLabel().removeStyleName("content-warning"); header.getInfoLabel().addStyleName("content-info"); }
public void setContentInfo(String info){ header.getInfoLabel().setHTML(info); header.getInfoLabel().removeStyleName("content-warning"); header.getInfoLabel().addStyleName("content-info"); }
public void setContentWarning(String info){ header.getInfoLabel().setHTML(info); header.getInfoLabel().removeStyleName("content-info"); header.getInfoLabel().addStyleName("content-warning"); }
public FieldsHolderPanel(FormDesigner formDesigner, ResourceId parentId) { this.formDesigner = formDesigner; this.parentId = parentId; this.panel = new FieldPanel(formDesigner) { @Override public String getSelectedClassName() { return FormDesignerStyles.INSTANCE.sectionWidgetContainerSelected(); } }; this.panel.asWidget().getElement().setAttribute(FIELDS_HOLDER_ATTRIBUTE_NAME, "true"); // mark holder panel this.panel.getLabel().addStyleName(FormDesignerStyles.INSTANCE.sectionLabel()); }
public void addWidget(Widget w) { if (w != null) { if (hasSeparator) { if (widgetPanel.getElement().hasChildNodes()) { HTML separatorWrapper = new HTML("<span style='float: left; margin-left: .7em; margin-right: .7em'>|</span>"); separatorWrapper.addStyleName("ks-documentHeader-widgetPanel"); widgetPanel.add(separatorWrapper); } } w.addStyleName("ks-documentHeader-widgetPanel"); widgetPanel.add(w); } }
public HistoryPane(FormStore formStore, TableViewModel viewModel) { this.panel = new HTML("Testing"); this.panel.addStyleName(TableBundle.INSTANCE.style().detailPane()); Observable<RecordHistory> history = viewModel.getSelectedRecordRef().join(ref -> { if (ref.isPresent()) { return formStore.getFormRecordHistory(ref.get()); } else { return Observable.just(RecordHistory.create(Collections.emptyList())); } }); Observable<SafeHtml> html = history.transform((h) -> renderer.render(h)); html.subscribe(observable -> { if (observable.isLoaded()) { panel.setHTML(observable.get()); } else { panel.setHTML(I18N.CONSTANTS.loading()); } }); }
public LocaleSelector() { Menu menu = new Menu(); for (final ApplicationLocale applicationLocale : ApplicationLocale.values()) { CheckMenuItem menuItem = new CheckMenuItem(applicationLocale.getLocalizedName()); menuItem.setChecked(isCurrent(applicationLocale)); menuItem.setGroup("lang"); menuItem.addSelectionHandler(selectionEvent -> switchLocale(applicationLocale)); menu.add(menuItem); } String currentLocaleCode = LocaleInfo.getCurrentLocale().getLocaleName().toUpperCase(); icon = new HTML(); icon.addStyleName(ChromeBundle.BUNDLE.style().localeIcon()); icon.addStyleName(ChromeBundle.BUNDLE.style().appBarButton()); icon.setText(currentLocaleCode); icon.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { menu.show(icon.getElement(), new Style.AnchorAlignment(Style.Anchor.TOP, Style.Anchor.BOTTOM)); } }); }
/** * Choice dialog * @param app XWiki GWT App object to access translations and css prefix names * @param name dialog name * @param buttonModes button modes Dialog.BUTTON_CANCEL|Dialog.BUTTON_NEXT for Cancel / Next */ public MessageDialog(XWikiGWTApp app, String name, int buttonModes) { super(app, name, buttonModes); FlowPanel main = new FlowPanel(); main.addStyleName(getCSSName("main")); messagePanel = new HTML(app.getTranslation(getDialogTranslationName() + ".invitation")); messagePanel.addStyleName(getCSSName("invitation")); main.add(messagePanel); main.add(getActionsPanel()); add(main); }
/** * Choice dialog * @param app XWiki GWT App object to access translations and css prefix names * @param name dialog name * @param buttonModes button modes Dialog.BUTTON_CANCEL|Dialog.BUTTON_NEXT for Cancel / Next */ public CustomDialog(XWikiGWTApp app, String name, Panel panel, int buttonModes) { super(app, name, buttonModes); FlowPanel main = new FlowPanel(); main.addStyleName(getCSSName("main")); messagePanel = new HTML(app.getTranslation(getDialogTranslationName() + ".invitation")); messagePanel.addStyleName(getCSSName("invitation")); main.add(messagePanel); addPanel = new SimplePanel(); main.add(addPanel); if (panel!=null) { addPanel.add(panel); } main.add(getActionsPanel()); add(main); }
public AppFrame(AppCache appCache, HttpStore httpStore, OfflineStore offlineStore) { ChromeBundle.BUNDLE.style().ensureInjected(); HTML logoLink = new HTML(ChromeBundle.BUNDLE.logoLink().getText()); titleHtml = new HTML("ActivityInfo"); titleHtml.addStyleName(ChromeBundle.BUNDLE.style().appTitle()); BoxLayoutContainer.BoxLayoutData titleLayout = new BoxLayoutContainer.BoxLayoutData(); titleLayout.setFlex(1); titleLayout.setMargins(new Margins(0, 0, 0, 10)); HBoxLayoutContainer appBar = new HBoxLayoutContainer(HBoxLayoutContainer.HBoxLayoutAlign.MIDDLE); appBar.setEnableOverflow(false); appBar.addStyleName(ChromeBundle.BUNDLE.style().appBar()); appBar.add(logoLink); appBar.add(titleHtml, titleLayout); appBar.add(new ConnectionIcon(httpStore.getHttpBus())); appBar.add(new OfflineMenu(httpStore.getHttpBus(), offlineStore)); appBar.add(new LocaleSelector()); appBar.add(new SystemMenu(appCache)); container = new BorderLayoutContainer(); container.setNorthWidget(appBar, new BorderLayoutContainer.BorderLayoutData(50)); }