private CategoryDataset createDataset ( ) { DefaultCategoryDataset dataset = new DefaultCategoryDataset ( ) ; startTimes = new Long [ stl . getPulses ( ) . length + 1 ] ; startTimes [ 0 ] = new Long ( 0 ) ; for ( int i = 1 ; i < startTimes . length ; i ++ ) { startTimes [ i ] = stl . getPulses ( ) [ i - 1 ] ; } durations = new Long [ stl . getDurations ( ) . length + 1 ] ; durations [ 0 ] = new Long ( 0 ) ; for ( int i = 1 ; i < durations . length ; i ++ ) { durations [ i ] = stl . getDurations ( ) [ i - 1 ] ; } values = new Object [ stl . getValues ( ) . length + 1 ] ; values [ 0 ] = null ; for ( int i = 1 ; i < values . length ; i ++ ) { values [ i ] = stl . getValues ( ) [ i - 1 ] ; } for ( int i = 0 ; i < durations . length ; i ++ ) { //Dbg.printMsg("dur" + i + ": " + durations.elementAt(i), LogLvl.Normal); //dataset.addValue((long)durations.elementAt(i), i+"", stateVar.getName()); dataset . addValue ( ( long ) durations [ i ] , i + "" , "" ) ; } return dataset ; }
Creates a dataset from the bsv vector .