visad.ss
Class BasicSSCell

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by visad.ss.BasicSSCell
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, DisplayListener, MessageListener
Direct Known Subclasses:
FancySSCell

public class BasicSSCell
extends JPanel
implements DisplayListener, MessageListener

BasicSSCell represents a single spreadsheet display cell. BasicSSCells can be added to a VisAD user interface to provide some of the capabilities presented in the VisAD SpreadSheet. Other capabilities, like the file loader and data mapping dialog boxes, are available only with a FancySSCell.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
static int ADD_DATA
          Message ID indicating a data object has been added.
static int ADD_SOURCE
          Message ID indicating a source has been added.
protected static boolean CanDo3D
          Whether Java3D is enabled for this JVM.
protected  Vector CellData
          List of this cell's data.
protected  int CollabID
          ID number for this collaborative cell.
static boolean DEBUG
          Debugging flag.
static int DEBUG_LEVEL
          Debugging level.
protected static FormulaManager defaultFM
          Default FormulaManager object used by SSCells.
protected  int Dim
          The dimensionality of the display: JAVA3D_3D, JAVA2D_2D, or JAVA3D_2D.
static int DIRECT_SOURCE
          Indicates that the data was added to this cell directly using addData() or addReference().
protected  boolean DisplayEnabled
          Whether display updates are enabled.
protected  Vector DListen
          List of DisplayListeners.
protected  String[] Errors
          Global errors currently being displayed in this cell, if any.
protected  FormulaManager fm
          Formula manager for this cell.
static int FORMULA_SOURCE
          Indicates that the data was computed from a formula.
protected  boolean HasDisplay
          Whether a valid VisAD display currently exists.
protected  boolean HasMappings
          Whether this cell has mappings from Data to Display.
protected  boolean IsRemote
          Whether this display is remote.
protected  boolean IsSlave
          Whether this display is slaved.
static int JAVA2D_2D
          Constant for 2-D (Java2D) dimensionality.
static int JAVA3D_2D
          Constant for 2-D (Java3D) dimensionality.
static int JAVA3D_3D
          Constant for 3-D (Java3D) dimensionality.
protected  int Loading
          The number of data objects this cell is currently loading.
protected  Object Lock
          Prevents simultaneous GUI manipulation.
static int MAX_ID
          No message ID should have a value greater than or equal to this number.
protected  DisplayImpl MDisplay
          Associated DisplayImpl for sending and receiving messages.
static String[] messages
          Message ID strings, for debugging.
protected  String Name
          Name of this cell.
protected  boolean NewClient
          Whether this display is still a new client (hasn't been initialized).
protected static int POLLING_INTERVAL
          Interval at which to check for status changes while waiting.
protected static boolean Possible3D
          Whether Java3D is possible for this JVM.
static int REMOTE_SOURCE
          Indicates that the data came from a remotely linked cell.
protected  RemoteDisplay RemoteMDisplay
          Associated RemoteDisplay for sending and receiving messages.
protected  RemoteDisplay RemoteVDisplay
          Associated VisAD RemoteDisplay.
protected  RemoteServer RemoteVServer
          Associated VisAD RemoteServer, if any.
protected  RemoteSlaveDisplayImpl RemoteVSlave
          Associated VisAD RemoteSlaveDisplay, if any.
static int REMOVE_DATA
          Message ID indicating a data object has been removed.
static int RMI_SOURCE
          Indicates that the data came from an RMI server.
protected static int Saving
          The number of SSCells currently saving data.
protected  Vector Servers
          List of servers to which this cell has been added.
static int SET_DIM
          Message ID indicating dimension has changed.
static int SET_ERRORS
          Message ID indicating errors have changed.
static int SET_MAPS
          Message ID indicating mappings have changed.
protected  Vector SListen
          List of SSCellListeners.
protected static Vector SSCellVector
          List of SSCells on this JVM.
static int STATUS
          Message ID indicating a cell's status information is being requested or reported.
static int UNKNOWN_SOURCE
          Indicates that the source of the data is unknown.
static int UPDATE_DATA
          Message ID indicating a data object has changed.
static int UPDATE_DEPENDENCIES
          Message ID indicating a data object's dependencies have changed.
static int URL_SOURCE
          Indicates that the data came from a file or URL.
protected  DisplayImpl VDisplay
          Associated VisAD Display.
protected  Component VDPanel
          Associated VisAD Display component.
 
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
BasicSSCell(String name)
          Constructs a new BasicSSCell with the given name.
BasicSSCell(String name, FormulaManager fman)
          Constructs a new BasicSSCell with the given name and non-default formula manager, to allow for custom formulas.
BasicSSCell(String name, FormulaManager fman, RemoteServer rs, boolean slave, String save)
          Constructs a new, possibly slaved, BasicSSCell with the given name, formula manager, and remote server.
BasicSSCell(String name, FormulaManager fman, RemoteServer rs, String save)
          Constructs a new BasicSSCell with the given name, formula manager, and remote server.
BasicSSCell(String name, RemoteServer rs)
          Constructs a new BasicSSCell with the given name, that gets its information from the given RemoteServer.
BasicSSCell(String name, String save)
          Constructs a new BasicSSCell with the given name and save string, used to reconstruct this cell's configuration.
 
Method Summary
 String addData(Data data)
          Adds a Data object to this cell, creating an associated DataReference for it.
 String addData(Data data, ConstantMap[] cmaps)
          Adds a Data object to this cell, creating an associated DataReference with the specified ConstantMaps for it.
protected  String addData(int id, Data data, ConstantMap[] cmaps, String source, int type, boolean notify)
          Adds a Data object to this cell from the given source of the specified type, creating an associated DataReference for it.
 String addDataSource(String source)
          Obtains a Data object from the given source of unknown type, and adds it to this cell.
 String addDataSource(String source, int type)
          Obtains a Data object from the given source of the specified type, and adds it to this cell.
 void addDisplayListener(DisplayListener d)
          Adds a DisplayListener.
 String addReference(DataReferenceImpl ref)
          Adds the given DataReference to this cell.
 String addReference(DataReferenceImpl ref, ConstantMap[] cmaps)
          Adds the given DataReference to this cell with the specified ConstantMaps.
protected  SSCellData addReferenceImpl(int id, DataReferenceImpl ref, ConstantMap[] cmaps, String source, int type, boolean notify, boolean checkErrors)
          Does the work of adding the given DataReference, from the given source of the specified type.
 void addSSCellChangeListener(SSCellListener l)
          Deprecated. Use addSSCellListener(SSCellListener) instead.
 void addSSCellListener(SSCellListener l)
          Adds an SSCellListener.
 void addToRemoteServer(RemoteServerImpl rs)
          Adds this cell to the given RemoteServer.
 void addVar(String name, ThingReference tr)
          Adds a variable to this cell's formula manager.
static boolean arraysEqual(Object[] o1, Object[] o2)
          Deprecated. Use visad.Util.arraysEqual(Object[], Object[]) instead.
static boolean canDo3D()
          Returns true if Java3D is enabled for this JVM.
 void captureImage(File f)
          Captures an image and saves it to a given file name, in JPEG format.
 void clearCell()
          Clears this cell completely.
 void clearDisplay()
          Clears this cell's display.
 void clearMaps()
          Clears this cell's mappings.
 boolean constructDisplay()
          Reconstructs this cell's display.
static void createVar(String name, ThingReference tr)
          Deprecated. Use addVar(String, ThingReference) instead.
 void destroyCell()
          Clears this cell completely and destroys it, removing it from the list of created cells.
static void disable3D()
          Disables Java3D for this JVM.
 void displayChanged(DisplayEvent e)
          Handles display changes.
static boolean enable3D()
          Attempts to enable Java3D for this JVM, returning true if successful.
protected  SSCellData getCellDataByName(String varName)
          Obtains the cell data entry corresponding to the given variable name.
 Data[] getData()
          Gets this cell's Data objects.
 Data getData(String varName)
          Gets this cell's Data object with the specified variable name.
 int getDataCount()
          Gets the number of Data object this cell has.
 DataReferenceImpl getDataRef()
          Deprecated. Use getReference(String) instead.
 String getDataSource(String varName)
          Gets this cell's data source string for data with the specified variable name.
 String[] getDataSources()
          Gets this cell's data source strings.
 int getDataSourceType(String varName)
          Gets this cell's data source type for data with the specified variable name.
 int[] getDataSourceTypes()
          Gets this cell's data source types.
 int getDimension()
          Gets this cell's dimension.
 DisplayImpl getDisplay()
          Gets this cell's VisAD Display.
 String getFilename()
          Deprecated. Use getDataSource(String) instead.
 URL getFileURL()
          Deprecated. Use getDataSource(String) instead.
protected  int getFirstFreeId()
          Gets the first free cell data ID number.
 String getFirstVariableName()
          Gets the variable name of this cell's first Data object.
 String getFormula()
          Deprecated. Use getDataSource(String) instead.
 FormulaManager getFormulaManager()
          Gets this cell's formula manager.
 String getLastVariableName()
          Gets the variable name of this cell's last Data object.
 ScalarMap[] getMaps()
          Gets this cell's mappings.
 String getName()
          Gets this cell's name.
 String getPartialSaveString()
          Gets a string for reconstructing ScalarMap range and Control information.
 DataReference getReference()
          Deprecated. Use getReference(String) instead.
 DataReference getReference(String varName)
          Gets this cell's DataReference with the specified variable name.
 DataReferenceImpl[] getReferences()
          Gets this cell's DataReferences.
 RemoteDataReferenceImpl getRemoteDataRef()
          Deprecated. Use getRemoteReference(String) instead.
 RemoteDisplay getRemoteDisplay()
          Gets this cell's VisAD RemoteDisplay.
 int getRemoteId()
          Gets the id number this cell uses for remote collaboration.
 RemoteDataReference getRemoteReference(String varName)
          Gets this cell's remote DataReference for data with the specified variable name.
 RemoteDataReference[] getRemoteReferences()
          Gets this cell's remote DataReferences.
 String getRMIAddress()
          Deprecated. Use getDataSource(String) instead.
 String getSaveString()
          Gets the save string necessary to reconstruct this cell.
static BasicSSCell getSSCellByName(String name)
          Gets the SSCell with the specified name.
 String getSSCellString()
          Deprecated. Use getSaveString() instead.
 String[] getVariableNames()
          Gets the variable names of this cell's Data objects.
 boolean hasData()
          Whether this cell has any data.
 boolean hasDisplay()
          Whether this cell has a valid display on-screen.
 boolean hasFormula()
          Deprecated. Use getDataSourceType(String) instead.
 boolean hasMappings()
          Whether this cell has any mappings.
static void invoke(boolean wait, Runnable r)
          Deprecated. Use visad.Util.invoke(boolean, Runnable) instead.
 boolean isRemote()
          Gets whether this cell is a cloned display cell.
static boolean isSaving()
          Returns true if any SSCell is currently saving data.
 boolean isSlave()
          Gets whether this cell is a slaved display cell.
 void loadData(String s)
          Deprecated. Use addDataSource(String, URL_SOURCE) instead.
 void loadData(URL u)
          Deprecated. Use addDataSource(String, URL_SOURCE) instead.
 void loadRMI(String s)
          Deprecated. Use addDataSource(String, RMI_SOURCE) instead.
static DataImpl makeLocal(Data data)
          Deprecated. Use visad.DataUtility.makeLocal(data) instead.
 boolean othersDepend()
          Whether other cells are dependent on any of this cell's Data objects.
 boolean othersDepend(String varName)
          Whether other cells are dependent on this cell's Data object with the specified variable name.
static boolean possible3D()
          Returns true if Java3D is possible for this JVM.
 void receiveMessage(MessageEvent msg)
          Handles VisAD messages.
 void removeAllListeners()
          Deprecated. Use removeAllSSCellListeners() instead.
 void removeAllReferences()
          Removes all Data objects from this cell.
protected  void removeAllReferences(boolean notify)
          Removes all Data objects from this cell, notifying listeners if the notify flag is set.
protected  void removeAllReferences(boolean notify, boolean display)
          Removes all Data objects from this cell, notifying listeners if the notify flag is set, and updating the display if the display flag is set.
 void removeAllSSCellListeners()
          Removes all SSCellListeners.
 void removeData(Data data)
          Removes the given Data object from this cell.
 void removeData(String varName)
          Removes the Data object corresponding to the given variable name from this cell.
protected  void removeDataImpl(SSCellData cellData, boolean notify, boolean display)
          Does the work of removing the Data object at the specified index.
 void removeDisplayListener(DisplayListener d)
          Removes a DisplayListener from this cell.
 void removeFromRemoteServer(RemoteServerImpl rs)
          Removes this cell from the given RemoteServer.
 void removeListener(SSCellListener l)
          Deprecated. Use removeSSCellListener(SSCellListener) instead.
 void removeReference(DataReferenceImpl ref)
          Removes the given DataReference's associated Data object from this cell.
 void removeSSCellListener(SSCellListener l)
          Removes an SSCellListener.
 void saveData(File f, boolean netcdf)
          Deprecated. Use saveData(String, Form) instead.
 void saveData(File f, Form form)
          Deprecated. Use saveData(String, Form) instead.
 void saveData(String varName, String location, Form form)
          Exports a Data object to the given location, using the given Data form.
 void setData(Data data)
          Deprecated. Use addData(Data) instead.
 void setDimension(boolean twoD, boolean java2d)
          Deprecated. Use setDimension(int) instead.
 void setDimension(int dim)
          Sets this cell's dimensionality.
protected  void setErrors(String[] errors, boolean notify)
          Displays global errors in this cell, notifying linked cells if notify flag is set.
 void setFormula(String f)
          Deprecated. Use addDataSource(String, FORMULA_SOURCE) instead.
 void setMaps(ScalarMap[] maps)
          Maps RealTypes to the display according to the specified ScalarMaps.
 void setPartialSaveString(String save, boolean preserveMaps)
          Reconstructs parts of this cell using the specified save string.
 void setSaveString(String save)
          Reconstructs this cell using the specified save string.
 void setSSCellString(String save)
          Deprecated. Use setSaveString(String) instead.
protected  void setupClient()
          Sets up data needed for this cell to be a client.
protected  void setupServer()
          Sets up data needed for this cell to be a server.
static Tuple stringsToTuple(String[] s)
          Deprecated. Use visad.DataUtility.stringsToTuple(String[]) instead.
static String[] tupleToStrings(Tuple t)
          Deprecated. Use visad.DataUtility.tupleToStrings(Tuple) instead.
 void waitForData()
          Blocks until all of this cell's Data objects finish loading.
 void waitForData(String varName)
          Blocks until the Data object with the given variable name finishes loading.
 void waitForFormula()
          Deprecated. Use waitForData(String) instead.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, 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

DEBUG

public static boolean DEBUG
Debugging flag.


DEBUG_LEVEL

public static int DEBUG_LEVEL
Debugging level.
  • 1 = Normal.
  • 2 = Collaboration messages.
  • 3 = All exceptions.


  • SSCellVector

    protected static final Vector SSCellVector
    List of SSCells on this JVM.


    Saving

    protected static int Saving
    The number of SSCells currently saving data.


    Possible3D

    protected static boolean Possible3D
    Whether Java3D is possible for this JVM.


    CanDo3D

    protected static boolean CanDo3D
    Whether Java3D is enabled for this JVM.


    defaultFM

    protected static final FormulaManager defaultFM
    Default FormulaManager object used by SSCells.


    Name

    protected String Name
    Name of this cell.


    fm

    protected FormulaManager fm
    Formula manager for this cell.


    ADD_DATA

    public static final int ADD_DATA
    Message ID indicating a data object has been added.

    See Also:
    Constant Field Values

    ADD_SOURCE

    public static final int ADD_SOURCE
    Message ID indicating a source has been added.

    See Also:
    Constant Field Values

    REMOVE_DATA

    public static final int REMOVE_DATA
    Message ID indicating a data object has been removed.

    See Also:
    Constant Field Values

    SET_MAPS

    public static final int SET_MAPS
    Message ID indicating mappings have changed.

    See Also:
    Constant Field Values

    SET_DIM

    public static final int SET_DIM
    Message ID indicating dimension has changed.

    See Also:
    Constant Field Values

    SET_ERRORS

    public static final int SET_ERRORS
    Message ID indicating errors have changed.

    See Also:
    Constant Field Values

    UPDATE_DATA

    public static final int UPDATE_DATA
    Message ID indicating a data object has changed.

    See Also:
    Constant Field Values

    UPDATE_DEPENDENCIES

    public static final int UPDATE_DEPENDENCIES
    Message ID indicating a data object's dependencies have changed.

    See Also:
    Constant Field Values

    STATUS

    public static final int STATUS
    Message ID indicating a cell's status information is being requested or reported.

    See Also:
    Constant Field Values

    MAX_ID

    public static final int MAX_ID
    No message ID should have a value greater than or equal to this number.

    See Also:
    Constant Field Values

    messages

    public static final String[] messages
    Message ID strings, for debugging.


    Servers

    protected Vector Servers
    List of servers to which this cell has been added.


    MDisplay

    protected DisplayImpl MDisplay
    Associated DisplayImpl for sending and receiving messages.


    RemoteMDisplay

    protected RemoteDisplay RemoteMDisplay
    Associated RemoteDisplay for sending and receiving messages.


    RemoteVDisplay

    protected RemoteDisplay RemoteVDisplay
    Associated VisAD RemoteDisplay.


    RemoteVSlave

    protected RemoteSlaveDisplayImpl RemoteVSlave
    Associated VisAD RemoteSlaveDisplay, if any.


    RemoteVServer

    protected RemoteServer RemoteVServer
    Associated VisAD RemoteServer, if any.


    CollabID

    protected int CollabID
    ID number for this collaborative cell.


    IsRemote

    protected boolean IsRemote
    Whether this display is remote.


    IsSlave

    protected boolean IsSlave
    Whether this display is slaved.


    NewClient

    protected boolean NewClient
    Whether this display is still a new client (hasn't been initialized).


    POLLING_INTERVAL

    protected static final int POLLING_INTERVAL
    Interval at which to check for status changes while waiting.

    See Also:
    Constant Field Values

    UNKNOWN_SOURCE

    public static final int UNKNOWN_SOURCE
    Indicates that the source of the data is unknown.

    See Also:
    Constant Field Values

    DIRECT_SOURCE

    public static final int DIRECT_SOURCE
    Indicates that the data was added to this cell directly using addData() or addReference().

    See Also:
    Constant Field Values

    URL_SOURCE

    public static final int URL_SOURCE
    Indicates that the data came from a file or URL.

    See Also:
    Constant Field Values

    FORMULA_SOURCE

    public static final int FORMULA_SOURCE
    Indicates that the data was computed from a formula.

    See Also:
    Constant Field Values

    RMI_SOURCE

    public static final int RMI_SOURCE
    Indicates that the data came from an RMI server.

    See Also:
    Constant Field Values

    REMOTE_SOURCE

    public static final int REMOTE_SOURCE
    Indicates that the data came from a remotely linked cell.

    See Also:
    Constant Field Values

    Loading

    protected int Loading
    The number of data objects this cell is currently loading.


    CellData

    protected Vector CellData
    List of this cell's data.


    JAVA3D_3D

    public static final int JAVA3D_3D
    Constant for 3-D (Java3D) dimensionality.

    See Also:
    Constant Field Values

    JAVA2D_2D

    public static final int JAVA2D_2D
    Constant for 2-D (Java2D) dimensionality.

    See Also:
    Constant Field Values

    JAVA3D_2D

    public static final int JAVA3D_2D
    Constant for 2-D (Java3D) dimensionality.

    See Also:
    Constant Field Values

    VDisplay

    protected DisplayImpl VDisplay
    Associated VisAD Display.


    Dim

    protected int Dim
    The dimensionality of the display: JAVA3D_3D, JAVA2D_2D, or JAVA3D_2D.


    HasMappings

    protected boolean HasMappings
    Whether this cell has mappings from Data to Display.


    Lock

    protected Object Lock
    Prevents simultaneous GUI manipulation.


    VDPanel

    protected Component VDPanel
    Associated VisAD Display component.


    Errors

    protected String[] Errors
    Global errors currently being displayed in this cell, if any.


    HasDisplay

    protected boolean HasDisplay
    Whether a valid VisAD display currently exists.


    DisplayEnabled

    protected boolean DisplayEnabled
    Whether display updates are enabled.


    SListen

    protected Vector SListen
    List of SSCellListeners.


    DListen

    protected Vector DListen
    List of DisplayListeners.

    Constructor Detail

    BasicSSCell

    public BasicSSCell(String name)
                throws VisADException,
                       RemoteException
    Constructs a new BasicSSCell with the given name.

    Throws:
    VisADException
    RemoteException

    BasicSSCell

    public BasicSSCell(String name,
                       FormulaManager fman)
                throws VisADException,
                       RemoteException
    Constructs a new BasicSSCell with the given name and non-default formula manager, to allow for custom formulas.

    Throws:
    VisADException
    RemoteException

    BasicSSCell

    public BasicSSCell(String name,
                       RemoteServer rs)
                throws VisADException,
                       RemoteException
    Constructs a new BasicSSCell with the given name, that gets its information from the given RemoteServer. The associated SSCell on the server end must have already invoked its addToRemoteServer method.

    Throws:
    VisADException
    RemoteException

    BasicSSCell

    public BasicSSCell(String name,
                       String save)
                throws VisADException,
                       RemoteException
    Constructs a new BasicSSCell with the given name and save string, used to reconstruct this cell's configuration.

    Throws:
    VisADException
    RemoteException

    BasicSSCell

    public BasicSSCell(String name,
                       FormulaManager fman,
                       RemoteServer rs,
                       String save)
                throws VisADException,
                       RemoteException
    Constructs a new BasicSSCell with the given name, formula manager, and remote server.

    Throws:
    VisADException
    RemoteException

    BasicSSCell

    public BasicSSCell(String name,
                       FormulaManager fman,
                       RemoteServer rs,
                       boolean slave,
                       String save)
                throws VisADException,
                       RemoteException
    Constructs a new, possibly slaved, BasicSSCell with the given name, formula manager, and remote server.

    Throws:
    VisADException
    RemoteException
    Method Detail

    getSSCellByName

    public static BasicSSCell getSSCellByName(String name)
    Gets the SSCell with the specified name.


    isSaving

    public static boolean isSaving()
    Returns true if any SSCell is currently saving data.


    possible3D

    public static boolean possible3D()
    Returns true if Java3D is possible for this JVM.


    canDo3D

    public static boolean canDo3D()
    Returns true if Java3D is enabled for this JVM.


    enable3D

    public static boolean enable3D()
    Attempts to enable Java3D for this JVM, returning true if successful.


    disable3D

    public static void disable3D()
    Disables Java3D for this JVM.


    addToRemoteServer

    public void addToRemoteServer(RemoteServerImpl rs)
                           throws RemoteException
    Adds this cell to the given RemoteServer. SSCell servers must call this method for each cell before clients can clone the cells with the BasicSSCell(String name, RemoteServer rs) constructor, and before the cells can be exported as RMI addresses.

    Throws:
    RemoteException

    removeFromRemoteServer

    public void removeFromRemoteServer(RemoteServerImpl rs)
                                throws RemoteException
    Removes this cell from the given RemoteServer.

    Throws:
    RemoteException

    receiveMessage

    public void receiveMessage(MessageEvent msg)
                        throws RemoteException
    Handles VisAD messages. This method is the heart of BasicSSCell's collaboration support.

    Specified by:
    receiveMessage in interface MessageListener
    Parameters:
    msg - The message
    Throws:
    RemoteException

    setupServer

    protected void setupServer()
                        throws VisADException,
                               RemoteException
    Sets up data needed for this cell to be a server.

    Throws:
    VisADException
    RemoteException

    setupClient

    protected void setupClient()
                        throws VisADException,
                               RemoteException
    Sets up data needed for this cell to be a client.

    Throws:
    VisADException
    RemoteException

    addData

    public String addData(Data data)
                   throws VisADException,
                          RemoteException
    Adds a Data object to this cell, creating an associated DataReference for it.

    Returns:
    Variable name of the newly added data.
    Throws:
    VisADException
    RemoteException

    addData

    public String addData(Data data,
                          ConstantMap[] cmaps)
                   throws VisADException,
                          RemoteException
    Adds a Data object to this cell, creating an associated DataReference with the specified ConstantMaps for it.

    Returns:
    Variable name of the newly added data.
    Throws:
    VisADException
    RemoteException

    addData

    protected String addData(int id,
                             Data data,
                             ConstantMap[] cmaps,
                             String source,
                             int type,
                             boolean notify)
                      throws VisADException,
                             RemoteException
    Adds a Data object to this cell from the given source of the specified type, creating an associated DataReference for it.

    Returns:
    Variable name of the newly added data.
    Throws:
    VisADException
    RemoteException

    addReference

    public String addReference(DataReferenceImpl ref)
                        throws VisADException,
                               RemoteException
    Adds the given DataReference to this cell.

    Returns:
    Variable name of the newly added reference.
    Throws:
    VisADException
    RemoteException

    addReference

    public String addReference(DataReferenceImpl ref,
                               ConstantMap[] cmaps)
                        throws VisADException,
                               RemoteException
    Adds the given DataReference to this cell with the specified ConstantMaps.

    Returns:
    Variable name of the newly added reference.
    Throws:
    VisADException
    RemoteException

    addDataSource

    public String addDataSource(String source)
                         throws VisADException,
                                RemoteException
    Obtains a Data object from the given source of unknown type, and adds it to this cell.

    Returns:
    Variable name of the newly added data.
    Throws:
    VisADException
    RemoteException

    addDataSource

    public String addDataSource(String source,
                                int type)
                         throws VisADException,
                                RemoteException
    Obtains a Data object from the given source of the specified type, and adds it to this cell.

    Returns:
    Variable name of the newly added data.
    Throws:
    VisADException
    RemoteException

    addReferenceImpl

    protected SSCellData addReferenceImpl(int id,
                                          DataReferenceImpl ref,
                                          ConstantMap[] cmaps,
                                          String source,
                                          int type,
                                          boolean notify,
                                          boolean checkErrors)
                                   throws VisADException,
                                          RemoteException
    Does the work of adding the given DataReference, from the given source of the specified type.

    Returns:
    The newly created SSCellData object.
    Throws:
    VisADException
    RemoteException

    removeData

    public void removeData(Data data)
                    throws VisADException,
                           RemoteException
    Removes the given Data object from this cell.

    Throws:
    VisADException
    RemoteException

    removeData

    public void removeData(String varName)
                    throws VisADException,
                           RemoteException
    Removes the Data object corresponding to the given variable name from this cell.

    Throws:
    VisADException
    RemoteException

    removeReference

    public void removeReference(DataReferenceImpl ref)
                         throws VisADException,
                                RemoteException
    Removes the given DataReference's associated Data object from this cell.

    Throws:
    VisADException
    RemoteException

    removeAllReferences

    public void removeAllReferences()
                             throws VisADException,
                                    RemoteException
    Removes all Data objects from this cell.

    Throws:
    VisADException
    RemoteException

    removeAllReferences

    protected void removeAllReferences(boolean notify)
                                throws VisADException,
                                       RemoteException
    Removes all Data objects from this cell, notifying listeners if the notify flag is set.

    Throws:
    VisADException
    RemoteException

    removeAllReferences

    protected void removeAllReferences(boolean notify,
                                       boolean display)
                                throws VisADException,
                                       RemoteException
    Removes all Data objects from this cell, notifying listeners if the notify flag is set, and updating the display if the display flag is set.

    Throws:
    VisADException
    RemoteException

    removeDataImpl

    protected void removeDataImpl(SSCellData cellData,
                                  boolean notify,
                                  boolean display)
                           throws VisADException,
                                  RemoteException
    Does the work of removing the Data object at the specified index.

    Throws:
    VisADException
    RemoteException

    waitForData

    public void waitForData(String varName)
                     throws VisADException
    Blocks until the Data object with the given variable name finishes loading.

    Throws:
    VisADException

    waitForData

    public void waitForData()
                     throws VisADException
    Blocks until all of this cell's Data objects finish loading.

    Throws:
    VisADException

    saveData

    public void saveData(String varName,
                         String location,
                         Form form)
                  throws BadFormException,
                         IOException,
                         VisADException,
                         RemoteException
    Exports a Data object to the given location, using the given Data form.

    Throws:
    BadFormException
    IOException
    VisADException
    RemoteException

    getCellDataByName

    protected SSCellData getCellDataByName(String varName)
    Obtains the cell data entry corresponding to the given variable name.


    getFirstFreeId

    protected int getFirstFreeId()
    Gets the first free cell data ID number.


    constructDisplay

    public boolean constructDisplay()
    Reconstructs this cell's display.


    displayChanged

    public void displayChanged(DisplayEvent e)
    Handles display changes.

    Specified by:
    displayChanged in interface DisplayListener
    Parameters:
    e - DisplayEvent to send

    setMaps

    public void setMaps(ScalarMap[] maps)
                 throws VisADException,
                        RemoteException
    Maps RealTypes to the display according to the specified ScalarMaps.

    Throws:
    VisADException
    RemoteException

    clearMaps

    public void clearMaps()
                   throws VisADException,
                          RemoteException
    Clears this cell's mappings.

    Throws:
    VisADException
    RemoteException

    clearDisplay

    public void clearDisplay()
                      throws VisADException,
                             RemoteException
    Clears this cell's display.

    Throws:
    VisADException
    RemoteException

    clearCell

    public void clearCell()
                   throws VisADException,
                          RemoteException
    Clears this cell completely.

    Throws:
    VisADException
    RemoteException

    destroyCell

    public void destroyCell()
                     throws VisADException,
                            RemoteException
    Clears this cell completely and destroys it, removing it from the list of created cells.

    Throws:
    VisADException
    RemoteException

    setDimension

    public void setDimension(int dim)
                      throws VisADException,
                             RemoteException
    Sets this cell's dimensionality.

    Throws:
    VisADException
    RemoteException

    captureImage

    public void captureImage(File f)
                      throws VisADException,
                             IOException
    Captures an image and saves it to a given file name, in JPEG format.

    Throws:
    VisADException
    IOException

    getSaveString

    public String getSaveString()
    Gets the save string necessary to reconstruct this cell.


    setSaveString

    public void setSaveString(String save)
                       throws VisADException,
                              RemoteException
    Reconstructs this cell using the specified save string.

    Throws:
    VisADException
    RemoteException

    getPartialSaveString

    public String getPartialSaveString()
    Gets a string for reconstructing ScalarMap range and Control information.


    setPartialSaveString

    public void setPartialSaveString(String save,
                                     boolean preserveMaps)
                              throws VisADException,
                                     RemoteException
    Reconstructs parts of this cell using the specified save string.

    Throws:
    VisADException
    RemoteException

    addVar

    public void addVar(String name,
                       ThingReference tr)
                throws VisADException
    Adds a variable to this cell's formula manager.

    Throws:
    VisADException

    setErrors

    protected void setErrors(String[] errors,
                             boolean notify)
    Displays global errors in this cell, notifying linked cells if notify flag is set.


    addDisplayListener

    public void addDisplayListener(DisplayListener d)
    Adds a DisplayListener.


    removeDisplayListener

    public void removeDisplayListener(DisplayListener d)
    Removes a DisplayListener from this cell.


    addSSCellListener

    public void addSSCellListener(SSCellListener l)
    Adds an SSCellListener.


    removeSSCellListener

    public void removeSSCellListener(SSCellListener l)
    Removes an SSCellListener.


    removeAllSSCellListeners

    public void removeAllSSCellListeners()
    Removes all SSCellListeners.


    getName

    public String getName()
    Gets this cell's name.

    Overrides:
    getName in class Component

    isRemote

    public boolean isRemote()
    Gets whether this cell is a cloned display cell.


    isSlave

    public boolean isSlave()
    Gets whether this cell is a slaved display cell.


    getRemoteId

    public int getRemoteId()
    Gets the id number this cell uses for remote collaboration.


    getFormulaManager

    public FormulaManager getFormulaManager()
    Gets this cell's formula manager.


    getDisplay

    public DisplayImpl getDisplay()
    Gets this cell's VisAD Display.


    getRemoteDisplay

    public RemoteDisplay getRemoteDisplay()
    Gets this cell's VisAD RemoteDisplay.


    getMaps

    public ScalarMap[] getMaps()
    Gets this cell's mappings.


    getDimension

    public int getDimension()
    Gets this cell's dimension.

    Returns:
    Dimension type. Valid types are:
    • BasicSSCell.JAVA3D_3D
    • BasicSSCell.JAVA2D_2D
    • BasicSSCell.JAVA3D_2D

    getData

    public Data getData(String varName)
    Gets this cell's Data object with the specified variable name.


    getData

    public Data[] getData()
    Gets this cell's Data objects.


    getReference

    public DataReference getReference(String varName)
    Gets this cell's DataReference with the specified variable name.


    getReferences

    public DataReferenceImpl[] getReferences()
    Gets this cell's DataReferences.


    getRemoteReference

    public RemoteDataReference getRemoteReference(String varName)
    Gets this cell's remote DataReference for data with the specified variable name.


    getRemoteReferences

    public RemoteDataReference[] getRemoteReferences()
    Gets this cell's remote DataReferences.


    getDataSourceType

    public int getDataSourceType(String varName)
    Gets this cell's data source type for data with the specified variable name.


    getDataSourceTypes

    public int[] getDataSourceTypes()
    Gets this cell's data source types.


    getDataSource

    public String getDataSource(String varName)
    Gets this cell's data source string for data with the specified variable name.


    getDataSources

    public String[] getDataSources()
    Gets this cell's data source strings.


    getFirstVariableName

    public String getFirstVariableName()
    Gets the variable name of this cell's first Data object.


    getLastVariableName

    public String getLastVariableName()
    Gets the variable name of this cell's last Data object.


    getVariableNames

    public String[] getVariableNames()
    Gets the variable names of this cell's Data objects.


    getDataCount

    public int getDataCount()
    Gets the number of Data object this cell has.


    hasData

    public boolean hasData()
    Whether this cell has any data.


    hasDisplay

    public boolean hasDisplay()
    Whether this cell has a valid display on-screen.


    hasMappings

    public boolean hasMappings()
    Whether this cell has any mappings.


    othersDepend

    public boolean othersDepend(String varName)
    Whether other cells are dependent on this cell's Data object with the specified variable name.


    othersDepend

    public boolean othersDepend()
    Whether other cells are dependent on any of this cell's Data objects.


    createVar

    public static void createVar(String name,
                                 ThingReference tr)
                          throws VisADException
    Deprecated. Use addVar(String, ThingReference) instead.

    Throws:
    VisADException

    addSSCellChangeListener

    public void addSSCellChangeListener(SSCellListener l)
    Deprecated. Use addSSCellListener(SSCellListener) instead.


    removeListener

    public void removeListener(SSCellListener l)
    Deprecated. Use removeSSCellListener(SSCellListener) instead.


    removeAllListeners

    public void removeAllListeners()
    Deprecated. Use removeAllSSCellListeners() instead.


    setSSCellString

    public void setSSCellString(String save)
                         throws VisADException,
                                RemoteException
    Deprecated. Use setSaveString(String) instead.

    Throws:
    VisADException
    RemoteException

    getSSCellString

    public String getSSCellString()
    Deprecated. Use getSaveString() instead.


    saveData

    public void saveData(File f,
                         boolean netcdf)
                  throws BadFormException,
                         IOException,
                         VisADException,
                         RemoteException
    Deprecated. Use saveData(String, Form) instead.

    Throws:
    BadFormException
    IOException
    VisADException
    RemoteException

    saveData

    public void saveData(File f,
                         Form form)
                  throws BadFormException,
                         IOException,
                         VisADException,
                         RemoteException
    Deprecated. Use saveData(String, Form) instead.

    Throws:
    BadFormException
    IOException
    VisADException
    RemoteException

    setData

    public void setData(Data data)
                 throws VisADException,
                        RemoteException
    Deprecated. Use addData(Data) instead.

    Throws:
    VisADException
    RemoteException

    setFormula

    public void setFormula(String f)
                    throws VisADException,
                           RemoteException
    Deprecated. Use addDataSource(String, FORMULA_SOURCE) instead.

    Throws:
    VisADException
    RemoteException

    waitForFormula

    public void waitForFormula()
                        throws VisADException,
                               RemoteException
    Deprecated. Use waitForData(String) instead.

    Throws:
    VisADException
    RemoteException

    getDataRef

    public DataReferenceImpl getDataRef()
    Deprecated. Use getReference(String) instead.


    getRemoteDataRef

    public RemoteDataReferenceImpl getRemoteDataRef()
    Deprecated. Use getRemoteReference(String) instead.


    getFileURL

    public URL getFileURL()
    Deprecated. Use getDataSource(String) instead.


    getFilename

    public String getFilename()
    Deprecated. Use getDataSource(String) instead.


    getRMIAddress

    public String getRMIAddress()
    Deprecated. Use getDataSource(String) instead.


    getFormula

    public String getFormula()
    Deprecated. Use getDataSource(String) instead.


    loadData

    public void loadData(URL u)
                  throws VisADException,
                         RemoteException
    Deprecated. Use addDataSource(String, URL_SOURCE) instead.

    Throws:
    VisADException
    RemoteException

    loadData

    public void loadData(String s)
                  throws VisADException,
                         RemoteException
    Deprecated. Use addDataSource(String, URL_SOURCE) instead.

    Throws:
    VisADException
    RemoteException

    loadRMI

    public void loadRMI(String s)
                 throws VisADException,
                        RemoteException
    Deprecated. Use addDataSource(String, RMI_SOURCE) instead.

    Throws:
    VisADException
    RemoteException

    setDimension

    public void setDimension(boolean twoD,
                             boolean java2d)
                      throws VisADException,
                             RemoteException
    Deprecated. Use setDimension(int) instead.

    Throws:
    VisADException
    RemoteException

    hasFormula

    public boolean hasFormula()
    Deprecated. Use getDataSourceType(String) instead.


    getReference

    public DataReference getReference()
    Deprecated. Use getReference(String) instead.


    stringsToTuple

    public static Tuple stringsToTuple(String[] s)
    Deprecated. Use visad.DataUtility.stringsToTuple(String[]) instead.


    tupleToStrings

    public static String[] tupleToStrings(Tuple t)
    Deprecated. Use visad.DataUtility.tupleToStrings(Tuple) instead.


    makeLocal

    public static DataImpl makeLocal(Data data)
    Deprecated. Use visad.DataUtility.makeLocal(data) instead.


    arraysEqual

    public static boolean arraysEqual(Object[] o1,
                                      Object[] o2)
    Deprecated. Use visad.Util.arraysEqual(Object[], Object[]) instead.


    invoke

    public static void invoke(boolean wait,
                              Runnable r)
    Deprecated. Use visad.Util.invoke(boolean, Runnable) instead.