com.google.gwt.user.client.ui.LayoutPanel Java Examples
The following examples show how to use
com.google.gwt.user.client.ui.LayoutPanel.
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: GwtMockitoWidgetBaseClassesTest.java From gwtmockito with Apache License 2.0 | 6 votes |
@Test public void testPanels() throws Exception { invokeAllAccessibleMethods(new AbsolutePanel() {}); invokeAllAccessibleMethods(new CellPanel() {}); invokeAllAccessibleMethods(new ComplexPanel() {}); invokeAllAccessibleMethods(new DeckLayoutPanel() {}); invokeAllAccessibleMethods(new DeckPanel() {}); invokeAllAccessibleMethods(new DecoratorPanel() {}); invokeAllAccessibleMethods(new DockLayoutPanel(Unit.PX) {}); invokeAllAccessibleMethods(new DockPanel() {}); invokeAllAccessibleMethods(new FlowPanel() {}); invokeAllAccessibleMethods(new FocusPanel() {}); invokeAllAccessibleMethods(new HorizontalPanel() {}); invokeAllAccessibleMethods(new HTMLPanel("") {}); invokeAllAccessibleMethods(new LayoutPanel() {}); invokeAllAccessibleMethods(new PopupPanel() {}); invokeAllAccessibleMethods(new RenderablePanel("") {}); invokeAllAccessibleMethods(new ResizeLayoutPanel() {}); invokeAllAccessibleMethods(new SimpleLayoutPanel() {}); invokeAllAccessibleMethods(new SimplePanel() {}); invokeAllAccessibleMethods(new SplitLayoutPanel() {}); invokeAllAccessibleMethods(new StackPanel() {}); invokeAllAccessibleMethods(new VerticalPanel() {}); }
Example #2
Source File: RBACContextView.java From core with GNU Lesser General Public License v2.1 | 6 votes |
public void launch() { final DefaultWindow window = new DefaultWindow("RBAC Diagnostics"); LayoutPanel inner = new LayoutPanel(); inner.setStyleName("default-window-content"); inner.addStyleName("rbac-diagnostics"); ClickHandler clickHandler = new ClickHandler() { @Override public void onClick(ClickEvent event) { window.hide(); } }; Widget content = new WindowContentBuilder(asWidget(), new DialogueOptions( "Done", clickHandler, "Cancel", clickHandler) ).build(); inner.add(content); window.setWidget(inner); window.setWidth(480); window.setHeight(360); window.center(); }
Example #3
Source File: JMSBridgeView.java From core with GNU Lesser General Public License v2.1 | 6 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("JMS Bridges"); layout.add(titleBar); jmsBridgeList = new JMSBridgeList(presenter); Widget widget = jmsBridgeList.asWidget(); layout.add(widget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(widget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #4
Source File: FiltersView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Filters"); layout.add(titleBar); leftPanel = new PagedView(true); customFilterEditor = new FilterEditor(presenter, CUSTOM_ADDRESS, "Custom Filter", false); errorPageList = new FilterEditor(presenter, ERROR_PAGE_ADDRESS, "Error Page", false); expressionList = new FilterEditor(presenter, EXPRESSION_ADDRESS, "Expression", false); gzipList = new FilterEditor(presenter, GZIP_ADDRESS, "Gzip", false); modclusterList = new FilterEditor(presenter, MODCLUSTER_ADDRESS, "ModCluster", true); requestLimitList = new FilterEditor(presenter, REQUEST_LIMIT_ADDRESS, "Request Limit", false); responseHeaderList = new FilterEditor(presenter, RESPONSE_HEADER_ADDRESS, "Response Header", false); rewriteList = new FilterEditor(presenter, REWRITE_ADDRESS, "Rewrite", false); leftPanel.addPage("Custom Filter", customFilterEditor.asWidget()); leftPanel.addPage("Error Page", errorPageList.asWidget()); leftPanel.addPage("Expression", expressionList.asWidget()); leftPanel.addPage("Gzip", gzipList.asWidget()); leftPanel.addPage("ModCluster", modclusterList.asWidget()); leftPanel.addPage("Request Limit", requestLimitList.asWidget()); leftPanel.addPage("Response Header", responseHeaderList.asWidget()); leftPanel.addPage("Rewrite", rewriteList.asWidget()); // default page leftPanel.showPage(0); Widget panelWidget = leftPanel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(panelWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #5
Source File: JMSEditor.java From core with GNU Lesser General Public License v2.1 | 5 votes |
public Widget asWidget() { LayoutPanel layout = new LayoutPanel(); VerticalPanel panel = new VerticalPanel(); panel.setStyleName("rhs-content-panel"); ScrollPanel scroll = new ScrollPanel(panel); layout.add(scroll); layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT); serverName = new HTML("Replace me"); serverName.setStyleName("content-header-label"); panel.add(serverName); panel.add(new ContentDescription("Configuration for JMS queues and topics.")); TabPanel bottomLayout = new TabPanel(); bottomLayout.addStyleName("default-tabpanel"); bottomLayout.addStyleName("master_detail-detail"); queueList = new JMSQueueList(presenter); bottomLayout.add(queueList.asWidget(), "Queues"); topicList = new JMSTopicList(presenter); bottomLayout.add(topicList.asWidget(), "Topics"); bottomLayout.selectTab(0); panel.add(bottomLayout); return layout; }
Example #6
Source File: MsgDestinationsView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Messaging Destinations"); layout.add(titleBar); PagedView panel = new PagedView(true); coreQueueEditor = new CoreQueueEditor(presenter); jmsEditor = new JMSEditor(presenter); securitySettings = new SecurityDetails(presenter); addressingSettings = new AddressingDetails(presenter); divertList = new DivertList(presenter); panel.addPage("Core Queues", coreQueueEditor.asWidget()) ; panel.addPage("JMS Queues/Topics", jmsEditor.asWidget()) ; panel.addPage("Security Settings", securitySettings.asWidget()) ; panel.addPage("Address Settings", addressingSettings.asWidget()) ; panel.addPage("Diverts", divertList.asWidget()) ; // default page panel.showPage(0); Widget panelWidget = panel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(panelWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #7
Source File: CoreQueueEditor.java From core with GNU Lesser General Public License v2.1 | 5 votes |
public Widget asWidget() { LayoutPanel layout = new LayoutPanel(); VerticalPanel panel = new VerticalPanel(); panel.setStyleName("rhs-content-panel"); ScrollPanel scroll = new ScrollPanel(panel); layout.add(scroll); layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT); serverName = new HTML("Replace me"); serverName.setStyleName("content-header-label"); panel.add(serverName); panel.add(new ContentDescription("Configuration for core queues.")); TabPanel bottomLayout = new TabPanel(); bottomLayout.addStyleName("default-tabpanel"); bottomLayout.addStyleName("master_detail-detail"); queueList = new CoreQueueList(presenter); bottomLayout.add(queueList.asWidget(), "Queues"); bottomLayout.selectTab(0); panel.add(bottomLayout); return layout; }
Example #8
Source File: MsgClusteringView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Messaging Clustering"); layout.add(titleBar); PagedView panel = new PagedView(true); ResourceDescription broadcastDefinition = presenter.getDescriptionRegistry().lookup(BROADCASTGROUP_ADDRESS); ResourceDescription discoveryDefinition = presenter.getDescriptionRegistry().lookup(DISCOVERYGROUP_ADDRESS); ResourceDescription clusterDefinition = presenter.getDescriptionRegistry().lookup(CLUSTERCONNECTION_ADDRESS); broadcastGroupList = new BroadcastGroupList(broadcastDefinition, presenter, "Broadcast Groups", BROADCASTGROUP_ADDRESS); discoveryGroupList = new DiscoveryGroupList(discoveryDefinition, presenter, "Discovery Groups", DISCOVERYGROUP_ADDRESS); clusterConnectionList = new ClusterConnectionList(clusterDefinition, presenter, "Cluster Connections", CLUSTERCONNECTION_ADDRESS); panel.addPage("Broadcast Group", broadcastGroupList.asWidget()); panel.addPage("Discovery Group", discoveryGroupList.asWidget()); panel.addPage("Cluster Connection", clusterConnectionList.asWidget()); // default page panel.showPage(0); Widget panelWidget = panel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(panelWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #9
Source File: ColumnFilter.java From core with GNU Lesser General Public License v2.1 | 5 votes |
public Widget asWidget() { panel = new LayoutPanel(); textBox = new TextBox(); textBox.setMaxLength(30); textBox.setVisibleLength(20); textBox.addKeyUpHandler(keyUpEvent -> { String token = textBox.getText(); if (token != null && !token.equals("")) { if (!token.equals(currentFilterExpression)) { // prevent keyUp w/o value change currentFilterExpression = token; selection.clear(); applyFilter(token); } } else { selection.clear(); clear(); } }); HTML icon = new HTML("<i class=\"icon-search\"></i>"); icon.getElement().setAttribute("style", "padding-top:5px"); textBox.getElement().setAttribute("style", "padding-top:5px"); panel.add(icon); panel.add(textBox); panel.setWidgetLeftWidth(icon, 5, Style.Unit.PX, 20, Style.Unit.PX); panel.setWidgetLeftWidth(textBox, 25, Style.Unit.PX, 205, Style.Unit.PX); panel.getElement().getStyle().setMargin(5, Style.Unit.PX); return panel; }
Example #10
Source File: MsgConnectionsView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Messaging Connections"); layout.add(titleBar); PagedView panel = new PagedView(true); acceptorOverview = new AcceptorOverview(presenter); connectorOverview = new ConnectorOverview(presenter); connectionFactories = new ConnectionFactoryList(presenter); connectorServiceList = new ConnectorServiceList(presenter); bridgesList = new BridgesList(presenter); pooledConnectionFactoryView = new PooledConnectionFactoryView(presenter); panel.addPage("Acceptor", acceptorOverview.asWidget()); panel.addPage("Connector", connectorOverview.asWidget()); panel.addPage("Connector Services", connectorServiceList.asWidget()); panel.addPage("Connection Factories", connectionFactories.asWidget()); panel.addPage("Pooled Connection Factory", pooledConnectionFactoryView.asWidget()); panel.addPage("Bridges", bridgesList.asWidget()); // default page panel.showPage(0); Widget panelWidget = panel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(panelWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #11
Source File: JGroupsSubsystemView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("JGroups"); layout.add(titleBar); panel = new PagedView(); stackOverview = new StackOverview(presenter); stackEditor = new StackEditor(presenter); transportEditor = new TransportEditor(presenter); panel.addPage("Protocol Stacks", stackOverview.asWidget()); panel.addPage("Protocols", stackEditor.asWidget()); panel.addPage("Transport", transportEditor.asWidget()); // default page panel.showPage(0); Widget panelWidget = panel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(panelWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #12
Source File: EEServicesView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
Widget asWidget() { LayoutPanel layout = new LayoutPanel(); panel = new PagedView(true); contextView = new ServiceViewTemplate(presenter, "Context Services", AddressTemplate.of("{selected.profile}/subsystem=ee/context-service=*")); executorView = new ServiceViewTemplate(presenter, "Executor", AddressTemplate.of("{selected.profile}/subsystem=ee/managed-executor-service=*")); scheduledView = new ServiceViewTemplate(presenter, "Scheduled Executor", AddressTemplate.of("{selected.profile}/subsystem=ee/managed-scheduled-executor-service=*")); threadView = new ServiceViewTemplate(presenter, "Thread Factories", AddressTemplate.of("{selected.profile}/subsystem=ee/managed-thread-factory=*")); // TODO: default bindings panel.addPage("Context Service", contextView.asWidget()); panel.addPage("Executor", executorView.asWidget()); panel.addPage("Scheduled Executor", scheduledView.asWidget()); panel.addPage("Thread Factories", threadView.asWidget()); // default page panel.showPage(0); Widget panelWidget = panel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(panelWidget, 0, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #13
Source File: MsgConnectionsView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Messaging Connections"); layout.add(titleBar); panel = new PagedView(true); acceptorOverview = new AcceptorOverview(presenter); connectorOverview = new ConnectorOverview(presenter); connectorServiceList = new ConnectorServiceList(presenter); bridgesList = new BridgesList(presenter); panel.addPage("Acceptor", acceptorOverview.asWidget()) ; panel.addPage("Connector", connectorOverview.asWidget()) ; panel.addPage("Connector Services", connectorServiceList.asWidget()) ; panel.addPage("Bridges", bridgesList.asWidget()) ; // default page panel.showPage(0); Widget panelWidget = panel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(panelWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #14
Source File: MsgDestinationsView.java From core with GNU Lesser General Public License v2.1 | 5 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Messaging Destinations"); layout.add(titleBar); panel = new PagedView(true); jmsEditor = new JMSEditor(presenter); connectionFactories = new ConnectionFactoryList(presenter); securitySettings = new SecurityDetails(presenter); addressingSettings = new AddressingDetails(presenter); divertList = new DivertList(presenter); panel.addPage("Queues/Topics", jmsEditor.asWidget()) ; panel.addPage("Connection Factories", connectionFactories.asWidget()) ; panel.addPage("Security Settings", securitySettings.asWidget()) ; panel.addPage("Address Settings", addressingSettings.asWidget()) ; panel.addPage("Diverts", divertList.asWidget()) ; // default page panel.showPage(0); Widget panelWidget = panel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(panelWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #15
Source File: VMMetricsView.java From core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Virtual Machine Status"); layout.add(titleBar); ClickHandler refreshHandler = new ClickHandler() { @Override public void onClick(ClickEvent event) { presenter.refresh(); } }; // ---- VerticalPanel vpanel = new VerticalPanel(); vpanel.setStyleName("rhs-content-panel"); ScrollPanel scroll = new ScrollPanel(vpanel); layout.add(scroll); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(scroll, 40, Style.Unit.PX, 100, Style.Unit.PCT); // ------------------------ osName = new HTML(); processors = new HTML(); uptime = new HTML(); HorizontalPanel header = new HorizontalPanel(); header.setStyleName("fill-layout-width"); vmName = new ContentHeaderLabel(""); header.add(vmName); HTML refreshBtn = new HTML("<i class='icon-refresh'></i> Refresh Results"); refreshBtn.setStyleName("html-link"); refreshBtn.addClickHandler(refreshHandler); osPanel = new VerticalPanel(); osPanel.add(refreshBtn); header.add(osPanel); vpanel.add(header); vpanel.add(osName); vpanel.add(processors); vpanel.add(uptime); // 50/50 osPanel.getElement().getParentElement().setAttribute("style", "width:50%; vertical-align:top;padding-right:15px;"); osPanel.getElement().getParentElement().setAttribute("align", "right"); vmName.getElement().getParentElement().setAttribute("style", "width:50%; vertical-align:top"); // -- heapChart = new HeapChartView("Heap Usage") ; nonHeapChart = new HeapChartView("Non Heap Usage", false) ; vpanel.add(heapChart.asWidget()); Widget widget = nonHeapChart.asWidget(); //vpanel.add(widget); // -- threadChart = new ThreadChartView("Thread Usage"); vpanel.add(threadChart.asWidget()); //threadPanel.add(osPanel); return layout; }
Example #16
Source File: PicketLinkFinder.java From core with GNU Lesser General Public License v2.1 | 4 votes |
void launchAddFederationDialog() { ResourceDescription resourceDescription = StaticResourceDescription .from(PICKET_LINK_RESOURCES.newFederationDescription()); ComboBoxItem securityDomains = new ComboBoxItem("security-domain", "Security Domain"); securityDomains.setRequired(false); securityDomains.setValueMap(this.securityDomains); DefaultWindow dialog = new DefaultWindow(Console.MESSAGES.newTitle("Federation")); ModelNodeFormBuilder.FormAssets assets = new ModelNodeFormBuilder() .setResourceDescription(resourceDescription) .addFactory("security-domain", attributeDescription -> securityDomains) .setSecurityContext(securityContext) .unsorted() .build(); assets.getForm().setEnabled(true); assets.getForm().addFormValidator(new IdentityProviderEditor.IdentityProviderFormValidator()); DialogueOptions options = new DialogueOptions( event -> { FormValidation validation = assets.getForm().validate(); if (!validation.hasErrors()) { dialog.hide(); ModelNode payload = assets.getForm().getUpdatedEntity(); String name = payload.get(NAME).asString(); String ip = payload.get("identity-provider").asString(); Operation addFederation = new Operation.Builder(ADD, FEDERATION_TEMPLATE.resolve(statementContext, name)).build(); Operation addIdentityProvider = new Operation.Builder(ADD, IDENTITY_PROVIDER_TEMPLATE.resolve(statementContext, name, ip)) .param("security-domain", payload.get("security-domain").asString()) .param("external", payload.get("external").asBoolean()) .param("url", payload.get("url").asString()) .build(); dispatcher.execute(new DMRAction(new Composite(addFederation, addIdentityProvider)), new SimpleCallback<DMRResponse>() { @Override public void onFailure(final Throwable caught) { super.onFailure(caught); readFederations(); } @Override public void onSuccess(final DMRResponse dmrResponse) { Console.info(Console.MESSAGES.successfullyAdded((name))); readFederations(); } }); } }, event -> dialog.hide() ); VerticalPanel layout = new VerticalPanel(); layout.setStyleName("fill-layout-width window-content"); ContentDescription text = new ContentDescription(resourceDescription.get(DESCRIPTION).asString()); layout.add(text); layout.add(assets.getHelp().asWidget()); layout.add(assets.getForm().asWidget()); ScrollPanel scroll = new ScrollPanel(layout); LayoutPanel content = new LayoutPanel(); content.addStyleName("fill-layout"); content.add(scroll); content.add(options); content.getElement().setAttribute("style", "margin-bottom:10px"); content.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 92, Style.Unit.PCT); content.setWidgetBottomHeight(options, 0, Style.Unit.PX, 35, Style.Unit.PX); dialog.setWidth(640); dialog.setHeight(480); dialog.setWidget(new TrappedFocusPanel(content)); dialog.setGlassEnabled(true); dialog.center(); }
Example #17
Source File: LHSServerGroupNavigation.java From core with GNU Lesser General Public License v2.1 | 4 votes |
public LHSServerGroupNavigation() { layout = new LayoutPanel(); layout.setStyleName("fill-layout"); stack = new VerticalPanel(); stack.setStyleName("fill-layout-width"); serverGroupSection = new ServerGroupSection(); stack.add(serverGroupSection.asWidget()); DeploymentSection deploymentSection = new DeploymentSection(); stack.add(deploymentSection.asWidget()); layout.add(stack); }
Example #18
Source File: ServletView.java From core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Servlet Container"); layout.add(titleBar); panel = new PagedView(); serverList = new ContainerList(presenter); jspView = new JSPView(presenter); webSockets = new WebSocketView(presenter); sessionView = new SessionView(presenter); cookieView = new CookieView(presenter); panel.addPage("Servlet Container", serverList.asWidget()); panel.addPage("JSP", jspView.asWidget()); panel.addPage("Web Sockets", webSockets.asWidget()); panel.addPage("Sessions", sessionView.asWidget()); panel.addPage("Cookies", cookieView.asWidget()); // default page panel.showPage(0); Widget panelWidget = panel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(panelWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); // clear states panel.addPageCallback( new PagedView.PageCallback() { @Override public void onRevealPage(int index) { if (0 == index) { presenter.clearContainer(); } } }); return layout; }
Example #19
Source File: MainLayoutViewImpl.java From core with GNU Lesser General Public License v2.1 | 4 votes |
@Inject public MainLayoutViewImpl(final Header header, Footer footer, MessageCenter messageCenter, PlaceManager placeManager) { this.messageCenter = messageCenter; this.header = header; this.placeManager = placeManager; mainContentPanel = new LayoutPanel(); mainContentPanel.setStyleName("main-content-panel"); mainContentPanel.addStyleName("animated"); // see http://www.w3.org/TR/wai-aria/states_and_properties#aria-live mainContentPanel.getElement().setAttribute("role", "region"); mainContentPanel.getElement().setAttribute("aria-live", "polite"); mainContentPanel.getElement().setId("main-content-area"); headerPanel = new LayoutPanel(); headerPanel.setStyleName("header-panel"); headerPanel.getElement().setId("header"); footerPanel = new LayoutPanel(); footerPanel.setStyleName("footer-panel"); footerPanel.getElement().setId("footer"); panel = new DockLayoutPanel(Style.Unit.PX); panel.getElement().setAttribute("id", "container"); panel.addNorth(headerPanel, 80); panel.addSouth(footerPanel, 42); panel.add(mainContentPanel); getHeaderPanel().add(header.asWidget()); getFooterPanel().add(footer.asWidget()); // the application window window = new DefaultWindow(""); // window.addStyleName("animated"); window.addCloseHandler(new CloseHandler<PopupPanel>() { @Override public void onClose(CloseEvent<PopupPanel> event) { Console.getPlaceManager().revealRelativePlace(-1); // clearing the slot: // this is necessary to signal GWTP that the slot is not used // without subsequent attempts to reveal the same place twice would not succeed Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() { @Override public void execute() { presenter.clearSlot(MainLayoutPresenter.TYPE_Popup); } }); /* window.removeStyleName(ACTIVE_CSS); window.addStyleName(INACTIVE_CSS);*/ } }); window.setWidth(640); window.setHeight(480); window.setAutoHideOnHistoryEventsEnabled(true); //window.setGlassStyleName("application-panel-glass"); window.setGlassEnabled(true); }
Example #20
Source File: MainLayoutViewImpl.java From core with GNU Lesser General Public License v2.1 | 4 votes |
public LayoutPanel getHeaderPanel() { return headerPanel; }
Example #21
Source File: MainLayoutViewImpl.java From core with GNU Lesser General Public License v2.1 | 4 votes |
public LayoutPanel getFooterPanel() { return footerPanel; }
Example #22
Source File: SimpleLayout.java From core with GNU Lesser General Public License v2.1 | 4 votes |
public Widget build() { layout = new LayoutPanel(); layout.setStyleName("fill-layout"); FakeTabPanel titleBar = null; if(!isPlain) { titleBar = new FakeTabPanel(title); layout.add(titleBar); } if(this.toolStrip !=null) { layout.add(toolStrip); } VerticalPanel panel = new VerticalPanel(); panel.setStyleName("rhs-content-panel"); ScrollPanel scroll = new ScrollPanel(panel); layout.add(scroll); // titlebar offset, if exists int offset = isPlain ? 0 : 40; if(toolStrip!=null) { if(!isPlain) layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(toolStrip, offset, Style.Unit.PX, 30, Style.Unit.PX); layout.setWidgetTopHeight(scroll, offset+30, Style.Unit.PX, 100, Style.Unit.PCT); } else { if(!isPlain) layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(scroll, offset, Style.Unit.PX, 100, Style.Unit.PCT); } if(null==headlineWidget) { panel.add(new ContentHeaderLabel(headline)); } else { panel.add(headlineWidget); } if(description!=null) { description.setStyleName("content-description"); panel.add(description); } for(NamedWidget item : details) { panel.add(item.widget); item.widget.getElement().addClassName("fill-layout-width"); } //layout.getElement().setAttribute("style", "border:1px solid red"); return layout; }
Example #23
Source File: OneToOneLayout.java From core with GNU Lesser General Public License v2.1 | 4 votes |
public Widget build() { layout = new LayoutPanel(); layout.setStyleName("fill-layout"); FakeTabPanel titleBar = null; if(!isPlain) { titleBar = new FakeTabPanel(title); layout.add(titleBar); } if(this.toolStrip !=null) { layout.add(toolStrip); } VerticalPanel panel = new VerticalPanel(); panel.setStyleName("rhs-content-panel"); ScrollPanel scroll = new ScrollPanel(panel); layout.add(scroll); // titlebar offset, if exists int offset = isPlain ? 0 : 40; if(toolStrip!=null) { if(!isPlain) layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(toolStrip, offset, Style.Unit.PX, 30, Style.Unit.PX); layout.setWidgetTopHeight(scroll, offset+30, Style.Unit.PX, 100, Style.Unit.PCT); } else { if(!isPlain) layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(scroll, offset, Style.Unit.PX, 100, Style.Unit.PCT); } if(null==headlineWidget) { panel.add(new ContentHeaderLabel(headline)); } else { panel.add(headlineWidget); } panel.add(contentDescription); if(master!=null) { if(master.title!=null && !master.title.isEmpty()) panel.add(new ContentGroupLabel(master.title)); if(masterTools!=null) panel.add(masterTools); master.widget.getElement().setAttribute("role", "application"); panel.add(master.widget); } // ----- if(detail!=null) { detail.widget.getElement().addClassName("master_detail-detail"); if(detail.title!=null && !detail.title.isEmpty()) panel.add(new ContentGroupLabel(detail.title)); panel.add(detail.widget); detail.widget.getElement().addClassName("fill-layout-width"); detail.widget.getElement().setAttribute("role", "application"); } else if(details.size()>0) { TabPanel tabs = new TabPanel(); tabs.setStyleName("default-tabpanel"); tabs.addStyleName("master_detail-detail"); tabs.getElement().setAttribute("style", "margin-top:15px;"); for(NamedWidget item : details) { tabs.add(item.widget, item.title); item.widget.getElement().addClassName("fill-layout-width"); item.widget.getElement().setAttribute("role", "application"); } panel.add(tabs); if(!details.isEmpty()) tabs.selectTab(0); } //layout.getElement().setAttribute("style", "border:1px solid red"); return layout; }
Example #24
Source File: MonitorView.java From EasyML with Apache License 2.0 | 4 votes |
public LayoutPanel getLayoutPanel() { return layoutPanel; }
Example #25
Source File: DialogViewImpl.java From core with GNU Lesser General Public License v2.1 | 4 votes |
@Override public Widget createWidget() { this.container = new LayoutPanel(); this.container.setStyleName("fill-layout"); return container; }
Example #26
Source File: GwtMockitoTestRunner.java From gwtmockito with Apache License 2.0 | 4 votes |
/** * Returns a collection of classes whose non-abstract methods should always be replaced with * no-ops. By default, this list includes {@link Composite}, {@link DOM} {@link UIObject}, * {@link Widget}, {@link Image}, and most subclasses of {@link Panel}. It will also include any * classes specified via the {@link WithClassesToStub} annotation on the test class. This makes * it much safer to test code that uses or extends these types. * <p> * This list can be customized via {@link WithClassesToStub} or by defining a new test runner * extending {@link GwtMockitoTestRunner} and overriding this method. This allows users to * explicitly stub out particular classes that are causing problems in tests. If you override this * method, you will probably want to retain the classes that are stubbed here by doing something * like this: * * <pre> * @Override * protected Collection<Class<?>> getClassesToStub() { * Collection<Class<?>> classes = super.getClassesToStub(); * classes.add(MyBaseWidget.class); * return classes; * } * </pre> * * @return a collection of classes whose methods should be stubbed with no-ops while running tests */ protected Collection<Class<?>> getClassesToStub() { Collection<Class<?>> classes = new LinkedList<Class<?>>(); classes.add(Composite.class); classes.add(DOM.class); classes.add(UIObject.class); classes.add(Widget.class); classes.add(DataGrid.class); classes.add(HTMLTable.class); classes.add(Image.class); classes.add(AbsolutePanel.class); classes.add(CellList.class); classes.add(CellPanel.class); classes.add(CellTable.class); classes.add(ComplexPanel.class); classes.add(DeckLayoutPanel.class); classes.add(DeckPanel.class); classes.add(DecoratorPanel.class); classes.add(DockLayoutPanel.class); classes.add(DockPanel.class); classes.add(FlowPanel.class); classes.add(FocusPanel.class); classes.add(HorizontalPanel.class); classes.add(HTMLPanel.class); classes.add(LayoutPanel.class); classes.add(Panel.class); classes.add(PopupPanel.class); classes.add(RenderablePanel.class); classes.add(ResizeLayoutPanel.class); classes.add(SimpleLayoutPanel.class); classes.add(SimplePanel.class); classes.add(SplitLayoutPanel.class); classes.add(StackPanel.class); classes.add(VerticalPanel.class); classes.add(ValueListBox.class); WithClassesToStub annotation = unitTestClass.getAnnotation(WithClassesToStub.class); if (annotation != null) { classes.addAll(Arrays.asList(annotation.value())); } return classes; }
Example #27
Source File: MonitorView.java From EasyML with Apache License 2.0 | 4 votes |
public void setLayoutPanel(LayoutPanel layoutPanel) { this.layoutPanel = layoutPanel; }
Example #28
Source File: JMSEditor.java From core with GNU Lesser General Public License v2.1 | 3 votes |
public Widget asWidget() { LayoutPanel layout = new LayoutPanel(); VerticalPanel panel = new VerticalPanel(); panel.setStyleName("rhs-content-panel"); ScrollPanel scroll = new ScrollPanel(panel); layout.add(scroll); layout.setWidgetTopHeight(scroll, 0, Style.Unit.PX, 100, Style.Unit.PCT); // --- serverName = new HTML("Replace me"); serverName.setStyleName("content-header-label"); panel.add(serverName); panel.add(new ContentDescription("Queue and Topic destinations.")); // ---- TabPanel bottomLayout = new TabPanel(); bottomLayout.addStyleName("default-tabpanel"); bottomLayout.addStyleName("master_detail-detail"); queueList = new QueueList(presenter); bottomLayout.add(queueList.asWidget(),"Queues"); topicList = new TopicList(presenter); bottomLayout.add(topicList.asWidget(),"Topics"); bottomLayout.selectTab(0); panel.add(bottomLayout); return layout; }
Example #29
Source File: MsgClusteringView.java From core with GNU Lesser General Public License v2.1 | 3 votes |
@Override public Widget createWidget() { LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Messaging Clustering"); layout.add(titleBar); panel = new PagedView(true); broadcastGroupList = new BroadcastGroupList(presenter); discoveryGroupList = new DiscoveryGroupList(presenter); clusterConnectionList = new ClusterConnectionList(presenter); panel.addPage("Broadcast", broadcastGroupList.asWidget()) ; panel.addPage("Discovery", discoveryGroupList.asWidget()) ; panel.addPage("Cluster Connections", clusterConnectionList.asWidget()) ; // default page panel.showPage(0); Widget panelWidget = panel.asWidget(); layout.add(panelWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(panelWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }
Example #30
Source File: JPAMetricsView.java From core with GNU Lesser General Public License v2.1 | 3 votes |
@Override public Widget createWidget() { pages = new PagedView(); this.deploymentList = new PersistenceUnitList(presenter); this.basicMetrics = new BasicMetrics(this.presenter); pages.addPage("Persistence Units", deploymentList.asWidget()); pages.addPage("Basic Metrics", basicMetrics.asWidget()); // default page pages.showPage(0); LayoutPanel layout = new LayoutPanel(); // Top Most Tab FakeTabPanel titleBar = new FakeTabPanel("JPA"); layout.add(titleBar); Widget pagesWidget = pages.asWidget(); layout.add(pagesWidget); layout.setWidgetTopHeight(titleBar, 0, Style.Unit.PX, 40, Style.Unit.PX); layout.setWidgetTopHeight(pagesWidget, 40, Style.Unit.PX, 100, Style.Unit.PCT); return layout; }