Subject: | |
From: | |
Reply To: | |
Date: | Sat, 7 Jan 2012 14:43:05 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi Luis. Inspectors are really meant for fleeting things. f you're trying to set up a chart at runtime, it'd be better to do it as a display. Try this howto:
http://cs.gmu.edu/~eclab/projects/mason/docs/howto.html#chart
If this is still not working, I can try to help you further.
Sean
On Jan 3, 2012, at 3:17 AM, Luís de Sousa wrote:
> I would like to have a permanent chart displaying the evolution of one
> of the simulation properties. I added a
> TimeSeriesChartingPropertyInspector property to the GUI class that is
> initialized this way:
>
> chart = new TimeSeriesChartingPropertyInspector(
> Properties.getProperties(sim, false, false, false), 1, this, null);
>
> where sim is the State class instance. This way I was getting a null
> pointer exception; I tracked it down to the ChartingPropertyInspector
> class, where I had to change line 124 in one of the constructors:
>
> this.generator.getFrame().addWindowListener(wl);
>
> Originally the reference was to the generator argument, which before
> simulation start is null.
>
> But after correcting this, even though the chart panel is created at
> the beginning of the simulation, no data is sent to it and it remains
> void. So the question is: how can I have a chart automatically set up
> at the beginning of the simulation?
>
> Thank you and an happy 2012,
>
> Luís
|
|
|