WISA.wisa3D
Class Wisa3DPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--WISA.wisa3D.Wisa3DPanel
All Implemented Interfaces:
javax.accessibility.Accessible, visad.DisplayListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable

public class Wisa3DPanel
extends javax.swing.JPanel
implements java.awt.event.MouseListener, visad.DisplayListener

Wisa3DPanel ist die zentrale Klasse des Wisa3D-Pakets. Die gesamte Visualisierung läuft über das Wisa3DPanel. Dieses beinhaltet eine Wisa3DCell und diverse Kontrollelemente.
Die Wisa3DCell ist immer mittig angeordnet und dominiert den Bereich des Panels. Sie sorgt für die eigentliche graphische Darstellung der Daten und bedient sich dabei des VisAD-Pakets.
Die Kontrollelemente setzen sich zum einen aus einer Reihe von Bedienknöpfen und zum anderen aus einem Textfeld zusammen. Beide Elemente sind dabei frei und völlig unabhängig voneinander konfigurierbar. Die entsprechenden Methoden stellt das Wisa3DPanel selbst zur Verfügung. Ebenso die entsprechenden graphischen Kontrollelemente zur Konfiguration des Panels noch während der Laufzeit.
Anders als der Name vermuten läßt eignet sich das Wisa3DPanel auch zur zweidimensionalen Darstellung der Daten. Bei Bedarf schaltet die Wisa3DCell automatisch in den 2D-Modus. Dieser operiert, im Gegensatz zum 3D-Modus, ausschließlich auf Java2D.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  java.util.Vector data
          The data contained within this Wisa3DPanel.
protected  visad.DisplayImpl display
          Die Wisa3DCell.
protected  javax.swing.JPanel displayPanel
          The JPanel containing the Display.
static int J2D_2D_MODE
          The mode for a Java2D display.
static int J3D_2D_MODE
          The mode for a Java3D display in 2D-mode.
static int J3D_3D_MODE
          The mode for a Java3D display in 3D-mode.
protected  java.util.Vector maps
          The ScalarMaps of this Wisa3DPanel.
static int X_AXIS
          Key for the x-axis used for rotations etc.
static int XMINUS_VIEW
          Key for a x-plus ortho view.
static int XPLUS_VIEW
          Key for a x-plus ortho view.
static int Y_AXIS
          Key for the x-axis used for rotations etc.
static int YMINUS_VIEW
          Key for a x-plus ortho view.
static int YPLUS_VIEW
          Key for a x-plus ortho view.
static int Z_AXIS
          Key for the x-axis used for rotations etc.
static int ZMINUS_VIEW
          Key for a x-plus ortho view.
static int ZPLUS_VIEW
          Key for a x-plus ortho view.
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Wisa3DPanel(java.awt.Frame parent, java.lang.String name)
          Konstruiert ein Wisa3DPanel in dem angegebenen Frame und nur mit den übergebenen Kontrollen.
 
Method Summary
 void addData(visad.Data data)
           
 void addData(visad.DataReferenceImpl ref)
           
 void addData(visad.DataReferenceImpl ref, visad.ConstantMap[] cMaps)
           
 void addData(visad.DataReferenceImpl ref, visad.DataRenderer renderer)
           
 void addData(visad.DataReferenceImpl ref, visad.DataRenderer renderer, visad.ConstantMap[] cMaps)
           
protected  void addData(DisplayData data, boolean refresh)
           
 void addData(double[][] data)
          Adds data to the current visualization.
 void addData(float[][] data)
          Adds data to the current visualization.
protected  void addData(int id, int type, java.lang.String source, java.lang.String name, visad.DataReferenceImpl ref, visad.ConstantMap[] cMaps, visad.DataRenderer renderer, boolean refresh)
           
 void addData(java.lang.Object[][] data)
          Adds data to the current visualization.
 void addData(java.lang.String data)
          Adds data to the current visualization.
 void addMap(visad.ScalarMap map)
          Adds a new mapping to the display of this Wisa3DPanel.
 void addMaps(visad.ScalarMap[] maps)
          Adds new mappings to the display of this Wisa3DPanel.
 void addMouseListener(java.awt.event.MouseListener l)
          Fügt einen MouseListener zu diesem Wisa3DPanel hinzu.
 void changeMaps(visad.ScalarMap[] maps)
          This methods determines if ScalarMaps with the same RealType and DisplayRealType allready exist in this Wisa3DPanel.
 void clearData()
          Clears all data in this Wisa3DPanel.
 void clearMaps()
          Clears the maps of this Wisa3DPanel.
 void displayChanged(visad.DisplayEvent e)
          Standardmethode des DisplayListener-Interface.
 void disposeSlicer()
          Zerstört den Slicer dieses Panels.
 visad.ConstantMap[] getConstantMaps()
          Returns the ConstantMaps of this display.
 java.util.Vector getConstantMapVector()
          Returns the ConstantMaps of this display.
 visad.Data[] getData()
           
 visad.Data getData(java.lang.String name)
          Returns the data with the specified name or null if the data can not be found.
 int getDataCount()
          Returns the number of data-objects contained in this Wisa3DPanel.
 java.lang.String[] getDataNames()
          Returns the names of all data-objects contained in this Wisa3DPanel.
 java.lang.String getDataSource(java.lang.String name)
          Returns the source of the data with the specified name or null if the data can not be found.
 int getDataSourceType(java.lang.String name)
          Returns the sourcetype of the data with the specified name or -1 if the data can not be found.
 visad.DisplayImpl getDisplay()
          Returns the display of this Wisa3DPanel.
protected  DisplayData[] getDisplayData()
           
protected  DisplayData getDisplayData(java.lang.String name)
          Returns the data with the specified name or null if the data can not be found.
 javax.swing.JPanel getDisplayPanel()
          Returns the JPanel containing the display.
 java.lang.Object getDisplayState()
          Returns the current state of this display, e.g. the contained data and the maps.
protected  javax.swing.JFileChooser getFileChooser()
          Return the file chooser used for loading and saving files in all supported file formats.
protected  int getFirstFreeID()
          Computes the first free ID for data.
 java.awt.Image getImage()
          Erzeugt ein Image der aktuellen Visualisierung.
 visad.ScalarMap[] getMaps()
          Returns both the ScalarMaps and the ConstantMaps of this display.
 java.util.Vector getMapVector()
          Returns both the ScalarMaps and the ConstantMaps of this display.
 int getMode()
          Returns the mode of this display.
protected  Options[] getOptions()
          Get the Options used for showing the OptionsDialog.
 visad.DataReferenceImpl[] getReferences()
          Returns the DataReferences containes in this Wisa3DPanel.
 visad.ScalarMap getScalarMapByType(visad.DisplayRealType type)
          Returns the ScalarMap with the specified DisplayRealType or null if no such map exists.
 visad.ScalarMap[] getScalarMaps()
          Returns the ScalarMaps of this display.
 java.util.Vector getScalarMapVector()
          Returns the ScalarMaps of this display.
 void guessMaps()
          Guesses maps for the data contained in this Wisa3DPanel.
 boolean hasData()
          Returns true if this Wisa3DPanel containes data, false otherwise.
 boolean hasMap(visad.ScalarMap map)
          Checks if this Wisa3DPanel allready has a mapping like map.
 boolean hasMaps()
          Returns true if this Wisa3DPanel has mappings, false otherwise.
 boolean is3D()
          Returns true if this Wisa3DPanel is in J3D_3D_MODE.
 boolean isBorderVisible()
          Ermittelt ob der Rahmen dieses Panels gerade gezeichnet wird.
 boolean isSlicerEnabled()
          Return if the slicer of this Wisa3DPanel is enabled.
 void mouseClicked(java.awt.event.MouseEvent e)
          Standardmethode des MouseListener-Interface.
 void mouseEntered(java.awt.event.MouseEvent e)
          Standardmethode des MouseListener-Interface.
 void mouseExited(java.awt.event.MouseEvent e)
          Standardmethode des MouseListener-Interface.
 void mousePressed(java.awt.event.MouseEvent e)
          Standardmethode des MouseListener-Interface.
 void mouseReleased(java.awt.event.MouseEvent e)
          Standardmethode des MouseListener-Interface.
 void print()
          Print the contents of this Wisa3DPanel.
 void refreshDisplay()
          Aktualisiert die Anzeige.
 boolean removeData(visad.DataReferenceImpl ref)
          Removes the specified data from this Wisa3DPanel.
 void removeData(visad.DataReferenceImpl[] refs)
          Removes all specified data from this Wisa3DPanel.
protected  boolean removeData(DisplayData data)
          Remove the specified data from this Wisa3DPanel.
 void removeData(java.lang.String name)
          Removes the data with the specified name from this Wisa3DPanel.
 void removeMap(visad.ScalarMap map)
          Removes the specified map from this display.
 void removeMaps(visad.ScalarMap[] maps)
          Removes the specified maps from this display.
 void restoreDisplayState()
          Restore a former state of this display saved with saveDisplayState() or do nothing if saveDisplayState() was not yet called for this display resepectively the Stack used for storing the states is empty.
 void rotate(int axis, double angle)
          Rotate the visualization.
 void saveDisplayState()
          Saves the state of this display internally.
 void setBorderVisible(boolean on)
          Sets the activated border visible.
 void setData(double[][] data)
          Clears this Wisa3DPanel and adds data to it.
 void setData(float[][] data)
          Clears this Wisa3DPanel and adds data to it.
 void setData(java.lang.Object[][] data)
          Clears this Wisa3DPanel and adds data to it.
 void setData(java.lang.String data)
          Clears this Wisa3DPanel and adds data to it.
 void setDataMaps(java.lang.String name, visad.ConstantMap[] cMaps)
          Set the ConstantMaps of the data with the specified name.
 void setDataVisible(java.lang.String name, boolean visible)
          Set the specified data visible or invisible.
 void setDisplayState(java.lang.Object state)
          Sets the state of the display from the specified state.
 void setEnabled(boolean enabled)
          Sets this Wisa3DPanel enabled or disabled depending on parameter.
 void setMaps(visad.ScalarMap[] maps)
          Sets the mappings of the display contained in this Wisa3DPanel.
 void setMode(int mode)
          Sets the mode of this display.
 void setName(java.lang.String name)
          Sets the name of this Wisa3DPanel.
 void setOrthoView(int view)
          Transform the display to the specified view.
 void setSelected(boolean selected)
          Aktiviert oder deaktiviert dieses Wisa3DPanel, d.h. der Rahmen wird entweder aktiviert oder deaktiviert gezeichnet.
 void setSlicerEnabled(boolean b)
          Activate a existing slicer or construct a new one if there is none for this display.
 void setSlicerOutputLink(Wisa3DPanel slicerOutput)
          Set the display for slicer output.
 void showConstantMapsDialog()
          Opens the ConstantMappingDialog for this Wisa3DPanel.
 void showControlsDialog()
          Shows the ControlsDialog for this Wisa3DPanel.
 visad.Data showDataChooserDialog()
          Pop up a dialog to select a data if there are more than one datas in this Wisa3DPanel.
 void showLoadDataDialog()
          Opens a JFileChooser where the user can select any file of supported type and open it for displaying it in this Wisa3DPanel.
 void showOptionsDialog()
          Shows the controlsDialog of this Wisa3DPanel.
 void showOptionsDialog(Options[] options)
           
 void showPrintDataDialog()
          Opens a print dialog where the user can print the contents of this Wisa3DPanel.
 void showRotationDialog()
          Opens a JDialog for free rotation of the display.
 void showSaveDataDialog()
          Opens a JFileChooser where the user can specify a file where the actual content of this Wisa3DPanel is saved to.
 void showScalarMapsDialog()
          Opens the MappingDialog for ScalarMaps for this Wisa3DPanel.
protected  void updateDialogs()
          Updates all active Dialogs of this Wisa3DPanel.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

J2D_2D_MODE

public static final int J2D_2D_MODE
The mode for a Java2D display.

See Also:
Constant Field Values

J3D_2D_MODE

public static final int J3D_2D_MODE
The mode for a Java3D display in 2D-mode.

See Also:
Constant Field Values

J3D_3D_MODE

public static final int J3D_3D_MODE
The mode for a Java3D display in 3D-mode.

See Also:
Constant Field Values

XPLUS_VIEW

public static final int XPLUS_VIEW
Key for a x-plus ortho view.

See Also:
Constant Field Values

XMINUS_VIEW

public static final int XMINUS_VIEW
Key for a x-plus ortho view.

See Also:
Constant Field Values

YPLUS_VIEW

public static final int YPLUS_VIEW
Key for a x-plus ortho view.

See Also:
Constant Field Values

YMINUS_VIEW

public static final int YMINUS_VIEW
Key for a x-plus ortho view.

See Also:
Constant Field Values

ZPLUS_VIEW

public static final int ZPLUS_VIEW
Key for a x-plus ortho view.

See Also:
Constant Field Values

ZMINUS_VIEW

public static final int ZMINUS_VIEW
Key for a x-plus ortho view.

See Also:
Constant Field Values

X_AXIS

public static final int X_AXIS
Key for the x-axis used for rotations etc.

See Also:
Constant Field Values

Y_AXIS

public static final int Y_AXIS
Key for the x-axis used for rotations etc.

See Also:
Constant Field Values

Z_AXIS

public static final int Z_AXIS
Key for the x-axis used for rotations etc.

See Also:
Constant Field Values

display

protected visad.DisplayImpl display
Die Wisa3DCell.


displayPanel

protected javax.swing.JPanel displayPanel
The JPanel containing the Display.


data

protected java.util.Vector data
The data contained within this Wisa3DPanel.


maps

protected java.util.Vector maps
The ScalarMaps of this Wisa3DPanel.

Constructor Detail

Wisa3DPanel

public Wisa3DPanel(java.awt.Frame parent,
                   java.lang.String name)
Konstruiert ein Wisa3DPanel in dem angegebenen Frame und nur mit den übergebenen Kontrollen. Die Kontrollen stehen dabei defaultmäßig links vom Visualisierungbereich während das Formel-Textfeld unter dem Visualisierungbereich steht.

Parameters:
parent - Der Frame der dieses Wisa3DPanel enthalten soll.
Method Detail

setData

public void setData(java.lang.String data)
             throws DataException
Clears this Wisa3DPanel and adds data to it. Data must be any File which contains any data that can be visualized with VisAD.

Parameters:
data - The File which contains the data to be visualized.
DataException

setData

public void setData(double[][] data)
             throws DataException
Clears this Wisa3DPanel and adds data to it. The data will be interpreted like it is defined in WISA.wisa3D.data.SatDatGenForm.FIELDS and WISA.wisa3D.data.SatDatGenForm.CLASSES.

Parameters:
data - The dataset to be visualized.
DataException

setData

public void setData(float[][] data)
             throws DataException
Clears this Wisa3DPanel and adds data to it. The data will be interpreted like it is defined in WISA.wisa3D.data.SatDatGenForm.FIELDS and WISA.wisa3D.data.SatDatGenForm.CLASSES.

Parameters:
data - The dataset to be visualized.
DataException

setData

public void setData(java.lang.Object[][] data)
             throws DataException
Clears this Wisa3DPanel and adds data to it. The data will be interpreted like it is defined in WISA.wisa3D.data.SatDatGenForm.FIELDS and WISA.wisa3D.data.SatDatGenForm.CLASSES.

Parameters:
data - The dataset to be visualized.
DataException

addData

public void addData(java.lang.String data)
             throws DataException
Adds data to the current visualization. Data must be any File which contains any data that can be visualized with VisAD.

Parameters:
data - The File which contains the data to be visualized.
DataException

addData

public void addData(double[][] data)
             throws DataException
Adds data to the current visualization. The data will be interpreted like it is defined in WISA.wisa3D.data.SatDatGenForm.FIELDS and WISA.wisa3D.data.SatDatGenForm.CLASSES.

Parameters:
data - The dataset to be visualized.
DataException

addData

public void addData(float[][] data)
             throws DataException
Adds data to the current visualization. The data will be interpreted like it is defined in WISA.wisa3D.data.SatDatGenForm.FIELDS and WISA.wisa3D.data.SatDatGenForm.CLASSES.

Parameters:
data - The dataset to be visualized.
DataException

addData

public void addData(java.lang.Object[][] data)
             throws DataException
Adds data to the current visualization. The data will be interpreted like it is defined in WISA.wisa3D.data.SatDatGenForm.FIELDS and WISA.wisa3D.data.SatDatGenForm.CLASSES.

Parameters:
data - The dataset to be visualized.
DataException

addData

public void addData(visad.Data data)
             throws DataException
DataException

addData

public void addData(visad.DataReferenceImpl ref)
             throws DataException
DataException

addData

public void addData(visad.DataReferenceImpl ref,
                    visad.ConstantMap[] cMaps)
             throws DataException
DataException

addData

public void addData(visad.DataReferenceImpl ref,
                    visad.DataRenderer renderer)
             throws DataException
DataException

addData

public void addData(visad.DataReferenceImpl ref,
                    visad.DataRenderer renderer,
                    visad.ConstantMap[] cMaps)
             throws DataException
DataException

addData

protected void addData(int id,
                       int type,
                       java.lang.String source,
                       java.lang.String name,
                       visad.DataReferenceImpl ref,
                       visad.ConstantMap[] cMaps,
                       visad.DataRenderer renderer,
                       boolean refresh)
                throws DataException
DataException

addData

protected void addData(DisplayData data,
                       boolean refresh)
                throws DataException
DataException

getDisplayState

public java.lang.Object getDisplayState()
Returns the current state of this display, e.g. the contained data and the maps. Someone can use this method in combination with setDisplayState(Object) to store a state of a display and to restore this state later on.

Returns:
The current state of the display.
See Also:

setDisplayState

public void setDisplayState(java.lang.Object state)
                     throws DataException
Sets the state of the display from the specified state.

DataException
See Also:

saveDisplayState

public void saveDisplayState()
Saves the state of this display internally. This works with Stacks, e.g. some can save as many states of a display as he wants and restore them in reversed order with restoreDisplayState().

See Also:

restoreDisplayState

public void restoreDisplayState()
                         throws DataException
Restore a former state of this display saved with saveDisplayState() or do nothing if saveDisplayState() was not yet called for this display resepectively the Stack used for storing the states is empty.

DataException
See Also:

setSlicerOutputLink

public void setSlicerOutputLink(Wisa3DPanel slicerOutput)
Set the display for slicer output. If a slicer is active this method causes the destruction of the old slicer and constructs a new one with the given slicer output.

Parameters:
slicerOutput - The display for doing slicer output.

setSlicerEnabled

public void setSlicerEnabled(boolean b)
Activate a existing slicer or construct a new one if there is none for this display. Uses the slicer output set with setSlicerOutputLink or constructs an inline slicer if there is no slicer output set.

Parameters:
b - Activate a slicer if true or deactivate it otherwise.

isSlicerEnabled

public boolean isSlicerEnabled()
Return if the slicer of this Wisa3DPanel is enabled.

Returns:
True if the slicer is enabled, false otherwise.

showRotationDialog

public void showRotationDialog()
Opens a JDialog for free rotation of the display.


showLoadDataDialog

public void showLoadDataDialog()
Opens a JFileChooser where the user can select any file of supported type and open it for displaying it in this Wisa3DPanel.


showSaveDataDialog

public void showSaveDataDialog()
Opens a JFileChooser where the user can specify a file where the actual content of this Wisa3DPanel is saved to.


showDataChooserDialog

public visad.Data showDataChooserDialog()
Pop up a dialog to select a data if there are more than one datas in this Wisa3DPanel.

Returns:
The choosen data.

print

public void print()
Print the contents of this Wisa3DPanel.


showPrintDataDialog

public void showPrintDataDialog()
Opens a print dialog where the user can print the contents of this Wisa3DPanel.


showScalarMapsDialog

public void showScalarMapsDialog()
Opens the MappingDialog for ScalarMaps for this Wisa3DPanel.


showConstantMapsDialog

public void showConstantMapsDialog()
Opens the ConstantMappingDialog for this Wisa3DPanel.


showControlsDialog

public void showControlsDialog()
Shows the ControlsDialog for this Wisa3DPanel.


showOptionsDialog

public void showOptionsDialog()
Shows the controlsDialog of this Wisa3DPanel.


showOptionsDialog

public void showOptionsDialog(Options[] options)

updateDialogs

protected void updateDialogs()
Updates all active Dialogs of this Wisa3DPanel.


getOptions

protected Options[] getOptions()
Get the Options used for showing the OptionsDialog.

Returns:
The Options of this Wisa3DPanel.

getFileChooser

protected javax.swing.JFileChooser getFileChooser()
Return the file chooser used for loading and saving files in all supported file formats.

Returns:
The JFileChooser of this Wisa3DPanel.

guessMaps

public void guessMaps()
Guesses maps for the data contained in this Wisa3DPanel.


removeData

protected boolean removeData(DisplayData data)
Remove the specified data from this Wisa3DPanel.

Parameters:
data - The data to be removed.
Returns:
True if removing was successful.

removeData

public boolean removeData(visad.DataReferenceImpl ref)
Removes the specified data from this Wisa3DPanel.

Parameters:
ref - The DataReference to be removed.
Returns:
True if the data was found and removed.

removeData

public void removeData(visad.DataReferenceImpl[] refs)
Removes all specified data from this Wisa3DPanel.

Parameters:
refs - The DataReferences to be removed.

removeData

public void removeData(java.lang.String name)
Removes the data with the specified name from this Wisa3DPanel.

Parameters:
name - The name of the data to be removed.

setDataVisible

public void setDataVisible(java.lang.String name,
                           boolean visible)
Set the specified data visible or invisible.

Parameters:
name - The name of the data.
visible - If true the data will be visible.

setDataMaps

public void setDataMaps(java.lang.String name,
                        visad.ConstantMap[] cMaps)
Set the ConstantMaps of the data with the specified name.

Parameters:
name - The name of the data.
cMaps - The new ConstantMaps.

hasData

public boolean hasData()
Returns true if this Wisa3DPanel containes data, false otherwise.

Returns:
True if this Wisa3DPanel isn't empty.

hasMaps

public boolean hasMaps()
Returns true if this Wisa3DPanel has mappings, false otherwise.

Returns:
True if this Wisa3DPanel has mappings.

getDisplayData

protected DisplayData getDisplayData(java.lang.String name)
Returns the data with the specified name or null if the data can not be found.

Parameters:
name - The name of the data.
Returns:
The data with the specified name or null.

getDisplayData

protected DisplayData[] getDisplayData()

getData

public visad.Data getData(java.lang.String name)
Returns the data with the specified name or null if the data can not be found.

Parameters:
name - The name of the data.
Returns:
The data with the specified name or null.

getData

public visad.Data[] getData()

getDataSource

public java.lang.String getDataSource(java.lang.String name)
Returns the source of the data with the specified name or null if the data can not be found.

Parameters:
name - The name of the data.
Returns:
The source of the data with the specified name or null.

getDataSourceType

public int getDataSourceType(java.lang.String name)
Returns the sourcetype of the data with the specified name or -1 if the data can not be found.

Parameters:
name - The name of the data.
Returns:
The sourcetype of the data with the specified name or -1.

getReferences

public visad.DataReferenceImpl[] getReferences()
Returns the DataReferences containes in this Wisa3DPanel.

Returns:
The DataReferenceImpls.

getDataNames

public java.lang.String[] getDataNames()
Returns the names of all data-objects contained in this Wisa3DPanel.

Returns:
The Names aof all data-objects.

getDataCount

public int getDataCount()
Returns the number of data-objects contained in this Wisa3DPanel.

Returns:
The number of data-objects.

getFirstFreeID

protected int getFirstFreeID()
Computes the first free ID for data.

Returns:
The first free data-ID.

setMaps

public void setMaps(visad.ScalarMap[] maps)
Sets the mappings of the display contained in this Wisa3DPanel. All former mappings are claered before the new ones are added.

Parameters:
maps - The new mappings.

addMap

public void addMap(visad.ScalarMap map)
Adds a new mapping to the display of this Wisa3DPanel.

Parameters:
map - The mapping to be added.

addMaps

public void addMaps(visad.ScalarMap[] maps)
Adds new mappings to the display of this Wisa3DPanel.

Parameters:
maps - The mappings to be added.

changeMaps

public void changeMaps(visad.ScalarMap[] maps)
This methods determines if ScalarMaps with the same RealType and DisplayRealType allready exist in this Wisa3DPanel. If they don't exist the given map is added. If it exists nothing happens. All maps that are members of this Wisa3DPanel but are not in the specified array will be deleted from this Wisa3DPanel.

Parameters:
maps - The maps which should be set after calling this method.

removeMap

public void removeMap(visad.ScalarMap map)
Removes the specified map from this display.

Parameters:
map - The map to be removed.

removeMaps

public void removeMaps(visad.ScalarMap[] maps)
Removes the specified maps from this display.


getMaps

public visad.ScalarMap[] getMaps()
Returns both the ScalarMaps and the ConstantMaps of this display. If there are neither ScalarMaps nor ConstantMaps null is returned.

Returns:
An array which containes both ScalarMaps and ConstantMaps of this display.

getMapVector

public java.util.Vector getMapVector()
Returns both the ScalarMaps and the ConstantMaps of this display. If there are neither ScalarMaps nor ConstantMaps null is returned.

Returns:
A Vector which containes both ScalarMaps and ConstantMaps of this display.

getScalarMaps

public visad.ScalarMap[] getScalarMaps()
Returns the ScalarMaps of this display. If there are no ScalarMaps null is returned.

Returns:
An array which containes the ScalarMaps of this display.

getScalarMapVector

public java.util.Vector getScalarMapVector()
Returns the ScalarMaps of this display.

Returns:
A vector which containes the ScalarMaps of this display.

getConstantMaps

public visad.ConstantMap[] getConstantMaps()
Returns the ConstantMaps of this display. If there are no ConstantMaps null is returned.

Returns:
An array which containes the ConstantMaps of this display.

getConstantMapVector

public java.util.Vector getConstantMapVector()
Returns the ConstantMaps of this display.

Returns:
A vector which containes the ConstantMaps of this display.

hasMap

public boolean hasMap(visad.ScalarMap map)
Checks if this Wisa3DPanel allready has a mapping like map.

Parameters:
map - The ScalarMap to be checked.
Returns:
True if the mapping allready exists.

getScalarMapByType

public visad.ScalarMap getScalarMapByType(visad.DisplayRealType type)
Returns the ScalarMap with the specified DisplayRealType or null if no such map exists.

Parameters:
type - The DisplayRealType of the searched for map.
Returns:
The ScalarMap with the specified DisplayRealType or null.

clearMaps

public void clearMaps()
Clears the maps of this Wisa3DPanel.


clearData

public void clearData()
Clears all data in this Wisa3DPanel.


setName

public void setName(java.lang.String name)
Sets the name of this Wisa3DPanel.

Overrides:
setName in class java.awt.Component
Parameters:
name - The new name of this panel.

getImage

public java.awt.Image getImage()
Erzeugt ein Image der aktuellen Visualisierung.

Returns:
Das erzeugte Image-Objekt

getDisplay

public visad.DisplayImpl getDisplay()
Returns the display of this Wisa3DPanel.

Returns:
The display of this Wisa3DPanel.

getDisplayPanel

public javax.swing.JPanel getDisplayPanel()
Returns the JPanel containing the display.

Returns:
The JPanel containing the display.

setSelected

public void setSelected(boolean selected)
Aktiviert oder deaktiviert dieses Wisa3DPanel, d.h. der Rahmen wird entweder aktiviert oder deaktiviert gezeichnet.

Parameters:
selected - Falls true wird das Panel aktiviert, ansonsten deaktiviert.

setBorderVisible

public void setBorderVisible(boolean on)
Sets the activated border visible.

Parameters:
on - If true the border will be painted if this Wisa3DPanel is active.

isBorderVisible

public boolean isBorderVisible()
Ermittelt ob der Rahmen dieses Panels gerade gezeichnet wird.

Returns:
Falls true wird der Rahmen gerade gezeichnet, ansonsten nicht.

setEnabled

public void setEnabled(boolean enabled)
Sets this Wisa3DPanel enabled or disabled depending on parameter.

Overrides:
setEnabled in class javax.swing.JComponent

setOrthoView

public void setOrthoView(int view)
Transform the display to the specified view.

Parameters:
view - The view, e.g. XPLUS_VIEW, XMINUS_VIEW, YPLUS_VIEW, YMINUS_VIEW, ZPLUS_VIEW, ZMINUS_VIEW.

rotate

public void rotate(int axis,
                   double angle)
Rotate the visualization.

Parameters:
axis - The axis to rotate.
angle - The angle to rotate.

setMode

public void setMode(int mode)
Sets the mode of this display. This can be J2D_2D_MODE, J3D_2D_MODE or J3D_3D_MODE.

Parameters:
mode - The mode of this display.

getMode

public int getMode()
Returns the mode of this display.

Returns:
The mode of this display.

is3D

public boolean is3D()
Returns true if this Wisa3DPanel is in J3D_3D_MODE.

Returns:
True if getMode() is J3D_3D_MODE.

refreshDisplay

public void refreshDisplay()
Aktualisiert die Anzeige. Sollte immer dann aufgerufen werden wenn sich die zu diesem Display zugehörigen Wisa3DProperties geändert haben.


disposeSlicer

public void disposeSlicer()
Zerstört den Slicer dieses Panels.


addMouseListener

public void addMouseListener(java.awt.event.MouseListener l)
Fügt einen MouseListener zu diesem Wisa3DPanel hinzu.

Overrides:
addMouseListener in class java.awt.Component
Parameters:
l - Der hinzuzufügende MouseListener.

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Standardmethode des MouseListener-Interface.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Standardmethode des MouseListener-Interface.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Standardmethode des MouseListener-Interface.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Standardmethode des MouseListener-Interface.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Standardmethode des MouseListener-Interface.

Specified by:
mouseExited in interface java.awt.event.MouseListener

displayChanged

public void displayChanged(visad.DisplayEvent e)
Standardmethode des DisplayListener-Interface.

Specified by:
displayChanged in interface visad.DisplayListener