List of usage examples for com.google.gwt.user.client.ui StackLayoutPanel add
public void add(final IsWidget widget, IsWidget header, double headerSize)
From source file:com.google.gwt.examples.StackLayoutPanelExample.java
License:Apache License
public void onModuleLoad() { // Create a three-item stack, with headers sized in EMs. StackLayoutPanel p = new StackLayoutPanel(Unit.EM); p.add(new HTML("this"), new HTML("[this]"), 4); p.add(new HTML("that"), new HTML("[that]"), 4); p.add(new HTML("the other"), new HTML("[the other]"), 4); // Attach the LayoutPanel to the RootLayoutPanel. The latter will listen for // resize events on the window to ensure that its children are informed of // possible size changes. RootLayoutPanel rp = RootLayoutPanel.get(); rp.add(p);//from w w w . j ava 2 s . c om }
From source file:com.google.gwt.sample.showcase.client.content.lists.CwStackLayoutPanel.java
License:Apache License
/** * Initialize this example./*from w ww .ja va 2s . co m*/ */ @ShowcaseSource @Override public Widget onInitialize() { // Get the images. Images images = (Images) GWT.create(Images.class); // Create a new stack layout panel. StackLayoutPanel stackPanel = new StackLayoutPanel(Unit.EM); stackPanel.setPixelSize(200, 400); // Add the Mail folders. Widget mailHeader = createHeaderWidget(constants.cwStackLayoutPanelMailHeader(), images.mailgroup()); stackPanel.add(createMailItem(images), mailHeader, 4); // Add a list of filters. Widget filtersHeader = createHeaderWidget(constants.cwStackLayoutPanelFiltersHeader(), images.filtersgroup()); stackPanel.add(createFiltersItem(), filtersHeader, 4); // Add a list of contacts. Widget contactsHeader = createHeaderWidget(constants.cwStackLayoutPanelContactsHeader(), images.contactsgroup()); stackPanel.add(createContactsItem(images), contactsHeader, 4); // Return the stack panel. stackPanel.ensureDebugId("cwStackLayoutPanel"); return stackPanel; }
From source file:com.google.gwt.sample.stockwatcher.client.Panels.java
private Widget loadStackLayoutPanel() { StackLayoutPanel p = new StackLayoutPanel(EM); p.add(new HTML("this content"), new HTML("this"), 4); p.add(new HTML("that content"), new HTML("that"), 4); p.add(new HTML(MUSSUM_IPSUM_LITERIS), new HTML("the other"), 4); p.setPixelSize(800, 500);//from w w w. java2 s . c o m return p; }
From source file:com.mashery.examples.api.client.Examples.java
License:Open Source License
private void addExample(Example example, StackLayoutPanel headerPanel) { examples.add(example);// w w w. ja v a 2 s . c o m int i = headerPanel.getWidgetCount(); exampleIndex.put(example.getId(), i); headerPanel.add(example.createHeaderContent(), example.getHeaderTitle(), 32d); contentPanel.add(example.createContent()); }
From source file:eml.studio.client.mvp.view.MonitorView.java
License:Open Source License
@Override public Widget createMainLayout() { SplitLayoutPanel splitLayout = new SplitLayoutPanel(); StackLayoutPanel stack = new StackLayoutPanel(Unit.EM); stack.setStyleName("sp"); ScrollPanel leftcrp = new ScrollPanel(); leftcrp.setSize("100%", "100%"); VerticalPanel vPanel = new VerticalPanel(); vPanel.setWidth("100%"); programTree = ProgramTreeLoader.load(AppController.email); datasetTree = DatasetTreeLoader.load(AppController.email); jobTree = JobTreeLoader.load(AppController.email); resultTree = new SearchTree(); initTabPanel();// www .j av a 2 s . c om DisclosurePanel distackleft = new DisclosureStackPanel("Search").asWidget(); searchGrid = new SearchGrid(programTree, datasetTree, jobTree, resultTree); distackleft.setContent(searchGrid); SimplePanel tabSimPanel = new SimplePanel(); tabSimPanel.add(tabPanel); vPanel.add(tabSimPanel); vPanel.add(distackleft); leftcrp.add(vPanel); stack.add(leftcrp, "", 0); StackLayoutPanel stackright = new StackLayoutPanel(Unit.EM); stackright.setStyleName("sp"); DisclosurePanel distackright1 = new DisclosureStackPanel(Constants.studioUIMsg.jobPanelTitle()).asWidget(); DisclosurePanel distackright2 = new DisclosureStackPanel(Constants.studioUIMsg.modulePanelTitle()) .asWidget(); ScrollPanel scvp = new ScrollPanel(); VerticalPanel verticalPanel = new VerticalPanel(); verticalPanel.setWidth("100%"); HorizontalPanel btnPanel = new HorizontalPanel(); historyBtn.removeStyleName("gwt-Button"); historyBtn.addStyleName("history-button-style"); submitBtn.setEnabled(false); submitBtn.removeStyleName("gwt-Button"); submitBtn.addStyleName("button-style"); clearBtn.removeStyleName("gwt-Button"); clearBtn.addStyleName("button-style"); cloneBtn.removeStyleName("gwt-Button"); cloneBtn.addStyleName("button-style"); refreshBtn.removeStyleName("gwt-Button"); refreshBtn.addStyleName("button-style"); stopBtn.removeStyleName("gwt-Button"); stopBtn.addStyleName("button-style"); btnPanel.add(historyBtn); btnPanel.add(new HTML(" ")); btnPanel.add(submitBtn); btnPanel.add(new HTML(" ")); btnPanel.add(clearBtn); btnPanel.add(new HTML(" ")); btnPanel.add(cloneBtn); btnPanel.add(new HTML(" ")); btnPanel.add(stopBtn); btnPanel.add(new HTML(" ")); btnPanel.add(refreshBtn); btnPanel2.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); btnPanel2.add(btnPanel); btnPanel2.addStyleName("btnPanel"); splitLayout.addWest(stack, 200); jobDescGrid = new MonitorJobDescGrid(); distackright1.setContent(jobDescGrid); distackright2.setContent(propPanel); verticalPanel.add(distackright1); verticalPanel.add(distackright2); scvp.add(verticalPanel); stackright.add(scvp, "", 0); splitLayout.addEast(stackright, 287); // Use different controllers in different classes setController(new MonitorController(Constants.CONTROLLER_WIDTH, Constants.CONTROLLER_HEIGHT)); rebuiltLayoutPanel(getController()); splitLayout.add(layoutPanel); return splitLayout; }
From source file:org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator.java
License:Apache License
/** * onModuleLoad is the entry point method. */// w ww. j av a2s .c o m @SuppressWarnings("deprecation") public void onModuleLoad() { widgets = new ArrayList<NodeWidget>(); nodeCount = new EnumMap<OozieWorkflowGenerator.NodeType, Integer>(NodeType.class); // start DiagramController (gwt-links library) controller = new OozieDiagramController(1300, 600); //controller.showGrid(true); // Display a background grid // start PickUpDragContoller (gwt-Drag-and-Drop library) dragController = new PickupDragController(controller.getView(), true); // register the dragController in GWT-Links controller.registerDragController(dragController); // panel for Property Table propPanel = new AbsolutePanel(); // stack Layout for left-side tree-view StackLayoutPanel stack = new StackLayoutPanel(Unit.EM); // create left tree-view panel stack.add(initNodeTree(), new HTML("Nodes"), 2); stack.add(initWrkflowTree(), new HTML("Workflow"), 2); initWidget(); // Create a three-pane layout with splitters. SplitLayoutPanel p = new SplitLayoutPanel(); Panel east = new AbsolutePanel(); // Create a top panel under menu to hold button (e.g, generate xml) AbsolutePanel btnpanl = new AbsolutePanel(); Button btn = createXMLButton(); btnpanl.add(btn); // p.addNorth(initMenu(), 30); // p.addEast(east, 250); p.addSouth(propPanel, 300); p.addWest(stack, 150); p.addSouth(btnpanl, 30); //((OozieDiagramController) controller).setXmlPanel(east); p.add(controller.getView()); // Attach the LayoutPanel to the RootLayoutPanel. RootLayoutPanel rp = RootLayoutPanel.get(); rp.add(p); }
From source file:uk.ac.ebi.fg.annotare2.web.gwt.editor.client.view.experiment.info.ExperimentalDesignsDialog.java
License:Apache License
private Widget createContent(List<OntologyTermGroup> groups) { StackLayoutPanel stackPanel = new StackLayoutPanel(Style.Unit.PX); stackPanel.setWidth("100%"); for (OntologyTermGroup group : groups) { stackPanel.add(createSectionContent(group), fromSafeConstant(group.getName()), 25); }//from w ww . j a va2 s. co m return stackPanel; }