[Date Prev][Date Next][Index][Thread]
[SGT Mail Archive]
[SGT Main Page]
JPlotLayout and updating Key labels
*************************************************
Message from the sgt mail list.
*************************************************
Rob,
Yes, there is a way. You use the SimpleLine.setKeyTitle(SGLabel
lab) method to define a title using a SGLabel. Then you can use the
getKeyTitle().setText("new text") combination to change the text on the
fly. I have do this using a custom SGTData class (not part of SGT) to
update the title during an animation or new subset of data. I've attached
the relevant code (I hope), all the code for ncBrowse can be downloaded
from the ncBrowse web site (see below).
Look at the VMapModel.updateLineData() method to see how I've done
it. The VMapGraph.run() method shows how the VMapModel is used. This is
working code so you'll have to dig for the LineKey stuff a bit, sorry.
Don
At 04:52 AM 3/19/2002 -0800, owner-sgt@epic.noaa.gov wrote:
From robert.davies@astro.cf.ac.uk Tue Mar 19 04:52:24 2002
Return-Path: <robert.davies@astro.cf.ac.uk>
Received: from RHO.PMEL.NOAA.GOV by plover.epic.noaa.gov (8.9.3+Sun/SMI-SVR4)
id EAA22620; Tue, 19 Mar 2002 04:52:23 -0800 (PST)
Received: from carina.astro.cf.ac.uk by RHO.PMEL.NOAA.GOV (PMDF V5.2-32
#33902)
with ESMTP id <01KFJ6KKTMUO8WW2LG@RHO.PMEL.NOAA.GOV> for sgt@epic.noaa.gov;
Tue, 19 Mar 2002 04:52:22 PST
Received: from t039.astro.cf.ac.uk ([131.251.45.196])
by carina.astro.cf.ac.uk with smtp (Exim 3.10 #1)
id 16nJ5t-0000LD-00 for sgt@epic.noaa.gov; Tue, 19 Mar 2002
12:52:01 +0000
Date: Tue, 19 Mar 2002 12:50:20 +0000
From: Robert Davies <robert.davies@astro.cf.ac.uk>
Subject: help with JPlotLayout
To: sgt@epic.noaa.gov
Message-id: <02031912502003.02221@t039.astro.cf.ac.uk>
MIME-version: 1.0
X-Mailer: KMail [version 1.2]
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Content-Length: 252
Hi
Can anyone help me with this problem? I'm trying to update the titles
displayed by the axis and the LineKey legend. Is there any way I can change
them? I am using JPlotLayout and I can't see how to change or access them.
Thanks for any help
Rob
==================================================
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.