com.google.gwt.user.client.ui.DisclosurePanel Java Examples
The following examples show how to use
com.google.gwt.user.client.ui.DisclosurePanel.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ContentBox.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public ContentBox(final String id, final String title, final SafeHtml body, final String linkTitle, final String linkTarget) { dp = new DisclosurePanel(); dp.setHeader(new HTML(TEMPLATES.header(IdHelper.asId(id + "_", getClass(), "_" + "header"), title))); dp.addOpenHandler(this); dp.addCloseHandler(this); dp.setOpen(true); String linkId = IdHelper.asId(id + "_", getClass(), "_" + "link"); HTMLPanel panel = new HTMLPanel(TEMPLATES.body(body, linkId)); panel.addStyleName("homepage-content-box-body"); InlineHyperlink hyperlink = new InlineHyperlink(linkTitle, linkTarget); hyperlink.addStyleName("homepage-link"); panel.add(hyperlink, linkId); dp.add(panel); initWidget(dp); setStyleName("homepage-content-box"); }
Example #2
Source File: ContentBox.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public ContentBox(final String id, final String title, final SafeHtml body, Widget widget) { dp = new DisclosurePanel(); dp.setHeader(new HTML(TEMPLATES.header(IdHelper.asId(id + "_", getClass(), "_" + "header"), title))); dp.addOpenHandler(this); dp.addCloseHandler(this); dp.setOpen(true); String linkId = HTMLPanel.createUniqueId(); HTMLPanel panel = new HTMLPanel(TEMPLATES.body(body, linkId)); panel.addStyleName("homepage-content-box-body"); panel.add(widget, linkId); dp.add(panel); initWidget(dp); setStyleName("homepage-content-box"); }
Example #3
Source File: DisclosureStackPanel.java From EasyML with Apache License 2.0 | 5 votes |
public DisclosureStackPanel(String title) { panel = new DisclosurePanel(title); panel.setOpen(true); panel.setAnimationEnabled(true); panel.getElement().setAttribute("style", "width:100%;"); panel.setStyleName("myDisclosurePanel"); panel.getHeader().setStyleName("myDisclosurePanel-header"); panel.setSize("100%", "100%"); }
Example #4
Source File: MonitorView.java From EasyML with Apache License 2.0 | 4 votes |
@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(); 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; }
Example #5
Source File: DisclosureStackPanel.java From EasyML with Apache License 2.0 | 4 votes |
public DisclosurePanel asWidget() { return panel; }
Example #6
Source File: ContentBox.java From core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void onOpen(final OpenEvent<DisclosurePanel> event) { setIconClassname("icon-angle-down"); }
Example #7
Source File: ContentBox.java From core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public void onClose(final CloseEvent<DisclosurePanel> event) { setIconClassname("icon-angle-right"); }