Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2016-07-13 22:14:24 +0000
committerRyan D. Brooks2016-08-31 16:17:26 +0000
commit667704f36a542792928be11e8d668d5258c106c9 (patch)
tree8a6c10b7907623ddbee3deba62ca55b193bf9cd6 /plugins
parent8c18fb1df34d25048e95ea1f2156ed0d01ec8637 (diff)
downloadorg.eclipse.osee-667704f36a542792928be11e8d668d5258c106c9.tar.gz
org.eclipse.osee-667704f36a542792928be11e8d668d5258c106c9.tar.xz
org.eclipse.osee-667704f36a542792928be11e8d668d5258c106c9.zip
refinement: Remove ResultsEditor chart tab and Birt dependency
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java1
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/BarChartExample.java167
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF17
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/ChartViewerSWT.java69
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/IResultsEditorChartTab.java23
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/ResultsEditorChartTab.java88
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/ResultsEditorExample.java121
8 files changed, 1 insertions, 487 deletions
diff --git a/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
index 65fa7caffe4..205b299cf72 100644
--- a/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats/META-INF/MANIFEST.MF
@@ -16,7 +16,6 @@ Require-Bundle: org.eclipse.gef,
org.eclipse.ui.editors,
org.eclipse.zest.layouts,
org.eclipse.ui.views,
- org.eclipse.birt.chart.engine,
org.eclipse.search,
org.eclipse.core.jobs,
org.eclipse.osee.ats.api,
@@ -192,7 +191,6 @@ Import-Package: com.google.common.cache,
org.eclipse.osee.framework.ui.skynet.render,
org.eclipse.osee.framework.ui.skynet.render.compare,
org.eclipse.osee.framework.ui.skynet.results,
- org.eclipse.osee.framework.ui.skynet.results.chart,
org.eclipse.osee.framework.ui.skynet.results.example,
org.eclipse.osee.framework.ui.skynet.results.html,
org.eclipse.osee.framework.ui.skynet.results.table,
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java
index 081006cb910..3b62be19fc1 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java
@@ -275,7 +275,6 @@ public final class AtsNavigateViewItems implements XNavigateViewItems, IXNavigat
private void createExampleItems(XNavigateItem parent, List<XNavigateItem> items) {
XNavigateItem exampleItems = new XNavigateItem(parent, "Examples", AtsImage.REPORT);
- new BarChartExample(exampleItems);
new ResultsEditorExample(exampleItems);
new CompareEditorExample(exampleItems);
new XViewerExample(exampleItems);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/BarChartExample.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/BarChartExample.java
deleted file mode 100644
index 95cd32b47dd..00000000000
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/BarChartExample.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ats.navigate;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.birt.chart.model.Chart;
-import org.eclipse.birt.chart.model.ChartWithAxes;
-import org.eclipse.birt.chart.model.attribute.Anchor;
-import org.eclipse.birt.chart.model.attribute.AxisType;
-import org.eclipse.birt.chart.model.attribute.ChartDimension;
-import org.eclipse.birt.chart.model.attribute.IntersectionType;
-import org.eclipse.birt.chart.model.attribute.Position;
-import org.eclipse.birt.chart.model.attribute.TickStyle;
-import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionImpl;
-import org.eclipse.birt.chart.model.component.Axis;
-import org.eclipse.birt.chart.model.component.Series;
-import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
-import org.eclipse.birt.chart.model.data.NumberDataSet;
-import org.eclipse.birt.chart.model.data.SeriesDefinition;
-import org.eclipse.birt.chart.model.data.TextDataSet;
-import org.eclipse.birt.chart.model.data.impl.NumberDataSetImpl;
-import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
-import org.eclipse.birt.chart.model.data.impl.TextDataSetImpl;
-import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
-import org.eclipse.birt.chart.model.layout.Legend;
-import org.eclipse.birt.chart.model.layout.Plot;
-import org.eclipse.birt.chart.model.type.BarSeries;
-import org.eclipse.birt.chart.model.type.impl.BarSeriesImpl;
-import org.eclipse.osee.ats.AtsImage;
-import org.eclipse.osee.framework.jdk.core.util.AHTML;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorProvider;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-import org.eclipse.osee.framework.ui.skynet.results.chart.ResultsEditorChartTab;
-import org.eclipse.osee.framework.ui.skynet.results.html.ResultsEditorHtmlTab;
-
-/**
- * @author Donald G. Dunne
- */
-public class BarChartExample extends XNavigateItemAction {
-
- public BarChartExample(XNavigateItem parent) {
- super(parent, "Bar Chart Example", AtsImage.REPORT);
- }
-
- @Override
- public void run(TableLoadOption... tableLoadOptions) throws Exception {
- ResultsEditor.open(new IResultsEditorProvider() {
-
- @Override
- public String getEditorName() {
- return "Example Bar Chart";
- }
-
- @Override
- public List<IResultsEditorTab> getResultsEditorTabs() {
- List<IResultsEditorTab> tabs = new ArrayList<>();
- tabs.add(new ResultsEditorChartTab("Chart", createMyChart()));
- tabs.add(getReportHtmlTab());
- return tabs;
- }
-
- });
- }
-
- private IResultsEditorTab getReportHtmlTab() {
- StringBuffer sb = new StringBuffer();
- sb.append("Example Bar Chart Data");
- sb.append(AHTML.beginMultiColumnTable(95, 1));
- sb.append(AHTML.addHeaderRowMultiColumnTable(new String[] {"Type", "Title", "Status"}));
- for (int x = 0; x < 3; x++) {
- sb.append(AHTML.addRowMultiColumnTable(new String[] {"Type " + x, "Title " + x, x + ""}));
- }
- sb.append(AHTML.endMultiColumnTable());
- return new ResultsEditorHtmlTab("Example Bar Chart Data", "Report", AHTML.simplePage(sb.toString()));
- }
-
- @SuppressWarnings({"deprecation"})
- public static Chart createMyChart() {
- // bart charts are based on charts that contain axes
- ChartWithAxes cwaBar = ChartWithAxesImpl.create();
- cwaBar.getBlock().setBackground(ColorDefinitionImpl.WHITE());
- cwaBar.getBlock().getOutline().setVisible(true);
- cwaBar.setDimension(ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL);
-
- // customize the plot
- Plot p = cwaBar.getPlot();
- p.getClientArea().setBackground(ColorDefinitionImpl.create(255, 255, 225));
- p.getOutline().setVisible(false);
-
- cwaBar.getTitle().getLabel().getCaption().setValue("Example Bar Chart");
-
- // customize the legend
- Legend lg = cwaBar.getLegend();
- lg.getText().getFont().setSize(16);
- lg.getInsets().set(10, 5, 0, 0);
- lg.setAnchor(Anchor.NORTH_LITERAL);
-
- // customize the X-axis
- Axis xAxisPrimary = cwaBar.getPrimaryBaseAxes()[0];
- xAxisPrimary.setType(AxisType.TEXT_LITERAL);
- xAxisPrimary.getMajorGrid().setTickStyle(TickStyle.BELOW_LITERAL);
- xAxisPrimary.getOrigin().setType(IntersectionType.VALUE_LITERAL);
- xAxisPrimary.getTitle().setVisible(false);
-
- // customize the Y-axis
- Axis yAxisPrimary = cwaBar.getPrimaryOrthogonalAxis(xAxisPrimary);
- yAxisPrimary.getMajorGrid().setTickStyle(TickStyle.LEFT_LITERAL);
- yAxisPrimary.setType(AxisType.LINEAR_LITERAL);
- yAxisPrimary.getLabel().getCaption().getFont().setRotation(90);
-
- // initialize a collection with the X-series data
- List<String> vs = new ArrayList<>();
- vs.add("zero");
- vs.add("one");
- vs.add("two");
-
- TextDataSet categoryValues = TextDataSetImpl.create(vs);
-
- // initialize a collection with the Y-series data
- ArrayList<Double> vn1 = new ArrayList<>();
- vn1.add(new Double(25));
- vn1.add(new Double(35));
- vn1.add(new Double(-45));
-
- NumberDataSet orthoValues1 = NumberDataSetImpl.create(vn1);
-
- // create the category base series
- Series seCategory = SeriesImpl.create();
- seCategory.setDataSet(categoryValues);
-
- // create the value orthogonal series
- BarSeries bs1 = (BarSeries) BarSeriesImpl.create();
- bs1.setSeriesIdentifier("My Bar Series");
- bs1.setDataSet(orthoValues1);
- bs1.setRiserOutline(null);
- bs1.getLabel().setVisible(true);
- bs1.setLabelPosition(Position.INSIDE_LITERAL);
-
- // wrap the base series in the X-axis series definition
- SeriesDefinition sdX = SeriesDefinitionImpl.create();
- sdX.getSeriesPalette().update(0); // set the colors in the palette
- xAxisPrimary.getSeriesDefinitions().add(sdX);
- sdX.getSeries().add(seCategory);
-
- // wrap the orthogonal series in the X-axis series definition
- SeriesDefinition sdY = SeriesDefinitionImpl.create();
- sdY.getSeriesPalette().update(1); // set the color in the palette
- yAxisPrimary.getSeriesDefinitions().add(sdY);
- sdY.getSeries().add(bs1);
-
- return cwaBar;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
index c0d7d9c1e8e..5c974887c1c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/META-INF/MANIFEST.MF
@@ -25,22 +25,6 @@ Import-Package: com.google.common.base;version="15.0.0",
org.apache.commons.lang.mutable,
org.codehaus.jackson,
org.codehaus.jackson.map,
- org.eclipse.birt.chart.device,
- org.eclipse.birt.chart.exception,
- org.eclipse.birt.chart.factory,
- org.eclipse.birt.chart.model,
- org.eclipse.birt.chart.model.attribute,
- org.eclipse.birt.chart.model.attribute.impl,
- org.eclipse.birt.chart.model.component,
- org.eclipse.birt.chart.model.component.impl,
- org.eclipse.birt.chart.model.data,
- org.eclipse.birt.chart.model.data.impl,
- org.eclipse.birt.chart.model.impl,
- org.eclipse.birt.chart.model.layout,
- org.eclipse.birt.chart.model.type,
- org.eclipse.birt.chart.model.type.impl,
- org.eclipse.birt.chart.util,
- org.eclipse.birt.core.exception,
org.eclipse.compare,
org.eclipse.compare.structuremergeviewer,
org.eclipse.core.commands,
@@ -238,7 +222,6 @@ Export-Package: org.eclipse.osee.framework.ui.skynet,
org.eclipse.osee.framework.ui.skynet.render.word,
org.eclipse.osee.framework.ui.skynet.render.word.template,
org.eclipse.osee.framework.ui.skynet.results,
- org.eclipse.osee.framework.ui.skynet.results.chart,
org.eclipse.osee.framework.ui.skynet.results.example,
org.eclipse.osee.framework.ui.skynet.results.html,
org.eclipse.osee.framework.ui.skynet.results.table,
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/ChartViewerSWT.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/ChartViewerSWT.java
deleted file mode 100644
index bdcf0ed36a7..00000000000
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/ChartViewerSWT.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.ui.skynet.results.chart;
-
-import java.util.logging.Level;
-import org.eclipse.birt.chart.device.IDeviceRenderer;
-import org.eclipse.birt.chart.exception.ChartException;
-import org.eclipse.birt.chart.factory.Generator;
-import org.eclipse.birt.chart.model.Chart;
-import org.eclipse.birt.chart.model.attribute.Bounds;
-import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl;
-import org.eclipse.birt.chart.util.PluginSettings;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.skynet.internal.Activator;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-
-public class ChartViewerSWT implements PaintListener
-
-{
-
- private IDeviceRenderer idr = null;
- private final Chart chart;
-
- public ChartViewerSWT(Chart chart) {
- this.chart = chart;
- // INITIALIZE THE SWT RENDERING DEVICE
- final PluginSettings ps = PluginSettings.instance();
- try {
- idr = ps.getDevice("dv.SWT");
- } catch (ChartException pex) {
- OseeLog.log(Activator.class, Level.SEVERE, pex);
- }
- }
-
- /**
- * The SWT paint callback
- */
-
- @Override
- public void paintControl(PaintEvent pe) {
-
- idr.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT, pe.gc);
- Composite co = (Composite) pe.getSource();
- Rectangle re = co.getClientArea();
- Bounds bo = BoundsImpl.create(re.x, re.y, re.width, re.height);
- bo.scale(72d / idr.getDisplayServer().getDpiResolution()); // BOUNDS MUST BE SPECIFIED IN POINTS
- // BUILD AND RENDER THE CHART
-
- Generator gr = Generator.instance();
- try {
- gr.render(idr, gr.build(idr.getDisplayServer(), chart, null, bo, null));
- } catch (ChartException gex) {
- OseeLog.log(Activator.class, Level.SEVERE, gex);
- }
-
- }
-
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/IResultsEditorChartTab.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/IResultsEditorChartTab.java
deleted file mode 100644
index d0bd0d24f6e..00000000000
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/IResultsEditorChartTab.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.ui.skynet.results.chart;
-
-import org.eclipse.birt.chart.model.Chart;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
-
-/**
- * @author Donald G. Dunne
- */
-public interface IResultsEditorChartTab extends IResultsEditorTab {
-
- public Chart getChart() throws OseeCoreException;
-}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/ResultsEditorChartTab.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/ResultsEditorChartTab.java
deleted file mode 100644
index 35f1ebbc2e1..00000000000
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/chart/ResultsEditorChartTab.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.ui.skynet.results.chart;
-
-import org.eclipse.birt.chart.model.Chart;
-import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
-import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-import org.eclipse.osee.framework.ui.skynet.util.ImageCapture;
-import org.eclipse.osee.framework.ui.swt.ALayout;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Canvas;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.ToolBar;
-import org.eclipse.swt.widgets.ToolItem;
-
-/**
- * @author Donald G. Dunne
- */
-public class ResultsEditorChartTab implements IResultsEditorChartTab {
-
- private final Chart chart;
- private final String tabName;
- private Composite chartComposite;
- private Canvas chartCanvas;
-
- public ResultsEditorChartTab(String tabName, Chart chart) {
- this.tabName = tabName;
- this.chart = chart;
- }
-
- @Override
- public Chart getChart() {
- return chart;
- }
-
- @Override
- public String getTabName() {
- return tabName;
- }
-
- @Override
- public Composite createTab(Composite parent, ResultsEditor resultsEditor) {
- Chart chart = getChart();
- chartComposite = ALayout.createCommonPageComposite(parent);
- ToolBar toolBar = resultsEditor.createToolBar(chartComposite);
- createToolbar(toolBar);
-
- GridData gd = new GridData(GridData.FILL_BOTH);
- if (chart == null) {
- Label label = new Label(chartComposite, SWT.BORDER);
- label.setText("\n No Chart Provided");
- } else {
- chartCanvas = new Canvas(chartComposite, SWT.NONE);
- chartCanvas.setLayoutData(gd);
- chartCanvas.addPaintListener(new ChartViewerSWT(chart));
- }
-
- return chartComposite;
- }
-
- private void createToolbar(ToolBar toolBar) {
- ToolItem item = new ToolItem(toolBar, SWT.PUSH);
- item.setImage(ImageManager.getImage(FrameworkImage.PRINT));
- item.setToolTipText("Print this tab");
- item.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent event) {
- ImageCapture iCapture = new ImageCapture(chartCanvas);
- iCapture.popupDialog();
- }
- });
-
- item = new ToolItem(toolBar, SWT.SEPARATOR);
- }
-}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/ResultsEditorExample.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/ResultsEditorExample.java
index e9df13bd991..62866172e4e 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/ResultsEditorExample.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/ResultsEditorExample.java
@@ -14,34 +14,8 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
-import org.eclipse.birt.chart.model.Chart;
-import org.eclipse.birt.chart.model.ChartWithAxes;
-import org.eclipse.birt.chart.model.attribute.AxisType;
-import org.eclipse.birt.chart.model.attribute.IntersectionType;
-import org.eclipse.birt.chart.model.attribute.LegendItemType;
-import org.eclipse.birt.chart.model.attribute.MarkerType;
-import org.eclipse.birt.chart.model.attribute.TickStyle;
-import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionImpl;
-import org.eclipse.birt.chart.model.component.Axis;
-import org.eclipse.birt.chart.model.component.Series;
-import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
-import org.eclipse.birt.chart.model.data.BaseSampleData;
-import org.eclipse.birt.chart.model.data.DataFactory;
-import org.eclipse.birt.chart.model.data.NumberDataSet;
-import org.eclipse.birt.chart.model.data.OrthogonalSampleData;
-import org.eclipse.birt.chart.model.data.SampleData;
-import org.eclipse.birt.chart.model.data.SeriesDefinition;
-import org.eclipse.birt.chart.model.data.TextDataSet;
-import org.eclipse.birt.chart.model.data.impl.NumberDataSetImpl;
-import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
-import org.eclipse.birt.chart.model.data.impl.TextDataSetImpl;
-import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
-import org.eclipse.birt.chart.model.layout.Legend;
-import org.eclipse.birt.chart.model.layout.Plot;
-import org.eclipse.birt.chart.model.type.LineSeries;
-import org.eclipse.birt.chart.model.type.impl.LineSeriesImpl;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
+import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreBranches;
@@ -56,7 +30,6 @@ import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorProvider;
import org.eclipse.osee.framework.ui.skynet.results.IResultsEditorTab;
import org.eclipse.osee.framework.ui.skynet.results.ResultsEditor;
-import org.eclipse.osee.framework.ui.skynet.results.chart.ResultsEditorChartTab;
import org.eclipse.osee.framework.ui.skynet.results.html.ResultsEditorHtmlTab;
import org.eclipse.osee.framework.ui.skynet.results.table.IResultsXViewerRow;
import org.eclipse.osee.framework.ui.skynet.results.table.ResultsEditorTableTab;
@@ -100,7 +73,6 @@ public class ResultsEditorExample extends XNavigateItemAction {
public List<IResultsEditorTab> getResultsEditorTabs() {
if (tabs == null) {
tabs = new LinkedList<>();
- tabs.add(createChartTab());
tabs.add(createDataTab());
tabs.add(createHtmlTab());
tabs.add(createArtifactTab());
@@ -110,10 +82,6 @@ public class ResultsEditorExample extends XNavigateItemAction {
});
}
- private IResultsEditorTab createChartTab() {
- return new ResultsEditorChartTab("Chart", createChart());
- }
-
private IResultsEditorTab createDataTab() {
List<IResultsXViewerRow> rows = new ArrayList<>();
for (int x = 0; x < chartDateStrs.size(); x++) {
@@ -175,91 +143,4 @@ public class ResultsEditorExample extends XNavigateItemAction {
return sb.toString();
}
- public Chart createChart() {
- ChartWithAxes cwaLine = ChartWithAxesImpl.create();
- cwaLine.setType("Line Chart"); //$NON-NLS-1$
- cwaLine.setSubType("Overlay"); //$NON-NLS-1$
-
- // Plot
- cwaLine.getBlock().setBackground(ColorDefinitionImpl.WHITE());
- Plot p = cwaLine.getPlot();
- p.getClientArea().setBackground(ColorDefinitionImpl.create(255, 255, 225));
-
- // Title
- cwaLine.getTitle().getLabel().getCaption().setValue(
- "Action Item Backlog - Priority 1-3 Bugs\nGoal: 50% Reduction - Baseline: YE 2008");//$NON-NLS-1$
-
- // Legend
- Legend lg = cwaLine.getLegend();
- lg.setItemType(LegendItemType.SERIES_LITERAL);
-
- // X-Axis
- Axis xAxisPrimary = cwaLine.getPrimaryBaseAxes()[0];
- xAxisPrimary.setType(AxisType.TEXT_LITERAL);
- xAxisPrimary.getMajorGrid().setTickStyle(TickStyle.BELOW_LITERAL);
- xAxisPrimary.getOrigin().setType(IntersectionType.MIN_LITERAL);
-
- // Y-Axis
- Axis yAxisPrimary = cwaLine.getPrimaryOrthogonalAxis(xAxisPrimary);
- yAxisPrimary.getMajorGrid().setTickStyle(TickStyle.LEFT_LITERAL);
-
- // Data Set
- TextDataSet categoryValues = TextDataSetImpl.create(chartDateStrs.toArray(new String[chartDateStrs.size()]));
- NumberDataSet orthoValues1 = NumberDataSetImpl.create(chartValueStrs.toArray(new Double[chartValueStrs.size()]));
- NumberDataSet orthoValuesGoal =
- NumberDataSetImpl.create(chartValueStrsGoal.toArray(new Double[chartValueStrsGoal.size()]));
-
- SampleData sd = DataFactory.eINSTANCE.createSampleData();
- BaseSampleData sdBase = DataFactory.eINSTANCE.createBaseSampleData();
- sdBase.setDataSetRepresentation("");//$NON-NLS-1$
- sd.getBaseSampleData().add(sdBase);
-
- OrthogonalSampleData sdOrthogonal1 = DataFactory.eINSTANCE.createOrthogonalSampleData();
- sdOrthogonal1.setDataSetRepresentation("");//$NON-NLS-1$
- sdOrthogonal1.setSeriesDefinitionIndex(0);
- sd.getOrthogonalSampleData().add(sdOrthogonal1);
-
- OrthogonalSampleData sdOrthogonal2 = DataFactory.eINSTANCE.createOrthogonalSampleData();
- sdOrthogonal2.setDataSetRepresentation("");//$NON-NLS-1$
- sdOrthogonal2.setSeriesDefinitionIndex(1);
- sd.getOrthogonalSampleData().add(sdOrthogonal2);
-
- cwaLine.setSampleData(sd);
-
- // X-Series
- Series seCategory = SeriesImpl.create();
- seCategory.setDataSet(categoryValues);
- SeriesDefinition sdX = SeriesDefinitionImpl.create();
-
- xAxisPrimary.getSeriesDefinitions().add(sdX);
- sdX.getSeries().add(seCategory);
-
- // Y-Series
- LineSeries ls1 = (LineSeries) LineSeriesImpl.create();
- ls1.setDataSet(orthoValues1);
- ls1.setSeriesIdentifier("Count");
- ls1.getLineAttributes().setColor(ColorDefinitionImpl.BLUE());
- for (int i = 0; i < ls1.getMarkers().size(); i++) {
- ls1.getMarkers().get(i).setType(MarkerType.TRIANGLE_LITERAL);
- }
- ls1.getLabel().setVisible(true);
-
- LineSeries ls2 = (LineSeries) LineSeriesImpl.create();
- ls2.setDataSet(orthoValuesGoal);
- ls2.setSeriesIdentifier("Goal (100)");
- ls2.getLineAttributes().setColor(ColorDefinitionImpl.GREEN());
- for (int i = 0; i < ls2.getMarkers().size(); i++) {
- ls2.getMarkers().get(i).setType(MarkerType.TRIANGLE_LITERAL);
- }
- ls2.getLabel().setVisible(true);
-
- SeriesDefinition sdY = SeriesDefinitionImpl.create();
- sdY.getSeriesPalette().shift(-2);
- yAxisPrimary.getSeriesDefinitions().add(sdY);
- sdY.getSeries().add(ls2);
- sdY.getSeries().add(ls1);
-
- return cwaLine;
- }
-
}

Back to the top