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: