visad.ss
Class BasicSSCell
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- visad.ss.BasicSSCell
-
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, DisplayListener, MessageListener
- Direct Known Subclasses:
- FancySSCell
public class BasicSSCell extends javax.swing.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
-
Field Summary
Fields Modifier and Type Field and Description static intADD_DATAMessage ID indicating a data object has been added.static intADD_SOURCEMessage ID indicating a source has been added.static booleanDEBUGDebugging flag.static intDEBUG_LEVELDebugging level.static intDIRECT_SOURCEIndicates that the data was added to this cell directly using addData() or addReference().static intFORMULA_SOURCEIndicates that the data was computed from a formula.static intJAVA2D_2DConstant for 2-D (Java2D) dimensionality.static intJAVA3D_2DConstant for 2-D (Java3D) dimensionality.static intJAVA3D_3DConstant for 3-D (Java3D) dimensionality.static intMAX_IDNo message ID should have a value greater than or equal to this number.static java.lang.String[]messagesMessage ID strings, for debugging.static intREMOTE_SOURCEIndicates that the data came from a remotely linked cell.static intREMOVE_DATAMessage ID indicating a data object has been removed.static intRMI_SOURCEIndicates that the data came from an RMI server.static intSET_DIMMessage ID indicating dimension has changed.static intSET_ERRORSMessage ID indicating errors have changed.static intSET_MAPSMessage ID indicating mappings have changed.static intSTATUSMessage ID indicating a cell's status information is being requested or reported.static intUNKNOWN_SOURCEIndicates that the source of the data is unknown.static intUPDATE_DATAMessage ID indicating a data object has changed.static intUPDATE_DEPENDENCIESMessage ID indicating a data object's dependencies have changed.static intURL_SOURCEIndicates that the data came from a file or URL.-
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
-
-
Constructor Summary
Constructors Constructor and Description BasicSSCell(java.lang.String name)Constructs a new BasicSSCell with the given name.BasicSSCell(java.lang.String name, FormulaManager fman)Constructs a new BasicSSCell with the given name and non-default formula manager, to allow for custom formulas.BasicSSCell(java.lang.String name, FormulaManager fman, RemoteServer rs, boolean slave, java.lang.String save)Constructs a new, possibly slaved, BasicSSCell with the given name, formula manager, and remote server.BasicSSCell(java.lang.String name, FormulaManager fman, RemoteServer rs, java.lang.String save)Constructs a new BasicSSCell with the given name, formula manager, and remote server.BasicSSCell(java.lang.String name, RemoteServer rs)Constructs a new BasicSSCell with the given name, that gets its information from the given RemoteServer.BasicSSCell(java.lang.String name, java.lang.String save)Constructs a new BasicSSCell with the given name and save string, used to reconstruct this cell's configuration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description java.lang.StringaddData(Data data)Adds a Data object to this cell, creating an associated DataReference for it.java.lang.StringaddData(Data data, ConstantMap[] cmaps)Adds a Data object to this cell, creating an associated DataReference with the specified ConstantMaps for it.java.lang.StringaddDataSource(java.lang.String source)Obtains a Data object from the given source of unknown type, and adds it to this cell.java.lang.StringaddDataSource(java.lang.String source, int type)Obtains a Data object from the given source of the specified type, and adds it to this cell.voidaddDisplayListener(DisplayListener d)Adds a DisplayListener.java.lang.StringaddReference(DataReferenceImpl ref)Adds the given DataReference to this cell.java.lang.StringaddReference(DataReferenceImpl ref, ConstantMap[] cmaps)Adds the given DataReference to this cell with the specified ConstantMaps.voidaddSSCellChangeListener(SSCellListener l)Deprecated.Use addSSCellListener(SSCellListener) instead.voidaddSSCellListener(SSCellListener l)Adds an SSCellListener.voidaddToRemoteServer(RemoteServerImpl rs)Adds this cell to the given RemoteServer.voidaddVar(java.lang.String name, ThingReference tr)Adds a variable to this cell's formula manager.static booleanarraysEqual(java.lang.Object[] o1, java.lang.Object[] o2)Deprecated.Use visad.Util.arraysEqual(Object[], Object[]) instead.static booleancanDo3D()Returns true if Java3D is enabled for this JVM.voidcaptureImage(java.io.File f)Captures an image and saves it to a given file name, in JPEG format.voidclearCell()Clears this cell completely.voidclearDisplay()Clears this cell's display.voidclearMaps()Clears this cell's mappings.booleanconstructDisplay()Reconstructs this cell's display.static voidcreateVar(java.lang.String name, ThingReference tr)Deprecated.Use addVar(String, ThingReference) instead.voiddestroyCell()Clears this cell completely and destroys it, removing it from the list of created cells.static voiddisable3D()Disables Java3D for this JVM.voiddisplayChanged(DisplayEvent e)Handles display changes.static booleanenable3D()Attempts to enable Java3D for this JVM, returning true if successful.Data[]getData()Gets this cell's Data objects.DatagetData(java.lang.String varName)Gets this cell's Data object with the specified variable name.intgetDataCount()Gets the number of Data object this cell has.DataReferenceImplgetDataRef()Deprecated.Use getReference(String) instead.java.lang.StringgetDataSource(java.lang.String varName)Gets this cell's data source string for data with the specified variable name.java.lang.String[]getDataSources()Gets this cell's data source strings.intgetDataSourceType(java.lang.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.intgetDimension()Gets this cell's dimension.DisplayImplgetDisplay()Gets this cell's VisAD Display.java.lang.StringgetFilename()Deprecated.Use getDataSource(String) instead.java.net.URLgetFileURL()Deprecated.Use getDataSource(String) instead.java.lang.StringgetFirstVariableName()Gets the variable name of this cell's first Data object.java.lang.StringgetFormula()Deprecated.Use getDataSource(String) instead.FormulaManagergetFormulaManager()Gets this cell's formula manager.java.lang.StringgetLastVariableName()Gets the variable name of this cell's last Data object.ScalarMap[]getMaps()Gets this cell's mappings.java.lang.StringgetName()Gets this cell's name.java.lang.StringgetPartialSaveString()Gets a string for reconstructing ScalarMap range and Control information.DataReferencegetReference()Deprecated.Use getReference(String) instead.DataReferencegetReference(java.lang.String varName)Gets this cell's DataReference with the specified variable name.DataReferenceImpl[]getReferences()Gets this cell's DataReferences.RemoteDataReferenceImplgetRemoteDataRef()Deprecated.Use getRemoteReference(String) instead.RemoteDisplaygetRemoteDisplay()Gets this cell's VisAD RemoteDisplay.intgetRemoteId()Gets the id number this cell uses for remote collaboration.RemoteDataReferencegetRemoteReference(java.lang.String varName)Gets this cell's remote DataReference for data with the specified variable name.RemoteDataReference[]getRemoteReferences()Gets this cell's remote DataReferences.java.lang.StringgetRMIAddress()Deprecated.Use getDataSource(String) instead.java.lang.StringgetSaveString()Gets the save string necessary to reconstruct this cell.static BasicSSCellgetSSCellByName(java.lang.String name)Gets the SSCell with the specified name.java.lang.StringgetSSCellString()Deprecated.Use getSaveString() instead.java.lang.String[]getVariableNames()Gets the variable names of this cell's Data objects.booleanhasData()Whether this cell has any data.booleanhasDisplay()Whether this cell has a valid display on-screen.booleanhasFormula()Deprecated.Use getDataSourceType(String) instead.booleanhasMappings()Whether this cell has any mappings.static voidinvoke(boolean wait, java.lang.Runnable r)Deprecated.Use visad.Util.invoke(boolean, Runnable) instead.booleanisRemote()Gets whether this cell is a cloned display cell.static booleanisSaving()Returns true if any SSCell is currently saving data.booleanisSlave()Gets whether this cell is a slaved display cell.voidloadData(java.lang.String s)Deprecated.Use addDataSource(String, URL_SOURCE) instead.voidloadData(java.net.URL u)Deprecated.Use addDataSource(String, URL_SOURCE) instead.voidloadRMI(java.lang.String s)Deprecated.Use addDataSource(String, RMI_SOURCE) instead.static DataImplmakeLocal(Data data)Deprecated.Use visad.DataUtility.makeLocal(data) instead.booleanothersDepend()Whether other cells are dependent on any of this cell's Data objects.booleanothersDepend(java.lang.String varName)Whether other cells are dependent on this cell's Data object with the specified variable name.static booleanpossible3D()Returns true if Java3D is possible for this JVM.voidreceiveMessage(MessageEvent msg)Handles VisAD messages.voidremoveAllListeners()Deprecated.Use removeAllSSCellListeners() instead.voidremoveAllReferences()Removes all Data objects from this cell.voidremoveAllSSCellListeners()Removes all SSCellListeners.voidremoveData(Data data)Removes the given Data object from this cell.voidremoveData(java.lang.String varName)Removes the Data object corresponding to the given variable name from this cell.voidremoveDisplayListener(DisplayListener d)Removes a DisplayListener from this cell.voidremoveFromRemoteServer(RemoteServerImpl rs)Removes this cell from the given RemoteServer.voidremoveListener(SSCellListener l)Deprecated.Use removeSSCellListener(SSCellListener) instead.voidremoveReference(DataReferenceImpl ref)Removes the given DataReference's associated Data object from this cell.voidremoveSSCellListener(SSCellListener l)Removes an SSCellListener.voidsaveData(java.io.File f, boolean netcdf)Deprecated.Use saveData(String, Form) instead.voidsaveData(java.io.File f, Form form)Deprecated.Use saveData(String, Form) instead.voidsaveData(java.lang.String varName, java.lang.String location, Form form)Exports a Data object to the given location, using the given Data form.voidsetData(Data data)Deprecated.Use addData(Data) instead.voidsetDimension(boolean twoD, boolean java2d)Deprecated.Use setDimension(int) instead.voidsetDimension(int dim)Sets this cell's dimensionality.voidsetFormula(java.lang.String f)Deprecated.Use addDataSource(String, FORMULA_SOURCE) instead.voidsetMaps(ScalarMap[] maps)Maps RealTypes to the display according to the specified ScalarMaps.voidsetPartialSaveString(java.lang.String save, boolean preserveMaps)Reconstructs parts of this cell using the specified save string.voidsetSaveString(java.lang.String save)Reconstructs this cell using the specified save string.voidsetSSCellString(java.lang.String save)Deprecated.Use setSaveString(String) instead.static TuplestringsToTuple(java.lang.String[] s)Deprecated.Use visad.DataUtility.stringsToTuple(String[]) instead.static java.lang.String[]tupleToStrings(Tuple t)Deprecated.Use visad.DataUtility.tupleToStrings(Tuple) instead.voidwaitForData()Blocks until all of this cell's Data objects finish loading.voidwaitForData(java.lang.String varName)Blocks until the Data object with the given variable name finishes loading.voidwaitForFormula()Deprecated.Use waitForData(String) instead.-
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
-
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, 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, 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, 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, transferFocusBackward, transferFocusUpCycle
-
-
-
-
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.
-
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 java.lang.String[] messages
Message ID strings, for debugging.
-
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
-
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
-
-
Constructor Detail
-
BasicSSCell
public BasicSSCell(java.lang.String name) throws VisADException, java.rmi.RemoteExceptionConstructs a new BasicSSCell with the given name.- Throws:
VisADExceptionjava.rmi.RemoteException
-
BasicSSCell
public BasicSSCell(java.lang.String name, FormulaManager fman) throws VisADException, java.rmi.RemoteExceptionConstructs a new BasicSSCell with the given name and non-default formula manager, to allow for custom formulas.- Throws:
VisADExceptionjava.rmi.RemoteException
-
BasicSSCell
public BasicSSCell(java.lang.String name, RemoteServer rs) throws VisADException, java.rmi.RemoteExceptionConstructs 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:
VisADExceptionjava.rmi.RemoteException
-
BasicSSCell
public BasicSSCell(java.lang.String name, java.lang.String save) throws VisADException, java.rmi.RemoteExceptionConstructs a new BasicSSCell with the given name and save string, used to reconstruct this cell's configuration.- Throws:
VisADExceptionjava.rmi.RemoteException
-
BasicSSCell
public BasicSSCell(java.lang.String name, FormulaManager fman, RemoteServer rs, java.lang.String save) throws VisADException, java.rmi.RemoteExceptionConstructs a new BasicSSCell with the given name, formula manager, and remote server.- Throws:
VisADExceptionjava.rmi.RemoteException
-
BasicSSCell
public BasicSSCell(java.lang.String name, FormulaManager fman, RemoteServer rs, boolean slave, java.lang.String save) throws VisADException, java.rmi.RemoteExceptionConstructs a new, possibly slaved, BasicSSCell with the given name, formula manager, and remote server.- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
Method Detail
-
getSSCellByName
public static BasicSSCell getSSCellByName(java.lang.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 java.rmi.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:
java.rmi.RemoteException
-
removeFromRemoteServer
public void removeFromRemoteServer(RemoteServerImpl rs) throws java.rmi.RemoteException
Removes this cell from the given RemoteServer.- Throws:
java.rmi.RemoteException
-
receiveMessage
public void receiveMessage(MessageEvent msg) throws java.rmi.RemoteException
Handles VisAD messages. This method is the heart of BasicSSCell's collaboration support.- Specified by:
receiveMessagein interfaceMessageListener- Parameters:
msg- The message- Throws:
java.rmi.RemoteException
-
addData
public java.lang.String addData(Data data) throws VisADException, java.rmi.RemoteException
Adds a Data object to this cell, creating an associated DataReference for it.- Returns:
- Variable name of the newly added data.
- Throws:
VisADExceptionjava.rmi.RemoteException
-
addData
public java.lang.String addData(Data data, ConstantMap[] cmaps) throws VisADException, java.rmi.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:
VisADExceptionjava.rmi.RemoteException
-
addReference
public java.lang.String addReference(DataReferenceImpl ref) throws VisADException, java.rmi.RemoteException
Adds the given DataReference to this cell.- Returns:
- Variable name of the newly added reference.
- Throws:
VisADExceptionjava.rmi.RemoteException
-
addReference
public java.lang.String addReference(DataReferenceImpl ref, ConstantMap[] cmaps) throws VisADException, java.rmi.RemoteException
Adds the given DataReference to this cell with the specified ConstantMaps.- Returns:
- Variable name of the newly added reference.
- Throws:
VisADExceptionjava.rmi.RemoteException
-
addDataSource
public java.lang.String addDataSource(java.lang.String source) throws VisADException, java.rmi.RemoteExceptionObtains 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:
VisADExceptionjava.rmi.RemoteException
-
addDataSource
public java.lang.String addDataSource(java.lang.String source, int type) throws VisADException, java.rmi.RemoteExceptionObtains 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:
VisADExceptionjava.rmi.RemoteException
-
removeData
public void removeData(Data data) throws VisADException, java.rmi.RemoteException
Removes the given Data object from this cell.- Throws:
VisADExceptionjava.rmi.RemoteException
-
removeData
public void removeData(java.lang.String varName) throws VisADException, java.rmi.RemoteExceptionRemoves the Data object corresponding to the given variable name from this cell.- Throws:
VisADExceptionjava.rmi.RemoteException
-
removeReference
public void removeReference(DataReferenceImpl ref) throws VisADException, java.rmi.RemoteException
Removes the given DataReference's associated Data object from this cell.- Throws:
VisADExceptionjava.rmi.RemoteException
-
removeAllReferences
public void removeAllReferences() throws VisADException, java.rmi.RemoteExceptionRemoves all Data objects from this cell.- Throws:
VisADExceptionjava.rmi.RemoteException
-
waitForData
public void waitForData(java.lang.String varName) throws VisADExceptionBlocks until the Data object with the given variable name finishes loading.- Throws:
VisADException
-
waitForData
public void waitForData() throws VisADExceptionBlocks until all of this cell's Data objects finish loading.- Throws:
VisADException
-
saveData
public void saveData(java.lang.String varName, java.lang.String location, Form form) throws BadFormException, java.io.IOException, VisADException, java.rmi.RemoteExceptionExports a Data object to the given location, using the given Data form.- Throws:
BadFormExceptionjava.io.IOExceptionVisADExceptionjava.rmi.RemoteException
-
constructDisplay
public boolean constructDisplay()
Reconstructs this cell's display.
-
displayChanged
public void displayChanged(DisplayEvent e)
Handles display changes.- Specified by:
displayChangedin interfaceDisplayListener- Parameters:
e- DisplayEvent to send
-
setMaps
public void setMaps(ScalarMap[] maps) throws VisADException, java.rmi.RemoteException
Maps RealTypes to the display according to the specified ScalarMaps.- Throws:
VisADExceptionjava.rmi.RemoteException
-
clearMaps
public void clearMaps() throws VisADException, java.rmi.RemoteExceptionClears this cell's mappings.- Throws:
VisADExceptionjava.rmi.RemoteException
-
clearDisplay
public void clearDisplay() throws VisADException, java.rmi.RemoteExceptionClears this cell's display.- Throws:
VisADExceptionjava.rmi.RemoteException
-
clearCell
public void clearCell() throws VisADException, java.rmi.RemoteExceptionClears this cell completely.- Throws:
VisADExceptionjava.rmi.RemoteException
-
destroyCell
public void destroyCell() throws VisADException, java.rmi.RemoteExceptionClears this cell completely and destroys it, removing it from the list of created cells.- Throws:
VisADExceptionjava.rmi.RemoteException
-
setDimension
public void setDimension(int dim) throws VisADException, java.rmi.RemoteExceptionSets this cell's dimensionality.- Throws:
VisADExceptionjava.rmi.RemoteException
-
captureImage
public void captureImage(java.io.File f) throws VisADException, java.io.IOExceptionCaptures an image and saves it to a given file name, in JPEG format.- Throws:
VisADExceptionjava.io.IOException
-
getSaveString
public java.lang.String getSaveString()
Gets the save string necessary to reconstruct this cell.
-
setSaveString
public void setSaveString(java.lang.String save) throws VisADException, java.rmi.RemoteExceptionReconstructs this cell using the specified save string.- Throws:
VisADExceptionjava.rmi.RemoteException
-
getPartialSaveString
public java.lang.String getPartialSaveString()
Gets a string for reconstructing ScalarMap range and Control information.
-
setPartialSaveString
public void setPartialSaveString(java.lang.String save, boolean preserveMaps) throws VisADException, java.rmi.RemoteExceptionReconstructs parts of this cell using the specified save string.- Throws:
VisADExceptionjava.rmi.RemoteException
-
addVar
public void addVar(java.lang.String name, ThingReference tr) throws VisADExceptionAdds a variable to this cell's formula manager.- Throws:
VisADException
-
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 java.lang.String getName()
Gets this cell's name.- Overrides:
getNamein classjava.awt.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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 java.lang.String getDataSource(java.lang.String varName)
Gets this cell's data source string for data with the specified variable name.
-
getDataSources
public java.lang.String[] getDataSources()
Gets this cell's data source strings.
-
getFirstVariableName
public java.lang.String getFirstVariableName()
Gets the variable name of this cell's first Data object.
-
getLastVariableName
public java.lang.String getLastVariableName()
Gets the variable name of this cell's last Data object.
-
getVariableNames
public java.lang.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(java.lang.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(java.lang.String name, ThingReference tr) throws VisADExceptionDeprecated. 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(java.lang.String save) throws VisADException, java.rmi.RemoteExceptionDeprecated. Use setSaveString(String) instead.- Throws:
VisADExceptionjava.rmi.RemoteException
-
getSSCellString
public java.lang.String getSSCellString()
Deprecated. Use getSaveString() instead.
-
saveData
public void saveData(java.io.File f, boolean netcdf) throws BadFormException, java.io.IOException, VisADException, java.rmi.RemoteExceptionDeprecated. Use saveData(String, Form) instead.- Throws:
BadFormExceptionjava.io.IOExceptionVisADExceptionjava.rmi.RemoteException
-
saveData
public void saveData(java.io.File f, Form form) throws BadFormException, java.io.IOException, VisADException, java.rmi.RemoteExceptionDeprecated. Use saveData(String, Form) instead.- Throws:
BadFormExceptionjava.io.IOExceptionVisADExceptionjava.rmi.RemoteException
-
setData
public void setData(Data data) throws VisADException, java.rmi.RemoteException
Deprecated. Use addData(Data) instead.- Throws:
VisADExceptionjava.rmi.RemoteException
-
setFormula
public void setFormula(java.lang.String f) throws VisADException, java.rmi.RemoteExceptionDeprecated. Use addDataSource(String, FORMULA_SOURCE) instead.- Throws:
VisADExceptionjava.rmi.RemoteException
-
waitForFormula
public void waitForFormula() throws VisADException, java.rmi.RemoteExceptionDeprecated. Use waitForData(String) instead.- Throws:
VisADExceptionjava.rmi.RemoteException
-
getDataRef
public DataReferenceImpl getDataRef()
Deprecated. Use getReference(String) instead.
-
getRemoteDataRef
public RemoteDataReferenceImpl getRemoteDataRef()
Deprecated. Use getRemoteReference(String) instead.
-
getFileURL
public java.net.URL getFileURL()
Deprecated. Use getDataSource(String) instead.
-
getFilename
public java.lang.String getFilename()
Deprecated. Use getDataSource(String) instead.
-
getRMIAddress
public java.lang.String getRMIAddress()
Deprecated. Use getDataSource(String) instead.
-
getFormula
public java.lang.String getFormula()
Deprecated. Use getDataSource(String) instead.
-
loadData
public void loadData(java.net.URL u) throws VisADException, java.rmi.RemoteExceptionDeprecated. Use addDataSource(String, URL_SOURCE) instead.- Throws:
VisADExceptionjava.rmi.RemoteException
-
loadData
public void loadData(java.lang.String s) throws VisADException, java.rmi.RemoteExceptionDeprecated. Use addDataSource(String, URL_SOURCE) instead.- Throws:
VisADExceptionjava.rmi.RemoteException
-
loadRMI
public void loadRMI(java.lang.String s) throws VisADException, java.rmi.RemoteExceptionDeprecated. Use addDataSource(String, RMI_SOURCE) instead.- Throws:
VisADExceptionjava.rmi.RemoteException
-
setDimension
public void setDimension(boolean twoD, boolean java2d) throws VisADException, java.rmi.RemoteExceptionDeprecated. Use setDimension(int) instead.- Throws:
VisADExceptionjava.rmi.RemoteException
-
hasFormula
public boolean hasFormula()
Deprecated. Use getDataSourceType(String) instead.
-
getReference
public DataReference getReference()
Deprecated. Use getReference(String) instead.
-
stringsToTuple
public static Tuple stringsToTuple(java.lang.String[] s)
Deprecated. Use visad.DataUtility.stringsToTuple(String[]) instead.
-
tupleToStrings
public static java.lang.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(java.lang.Object[] o1, java.lang.Object[] o2)Deprecated. Use visad.Util.arraysEqual(Object[], Object[]) instead.
-
invoke
public static void invoke(boolean wait, java.lang.Runnable r)Deprecated. Use visad.Util.invoke(boolean, Runnable) instead.
-
-
DMelt 3.0 © DataMelt by jWork.ORG