byucc.jhdl.apps.Viewers.Waves
Class WavesDataManager

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bybyucc.jhdl.apps.Viewers.Waves.BrowserWavesPanel
                      extended bybyucc.jhdl.apps.Viewers.Waves.WavesDataManager
All Implemented Interfaces:
javax.accessibility.Accessible, BrowserWavesListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class WavesDataManager
extends BrowserWavesPanel
implements BrowserWavesListener

WavesDataManager.java

Author:
Brian McMurtrey and Mike Wirthlin This class is a helper for those who wish to implement the waves viewer in an application other than Jab. This class will work with the BrowserWavesPanel to create the waves viewer. The BrowserWavesPanel does not know which wires are being viewed and it does not know what values have been on the wires. This class will keep track of the wire values and it will make sure the correct data is being sent to the BrowserWavesPanel.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class byucc.jhdl.apps.Viewers.Waves.BrowserWavesPanel
_wavesListeners, dPanel, dScroll, HEIGHT, myTableData, PAD, selectedRow, sNameBar
 
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, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
WavesDataManager()
          Deprecated.  
WavesDataManager(JHDLHostWidgetInterface hwi)
          Constructs a new WavesDataManager--New constructor, so that this panel can pass the JHDLHostWidgetInterface to its parent to get the call chain ready to be initialized.
 
Method Summary
 void changeCycle(java.lang.String cycle)
          This method provides the functionality for the "Go to Cycle" command.
 void dataBarAdjusted(int newValue)
          This method will be called when the data scroll bar is adjusted.
 void decSize()
           
 void dumpDataToFile(java.lang.String fName)
           
 java.lang.String[] getBVRange(int index, int start, int elements)
          Get the range of data from the dataHistory vector for each wire that will actually be viewed.
 int getSelectedRow()
          Data format modification methods (radix changes)
 java.lang.String getShortName(int index)
           
 void incSize()
           
 boolean isShortName()
           
 void modifyFormat(int sIndex)
           
 void modifyFormat(java.lang.String newFormat, int formatNum)
           
 void removeData(int index)
          This is called to remove data from various vectors after a wire has been removed.
 void reset()
           
 void setShared(boolean share)
          Sets whether or not all of the waves share the selected radix value.
 void setShortName(boolean value)
           
 void setTableWidth(int tw)
           
 void setTextMode(boolean text)
           
 void updateData(BV[] inData, java.lang.String cycleName, int sCount)
          This method is called after every clock cycle or step to update each wire value at that instant in time.
 void updateVectors(java.util.Vector cNames, java.util.Vector data)
          This is called to update the cycle names, wire data, and total step count from a text file.
 void updateWaves(boolean align, boolean nameChange)
          This method is called to prepare all of the wave data to be properly viewed.
 void updateWireData(int count, java.lang.String name, int width)
          This method is called after a new wire has been added to the Waves Viewer.
 
Methods inherited from class byucc.jhdl.apps.Viewers.Waves.BrowserWavesPanel
addWavesListener, checkTableWidth, disposeWindow, getBrowserNameCanvas, getCurrValue, removeWavesListener, scrollBarAdjust, setPageSize, setScrollIndex, setScrollMax, syncScroll, updateMarker, updateSelection, updateValueCanvas, updateWaves
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, 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

WavesDataManager

public WavesDataManager()
Deprecated.  


WavesDataManager

public WavesDataManager(JHDLHostWidgetInterface hwi)
Constructs a new WavesDataManager--New constructor, so that this panel can pass the JHDLHostWidgetInterface to its parent to get the call chain ready to be initialized.

Parameters:
hwi - The JHDLHostWidgetInterface this panel will send to its parent.
Method Detail

reset

public void reset()
Overrides:
reset in class BrowserWavesPanel

setTextMode

public void setTextMode(boolean text)

updateVectors

public void updateVectors(java.util.Vector cNames,
                          java.util.Vector data)
This is called to update the cycle names, wire data, and total step count from a text file.


updateData

public void updateData(BV[] inData,
                       java.lang.String cycleName,
                       int sCount)
This method is called after every clock cycle or step to update each wire value at that instant in time. It also updates the cycleNames vector and total stepCount.


updateWireData

public void updateWireData(int count,
                           java.lang.String name,
                           int width)
This method is called after a new wire has been added to the Waves Viewer. It updates the watchCount, the vector of wireNames, and the vector of wireWidths. It also creates a new Vector for the dataHistory of the newly added wire and initializes its radix format.


removeData

public void removeData(int index)
This is called to remove data from various vectors after a wire has been removed.


updateWaves

public void updateWaves(boolean align,
                        boolean nameChange)
This method is called to prepare all of the wave data to be properly viewed. It establishes the alignment, updates scroll info, and organizes all of the data to be viewed. It then makes a call to the BrowserWavesPanel to finished organizing the data and view it.


getBVRange

public java.lang.String[] getBVRange(int index,
                                     int start,
                                     int elements)
Get the range of data from the dataHistory vector for each wire that will actually be viewed.


changeCycle

public void changeCycle(java.lang.String cycle)
This method provides the functionality for the "Go to Cycle" command.


isShortName

public boolean isShortName()

setShortName

public void setShortName(boolean value)

getShortName

public java.lang.String getShortName(int index)

getSelectedRow

public int getSelectedRow()
Data format modification methods (radix changes)


setShared

public void setShared(boolean share)
Sets whether or not all of the waves share the selected radix value.


modifyFormat

public void modifyFormat(java.lang.String newFormat,
                         int formatNum)

modifyFormat

public void modifyFormat(int sIndex)

decSize

public void decSize()

incSize

public void incSize()

setTableWidth

public void setTableWidth(int tw)

dumpDataToFile

public void dumpDataToFile(java.lang.String fName)

dataBarAdjusted

public void dataBarAdjusted(int newValue)
Description copied from interface: BrowserWavesListener
This method will be called when the data scroll bar is adjusted.

Specified by:
dataBarAdjusted in interface BrowserWavesListener


Copyright ? 2006 Brigham Young University, Configurable Computing Laboratory. All Rights Reserved.