Bill Hibbard wrote:
>
> Hi Doug,
>
> > Is there a (good) reason why a ScalarType name "cannot contain space . (
> > or )"? I'd like to create RealTypes with nice names for display purposes
> > (e.g. "Wind Direction") but:
> > . . .
>
> There are a number of places where VisAD parses MathType
> strings, and there may be applications out there that depend
> in some way on the fact that ScalarType names do not contain
> spaces. However, I have added a method to ScalarMap:
>
> public void setUnderscoreToBlank(boolean u2b);
>
> If you call it with u2b = true, then "_" will be replaced
> by " " in the name of the ScalarMap's ScalarType, in display
> axis labels, and in widgets. See Test26.java and Test66.java
> in the visad/examples directory for demos of how to use this.
>
> I hope this addresses your needs.
>
That should work.
Or I supose I could extend RealType and override validateName(). Don't
even think about making it "final". :-) (Part of me is still with the C
school of thought that allows the programmer to get himself into as much
trouble as he wants.)
Thanks,
Doug
--
*----------------------------------------------------------------------*
| Doug Lindholm, Software Engineer | E-mail: lind@xxxxxxxx |
| Research Applications Program | Phone: 303-497-8374 |
| National Center for Atmospheric Research | |
| P.O. Box 3000 | There's no place |
| Boulder, Colorado 80307-3000 | like $HOME |
*----------------------------------------------------------------------*