byucc.jhdl.apps.Viewers.Waves
Class BrowserWavesPanel

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
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
BrowserWaves, WavesDataManager

public class BrowserWavesPanel
extends javax.swing.JPanel

BrowserWavesPanel.java

Author:
Brian McMurtrey and Mike Wirthlin The BrowserWavesPanel is a new Panel that incorporates all aspects of a useable Waves Viewer panel but is not tied directly to a tool. The purpose of this panel is to combine the following GUI panels into a usable waveform viewer:
The various canvas components are organized as follows: -------------------------------------------------------------- | ----------- ----------- ---------------------------------- | | | Browser | | Browser | | CyclePanel | | | | Name | | Value | | | | | | Canvas | | Canvas | ---------------------------------- | | | | | | ---------------------------------- | | | | | | | BrowserDataCanvas | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------- ----------- ---------------------------------- | |------------------------------------------------------------| This class only contains the viewable components of the waveform, but does not manage any of the data that it is viewing. The data on the waveform is updated using the following methods: updateWaves, updateValues, updateMarker Todos: - move CyclePanel into BrowserDataCanvas
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
protected  java.util.ArrayList _wavesListeners
          This maintains a list of all WavesListeners registered to this panel.
 javax.swing.JPanel dPanel
           
 javax.swing.JScrollPane dScroll
           
static int HEIGHT
          The height of a waveform element.
protected  TableData myTableData
           
static int PAD
          The height of a waveform element.
protected  int selectedRow
           
protected  javax.swing.JScrollBar 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
BrowserWavesPanel()
          Deprecated.  
BrowserWavesPanel(JHDLHostWidgetInterface hwi)
          Constructs a new BrowserWavesPanel--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 addWavesListener(BrowserWavesListener listener)
          Adds a waves listener to the listener list.
 int checkTableWidth(int w)
           
 void disposeWindow()
           
 byucc.jhdl.apps.Viewers.Waves.BrowserNameCanvas getBrowserNameCanvas()
           
 int getCurrValue()
           
 void removeWavesListener(BrowserWavesListener listener)
          Removes a waves listener from the listener list.
 void reset()
           
protected  void scrollBarAdjust(int newValue)
           
 void setPageSize(int newSize)
           
 void setScrollIndex(int newIndex)
           
 void setScrollMax(int newMax)
           
 void syncScroll()
           
 void updateMarker(int loc)
           
protected  void updateSelection(int newSelection)
           
 void updateValueCanvas(int cycle)
          This method is used to update the values in the valueCanvas.
 void updateWaves(TableData newData, int viewStartCycle, int tableWidth, boolean nameChange)
          This method is used to update the names and values on wires.
 
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
 

Field Detail

HEIGHT

public static final int HEIGHT
The height of a waveform element. This should probably not be final as it would be nice to change this parameter for customization.

See Also:
Constant Field Values

PAD

public static final int PAD
The height of a waveform element. This should probably not be final and it may be better off in BrowserWavesCanvas.

See Also:
Constant Field Values

sNameBar

protected javax.swing.JScrollBar sNameBar

selectedRow

protected int selectedRow

dPanel

public javax.swing.JPanel dPanel

dScroll

public javax.swing.JScrollPane dScroll

myTableData

protected TableData myTableData

_wavesListeners

protected java.util.ArrayList _wavesListeners
This maintains a list of all WavesListeners registered to this panel. All WavesListeners will be called with relevent waves actions are made.

Constructor Detail

BrowserWavesPanel

public BrowserWavesPanel()
Deprecated.  


BrowserWavesPanel

public BrowserWavesPanel(JHDLHostWidgetInterface hwi)
Constructs a new BrowserWavesPanel--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

getBrowserNameCanvas

public byucc.jhdl.apps.Viewers.Waves.BrowserNameCanvas getBrowserNameCanvas()

reset

public void reset()

updateSelection

protected void updateSelection(int newSelection)

syncScroll

public void syncScroll()

scrollBarAdjust

protected void scrollBarAdjust(int newValue)

setScrollIndex

public void setScrollIndex(int newIndex)

setScrollMax

public void setScrollMax(int newMax)

setPageSize

public void setPageSize(int newSize)

updateWaves

public void updateWaves(TableData newData,
                        int viewStartCycle,
                        int tableWidth,
                        boolean nameChange)
This method is used to update the names and values on wires. This should be called any time the actual waveform data is changed.

Parameters:
newData - The actual waveform dataview (all of it)
viewStartCycle - ????
tableWidth - The number of cycles shown in the table (specifies how wide the new data should be).
nameChange - Indicates that a new wire has changed and that the names canvas should be changed (also used when changing from short to long names).

updateValueCanvas

public void updateValueCanvas(int cycle)
This method is used to update the values in the valueCanvas. This probably occurs when you move the red marker.


disposeWindow

public void disposeWindow()

checkTableWidth

public int checkTableWidth(int w)

updateMarker

public void updateMarker(int loc)

getCurrValue

public int getCurrValue()

addWavesListener

public void addWavesListener(BrowserWavesListener listener)
Adds a waves listener to the listener list. This allows multiple classes to listen to waves canvas events.


removeWavesListener

public void removeWavesListener(BrowserWavesListener listener)
Removes a waves listener from the listener list.



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