byucc.jhdl.apps.Viewers
Class ViewManager

java.lang.Object
  extended bybyucc.jhdl.apps.Viewers.ViewManager
All Implemented Interfaces:
AbstractViewManager, CLICommandListener, LayoutViewListener

public class ViewManager
extends java.lang.Object
implements CLICommandListener, LayoutViewListener, AbstractViewManager


Field Summary
 GenericFrame gFrame
           
 boolean stepButtonVisible
           
static java.lang.Object viewLock
           
 boolean window
           
 
Constructor Summary
ViewManager(BrowserCore bCore)
          ViewManager with BrowserCore support
ViewManager(HWSystem hwSystem)
          ViewManager without BrowserCore support
ViewManager(HWSystem hwSystem, Node rNode)
          ViewManager without BrowserCore support
 
Method Summary
 boolean addCircuitView(Cell cCell)
          addCircuitView, create a new circuit view and register it
 boolean addCircuitView(Cell cCell, int locx, int locy, int sizex, int sizey)
           
 boolean addCircuitView(java.lang.String cellName)
          addCircuitView, create a new circuit view and register it
 boolean addCircuitView(java.lang.String cellName, int locx, int locy, int sizex, int sizey)
          addCircuitView, create a new circuit view and register it
 boolean addClassView(CLInterpreter interp, java.lang.Object toView)
          addClassview, create new ClassInfo viewer and register it
 boolean addClassView(java.lang.Object toView)
          addClassview, create new ClassInfo viewer and register it
 void addFormat(java.lang.String newFormat)
           
 boolean addLayoutView(Cell c)
           
 boolean addLayoutView(java.lang.String cellName)
          addLayoutView, add new Layout viewer and register it
 boolean addMemoryView(java.lang.String cellName)
          addMemoryView, create a new memory view and register it
 boolean addMemoryView(java.lang.String memName, int locx, int locy, int sizex, int sizey)
          addMemoryView, create a new memory view and register it
 void addStepButton()
           
 boolean addWatch(java.lang.String wireName)
          addWatch
 boolean addWatch(Wire toAdd)
          addWatch
 void CLICommandEventFired(CLICommandEvent evt)
          CLICommandEventFired..
 void destroyClassView(java.lang.String cellName)
          destroyClassView, kill and unregister classViewx
 ConsoleFrame getConsoleFrame()
           
 int getCurrentCycle()
          getCurrentCycle, return current simulation cycle
 int getCurrentStep()
           
 boolean getHardwareMode()
           
 CLInterpreter getInterp()
           
 java.util.Vector getOldFormats()
          This method gets the recently used costom formats from the BrowserCore
 HWSystem getSystem()
           
 boolean getWavesSelect()
           
 boolean isWatched(java.lang.String wireName)
          isWatched, see if the given wire is watched or not
 void quit()
           
 void removeCircuitView(Cell cell)
          removeCircuitView, unregister circuit view
 void removeCircuitView(java.lang.String cellName)
          removeCircuitView, unregister circuit view
 void removeClassView(java.lang.String cellName)
          removeClassView, unregister classView
 void removeLayoutView(Cell c)
           
 void removeLayoutView(java.lang.String cellName)
           
 void removeMemoryView(java.lang.String cellName)
          removeMemoryView, unregister memory view
 void removeStepButton()
           
 void removeTool(Tool expiredTool)
          addCircuitView, create a new circuit view and register it
 boolean removeWatch(java.lang.String wireName)
          removeWatch, remove the given wire from the watch list
 void removeWaveView()
           
 void setGenericFrame(GenericFrame gFrame)
           
 void setHWSystem(HWSystem hws)
          sets the hardware system.
 void setWavesType(boolean newValue)
          setWavesType
 void setWin(boolean v)
           
 boolean stepButtonIsVisible()
           
 void systemReset()
          systemReset Called when the the user resets the system
 void updateBrowser()
          updateUserStep, called when the user wants to update the views..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gFrame

public GenericFrame gFrame

window

public boolean window

stepButtonVisible

public boolean stepButtonVisible

viewLock

public static java.lang.Object viewLock
Constructor Detail

ViewManager

public ViewManager(BrowserCore bCore)
ViewManager with BrowserCore support


ViewManager

public ViewManager(HWSystem hwSystem)
ViewManager without BrowserCore support

Parameters:
hwSystem - Reference to HWSystem which provides access to all essencial system commands

ViewManager

public ViewManager(HWSystem hwSystem,
                   Node rNode)
ViewManager without BrowserCore support

Parameters:
hwSystem - Reference to HWSystem which provides access to all essencial system commands
rNode - A Node in the circuit you want to use the View Manager with.
Method Detail

CLICommandEventFired

public void CLICommandEventFired(CLICommandEvent evt)
CLICommandEventFired.. tells when to change the cursor to "busy"

Specified by:
CLICommandEventFired in interface CLICommandListener

removeTool

public void removeTool(Tool expiredTool)
addCircuitView, create a new circuit view and register it


addCircuitView

public boolean addCircuitView(java.lang.String cellName,
                              int locx,
                              int locy,
                              int sizex,
                              int sizey)
addCircuitView, create a new circuit view and register it

Parameters:
cellName - The Cell to view
locx - Initial x-axis location of the window
locy - Initial y-axis location of the window
sizex - x-axis size
sizey - y-axis size

addCircuitView

public boolean addCircuitView(Cell cCell,
                              int locx,
                              int locy,
                              int sizex,
                              int sizey)

addCircuitView

public boolean addCircuitView(Cell cCell)
addCircuitView, create a new circuit view and register it

Parameters:
cCell - The Cell to view

addCircuitView

public boolean addCircuitView(java.lang.String cellName)
addCircuitView, create a new circuit view and register it

Parameters:
cellName - The Cell to view

removeCircuitView

public void removeCircuitView(java.lang.String cellName)
removeCircuitView, unregister circuit view

Parameters:
cellName - The cell to remove

removeCircuitView

public void removeCircuitView(Cell cell)
removeCircuitView, unregister circuit view

Parameters:
cell - The cell to remove

addMemoryView

public boolean addMemoryView(java.lang.String memName,
                             int locx,
                             int locy,
                             int sizex,
                             int sizey)
addMemoryView, create a new memory view and register it

Parameters:
locx - Initial x-axis location of the window
locy - Initial y-axis location of the window
sizex - x-axis size
sizey - y-axis size

addMemoryView

public boolean addMemoryView(java.lang.String cellName)
addMemoryView, create a new memory view and register it

Parameters:
cellName - The Cell to view

removeMemoryView

public void removeMemoryView(java.lang.String cellName)
removeMemoryView, unregister memory view

Parameters:
cellName - Cell to unregister

addClassView

public boolean addClassView(java.lang.Object toView)
addClassview, create new ClassInfo viewer and register it


addClassView

public boolean addClassView(CLInterpreter interp,
                            java.lang.Object toView)
addClassview, create new ClassInfo viewer and register it

Parameters:
interp - Interpreter to allow the class access to Jab commands

removeClassView

public void removeClassView(java.lang.String cellName)
removeClassView, unregister classView

Parameters:
cellName - Cell to unregister

destroyClassView

public void destroyClassView(java.lang.String cellName)
destroyClassView, kill and unregister classViewx

Parameters:
cellName - Cell to kill and unregister

addLayoutView

public boolean addLayoutView(java.lang.String cellName)
addLayoutView, add new Layout viewer and register it

Parameters:
cellName - The cell to view
Returns:
true if successful false if not

addLayoutView

public boolean addLayoutView(Cell c)
Specified by:
addLayoutView in interface LayoutViewListener

removeLayoutView

public void removeLayoutView(Cell c)
Specified by:
removeLayoutView in interface LayoutViewListener

removeLayoutView

public void removeLayoutView(java.lang.String cellName)

addWatch

public boolean addWatch(java.lang.String wireName)
addWatch

Parameters:
wireName -
Returns:
true if able to watch the given wire

addWatch

public boolean addWatch(Wire toAdd)
addWatch

Parameters:
toAdd -
Returns:
true if able to watch the given wire

removeWatch

public boolean removeWatch(java.lang.String wireName)
removeWatch, remove the given wire from the watch list

Parameters:
wireName - the wire to remove
Returns:
true if able to remove the wire specified

isWatched

public boolean isWatched(java.lang.String wireName)
isWatched, see if the given wire is watched or not

Parameters:
wireName - the wire to check
Returns:
true is watched false otherwise

removeWaveView

public void removeWaveView()

setWavesType

public void setWavesType(boolean newValue)
setWavesType

Parameters:
newValue - true for standard waves view, false for table waves

getWavesSelect

public boolean getWavesSelect()

getOldFormats

public java.util.Vector getOldFormats()
This method gets the recently used costom formats from the BrowserCore


addFormat

public void addFormat(java.lang.String newFormat)

getCurrentCycle

public int getCurrentCycle()
getCurrentCycle, return current simulation cycle

Returns:
current cycle number

getCurrentStep

public int getCurrentStep()

getHardwareMode

public boolean getHardwareMode()

getSystem

public HWSystem getSystem()

getInterp

public CLInterpreter getInterp()

setHWSystem

public void setHWSystem(HWSystem hws)
sets the hardware system.

Parameters:
hws - The new hardwareSystem

updateBrowser

public void updateBrowser()
updateUserStep, called when the user wants to update the views.. This is very important to use since it is when most of the views of the more common components will be updated Most of the components managed by ViewManager don't need to be refreshed every cycle.. doing so would just slow down simulation So if you are using the ViewManager in a test bench you will need to call this method every time you want to see the views update... ie: ... HWSystem.step( 50 ); updateUserStep(); ... Maybe it would make sence to add another method to observer..


systemReset

public void systemReset()
systemReset Called when the the user resets the system


setWin

public void setWin(boolean v)

getConsoleFrame

public ConsoleFrame getConsoleFrame()

setGenericFrame

public void setGenericFrame(GenericFrame gFrame)

stepButtonIsVisible

public boolean stepButtonIsVisible()

quit

public void quit()

removeStepButton

public void removeStepButton()

addStepButton

public void addStepButton()


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