Java Code Examples for com.google.gwt.user.client.ui.LayoutPanel#add()
The following examples show how to use
com.google.gwt.user.client.ui.LayoutPanel#add() .
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: 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 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: 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 4
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 5
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 6
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 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: 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 9
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 10
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 11
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 12
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 13
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 14
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 15
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 16
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 17
Source File: SocketBindingView.java From core with GNU Lesser General Public License v2.1 | 3 votes |
@Override public Widget createWidget() { socketGroups = new SocketGroupList(presenter, NameTokens.SocketBindingPresenter); sockets = new SocketList(presenter); remoteSockets = new RemoteSocketList(presenter); localSockets = new LocalSocketList(presenter); LayoutPanel layout = new LayoutPanel(); FakeTabPanel titleBar = new FakeTabPanel("Socket Bindings"); layout.add(titleBar); panel = new PagedView(); panel.addPage("Socket Binding Groups", socketGroups.asWidget()); panel.addPage("Inbound", sockets.asWidget()) ; panel.addPage("Outbound Remote", remoteSockets.asWidget()) ; panel.addPage("Outbound Local", localSockets.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 18
Source File: AcceptorOverview.java From core with GNU Lesser General Public License v2.1 | 2 votes |
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(Console.CONSTANTS.replace_me()); serverName.setStyleName("content-header-label"); HorizontalPanel header = new HorizontalPanel(); header.setStyleName("fill-layout-width"); header.add(serverName); final DeckPanel deck = new DeckPanel(); deck.addStyleName("fill-layout"); final ListBox selector = new ListBox(); selector.addItem("Type: Remote"); selector.addItem("Type: In-VM"); selector.addItem("Type: Generic"); selector.addChangeHandler(changeEvent -> deck.showWidget(selector.getSelectedIndex())); header.add(selector); selector.getElement().getParentElement().setAttribute("align", "right"); panel.add(header); panel.add(new ContentDescription(Console.CONSTANTS.hornetq_acceptor_type_desc())); genericAcceptors = new AcceptorList(presenter, AcceptorType.GENERIC); remoteAcceptors = new AcceptorList(presenter, AcceptorType.REMOTE); invmAcceptors = new AcceptorList(presenter, AcceptorType.INVM); deck.add(remoteAcceptors.asWidget()); deck.add(invmAcceptors.asWidget()); deck.add(genericAcceptors.asWidget()); deck.showWidget(0); panel.add(deck); return layout; }
Example 19
Source File: ConnectorOverview.java From core with GNU Lesser General Public License v2.1 | 2 votes |
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"); HorizontalPanel header = new HorizontalPanel(); header.setStyleName("fill-layout-width"); header.add(serverName); // ---- final DeckPanel deck = new DeckPanel(); deck.addStyleName("fill-layout"); final ListBox selector = new ListBox(); selector.addItem("Type: Remote"); selector.addItem("Type: In-VM"); selector.addItem("Type: Generic"); selector.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent changeEvent) { deck.showWidget(selector.getSelectedIndex()); } }); header.add(selector); selector.getElement().getParentElement().setAttribute("align", "right"); panel.add(header); panel.add(new ContentDescription(Console.CONSTANTS.jmsConnectorDescription())); genericConnectors = new ConnectorList(presenter, ConnectorType.GENERIC); remoteConnectors = new ConnectorList(presenter, ConnectorType.REMOTE); invmConnectors = new ConnectorList(presenter, ConnectorType.INVM); deck.add(remoteConnectors.asWidget()); deck.add(invmConnectors.asWidget()); deck.add(genericConnectors.asWidget()); deck.showWidget(0); panel.add(deck); return layout; }
Example 20
Source File: AcceptorOverview.java From core with GNU Lesser General Public License v2.1 | 2 votes |
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(Console.CONSTANTS.replace_me()); serverName.setStyleName("content-header-label"); HorizontalPanel header = new HorizontalPanel(); header.setStyleName("fill-layout-width"); header.add(serverName); // ---- final DeckPanel deck = new DeckPanel(); deck.addStyleName("fill-layout"); final ListBox selector = new ListBox(); selector.addItem("Type: Remote"); selector.addItem("Type: In-VM"); selector.addItem("Type: Generic"); selector.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent changeEvent) { deck.showWidget(selector.getSelectedIndex()); } }); header.add(selector); selector.getElement().getParentElement().setAttribute("align", "right"); panel.add(header); panel.add(new ContentDescription(Console.CONSTANTS.hornetq_acceptor_type_desc())); genericAcceptors = new AcceptorList(presenter, AcceptorType.GENERIC); remoteAcceptors = new AcceptorList(presenter, AcceptorType.REMOTE); invmAcceptors = new AcceptorList(presenter, AcceptorType.INVM); deck.add(remoteAcceptors.asWidget()); deck.add(invmAcceptors.asWidget()); deck.add(genericAcceptors.asWidget()); deck.showWidget(0); panel.add(deck); return layout; }