Re: Using RangeWidget

Hi Amaral,

Please send all questions to visad-list@xxxxxxxxxxxxx.
I am often travelling, and often someone else has a
better answer than I do.

I interpret "number of points to display" as number of
samples. In that case, you need to define a new Set with
the number of samples you want, and then pass it to the
resample() method of your Field. Then display the Field
returned by resample().

Good luck,
Bill

On Mon, 3 Feb 2003, Amaral wrote:

> Bill, thank your for your attention so far.
>
> What I would like to do  is  to control the number of points do display on a
> line.That is when the user enter a number in a textfield, my Set  (time_set)
> and my  h_vals in the declaration h_ff.setSamples(h_vals)  are adjusted so
> that I get the correct display. Could I use actionPerformed in RangeWidget
> for that ? How to pass a number to the parent class?
>
>
> Using RangeWidget I can do it for a number less than the default, but for a
> number larger than the default the line shrinks as if it were showing the
> same set of ponts in a larger range.
>
> Sorry for bothering you with which might be an java elementary coding.
>
> amaral.
>
>
>
>
>
> ----- Original Message -----
> From: "Bill Hibbard" <hibbard@xxxxxxxxxxxxxxxxx>
> To: "Amaral" <amaral@xxxxxx>
> Cc: "visad" <visad-list@xxxxxxxxxxxxx>
> Sent: Friday, January 31, 2003 10:38 AM
> Subject: Re: Using RangeWidget
>
>
> > Hi Amaral,
> >
> > You need to construct a RealType, such as "RANGE", and include
> > it in the MathType of your Data. Possible MathTypes include:
> >
> >   (x -> (y, RANGE))
> >   (RANGE -> (x, y))
> >
> > Then use ScalarMaps x -> XAxis, y -> YAxis, RANGE -> SelectRange,
> > and pass the last ScalarMap to the constructor for a
> > SelectRangeWidget (not a RangeWidget). Or, instead of constructing
> > a SelectRangeWidget, your application can just call the setRange()
> > method of the RangeControl you get from the getControl() method
> > of your ScalarMap.
> >
> > Good luck,
> > Bill
> >
> > > Amaral wrote:
> > >
> > > Please help me on the following problema:
> > > My VisAD class X should plot some points on a XY plane. The number of
> points is larger than the number to be ploted. I would like to allow the
> > > user to choose the interval  in the series to be ploted. I am trying to
> adapt Example P2_06 and RangeWidget for the task. In the class X I
> > > used a variavel size in the folowing dclarations:
> > >
> > > int size=30;
> > > time_set = new visad.Integer1DSet(time, size)
> > > ts=hv=jdbc.vmed.size();
> > > float[][] h_vals = new float[1][size];
> > > h_vals[0][i] =  jdbc.Med[ts-size+i];
> > > timeMap.setRange( XX, size);
> > >
> > > How could I use RangeWidget to send the value o variabe size to class X?
> > >
> > > Thanks. Amaral.
> >
> > --
> > ----------------------------------------------------------
> > Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
> > hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
> > http://www.ssec.wisc.edu/~billh/vis.html
> >
> >
>
>


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: