assetNameBox.addItem((String)enum.nextElement());
assetNameBox.addItem((String)en.nextElement());
  public void init()  {  	frame = this;  	setJMenuBar(new JMenuBar());  	buildChart();  	JScrollPane jChartScrollPane = new JScrollPane(chart);    getContentPane().add(jChartScrollPane, BorderLayout.CENTER);  	  	pspData();  	  	//queryPanel.setBorder(new LineBorder(Color.blue));    queryPanel.setLayout(new FlowLayout());    queryPanel.add(new JLabel("Assets"));  	  	for(Enumeration enum = stores.keys(); enum.hasMoreElements();)    {  	  assetNameBox.addItem((String)enum.nextElement());  	}  	assetNameBox.addActionListener(queryListener);  	queryPanel.add(assetNameBox);  	getContentPane().add(queryPanel, BorderLayout.NORTH);  	  	  	    setDataSetMenu();    setSize(600, 600); 	    frame.validate();  }    public void buildChart()  {  	System.out.println("%%%% call createMenuAndDialogs");  	createMenuAndDialogs(getContentPane(), getJMenuBar());  	double space = 0.0;  	chart = new NChart(totalCharts, "Time", "Asset", this, space);  	JScrollPane jChartScrollPane = new JScrollPane(chart);  	getContentPane().add(jChartScrollPane, BorderLayout.CENTER);  }      public Vector initialData()  {  	double[] data1 = new double[] {0.0, 0.0};  	double[] data2 = new double[] {0.0, 0.0};  	double[] data3 = new double[] {0.0, 0.0};  	double[] data4 = new double[] {0.0, 0.0};  	  	  	Vector data1V = new Vector();  		  	try	  	{	  			  		//  chart 1	  		DataSet d1a = new PolygonFillableDataSet(data1, data1.length/2, false);	  		d1a.dataName = "d1a";	  		data1V.add(d1a);	  			  			  			  			  			  	  	  	    }	    catch(Exception e)	    {	  		  }	  dataSetVector = new Vector(1);	  dataSetVector.add(data1V);  		  		  return dataSetVector;  }    public Vector testData()  {  	double[] data1 = new double[] {0.0, 10.0, 20.0, 5.0, 30.0, 40.0, 50.0, 14.0};  	double[] data2 = new double[] {0.0, 50.0, 20.0, 7.0, 30.0, 50.0, 40.0, 25.0};  	double[] data3 = new double[] {0.0, 14.0, 20.0, 78.0, 30.0, 60.0, 40.0, 35.0};  	double[] data4 = new double[] {0.0, 16.0, 20.0, 11.0, 30.0, 5.0, 40.0, 45.0};  	  	  	Vector data1V = new Vector();  		  	try	  	{	  			  		//  chart 1	  		DataSet d1a = new PolygonFillableDataSet(data1, data1.length/2, false);	  		d1a.dataName = "d1a";	  		data1V.add(d1a);	  		DataSet d2a = new PolygonFillableDataSet(data2, data2.length/2, false);	  		d2a.dataName = "d2a";	  		data1V.add(d2a);	  		DataSet d3a = new PolygonFillableDataSet(data3, data3.length/2, false);	  		d3a.dataName = "d3a";	  		data1V.add(d3a);	  		DataSet d4a = new PolygonFillableDataSet(data4, data4.length/2, false);	  		d4a.dataName = "d4a";	  		data1V.add(d4a);	  			  			  			  	  	  	    }	    catch(Exception e)	    {	  		  }	  dataSetVector = new Vector(1);	  dataSetVector.add(data1V);  		  		  return dataSetVector;  }        public void pspData()  {  	System.out.println("%%%% pspdata \'" + getParameter(NUMMAINTAINED) + "\'");  	int numSupplyClasses = Integer.parseInt(getParameter(NUMMAINTAINED));    int numDirectObjs;    int numItems = 0;    double[] dataSet = null;    // all the data    for (int chartNum = 1; chartNum <= numSupplyClasses; chartNum ++)    {    	String classString = getParameter (new String (MAINTAINEDCLASSNAME + chartNum));    	if(classString == null)    	{    		System.out.println("%%%% null classString for " + MAINTAINEDCLASSNAME + chartNum);    		continue;    	}      String maintName = new String (classString );      System.out.println("%%%% classString is " + classString);      numDirectObjs = Integer.parseInt (getParameter (new String (NUMDIRECTOBJS + chartNum)) );      Vector oneChartVecs[] = new Vector [numDirectObjs];      String assetName = new String();            // asset data      for (int dirObjNum = 1; dirObjNum <= numDirectObjs; dirObjNum ++)      {      	String assetString = getParameter ( new String (ASSETNAMEPARAM + chartNum + "_" + dirObjNum ) );      	String numItemsString = getParameter ( new String (NUMASPECTITEMS + chartNum + "_" + dirObjNum ) );      	if(assetString != null)          assetName = new String (assetString );        if(numItemsString != null)        {          numItems = Integer.parseInt (numItemsString);                  }        else        {        	System.out.println("%%%% null numItems for " + chartNum + "_" + dirObjNum);           continue;        }        dataSet = new double [numItems*2];        int itemNum, loadIdx;        // one set of double array data?                for (itemNum = 1, loadIdx = 0; itemNum <= numItems; itemNum ++, loadIdx +=2)        {             //System.out.println ("\t" + ATDATEPARAM + chartNum + "_" + dirObjNum + "_" + itemNum  );             //System.out.println("%%%% date param " + getParameter (new String (ATDATEPARAM + chartNum + "_" + dirObjNum + "_" + itemNum )));             //System.out.println ("\t" + READINESSPARAM + chartNum + "_" + dirObjNum + "_" + itemNum );           // x axis go in even indices, y axis goes in odd indices           String dateParam = getParameter (new String (ATDATEPARAM + chartNum + "_" + dirObjNum + "_" + itemNum ));           if(dateParam != null)           {	           Double standardDouble = new Double(dateParam);	           double myDouble = standardDouble.doubleValue();	           dataSet [loadIdx] = toMillis (myDouble);	           System.out.println("%%%% data " + myDouble);          }          String dataParam = getParameter (new String (READINESSPARAM + chartNum + "_" + dirObjNum + "_" + itemNum ));          if(dataParam != null)          {	           Double standardDouble = new Double(dataParam);	           double myDouble = standardDouble.doubleValue();	           dataSet [loadIdx+1] = myDouble;	           System.out.println("%%%% data " + myDouble);           }        }        try        {	        //DataSet d1a = new PolygonFillableDataSet(dataSet, dataSet.length/2, false);	        DataSet d1a = new StepDataSet(dataSet, dataSet.length/2, false);		  		d1a.dataName = assetName;		  		d1a.yAxisLabel = maintName + " - " + assetName;		  		Vector data1V = new Vector();		  		data1V.add(d1a);	        System.out.println("&&&& name " + maintName + " - " + assetName); 	        stores.put(new String (maintName + " - " + assetName), data1V); // put the vector of dataset into hashtable	        //stores.add(data1V);      }      catch(Exception e)      {      	      }      }    }