byucc.jhdl.apps.Viewers.Waves
Class BrowserDataCanvas

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bybyucc.jhdl.apps.Viewers.laf.JHDLUIPanel
                      extended bybyucc.jhdl.apps.Viewers.Waves.BrowserDataCanvas
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable

public class BrowserDataCanvas
extends JHDLUIPanel

BrowserDataCanvas.java This class is the data portion of the waves viewer. The paintData() refreshes this JPanel with the most current information. The data is in table format and shows the waves traces for selected wires Binary wires are represented by a red line, and n=multiple bit wires are represented by a blue line with the string value placed for all cycles.

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.awt.Color background_color
           
protected  java.awt.Color binary_waveform_color
           
static java.awt.Color BLUE
           
protected  java.awt.Color cell_color
           
protected  java.awt.Color cell_edge_color
           
static java.lang.String CLOCK
           
protected  java.awt.Color cycle_color
           
 java.lang.String[] cycleNames
          Names given to cycles
static java.awt.Color DARKBLUE
           
static java.awt.Color DARKGREEN
           
static int DEFAULT_X_SIZE
           
static int DEFAULT_Y_SIZE
           
static java.awt.Color GREEN
           
 int inc
           
protected  java.awt.Color intermediate_edge_color
           
protected  java.awt.Color lettering_color
           
static java.awt.Color LIGHTGREEN
           
static int MINIMUM_X_SIZE
           
static int MINIMUM_Y_SIZE
           
static java.lang.String MULTIBIT
           
 BrowserWavesPanel parent
          Parent BrowserWaves.
 int QUANT
          This value is the number of pixels assigned to each data cell.
static java.lang.String SINGLEBIT
           
 int tableWidth
          This value appears to be the number of data "cells" displayed in the waveform at a given time.
static java.lang.String UNDEFINED_VALUE
           
protected  java.awt.Color undefined_value_color
           
static java.awt.Color VERYLIGHTGRAY
           
 int viewStartCycle
           
 int xOffset
          The x offset of all Waveform painting.
 
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
BrowserDataCanvas(BrowserWavesPanel parent)
          Default constructor
 
Method Summary
 int checkTableWidth(int w)
           
 java.lang.String[] getAffectingGroups()
           
 CyclePanel getCyclePanel()
           
 void paintCenteredString(java.awt.Graphics g, int Y, int xStart, int xEnd, java.lang.String toPaint)
           
 void paintComponent(java.awt.Graphics g)
           
 void paintCycles(java.awt.Graphics g)
           
 void repaint()
           
 void updateAppUI()
           
 void updateData(java.lang.Object[][] newData, int[] widths, java.lang.String[] cycles, int vss, int TW)
           
 void updateMarker(int loc)
           
 void updateSelectedRow(int row)
           
 void updateUI()
           
 void updateValues()
           
 
Methods inherited from class byucc.jhdl.apps.Viewers.laf.JHDLUIPanel
propertyChange
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
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, 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, 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

MULTIBIT

public static final java.lang.String MULTIBIT
See Also:
Constant Field Values

SINGLEBIT

public static final java.lang.String SINGLEBIT
See Also:
Constant Field Values

UNDEFINED_VALUE

public static final java.lang.String UNDEFINED_VALUE
See Also:
Constant Field Values

CLOCK

public static final java.lang.String CLOCK
See Also:
Constant Field Values

DARKBLUE

public static final java.awt.Color DARKBLUE

BLUE

public static final java.awt.Color BLUE

VERYLIGHTGRAY

public static final java.awt.Color VERYLIGHTGRAY

DARKGREEN

public static final java.awt.Color DARKGREEN

GREEN

public static final java.awt.Color GREEN

LIGHTGREEN

public static final java.awt.Color LIGHTGREEN

lettering_color

protected java.awt.Color lettering_color

cell_color

protected java.awt.Color cell_color

binary_waveform_color

protected java.awt.Color binary_waveform_color

background_color

protected java.awt.Color background_color

undefined_value_color

protected java.awt.Color undefined_value_color

cycle_color

protected java.awt.Color cycle_color

cell_edge_color

protected java.awt.Color cell_edge_color

intermediate_edge_color

protected java.awt.Color intermediate_edge_color

DEFAULT_X_SIZE

public static final int DEFAULT_X_SIZE
See Also:
Constant Field Values

DEFAULT_Y_SIZE

public static final int DEFAULT_Y_SIZE
See Also:
Constant Field Values

MINIMUM_X_SIZE

public static final int MINIMUM_X_SIZE
See Also:
Constant Field Values

MINIMUM_Y_SIZE

public static final int MINIMUM_Y_SIZE
See Also:
Constant Field Values

parent

public BrowserWavesPanel parent
Parent BrowserWaves. This needs to be decoupled from this BrowserDataCanvas.


cycleNames

public java.lang.String[] cycleNames
Names given to cycles


xOffset

public int xOffset
The x offset of all Waveform painting. It appears that this is always set to zero and never used. TODO: get rid of this variable (not needed)


tableWidth

public int tableWidth
This value appears to be the number of data "cells" displayed in the waveform at a given time. It appears to be updated only in the updateData() method.


QUANT

public int QUANT
This value is the number of pixels assigned to each data cell.


viewStartCycle

public int viewStartCycle

inc

public int inc
Constructor Detail

BrowserDataCanvas

public BrowserDataCanvas(BrowserWavesPanel parent)
Default constructor

Method Detail

getAffectingGroups

public java.lang.String[] getAffectingGroups()
Specified by:
getAffectingGroups in class JHDLUIPanel

updateAppUI

public void updateAppUI()
Specified by:
updateAppUI in class JHDLUIPanel

updateUI

public void updateUI()

paintComponent

public void paintComponent(java.awt.Graphics g)

updateSelectedRow

public void updateSelectedRow(int row)

updateMarker

public void updateMarker(int loc)

updateData

public void updateData(java.lang.Object[][] newData,
                       int[] widths,
                       java.lang.String[] cycles,
                       int vss,
                       int TW)

checkTableWidth

public int checkTableWidth(int w)

paintCycles

public void paintCycles(java.awt.Graphics g)

paintCenteredString

public void paintCenteredString(java.awt.Graphics g,
                                int Y,
                                int xStart,
                                int xEnd,
                                java.lang.String toPaint)

updateValues

public void updateValues()

getCyclePanel

public CyclePanel getCyclePanel()

repaint

public void repaint()


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