List of usage examples for com.google.gwt.user.client.ui Widget toString
@Override
public String toString()
From source file:com.xpn.xwiki.watch.client.ui.articles.ArticleListWidget.java
License:Open Source License
protected PopupPanel buildPopup() { final PopupPanel popup = new PopupPanel(true); popup.setStyleName(watch.getCSSPrefix() + "-add-annotation-popup"); FlowPanel contents = new FlowPanel(); popup.setTitle("Add Annotation"); final TextArea ta = new TextArea(); Button cancel = new Button("Cancel", new ClickListener() { public void onClick(Widget arg0) { popup.hide();// ww w. jav a 2s . com } }); Button annotate = new Button("Annotate", new ClickListener() { public void onClick(Widget arg0) { if (selection != null) { watch.getXWatchServiceInstance().addAnnotation(selection, ta.getText(), currentArticle.getPageName(), new AsyncCallback<String>() { public void onSuccess(String arg0) { watch.refreshArticleList(); } public void onFailure(Throwable arg0) { Window.alert("FAILURE : " + arg0.toString()); } }); } popup.hide(); } }); FlowPanel taPanel = new FlowPanel(); taPanel.addStyleName("popup-textarea"); taPanel.add(ta); contents.add(taPanel); FlowPanel holder = new FlowPanel(); holder.add(cancel); holder.add(annotate); holder.setStyleName("popup-panel-footer"); contents.add(holder); popup.setWidget(contents); return popup; }
From source file:ilarkesto.gwt.client.Gwt.java
License:Open Source License
public static String toString(Widget widget) { if (widget == null) return "<null>"; if (widget instanceof AWidget) return widget.toString(); if (widget instanceof HasWidgets) { StringBuilder sb = new StringBuilder(); boolean first = true; sb.append(getSimpleName(widget.getClass())).append("("); for (Widget subWidget : (HasWidgets) widget) { if (first) { first = false;/*from w ww. j a va 2 s .c o m*/ } else { sb.append(", "); } sb.append(toString(subWidget)); } sb.append(")"); } return getSimpleName(widget.getClass()); }
From source file:nl.strohalm.cyclos.mobile.client.ui.widgets.DataList.java
License:Open Source License
/** * Creates the render representation of the model object *//* w w w. j ava 2 s . co m*/ private void createCell() { cell = new AbstractCell<T>() { @Override public void render(Context context, T value, SafeHtmlBuilder sb) { Widget widget = onRender(context, value); if (widget != null) { sb.appendHtmlConstant(widget.toString()); } } }; }
From source file:org.mobicents.servlet.management.client.router.RequestColumnsContainer.java
License:Open Source License
public String getDARText() { String source = ""; for (int col = 0; col < routeColumns.length; col++) { int count = routeColumns[col].getWidgetCount(); boolean empty = true; String routeText = ""; for (int row = 0; row < count; row++) { Widget widget = routeColumns[col].getWidget(row); if (widget instanceof ApplicationRouteNodeEditor) { empty = false;// ww w .j a v a2 s . com routeText += widget.toString() + ","; } } if (!empty) { routeText = routeText.substring(0, routeText.length() - 1); source += COLUMNS[col] + ":" + routeText + "\n"; } } return source; }
From source file:org.opencms.ade.containerpage.client.ui.CmsContainerPageContainer.java
License:Open Source License
/** * Returns all contained drag elements.<p> * /*from w w w . j a v a 2s. co m*/ * @return the drag elements */ public List<CmsContainerPageElementPanel> getAllDragElements() { List<CmsContainerPageElementPanel> elements = new ArrayList<CmsContainerPageElementPanel>(); Iterator<Widget> it = iterator(); while (it.hasNext()) { Widget w = it.next(); if (w instanceof CmsContainerPageElementPanel) { elements.add((CmsContainerPageElementPanel) w); } else { if (CmsDomUtil.hasClass(org.opencms.ade.containerpage.client.ui.css.I_CmsLayoutBundle.INSTANCE .containerpageCss().groupcontainerPlaceholder(), w.getElement())) { CmsDebugLog.getInstance().printLine("Ignoring group container placeholder."); } else { CmsDebugLog.getInstance() .printLine("WARNING: " + w.toString() + " is no instance of CmsDragContainerElement"); } } } return elements; }
From source file:org.openmoney.omlets.mobile.client.ui.widgets.DataList.java
License:Open Source License
/** * Creates the render representation of the model object *//* www . ja v a2s . c om*/ private void createCell() { cell = new AbstractCell<T>() { @Override public void render(Context context, T value, SafeHtmlBuilder sb) { Widget widget = onRender(context, value); if (widget != null) { sb.appendHtmlConstant(widget.toString()); } } }; }