Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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
*************************************************************


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690