NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: printing facility

Hi Jacky,


Jacky Saint wrote:
> 
> Hi,
>     I'm grateful for the help I recieved previously. Currently I am using
> SpreadSheet.java to implement my program. The problem is when I print a cell
> the background comes out as black. However I would like to change this so
> that the background is white, but I am having problem locating the class
> file that specifies the background. Please can someone tell me where I
> should look to find this class, or maybe if someone has already implemented
> this can you give me some guidance on how I can do this.
> 


VisAD Tutorial shows you in section 4.14 how to change the display's
background color.

First do

DisplayRenderer dRenderer = display.getDisplayRenderer();

then do

float[] backColor = colorToFloats(Color.lightGray);
dRenderer.setBackgroundColor(backColor[0], backColor[1],backColor[2]);

Please see the whole section for more details:
 http://www.ssec.wisc.edu/~billh/tutorial/s4/Section4.html#section4_14

However, when using the SpreadSheet, you'll have to know where the
display is. I'm not sure how to get the display from a SpreadSheet cell
but I believe Curtis can show you the way.

Cheers,

Ugo


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