Re: 2 questions about visaAD

Hi Chen Zang-

Chen Zhang wrote:
> 
> i have 2 small issues about the visaAD display (i use DisplayImplJ2D)
> 
> 1. is it possible to change the background color?

Use the RendererControl.setBackgroundColor() method.  You can
call display.getDisplayRenderer().getRendererControl() to get 
the RendererControl.  Test53 in the examples shows this. 

> 2. is it possible to draw more grid lines and more numbers on the scales
> (right now, only two numbers at the beginning and the end)?

See the visad.AxisScale class.  There are several methods to
change the properties of the AxisScale.  In particular for
your question:

   setMajorTickSpacing()
   setMinorTickSpacing()
   createStandardLabels()
   setLabelTable()

methods should help.  See Test26 in the examples.

Don Murray
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
http://www.unidata.ucar.edu/staff/donm
*************************************************************


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