RE: mouse clicking multiple cells

Hi Michelle,

> Do you know if there is a way to determine whether a Data object of type
> Scalar is a "Real" object or a "Text" object? It looks like
> DataImpl.getType() (and Data.getType()) returns a MathType but MathType.java
> does not have record whether it is a ScalarType and then if it is, whether
> it is a RealType or TextType.

You can do 'if (object instanceof Real) ...' or
'if (object instanceof Text) ...'. Or with the MathTypes
use 'if (object instanceof RealType) ...' or
'if (object instanceof TextType) ...'.

This is really an elementary programming question. You
should try harder to answer such questions for yourself.

Good luck,
Bill


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