AxisScale.setFont()

Hi all,

I think I found a small bug in the setFont() method of AxisScale. The
method asks if the specified font is null but nevertheless throws a
NullPointerException by calling getSize() on the null-font. Here?s the
mentioned piece of code:


if ((labelFont == null && oldFont != null) ||
!labelFont.equals(oldFont)) 
    {
      labelSize = labelFont.getSize();
      try {
        scalarMap.makeScale();  // update the display
      }
      catch (VisADException ve) {;}
    }


I found that because I wanted to set the font to the original font which
is null. Would be great if you could fix this.

Thanks, Mathias


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