List of usage examples for com.google.gwt.user.client.ui SplitLayoutPanel SplitLayoutPanel
public SplitLayoutPanel()
From source file:com.openkm.frontend.client.panel.center.HorizontalSplitLayoutExtended.java
License:Open Source License
/** * HorizontalSplitPanelExtendend/*from w w w . j a va 2 s . co m*/ * * @param handler */ public HorizontalSplitLayoutExtended(final HorizontalResizeHandler resizeHander) { super(); horizontalSplitLayoutPanel = new SplitLayoutPanel() { @Override public void onResize() { super.onResize(); leftWidth = Integer.parseInt( DOM.getStyleAttribute(DOM.getChild(horizontalSplitLayoutPanel.getElement(), 2), "left") .replace("px", "").trim()); rightWidth = this.getOffsetWidth() - Integer.parseInt( DOM.getStyleAttribute(DOM.getChild(horizontalSplitLayoutPanel.getElement(), 3), "left") .replace("px", "").trim()); resizeHander.onResize(leftWidth, rightWidth); } }; horizontalSplitLayoutPanel.setStyleName("okm-HorizontalSplitPanel"); initWidget(horizontalSplitLayoutPanel); }
From source file:com.openkm.frontend.client.panel.center.VerticalSplitLayoutExtended.java
License:Open Source License
/** * VerticalSplitLayoutExtended/* w w w . j av a2 s . c o m*/ * * @param handler */ public VerticalSplitLayoutExtended(final VerticalResizeHandler resizeHander) { super(); verticalSplitLayotPanel = new SplitLayoutPanel() { @Override public void onResize() { super.onResize(); topHeight = Integer.parseInt( DOM.getStyleAttribute(DOM.getChild(verticalSplitLayotPanel.getElement(), 2), "top") .replace("px", "").trim()); bottomHeight = this.getOffsetHeight() - Integer.parseInt( DOM.getStyleAttribute(DOM.getChild(verticalSplitLayotPanel.getElement(), 3), "top") .replace("px", "").trim()); resizeHander.onResize(topHeight, bottomHeight); } }; initWidget(verticalSplitLayotPanel); }
From source file:com.ponysdk.ui.terminal.ui.PTSplitLayoutPanel.java
License:Apache License
@Override public void create(final PTInstruction create, final UIService uiService) { init(create, uiService, new SplitLayoutPanel()); }
From source file:edu.caltech.ipac.firefly.ui.previews.DataSourceCoveragePreview.java
public DataSourceCoveragePreview(DataSourceCoverageData covData) { super(covData.getTitle(), covData.getTip()); _covData = covData;//w w w . ja v a 2 s. c om setName(covData.getTitle()); String group = covData.getGroup(); MiniPlotWidget mpw = new MiniPlotWidget(group); mpw.setImageSelection(true); mpw.setRemoveOldPlot(false); _plotDeck = new DisableablePlotDeckPanel(_prop.getName("noplot"), mpw, true); if (covData.getEnableDetails()) { _detailsView = new ScrollPanel(_details); SplitLayoutPanel display = new SplitLayoutPanel(); display.addSouth(_detailsView, 120); GwtUtil.setStyle(_detailsView, "borderTop", "1px solid gray"); GwtUtil.setStyle(_detailsView, "paddingTop", "3px"); display.add(_plotDeck); setDisplay(display); } else { setDisplay(_plotDeck); } }
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();/*from w w w .j av a 2 s.co m*/ 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:es.upm.fi.dia.oeg.map4rdf.client.view.DashboardView.java
License:Open Source License
@Inject public DashboardView(BrowserResources resources) { mapPanel = new LayoutPanel(); splitPanel = new SplitLayoutPanel(); leftPanel = new StackLayoutPanel(Unit.EM); centerPanel = new LayoutPanel(); mainPopupPanel = new ScrollPanel(); initWidget(createUi(resources));/*from w w w. java 2 s. co m*/ }
From source file:net.sf.mmm.client.ui.impl.gwt.widget.panel.adapter.UiWidgetAdapterGwtSplitPanel.java
License:Apache License
/** * {@inheritDoc}// w w w. j a va 2 s .c o m */ @Override protected SplitLayoutPanel createToplevelWidget() { SplitLayoutPanel splitPanel = new SplitLayoutPanel(); return splitPanel; }
From source file:org.apache.luke.client.LukeInspector.java
License:Apache License
public void onModuleLoad() { final RootPanel rootPanel = RootPanel.get(); CaptionPanel cptnpnlNewPanel = new CaptionPanel("New panel"); cptnpnlNewPanel.setCaptionHTML("Luke version 5.0"); rootPanel.add(cptnpnlNewPanel, 10, 10); cptnpnlNewPanel.setSize("959px", "652px"); TabPanel tabPanel = new TabPanel(); cptnpnlNewPanel.setContentWidget(tabPanel); tabPanel.setSize("5cm", "636px"); //LuceneIndexLoader.loadIndex(pName, this); SplitLayoutPanel splitLayoutPanel = new SplitLayoutPanel(); tabPanel.add(splitLayoutPanel, "Index overview", false); tabPanel.setVisible(true);//from www.j a v a 2 s. c o m splitLayoutPanel.setSize("652px", "590px"); SplitLayoutPanel splitLayoutPanel_1 = new SplitLayoutPanel(); splitLayoutPanel.addNorth(splitLayoutPanel_1, 288.0); Label lblIndexStatistics = new Label("Index statistics"); lblIndexStatistics.setDirectionEstimator(true); lblIndexStatistics.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); splitLayoutPanel_1.addNorth(lblIndexStatistics, 26.0); VerticalPanel verticalPanel = new VerticalPanel(); splitLayoutPanel_1.addWest(verticalPanel, 125.0); Label lblTest = new Label("Index name:"); verticalPanel.add(lblTest); lblTest.setWidth("109px"); Label lblTest_1 = new Label("# fields:"); verticalPanel.add(lblTest_1); Label lblNumber = new Label("# documents:"); verticalPanel.add(lblNumber); lblNumber.setWidth("101px"); Label lblTerms = new Label("# terms:"); verticalPanel.add(lblTerms); Label lblHasDeletions = new Label("Has deletions?"); verticalPanel.add(lblHasDeletions); Label lblNewLabel = new Label("Optimised?"); verticalPanel.add(lblNewLabel); Label lblIndexVersion = new Label("Index version:"); verticalPanel.add(lblIndexVersion); SplitLayoutPanel splitLayoutPanel_2 = new SplitLayoutPanel(); splitLayoutPanel.addWest(splitLayoutPanel_2, 240.0); // Create name column. TextColumn<Field> nameColumn = new TextColumn<Field>() { @Override public String getValue(Field field) { return field.getName(); } }; // Make the name column sortable. nameColumn.setSortable(true); // Create termCount column. TextColumn<Field> termCountColumn = new TextColumn<Field>() { @Override public String getValue(Field contact) { return contact.getTermCount(); } }; // Create decoder column. TextColumn<Field> decoderColumn = new TextColumn<Field>() { @Override public String getValue(Field contact) { return contact.getDecoder(); } }; final CellTable<Field> cellTable = new CellTable<Field>(); cellTable.addColumn(nameColumn, "Name"); cellTable.addColumn(termCountColumn, "Term count"); cellTable.addColumn(decoderColumn, "Decoder"); cellTable.setRowCount(FieldsDummyData.Fields.size(), true); // Set the range to display. In this case, our visible range is smaller than // the data set. cellTable.setVisibleRange(0, 3); // Create a data provider. AsyncDataProvider<Field> dataProvider = new AsyncDataProvider<Field>() { @Override protected void onRangeChanged(HasData<Field> display) { final Range range = display.getVisibleRange(); // Get the ColumnSortInfo from the table. final ColumnSortList sortList = cellTable.getColumnSortList(); // This timer is here to illustrate the asynchronous nature of this data // provider. In practice, you would use an asynchronous RPC call to // request data in the specified range. new Timer() { @Override public void run() { int start = range.getStart(); int end = start + range.getLength(); // This sorting code is here so the example works. In practice, you // would sort on the server. Collections.sort(FieldsDummyData.Fields, new Comparator<Field>() { public int compare(Field o1, Field o2) { if (o1 == o2) { return 0; } // Compare the name columns. int diff = -1; if (o1 != null) { diff = (o2 != null) ? o1.getName().compareTo(o2.getName()) : 1; } return sortList.get(0).isAscending() ? diff : -diff; } }); List<Field> dataInRange = FieldsDummyData.Fields.subList(start, end); // Push the data back into the list. cellTable.setRowData(start, dataInRange); } }.schedule(2000); } }; // Connect the list to the data provider. dataProvider.addDataDisplay(cellTable); // Add a ColumnSortEvent.AsyncHandler to connect sorting to the // AsyncDataPRrovider. AsyncHandler columnSortHandler = new AsyncHandler(cellTable); cellTable.addColumnSortHandler(columnSortHandler); // We know that the data is sorted alphabetically by default. cellTable.getColumnSortList().push(nameColumn); splitLayoutPanel_2.add(cellTable); SplitLayoutPanel splitLayoutPanel_3 = new SplitLayoutPanel(); splitLayoutPanel.addEast(splitLayoutPanel_3, 215.0); StackPanel stackPanel = new StackPanel(); rootPanel.add(stackPanel, 714, 184); stackPanel.setSize("259px", "239px"); FlowPanel flowPanel = new FlowPanel(); stackPanel.add(flowPanel, "Open index", false); flowPanel.setSize("100%", "100%"); TextBox textBox = new TextBox(); flowPanel.add(textBox); Button btnNewButton = new Button("..."); btnNewButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { DirectoryLister directoryLister = new DirectoryLister(); directoryLister.setPopupPosition(rootPanel.getAbsoluteLeft() + rootPanel.getOffsetWidth() / 2, rootPanel.getAbsoluteTop() + rootPanel.getOffsetHeight() / 2); directoryLister.show(); } }); flowPanel.add(btnNewButton); // exception handling // credits: http://code.google.com/p/mgwt/source/browse/src/main/java/com/googlecode/mgwt/examples/showcase/client/ShowCaseEntryPoint.java?repo=showcase GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { @Override public void onUncaughtException(Throwable e) { Window.alert("uncaught: " + e.getMessage()); String s = buildStackTrace(e, "RuntimeExceotion:\n"); Window.alert(s); e.printStackTrace(); } }); }
From source file:org.apache.oozie.tools.workflowgenerator.client.OozieWorkflowGenerator.java
License:Apache License
/** * onModuleLoad is the entry point method. *///from w ww . ja va 2 s .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:org.ebayopensource.turmeric.monitoring.client.view.ConsumerView.java
License:Open Source License
/** * Instantiates a new consumer view.//from w w w .j a va2 s.co m * * @param dashboard * the dashboard */ public ConsumerView(Dashboard dashboard) { // make the panel for the contents of the tab DockLayoutPanel contentPanel = new DockLayoutPanel(Unit.EM); initWidget(contentPanel); // heading Panel topPanel = new FlowPanel(); topPanel.addStyleName("summary-heading-panel"); Grid g = new Grid(1, 2); g.setHeight("100%"); g.setWidth("100%"); summaryHeading = new Label(" "); summaryHeading.setWidth("50em"); g.setWidget(0, 0, summaryHeading); g.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_MIDDLE); topPanel.add(g); // filters: dates, times and metrics filterWidget = new FilterWidget(); filterWidget.setDateFormat("dd MMM yyyy"); filterButton = new Button("Filter Criteria >>"); filterButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { pickFilter(); } }); g.setWidget(0, 1, filterButton); g.getCellFormatter().setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_MIDDLE); filterDialog = new DialogBox(true); filterDialog.setText("Select Filter Criteria"); FlowPanel contents = new FlowPanel(); filterDialog.setWidget(contents); contents.add(filterWidget); filterWidget.getApplyButton().addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { filterDialog.hide(true); } }); filterWidget.getCancelButton().addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { filterDialog.hide(true); } }); splitPanel = new SplitLayoutPanel(); contentPanel.addNorth(topPanel, 2.5); contentPanel.add(splitPanel); // scrolling panel for right hand side ScrollPanel rhs = new ScrollPanel(); rhs.setAlwaysShowScrollBars(true); rhs.addStyleName("summary-panel"); FlowPanel panel = new FlowPanel(); // Tables (which will be graphs in future releases) for when no Consumer // is selected: // Call Volume (isn't this just the same as Consumer Traffic from // service tab? CallCount for Service(/Operation) // by Consumer?) callVolumeTable = makeTable(); callVolumePanel = makePanel(ConsoleUtil.constants.callVolume(), callVolumeTable); panel.add(callVolumePanel); hide(callVolumePanel); // Performance (analogous to Least Performance for Service tab, but // grouped by Consumer) performanceTable = makeTable(); performancePanel = makePanel(ConsoleUtil.constants.performance(), performanceTable); panel.add(performancePanel); hide(performancePanel); // Errors (isn't this the same as Consumer Errors from service tab? // Errors for Service(/Operation) by Consumer? errorsTable = makeTable(); errorsPanel = makePanel(ConsoleUtil.constants.errors(), errorsTable); panel.add(errorsPanel); hide(errorsPanel); // Tables for when a Consumer has been selected: // Top Volume (CallCount for Consumer by Service) topVolumeTable = makeTable(); topVolumePanel = makePanel(ConsoleUtil.constants.topVolume(), topVolumeTable); panel.add(topVolumePanel); hide(topVolumePanel); // Least Performance (ResponseTime for Consumer by Service) leastPerformanceTable = makeTable(); leastPerformancePanel = makePanel(ConsoleUtil.constants.leastPerformance(), leastPerformanceTable); panel.add(leastPerformancePanel); hide(leastPerformancePanel); // Top Errors (Errors for Consumer by Service(NOTE: 5 columns: service + // error is returned!) topServiceErrorsTable = makeTable(); topServiceErrorsPanel = makePanel(ConsoleUtil.constants.topServiceErrors(), topServiceErrorsTable); panel.add(topServiceErrorsPanel); hide(topServiceErrorsPanel); // Consumer Errors (Errors for Consumer by ...?) topConsumerErrorsTable = makeTable(); topConsumerErrorsPanel = makePanel(ConsoleUtil.constants.topConsumerErrors(), topConsumerErrorsTable); panel.add(topConsumerErrorsPanel); hide(topConsumerErrorsPanel); rhs.add(panel); serviceListWidget = new ServiceListWidget(); splitPanel.addWest(serviceListWidget, 200); splitPanel.add(rhs); this.dashboard = dashboard; this.dashboard.addView(this, ConsoleUtil.constants.consumers()); }