WISA.wisa3D
Class DisplayData

java.lang.Object
  |
  +--WISA.wisa3D.DisplayData
All Implemented Interfaces:
java.lang.Comparable

public class DisplayData
extends java.lang.Object
implements java.lang.Comparable

DisplayData holds all field which are required to manage a data-object for displaying in Wisa3DPanel.


Field Summary
static int DIRECT_SOURCE
          Key for data directly added to the Wisa3DPanel.
static int FILE_SOURCE
          Key for data coming from a file.
static int FORMULA_SOURCE
          Key for computed data.
static int UNKNOWN_SOURCE
          Key for source of unknown type.
 
Constructor Summary
DisplayData(DisplayData data)
          Copy constructor.
DisplayData(int id, int type, java.lang.String source, java.lang.String name, visad.DataReferenceImpl ref, visad.ConstantMap[] cMaps, visad.DataRenderer renderer)
          Constructs a new DisplayData with the specified values.
 
Method Summary
 void addConstantMap(visad.ConstantMap cMap)
          Adds the specified ConstantMap to the constant mappings of this DisplayData.
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object obj)
           
static DisplayData[] getAllData()
          Returns an array with all DisplayDatas constructed in this VM.
 visad.ConstantMap[] getConstantMaps()
          Returns the ConstantMaps of this data.
 visad.Data getData()
          Returns the data of this data.
 visad.DataRenderer getDataRenderer()
          Returns the DataRenderer of this data.
 int getID()
          Returns the id of this data.
 java.lang.String getName()
          Returns the name of this data.
 visad.DataReferenceImpl getReference()
          Returns the DataReference of this data.
 java.lang.String getSource()
          Returns the source of this data.
 int getType()
          Returns the type of this data.
 boolean isVisible()
           
 void removeConstantMap(visad.ConstantMap cMap)
          Removes the specified ConstantMap from the constant mappings of this DisplayData.
 void setConstantMaps(visad.ConstantMap[] cMaps)
          Set the ConstantMaps of this data.
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_SOURCE

public static final int UNKNOWN_SOURCE
Key for source of unknown type.

See Also:
Constant Field Values

DIRECT_SOURCE

public static final int DIRECT_SOURCE
Key for data directly added to the Wisa3DPanel.

See Also:
Constant Field Values

FILE_SOURCE

public static final int FILE_SOURCE
Key for data coming from a file.

See Also:
Constant Field Values

FORMULA_SOURCE

public static final int FORMULA_SOURCE
Key for computed data.

See Also:
Constant Field Values
Constructor Detail

DisplayData

public DisplayData(int id,
                   int type,
                   java.lang.String source,
                   java.lang.String name,
                   visad.DataReferenceImpl ref,
                   visad.ConstantMap[] cMaps,
                   visad.DataRenderer renderer)
Constructs a new DisplayData with the specified values.


DisplayData

public DisplayData(DisplayData data)
Copy constructor.

Parameters:
data - The DisplayData to be copied.
Throws:
java.lang.RuntimeException - If an error occures during the copy process.
Method Detail

getID

public int getID()
Returns the id of this data.

Returns:
The id of this data.

getType

public int getType()
Returns the type of this data.

Returns:
The type of this data.

getSource

public java.lang.String getSource()
Returns the source of this data.

Returns:
The source of this data.

getName

public java.lang.String getName()
Returns the name of this data.

Returns:
The name of this data.

getData

public visad.Data getData()
Returns the data of this data.

Returns:
The data of this data.

getReference

public visad.DataReferenceImpl getReference()
Returns the DataReference of this data.

Returns:
The DataReference of this data.

getConstantMaps

public visad.ConstantMap[] getConstantMaps()
Returns the ConstantMaps of this data.

Returns:
The ConstantMaps of this data.

getDataRenderer

public visad.DataRenderer getDataRenderer()
Returns the DataRenderer of this data.

Returns:
The DataRenderer of this data.

setConstantMaps

public void setConstantMaps(visad.ConstantMap[] cMaps)
Set the ConstantMaps of this data.

Parameters:
cMaps - The new ConstantMaps for this data.

addConstantMap

public void addConstantMap(visad.ConstantMap cMap)
Adds the specified ConstantMap to the constant mappings of this DisplayData. If a ConstantMap with the same DisplayRealType exists this map will be replaced by the new map. Otherwise the new map is appended to the old ones.

Parameters:
cMap - The map to be added to the ConstantMaps of this DisplayData.

removeConstantMap

public void removeConstantMap(visad.ConstantMap cMap)
Removes the specified ConstantMap from the constant mappings of this DisplayData.

Parameters:
cMap - The ConstantMap to be removed from this DisplayData.

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable
See Also:
Comparable.compareTo(Object)

getAllData

public static DisplayData[] getAllData()
Returns an array with all DisplayDatas constructed in this VM.

Returns:
All DisplayDatas.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

setVisible

public void setVisible(boolean visible)

isVisible

public boolean isVisible()