visad.ss
Class FancySSCell
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- javax.swing.JComponent
-
- javax.swing.JPanel
-
- visad.ss.BasicSSCell
-
- visad.ss.FancySSCell
-
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, DisplayListener, MessageListener, SSCellListener
- Direct Known Subclasses:
- TestProxyCluster, TestSSCluster, TestWRFCluster
public class FancySSCell extends BasicSSCell implements SSCellListener
FancySSCell is an extension of BasicSSCell with extra options, such as a file loader dialog and a dialog to set up ScalarMaps. It provides an example of GUI extensions to BasicSSCell.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field and Description static javax.swing.border.BorderB_DIRECTBorder for cell with data set directly.static javax.swing.border.BorderB_EMPTYBorder for cell with no data.static javax.swing.border.BorderB_FORMULABorder for cell with formula.static javax.swing.border.BorderB_HIGHLIGHTBorder for selected cell.static javax.swing.border.BorderB_MULTIBorder for cell with multiple data objects.static javax.swing.border.BorderB_REMOTEBorder for cell with data from a remote source.static javax.swing.border.BorderB_RMIBorder for cell with RMI address.static javax.swing.border.BorderB_UNKNOWNBorder for cell with data from an unknown source.static javax.swing.border.BorderB_URLBorder for cell with file or URL.static java.awt.ColorDARK_BLUEDark blue.static java.awt.ColorDARK_CYANDark cyan.static java.awt.ColorDARK_GREENDark green.static java.awt.ColorDARK_PURPLEDark purple.static java.awt.ColorDARK_REDDark red.static java.awt.ColorDARK_YELLOWDark yellow.-
Fields inherited from class visad.ss.BasicSSCell
ADD_DATA, ADD_SOURCE, DEBUG, DEBUG_LEVEL, DIRECT_SOURCE, FORMULA_SOURCE, JAVA2D_2D, JAVA3D_2D, JAVA3D_3D, MAX_ID, messages, REMOTE_SOURCE, REMOVE_DATA, RMI_SOURCE, SET_DIM, SET_ERRORS, SET_MAPS, STATUS, UNKNOWN_SOURCE, UPDATE_DATA, UPDATE_DEPENDENCIES, URL_SOURCE
-
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 FancySSCell(java.lang.String name)Constructs a new FancySSCell with the given name.FancySSCell(java.lang.String name, FormulaManager fman, java.awt.Frame parent)Constructs a new FancySSCell with the given name, formula manager, and parent Frame.FancySSCell(java.lang.String name, FormulaManager fman, RemoteServer rs, boolean slave, java.lang.String save, java.awt.Frame parent)Constructs a new, possibly slaved, FancySSCell with the given name, formula manager, remote server, save string, and parent Frame.FancySSCell(java.lang.String name, FormulaManager fman, RemoteServer rs, java.lang.String save, java.awt.Frame parent)Constructs a new FancySSCell with the given name, formula manager, remote server, save string, and parent Frame.FancySSCell(java.lang.String name, java.awt.Frame parent)Constructs a new FancySSCell with the given name and parent Frame.FancySSCell(java.lang.String name, RemoteServer rs, java.awt.Frame parent)Constructs a new FancySSCell with the given name, remote server, and parent Frame.FancySSCell(java.lang.String name, java.lang.String save, java.awt.Frame parent)Constructs a new FancySSCell with the given name, save string, and parent Frame.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidaddMapDialog()Lets the user specify mappings between this cell's data and display.voidcaptureDialog()Captures display image and saves to a file selected by the user, in JPEG format.booleanconfirmClear()Asks user to confirm clearing the cell if any other cell depends on it.booleangetAutoDetect()Returns whether this FancySSCell auto-detects its mappings.booleangetAutoShowControls()Returns whether this FancySSCell auto-displays its widget frame.booleangetAutoSwitch()Returns whether this FancySSCell auto-switches to 3-D.booleanhasControls()Returns whether the cell has any associated controls.voidhideWidgetFrame()Hides the widgets for altering controls.voidloadDataDialog()Imports data from a file selected by the user.voidloadDataRMI(java.lang.String s)Deprecated.Use loadDataSource(String, RMI_SOURCE) instead.voidloadDataSource(java.lang.String source)Imports a data object from the given source of unknown type, in a separate thread.voidloadDataSource(java.lang.String source, int type)Imports a data object from the given source of the specified type, in a separate thread.voidloadDataString(java.lang.String s)Deprecated.Use loadDataSource(String, URL_SOURCE) instead.voidloadDataURL(java.net.URL u)Deprecated.Use loadDataSource(String, URL_SOURCE) instead.voidremoveData(java.lang.String varName)Removes the Data object corresponding to the given variable name from this cell.voidsaveDataDialog(boolean netcdf)Deprecated.Use saveDataDialog(String, Form) instead.voidsaveDataDialog(Form saveForm)Deprecated.Use saveDataDialog(String, Form) instead.voidsaveDataDialog(java.lang.String varName, Form saveForm)Saves a Data object to a file selected by the user, using the given data form.voidsetAutoDetect(boolean value)Specifies whether this FancySSCell should auto-detect its mappings.voidsetAutoShowControls(boolean value)Specifies whether this FancySSCell should auto-display its widget frame.voidsetAutoSwitch(boolean value)Specifies whether this FancySSCell should auto-switch to 3-D.voidsetBorderEnabled(boolean value)Specifies whether the FancySSCell has a border.voidsetMaps(ScalarMap[] maps)Sets the ScalarMaps for this cell and creates needed control widgets.voidsetMapsAuto(ScalarMap[] maps)Switches to 3-D mode if necessary and available.voidsetSelected(boolean value)Specifies whether the FancySSCell has a highlighted border.voidshowWidgetFrame()Shows the widgets for altering controls (if there are any).booleansmartClear()Clears the cell if no other cell depends on it; otherwise, ask the user "Are you sure?" return true if the cell was cleared.booleansmartDestroy()Permanently destroy this cell, asking user for confirmation first if other cells depend on it; return true if the cell was destroyed.voidssCellChanged(SSCellChangeEvent e)Re-detects mappings when this cell's data changes.voidwaitForMaps()Blocks until mapping auto-detection is complete.-
Methods inherited from class visad.ss.BasicSSCell
addData, addData, addDataSource, addDataSource, addDisplayListener, addReference, addReference, addSSCellChangeListener, addSSCellListener, addToRemoteServer, addVar, arraysEqual, canDo3D, captureImage, clearCell, clearDisplay, clearMaps, constructDisplay, createVar, destroyCell, disable3D, displayChanged, enable3D, getData, getData, getDataCount, getDataRef, getDataSource, getDataSources, getDataSourceType, getDataSourceTypes, getDimension, getDisplay, getFilename, getFileURL, getFirstVariableName, getFormula, getFormulaManager, getLastVariableName, getMaps, getName, getPartialSaveString, getReference, getReference, getReferences, getRemoteDataRef, getRemoteDisplay, getRemoteId, getRemoteReference, getRemoteReferences, getRMIAddress, getSaveString, getSSCellByName, getSSCellString, getVariableNames, hasData, hasDisplay, hasFormula, hasMappings, invoke, isRemote, isSaving, isSlave, loadData, loadData, loadRMI, makeLocal, othersDepend, othersDepend, possible3D, receiveMessage, removeAllListeners, removeAllReferences, removeAllSSCellListeners, removeData, removeDisplayListener, removeFromRemoteServer, removeListener, removeReference, removeSSCellListener, saveData, saveData, saveData, setData, setDimension, setDimension, setFormula, setPartialSaveString, setSaveString, setSSCellString, stringsToTuple, tupleToStrings, waitForData, waitForData, waitForFormula
-
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
-
DARK_RED
public static final java.awt.Color DARK_RED
Dark red.
-
DARK_GREEN
public static final java.awt.Color DARK_GREEN
Dark green.
-
DARK_BLUE
public static final java.awt.Color DARK_BLUE
Dark blue.
-
DARK_YELLOW
public static final java.awt.Color DARK_YELLOW
Dark yellow.
-
DARK_PURPLE
public static final java.awt.Color DARK_PURPLE
Dark purple.
-
DARK_CYAN
public static final java.awt.Color DARK_CYAN
Dark cyan.
-
B_EMPTY
public static final javax.swing.border.Border B_EMPTY
Border for cell with no data.
-
B_HIGHLIGHT
public static final javax.swing.border.Border B_HIGHLIGHT
Border for selected cell.
-
B_UNKNOWN
public static final javax.swing.border.Border B_UNKNOWN
Border for cell with data from an unknown source.
-
B_DIRECT
public static final javax.swing.border.Border B_DIRECT
Border for cell with data set directly.
-
B_URL
public static final javax.swing.border.Border B_URL
Border for cell with file or URL.
-
B_FORMULA
public static final javax.swing.border.Border B_FORMULA
Border for cell with formula.
-
B_RMI
public static final javax.swing.border.Border B_RMI
Border for cell with RMI address.
-
B_REMOTE
public static final javax.swing.border.Border B_REMOTE
Border for cell with data from a remote source.
-
B_MULTI
public static final javax.swing.border.Border B_MULTI
Border for cell with multiple data objects.
-
-
Constructor Detail
-
FancySSCell
public FancySSCell(java.lang.String name) throws VisADException, java.rmi.RemoteExceptionConstructs a new FancySSCell with the given name.- Throws:
VisADExceptionjava.rmi.RemoteException
-
FancySSCell
public FancySSCell(java.lang.String name, java.awt.Frame parent) throws VisADException, java.rmi.RemoteExceptionConstructs a new FancySSCell with the given name and parent Frame.- Throws:
VisADExceptionjava.rmi.RemoteException
-
FancySSCell
public FancySSCell(java.lang.String name, FormulaManager fman, java.awt.Frame parent) throws VisADException, java.rmi.RemoteExceptionConstructs a new FancySSCell with the given name, formula manager, and parent Frame.- Throws:
VisADExceptionjava.rmi.RemoteException
-
FancySSCell
public FancySSCell(java.lang.String name, RemoteServer rs, java.awt.Frame parent) throws VisADException, java.rmi.RemoteExceptionConstructs a new FancySSCell with the given name, remote server, and parent Frame.- Throws:
VisADExceptionjava.rmi.RemoteException
-
FancySSCell
public FancySSCell(java.lang.String name, java.lang.String save, java.awt.Frame parent) throws VisADException, java.rmi.RemoteExceptionConstructs a new FancySSCell with the given name, save string, and parent Frame.- Throws:
VisADExceptionjava.rmi.RemoteException
-
FancySSCell
public FancySSCell(java.lang.String name, FormulaManager fman, RemoteServer rs, java.lang.String save, java.awt.Frame parent) throws VisADException, java.rmi.RemoteExceptionConstructs a new FancySSCell with the given name, formula manager, remote server, save string, and parent Frame.- Throws:
VisADExceptionjava.rmi.RemoteException
-
FancySSCell
public FancySSCell(java.lang.String name, FormulaManager fman, RemoteServer rs, boolean slave, java.lang.String save, java.awt.Frame parent) throws VisADException, java.rmi.RemoteExceptionConstructs a new, possibly slaved, FancySSCell with the given name, formula manager, remote server, save string, and parent Frame.- Throws:
VisADExceptionjava.rmi.RemoteException
-
-
Method Detail
-
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.- Overrides:
removeDatain classBasicSSCell- Throws:
VisADExceptionjava.rmi.RemoteException
-
loadDataSource
public void loadDataSource(java.lang.String source)
Imports a data object from the given source of unknown type, in a separate thread.
-
loadDataSource
public void loadDataSource(java.lang.String source, int type)Imports a data object from the given source of the specified type, in a separate thread.
-
loadDataDialog
public void loadDataDialog()
Imports data from a file selected by the user.
-
saveDataDialog
public void saveDataDialog(java.lang.String varName, Form saveForm)Saves a Data object to a file selected by the user, using the given data form.
-
waitForMaps
public void waitForMaps()
Blocks until mapping auto-detection is complete.
-
confirmClear
public boolean confirmClear()
Asks user to confirm clearing the cell if any other cell depends on it.
-
smartClear
public boolean smartClear() throws VisADException, java.rmi.RemoteExceptionClears the cell if no other cell depends on it; otherwise, ask the user "Are you sure?" return true if the cell was cleared.- Throws:
VisADExceptionjava.rmi.RemoteException
-
smartDestroy
public boolean smartDestroy() throws VisADException, java.rmi.RemoteExceptionPermanently destroy this cell, asking user for confirmation first if other cells depend on it; return true if the cell was destroyed.- Throws:
VisADExceptionjava.rmi.RemoteException
-
setMapsAuto
public void setMapsAuto(ScalarMap[] maps) throws VisADException, java.rmi.RemoteException
Switches to 3-D mode if necessary and available.- Throws:
VisADExceptionjava.rmi.RemoteException
-
setMaps
public void setMaps(ScalarMap[] maps) throws VisADException, java.rmi.RemoteException
Sets the ScalarMaps for this cell and creates needed control widgets.- Overrides:
setMapsin classBasicSSCell- Throws:
VisADExceptionjava.rmi.RemoteException
-
addMapDialog
public void addMapDialog()
Lets the user specify mappings between this cell's data and display.
-
showWidgetFrame
public void showWidgetFrame()
Shows the widgets for altering controls (if there are any).
-
hideWidgetFrame
public void hideWidgetFrame()
Hides the widgets for altering controls.
-
setBorderEnabled
public void setBorderEnabled(boolean value)
Specifies whether the FancySSCell has a border.
-
setSelected
public void setSelected(boolean value)
Specifies whether the FancySSCell has a highlighted border.
-
setAutoSwitch
public void setAutoSwitch(boolean value)
Specifies whether this FancySSCell should auto-switch to 3-D.
-
setAutoDetect
public void setAutoDetect(boolean value)
Specifies whether this FancySSCell should auto-detect its mappings.
-
setAutoShowControls
public void setAutoShowControls(boolean value)
Specifies whether this FancySSCell should auto-display its widget frame.
-
ssCellChanged
public void ssCellChanged(SSCellChangeEvent e)
Re-detects mappings when this cell's data changes.- Specified by:
ssCellChangedin interfaceSSCellListener
-
captureDialog
public void captureDialog()
Captures display image and saves to a file selected by the user, in JPEG format.
-
getAutoSwitch
public boolean getAutoSwitch()
Returns whether this FancySSCell auto-switches to 3-D.
-
getAutoDetect
public boolean getAutoDetect()
Returns whether this FancySSCell auto-detects its mappings.
-
getAutoShowControls
public boolean getAutoShowControls()
Returns whether this FancySSCell auto-displays its widget frame.
-
hasControls
public boolean hasControls()
Returns whether the cell has any associated controls.
-
loadDataRMI
public void loadDataRMI(java.lang.String s)
Deprecated. Use loadDataSource(String, RMI_SOURCE) instead.
-
loadDataString
public void loadDataString(java.lang.String s)
Deprecated. Use loadDataSource(String, URL_SOURCE) instead.
-
loadDataURL
public void loadDataURL(java.net.URL u)
Deprecated. Use loadDataSource(String, URL_SOURCE) instead.
-
saveDataDialog
public void saveDataDialog(boolean netcdf)
Deprecated. Use saveDataDialog(String, Form) instead.
-
saveDataDialog
public void saveDataDialog(Form saveForm)
Deprecated. Use saveDataDialog(String, Form) instead.
-
-
DMelt 3.0 © DataMelt by jWork.ORG