WISA.wisa3D
Class DataTree

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTree
                          |
                          +--WISA.wisa3D.DataTree
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable

public class DataTree
extends javax.swing.JTree

DataTree is an extension to the swing class JTree and provides structured visualization of Wisa3D displays and data. It also provides different techniques for copying, deleting and moving data between displays. Every operation done by the user takes instant effect on the displays and datas.

See Also:
Serialized Form

Nested Class Summary
protected  class DataTree.DataTreeCellRenderer
          The DataTreeCellRenderer cares for an adequate visualization of the displays and datas contained in the DataTree.
 
Nested classes inherited from class javax.swing.JTree
javax.swing.JTree.AccessibleJTree, javax.swing.JTree.DynamicUtilTreeNode, javax.swing.JTree.EmptySelectionModel, javax.swing.JTree.TreeModelHandler, javax.swing.JTree.TreeSelectionRedirector
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JTree
ANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, editable, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, LARGE_MODEL_PROPERTY, largeModel, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, rootVisible, ROW_HEIGHT_PROPERTY, rowHeight, SCROLLS_ON_EXPAND_PROPERTY, scrollsOnExpand, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles, TOGGLE_CLICK_COUNT_PROPERTY, toggleClickCount, TREE_MODEL_PROPERTY, treeModel, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCount
 
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
DataTree()
          Construct a standard DataTree.
DataTree(Wisa3DFrame parent)
          Construct a DataTree from the displays and datas contained in the specified Wisa3DFrame.
 
Method Summary
protected  javax.swing.tree.DefaultMutableTreeNode constructAxisScaleNode(visad.AxisScale scale)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructConstantMapArrayNode(visad.ConstantMap[] maps)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructConstantMapNode(visad.ConstantMap map)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructDataNode(visad.Data data)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructDisplayArrayNode(Wisa3DPanel[] displays)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructDisplayDataArrayNode(DisplayData[] displayDatas)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructDisplayDataNode(DisplayData displayData)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructDisplayNode(Wisa3DPanel display)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructNode(java.lang.Object data)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructScalarMapArrayNode(visad.ScalarMap[] maps)
           
protected  javax.swing.tree.DefaultMutableTreeNode constructScalarMapNode(visad.ScalarMap map)
           
 void copy()
          Copy the selected TreeNode to the clipboard if the selected Object is a DisplayData.
 void cut()
          Cut the selected TreeNode and copy it to the clipboard if the selected Object is a DisplayData.
 void delete()
          Delete the selected TreeNode and its associated Object.
 java.lang.Object getSelectedData()
          Get the user object of the selected DefaultMutableTreeNode.
 boolean isClipboardUsed()
          Indicates if the clipboard is used either by calling cut() or copy().
 boolean isCopySupported()
          Checks if a copy operation is supported for the currently selected TreeNode.
 boolean isCutSupported()
          Checks if a cut operation is supported for the currently selected TreeNode.
 boolean isDeleteSupported()
          Checks if a delete operation is supported for the currently selected TreeNode.
 boolean isPasteSupported()
          Checks if a paste operation is supported for the currently selected TreeNode.
 void paste()
          Paste the clipboard TreeNode to the selected TreeNode if the selected Object is a DisplayData[] or to the DisplayData[] containing children of the selected TreeNode if the selected Object is a Wisa3DPanel.
 void setWisa3DFrame(Wisa3DFrame parent)
          Set the Wisa3DFrame of this DataTree.
 
Methods inherited from class javax.swing.JTree
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, convertValueToText, createTreeModel, createTreeModelListener, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, fireValueChanged, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getCellRenderer, getClosestPathForLocation, getClosestRowForLocation, getDefaultTreeModel, getDescendantToggledPaths, getDragEnabled, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBetweenRows, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getSelectionPaths, getSelectionRows, getShowsRootHandles, getToggleClickCount, getToolTipText, getTreeExpansionListeners, getTreeSelectionListeners, getTreeWillExpandListeners, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathEditable, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, paramString, removeDescendantSelectedPaths, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setCellRenderer, setDragEnabled, setEditable, setExpandedState, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setModel, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChange, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, 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
 

Constructor Detail

DataTree

public DataTree()
Construct a standard DataTree.


DataTree

public DataTree(Wisa3DFrame parent)
Construct a DataTree from the displays and datas contained in the specified Wisa3DFrame.

Parameters:
parent - The Wisa3DFrame holding the displays and datas to be visualized in the tree.
Method Detail

setWisa3DFrame

public void setWisa3DFrame(Wisa3DFrame parent)
Set the Wisa3DFrame of this DataTree.

Parameters:
parent - The Wisa3DFrame holding the displays and datas to be visualized in the tree.

constructNode

protected javax.swing.tree.DefaultMutableTreeNode constructNode(java.lang.Object data)

constructDisplayArrayNode

protected javax.swing.tree.DefaultMutableTreeNode constructDisplayArrayNode(Wisa3DPanel[] displays)

constructDisplayNode

protected javax.swing.tree.DefaultMutableTreeNode constructDisplayNode(Wisa3DPanel display)

constructDisplayDataArrayNode

protected javax.swing.tree.DefaultMutableTreeNode constructDisplayDataArrayNode(DisplayData[] displayDatas)

constructDisplayDataNode

protected javax.swing.tree.DefaultMutableTreeNode constructDisplayDataNode(DisplayData displayData)

constructDataNode

protected javax.swing.tree.DefaultMutableTreeNode constructDataNode(visad.Data data)

constructScalarMapArrayNode

protected javax.swing.tree.DefaultMutableTreeNode constructScalarMapArrayNode(visad.ScalarMap[] maps)

constructScalarMapNode

protected javax.swing.tree.DefaultMutableTreeNode constructScalarMapNode(visad.ScalarMap map)

constructConstantMapArrayNode

protected javax.swing.tree.DefaultMutableTreeNode constructConstantMapArrayNode(visad.ConstantMap[] maps)

constructConstantMapNode

protected javax.swing.tree.DefaultMutableTreeNode constructConstantMapNode(visad.ConstantMap map)

constructAxisScaleNode

protected javax.swing.tree.DefaultMutableTreeNode constructAxisScaleNode(visad.AxisScale scale)

getSelectedData

public java.lang.Object getSelectedData()
Get the user object of the selected DefaultMutableTreeNode.

Returns:
The selected Object.

cut

public void cut()
Cut the selected TreeNode and copy it to the clipboard if the selected Object is a DisplayData.


copy

public void copy()
Copy the selected TreeNode to the clipboard if the selected Object is a DisplayData.


paste

public void paste()
Paste the clipboard TreeNode to the selected TreeNode if the selected Object is a DisplayData[] or to the DisplayData[] containing children of the selected TreeNode if the selected Object is a Wisa3DPanel.


delete

public void delete()
Delete the selected TreeNode and its associated Object.


isCutSupported

public boolean isCutSupported()
Checks if a cut operation is supported for the currently selected TreeNode.

Returns:
True if the cut is supported.

isCopySupported

public boolean isCopySupported()
Checks if a copy operation is supported for the currently selected TreeNode.

Returns:
True if the copy is supported.

isPasteSupported

public boolean isPasteSupported()
Checks if a paste operation is supported for the currently selected TreeNode.

Returns:
True if the paste is supported.

isDeleteSupported

public boolean isDeleteSupported()
Checks if a delete operation is supported for the currently selected TreeNode.

Returns:
True if the delete is supported.

isClipboardUsed

public boolean isClipboardUsed()
Indicates if the clipboard is used either by calling cut() or copy().

Returns:
True if the clipboard is not null.