List of usage examples for com.google.gwt.gen2.table.override.client Grid Grid
public Grid(int rows, int columns)
From source file:org.sonar.plugins.core.hotspots.client.GwtHotspots.java
License:Open Source License
@Override protected Widget doOnResourceLoad(Resource resource) { Grid grid = new Grid(1, 2); grid.setStylePrimaryName("gwt-Hotspots"); loadHotspots(grid, resource);//from ww w . j av a2 s. c om return grid; }
From source file:org.sonar.plugins.core.violationsviewer.client.ViolationsViewer.java
License:Open Source License
@Override protected Widget doOnResourceLoad(Resource resource) { this.resource = resource; mainPanel.clear();/*from w w w . j ava 2 s . com*/ mainPanel.add(loading); mainPanel.setWidth("100%"); mainPanel.setStyleName("gwt-Violations"); sourcePanel = null; // reload sources when selecting a new file header = new Grid(1, 5); header.setWidth("100%"); header.setStylePrimaryName("gwt-ViewerHeader"); header.getCellFormatter().setStyleName(0, 0, "thin left"); header.getCellFormatter().setStyleName(0, 1, "right"); initFilters(); if (periodBox.getItemCount() > 1) { header.setWidget(0, 1, periodBox); header.getCellFormatter().setStyleName(0, 1, "thin cell right"); } header.setWidget(0, 2, filterBox); header.getCellFormatter().setStyleName(0, 2, "thin cell right"); header.setHTML(0, 3, "<div class='note'>" + I18nConstants.INSTANCE.expand() + "</div>"); header.getCellFormatter().setStyleName(0, 3, "thin right"); expandCheckbox = new CheckBox(); expandCheckbox.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { loadSources(); sourcePanel.setExpand(expandCheckbox.getValue()); sourcePanel.refresh(); } }); header.setWidget(0, 4, expandCheckbox); header.getCellFormatter().setStyleName(0, 4, "thin cell left"); loadRuleSeverities(); return mainPanel; }
From source file:org.sonar.plugins.core.violationsviewer.client.ViolationsViewer.java
License:Open Source License
private void displayRuleSeverities(Resource resource, String defaultFilter) { final Grid grid = new Grid(1, 10); header.setWidget(0, 0, grid);// w w w. j ava 2 s . c om displayRuleSeverity(grid, 0, "BLOCKER", defaultFilter, resource.getMeasure(Metrics.BLOCKER_VIOLATIONS)); displayRuleSeverity(grid, 2, "CRITICAL", defaultFilter, resource.getMeasure(Metrics.CRITICAL_VIOLATIONS)); displayRuleSeverity(grid, 4, "MAJOR", defaultFilter, resource.getMeasure(Metrics.MAJOR_VIOLATIONS)); displayRuleSeverity(grid, 6, "MINOR", defaultFilter, resource.getMeasure(Metrics.MINOR_VIOLATIONS)); displayRuleSeverity(grid, 8, "INFO", defaultFilter, resource.getMeasure(Metrics.INFO_VIOLATIONS)); }