Java Code Examples for com.google.gwt.user.client.ui.LayoutPanel#setWidgetTopHeight()
The following examples show how to use
com.google.gwt.user.client.ui.LayoutPanel#setWidgetTopHeight() .
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: 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 3
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 4
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 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); 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 6
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 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: 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 9
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 10
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 11
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 12
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 13
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; }
Example 14
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 15
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 16
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 17
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 18
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 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(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; }