Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

IVScanPlotter.java

00001 /*
00002  * IVScanPlotter.java
00003  *
00004  * Created on 03 November 2003, 16:02
00005  */
00006 
00007 package DisplayGUI.plotters;
00008 
00009 import java.util.*;
00010 import javax.swing.JPanel;
00011 import java.awt.BorderLayout;
00012 import hep.aida.*;
00013 import hep.aida.ref.plotter.PlotterUtilities;
00014 
00019 public class IVScanPlotter {
00020     private static IVScanPlotter instance = new IVScanPlotter();
00021     IAnalysisFactory af;
00022     ITree tree;
00023     IDataPointSetFactory dpsf=null;
00024     private JPanel panel;
00025     private IPlotter iplotter=null;
00026     
00027     private IVScanPlotter() {
00028         initialise();
00029         }    
00030 
00031     private void initialise() {
00032             af = IAnalysisFactory.create();
00033             tree = af.createTreeFactory().create();                    
00034     }    
00035     public static IVScanPlotter getInstance() {
00036         return instance;
00037     }
00038     
00039     public IDataPointSetFactory getDataPointSetFactory() {
00040        if(dpsf==null) dpsf=af.createDataPointSetFactory(tree);
00041        return dpsf;
00042       }
00043     public IPlotter getIPlotter() {
00044        if(iplotter==null) iplotter = af.createPlotterFactory().create();  
00045        return iplotter;
00046       }
00047 
00048     public JPanel getPlotPanel() {
00049         if (panel == null) {
00050             panel = new JPanel();
00051 
00052             // Now embed the plotter
00053             panel.add(PlotterUtilities.componentForPlotter(getIPlotter()), BorderLayout.CENTER);
00054         }
00055         
00056         return panel;
00057     }
00058     
00059 
00060     
00061 }

Generated on Thu Jul 15 09:55:44 2004 for SCT DAQ/DCS Software - Java by doxygen 1.3.5