[visad] Visad SelectRangeWidget data display format

I have added a SelectRangeWidget that is used to select time ranges with a 
slider.  The range widget works correctly but displays the time as an integer 
value which is the seconds since the Epoch.  I wish to display the time as a 
DateTime format on the the range widget.  Is that possible with Visad? 


            // time = RealType.getRealTypeByName("Time");
            time = RealType.getRealType("Time", 
CommonUnit.secondsSinceTheEpoch);
            rangeTime = new ScalarMap(time, Display.SelectRange );
            display.addMap( rangeTime );



 /**This function create range sliders and put them in a panel*/
          private Component createRangeSliders(){
                  JPanel p = new JPanel();
                  p.setLayout(new BoxLayout(p,BoxLayout.Y_AXIS));
                  try {
                          p.add( new SelectRangeWidget( rangeTime ) );
                  }
                  catch (Exception ex) {
                          ex.printStackTrace();
                  }
                  return p;
          }

Best Regards,

Merril Bradshaw



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