From a815664e98680a80120454551c5e2312322c59f0 Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Thu, 10 Dec 2015 10:21:11 +0100 Subject: [PATCH] Remove unused classes. --- src/eva2/gui/plot/DataViewer.java | 118 --------------------- src/eva2/gui/plot/DataViewerInterface.java | 20 ---- 2 files changed, 138 deletions(-) delete mode 100644 src/eva2/gui/plot/DataViewer.java delete mode 100644 src/eva2/gui/plot/DataViewerInterface.java diff --git a/src/eva2/gui/plot/DataViewer.java b/src/eva2/gui/plot/DataViewer.java deleted file mode 100644 index f20fc752..00000000 --- a/src/eva2/gui/plot/DataViewer.java +++ /dev/null @@ -1,118 +0,0 @@ -package eva2.gui.plot; - -import java.util.ArrayList; - -/** - * It represents one plot window in the client GUI. - */ -public class DataViewer implements DataViewerInterface { - - static private int graphCounter = -1; - static private ViewContainer viewContainer; - private String name; - private Plot plot; - - /** - * - */ - public static DataViewerInterface getInstance(String graphWindowName) { - if (viewContainer == null) { - viewContainer = new ViewContainer(); - } - DataViewerInterface ret = null; - try { - if (!viewContainer.containsName(graphWindowName)) { - ret = new DataViewer(graphWindowName, true); - viewContainer.add(ret); - } else { - ret = viewContainer.getPlot(graphWindowName); - } - } catch (Exception ee) { - System.out.println("GraphWindow ERROR : " + ee.getMessage()); - ee.printStackTrace(); - } - return ret; - } - - /** - * - */ - private DataViewer(String PlotName, boolean initflag) { - name = PlotName; - if (initflag) { - this.init(); - } - } - - /** - * - */ - public String getName() { - return name; - } - - /** - * - */ - @Override - public Graph getNewGraph(String InfoString) { - graphCounter++; - return new Graph(InfoString, plot, graphCounter); - } - - /** - * - */ - @Override - public void init() { - plot = new Plot(name, "x", "y", true); - } -} - -/** - * - */ -class ViewContainer extends ArrayList { - - private DataViewer actualPlot; - - /** - * - */ - public ViewContainer() { - } - - /** - * - */ - public boolean containsName(String name) { - DataViewer temp = null; - for (int i = 0; i < size(); i++) { - temp = (DataViewer) (get(i)); - if (name.equals(temp.getName())) { - return true; - } - } - return false; - } - - /** - * - */ - public DataViewer getPlot(String name) { - if (actualPlot != null) { - if (actualPlot.getName().equals(name)) { - return actualPlot; - } - } - DataViewer temp = null; - for (int i = 0; i < size(); i++) { - temp = (DataViewer) (get(i)); - if (name.equals(temp.getName())) { - actualPlot = temp; - return actualPlot; - } - } - return null; - } -} diff --git a/src/eva2/gui/plot/DataViewerInterface.java b/src/eva2/gui/plot/DataViewerInterface.java deleted file mode 100644 index 1e80c814..00000000 --- a/src/eva2/gui/plot/DataViewerInterface.java +++ /dev/null @@ -1,20 +0,0 @@ -package eva2.gui.plot; - -/* - * Title: EvA2 - * Description: - * Copyright: Copyright (c) 2003 - * Company: University of Tuebingen, Computer Architecture - * @author Holger Ulmer, Felix Streichert, Hannes Planatscher - * @version: $Revision: 10 $ - * $Date: 2006-01-18 11:02:22 +0100 (Wed, 18 Jan 2006) $ - * $Author: streiche $ - */ -/*==========================================================================* - * IMPORTS - *==========================================================================*/ -public interface DataViewerInterface { - Graph getNewGraph(String InfoString); - - void init(); -} \ No newline at end of file