List of usage examples for com.google.gwt.user.client.ui StackPanel add
@SuppressIsSafeHtmlCastCheck public void add(Widget w, String stackText)
From source file:com.audata.client.AuDoc.java
License:Open Source License
/** * Builds the stackpanel//from w w w. j a v a 2 s .c om * @return StackPanel containing the stack */ private StackPanel buildStack() { StackPanel panel = new StackPanel(); panel.setWidth("180px"); panel.setHeight("100%"); this.classBrowser = new ClassBrowser(this, "180px", "100%"); panel.add(this.classBrowser, LANG.browse_Text()); this.savedSearchPanel = new SavedSearchPanel(this); panel.add(this.savedSearchPanel, LANG.saved_searches_Text()); this.trayPanel = new TrayPanel(this); panel.add(this.trayPanel, LANG.trays_Text()); this.checkoutsPanel = new CheckoutPanel(this); panel.add(this.checkoutsPanel, LANG.checkouts_Text()); return panel; }
From source file:com.google.gwt.demos.fasttree.client.FastTreeDemo.java
License:Apache License
public StackPanel createDemo() { FastTree.addDefaultCSS();//from w ww. ja v a 2 s. c om StackPanel p = new StackPanel(); p.add(basicTree(), "Basic tree"); p.add(lazyTree(), "Lazy tree"); p.add(verboseTree(), "Verbose tree"); p.add(profileTree(), "Profiling tree"); p.add(stubbornTree(), "Stubborn tree"); return p; }
From source file:com.google.gwt.examples.StackPanelExample.java
License:Apache License
public void onModuleLoad() { // Create a stack panel containing three labels. StackPanel panel = new StackPanel(); panel.add(new Label("Foo"), "foo"); panel.add(new Label("Bar"), "bar"); panel.add(new Label("Baz"), "baz"); // Add it to the root panel. RootPanel.get().add(panel);//from w w w . ja v a2s. com }
From source file:com.google.gwt.gen2.demo.fasttree.client.FastTreeDemo.java
License:Apache License
public StackPanel createDemo() { // inject default styles FastTree.injectDefaultCss();//from ww w.ja v a 2s . c om StackPanel p = new StackPanel(); if (LocaleInfo.getCurrentLocale().isRTL()) { p.add(hebrewTree(), " "); } p.add(basicTree(), "Basic tree"); p.add(lazyTree(), "Lazy tree"); p.add(verboseTree(), "Verbose tree"); p.add(crazyTree(), "Crazy tree"); p.add(dynamicTree(), "Dynamic tree"); p.add(cancelEventTree(), "Cancel event tree"); return p; }
From source file:gwtquery.plugins.enhance.client.gwt.StackPanelWidgetFactory.java
License:Apache License
public StackPanel create(Element e) { StackPanel stackPanel = options.isDecorated() ? new DecoratedStackPanel() : new StackPanel(); WidgetsUtils.replaceOrAppend(e, stackPanel); GQuery contents = $(options.getContentSelector(), e); GQuery headers = $(options.getHeaderSelector(), e); for (int i = 0; i < contents.length(); i++) { Element content = contents.get(i); Element header = headers.get(i); Widget contentWidget = $(content).widget(); if (contentWidget == null) { contentWidget = new WidgetsHtmlPanel(content); }/*from ww w . ja va2 s. c o m*/ stackPanel.add(contentWidget, header != null ? header.getInnerText() : "Undefined"); } return stackPanel; }