[Date Prev][Date Next][Index][Thread]
[SGT Mail Archive]
[SGT Main Page]
Re: problem using key_pane with JPlotLayout
*************************************************
Message from the sgt mail list.
*************************************************
Rich,
This is a problem related to not having a Graphics object at the
point when the JPane first tries to draw. I've fixed this problem in the
new release which I am putting the final touches on now (mostly
documentation related). I expect to have SGT version 2.1 available
tomorrow. When it is ready I will notify the sgt mailing list.
Don
At 04:51 PM 12/13/2001 -0800, Schramm, Rich wrote:
>*************************************************
>Message from the sgt mail list.
>*************************************************
>
>I am having difficulty using extracting the key_pane from a JPlotLayout
>into a scrollable panel (e.g. as per the NOAATech2002 SGT Tutorials.
>
>If I set the is_key_pane parameter to true as in:
>
>layout_ = new JPlotLayout(false, false, false, "Trajectory Data", null,
>true);
>
>and procede with other code to extract and use the key pane. Then when I
>go to add the line data I get:
>
> java.lang.NullPointerException at
> gov.noaa.pmel.sgt.LabelDrawer2.getFontRenderContext(LabelDrawer2.java:520)
> at
> gov.noaa.pmel.sgt.LabelDrawer2.computeFontSize(LabelDrawer2.java:414)
> at
> gov.noaa.pmel.sgt.LabelDrawer2.computeBoundsD(LabelDrawer2.java:325)
> at
> gov.noaa.pmel.sgt.LabelDrawer2.getBounds(LabelDrawer2.java:264) at
> gov.noaa.pmel.sgt.SGLabel.getBounds(SGLabel.java:470) at
> gov.noaa.pmel.sgt.LineKey.getBounds(LineKey.java:545) at
> gov.noaa.pmel.sgt.LineKey.getRowHeight(LineKey.java:421) at
> gov.noaa.pmel.sgt.swing.JPlotLayout.addData(JPlotLayout.java:864) at
> gov.noaa.pmel.sgt.swing.JPlotLayout.addData(JPlotLayout.java:587) at
> gov.noaa.pmel.sgt.demo.JTimeSeriesDemo.makeGraph(JTimeSeriesDemo.java:138)
> at gov.noaa.pmel.sgt.demo.JTimeSeriesDemo.main(JTimeSeriesDemo.java:96)
>
>
>
>The problems seems to be down in or below the "line_key.getRowHeight"
>method which is called several times in JPlotLayout.java
>
>Can anyone demonstate a similar problem? Im on W2k w/JDK 1.3.1_01 - maybe
>I should go back to 1.2 or should this work?
>
>Also in same tutorial, it references 2 classes that I cant find...
>KeyPaneLayout and LineBorder, any help there?
>
>
>Thanks in advance for any help.
>
>Rich Schramm
>
>
>*************************************************
>To remove yourself from this mailing list,
>send mail to <Majordomo@epic.noaa.gov> with
>"unsubscribe sgt" in the message body.
==================================================
Donald W. Denbo dwd@pmel.noaa.gov
Ph: (206) 526-4487 Fax: (206) 526-6744
Collaborative tools: http://www.epic.noaa.gov/collab/
Netcdf Browser: http://www.epic.noaa.gov/java/ncBrowse
Scientific Java Graphics: http://www.epic.noaa.gov/java/sgt
EPIC Oceangraphic Data Management: http://www.pmel.noaa.gov/epic
==================================================
*************************************************
To remove yourself from this mailing list,
send mail to <Majordomo@epic.noaa.gov> with
"unsubscribe sgt" in the message body.