Class SVGController

Object
   |
   +--SVGController

class SVGController

This class is the 'engine' of the tracing viewer and is responsible for processing user interaction request, retrieving information from the tracing server, and building up the SVG document needed for the graphical representation of the invocation traces.


Field Summary
<static>  var X_SPACE
          
<static>  var Y_SPACE
          
<static>  var identityKind
          
 
Constructor Summary
SVGController ()
           
 
Method Summary
 function acquireLock()
           Used to prevent user interactions while busy
 function addTooltipText(v1, v2)
           Sets the tooltip text for an event or entity when hoovering with the mouse above the graphical representation.
 function clearTooltipText()
           Clears the tooltip text
 function clearTrailColor()
           Callback routine called when the user acts on the operation context menu to restore the default trail color.
 function clear_mouse_ctx(evt)
           Restores the default behaviour previously changed by the set_mouse_ctx routine.
 function collapseExpand(id, action)
           Callback routine called from the entity/identity tree when the user modifies the tree view to collapse or expand a tree fragment.
 function createTooltipPanel()
          
 function east()
           Called when the user clicks the page control 'east' button.
 function getEntities()
          
 function getEventCount()
          
 function getEvents()
          
 function hide(node, children)
           Callback routine called from the entity/identity tree when the user modifies the tree view to hide a tree fragment.
 function hideEvents()
           Callback routine called when the user acts on the event context menu to hide events from the top to the current event position.
 function hideOperation(menu)
           Callback routine called from the control_tabs HTML page when the user operates on the 'Filter Out Operation:' menu.
 function hideTooltip()
           called by the clear_mouse_ctx routine when the user is hoovering with the mouse from the graphical representation of an event or entity/identity.
 function home()
           Called when the user clicks the page control 'home' button.
 function html_init(panel, cookies, ctrl_panel_doc)
           This routine is called by the index HTML page javascript code after all documents, SVG as well as HTML are loaded.
 function init(server, entity_tree, event_tree, caption, tabs_doc)
           This routine is called by the control_tabs.
 function north()
           Called when the user clicks the page control 'north' button.
 function operationComplete(status)
          
 function option1(checkbox)
           Callback routine called from the control_tabs HTML page when the user operates on the 'operation to self' checkbox.
 function option2(checkbox)
           Callback routine called from the control_tabs HTML page when the user operates on the 'Hide unmatched events' checkbox.
 function refresh()
           This routine (re)calculates the position of the events on the view panel window and calls the updateSVGDocument routine to update the SVG document.
 function restore_default_menu()
           Restores the default (Adobe) context menu
 function serverRequest(value)
          
 function setHScrollOffset(px)
           Called when the user acts on the page control horizontal slider.
 function setTooltipSize()
           Modifies the size of the tooltip panel so that text set by the addTooltipText routine will fit.
 function setTrailColor(color)
           Callback routine called when the user acts on the operation context menu to color a trail.
 function setVScrollOffset(py)
           Called when the user acts on the page control vertical slider.
 function set_color_menu()
           Replaced the default (Adobe) context menu with the color menu used to color an invocation trail.
 function set_event_menu()
           Replaced the default (Adobe) context menu with the event menu.
 function set_mouse_ctx(evt)
           When the user moves the mouse over the graphical representation of an invocation, event, or entity/identity the corresponding SVG element will fire an 'onmouseover' event that is captured using this routine.
 function set_step_size(p)
           Routine is used to set the page control step size.
 function show(node, children)
           Callback routine called from the entity/identity tree when the user modifies the tree view to visualize a tree fragment.
 function showEventTree()
          
 function showEvents()
           Callback routine called when the user acts on the event context menu to restore the default view
 function showOperation(menu)
           Callback routine called from the control_tabs HTML page when the user operates on the 'Remove Operation Filter:' menu.
 function showTooltip()
           called by the set_mouse_ctx routine when the user is hoovering with the mouse over a graphical representation of an event or entity/identity.
 function south()
           Called when the user clicks the page control 'south' button.
 function timer()
           500 ms timer used to update the status line when retrieving information from the server.
 function toggleControlView(evt)
           When the user clicks with the mouse on the graphical representation of an invocation, event, or entity/identity the corresponding SVG element will fire an 'onclick' event that is captured using this routine.
 function updateControlView(id, tooltip, img, value)
           This routine is called by the operationComplete routine to update the entity/identity hierarchy tree after retrieving entities from the server.
 function updateFilterMenus()
          
 function updateSVGDocument()
           Updates the SVG document to reflect all the changes.
 function updateStatus(window, id)
           Called when the user hoovers with the mouse over the text of an entity/identity tree node.
 function west()
           Called when the user clicks the page control 'west' button.
<static> function scroll()
           Static event listener (Adobe SVGScroll events) callback routine that handles panning events the user can issue by holding the alt key and clicking and dragging with the mouse.
<static> function yposIndexOrder(a,b)
           Order function used by the visible events array to sort events with the yposIndex parameter as sort criteria.
<static> function zoom()
           Static event listener (Adobe SVGZoom events) callback routine that handles zoom in/out events the user can issue using the default Adobe context menu.

Field Detail

X_SPACE

<static> var X_SPACE

Y_SPACE

<static> var Y_SPACE

identityKind

<static> var identityKind

Constructor Detail

SVGController

function SVGController()

Method Detail

acquireLock

function acquireLock()
Used to prevent user interactions while busy


addTooltipText

function addTooltipText(v1, v2)
Sets the tooltip text for an event or entity when hoovering with the mouse above the graphical representation. This function is called by the showTooltip routine.

Parameters:
v1 - Discriminator to identify the element type - event or entity.

v2 - Element Id.


clearTooltipText

function clearTooltipText()
Clears the tooltip text


clearTrailColor

function clearTrailColor()
Callback routine called when the user acts on the operation context menu to restore the default trail color.


clear_mouse_ctx

function clear_mouse_ctx(evt)
Restores the default behaviour previously changed by the set_mouse_ctx routine.


collapseExpand

function collapseExpand(id, action)
Callback routine called from the entity/identity tree when the user modifies the tree view to collapse or expand a tree fragment.

Parameters:
id - Branch id of the tree node the user operates upon.

action - Flag indication if the specified tree node is being collapsed or expanded.


createTooltipPanel

function createTooltipPanel()


east

function east()
Called when the user clicks the page control 'east' button.


getEntities

function getEntities()


getEventCount

function getEventCount()


getEvents

function getEvents()


hide

function hide(node, children)
Callback routine called from the entity/identity tree when the user modifies the tree view to hide a tree fragment.

Parameters:
children - All children underneath the specified node for which the visual flag must be set to false as well.

node - Branch id of the tree node the user operates upon.


hideEvents

function hideEvents()
Callback routine called when the user acts on the event context menu to hide events from the top to the current event position.


hideOperation

function hideOperation(menu)
Callback routine called from the control_tabs HTML page when the user operates on the 'Filter Out Operation:' menu.

Parameters:
menu - Menu element.


hideTooltip

function hideTooltip()
called by the clear_mouse_ctx routine when the user is hoovering with the mouse from the graphical representation of an event or entity/identity.


home

function home()
Called when the user clicks the page control 'home' button.


html_init

function html_init(panel, cookies, ctrl_panel_doc)
This routine is called by the index HTML page javascript code after all documents, SVG as well as HTML are loaded.

Parameters:
ctrl_panel_doc - HTML control_panel document.

panel - SVG page control document.

cookies - Setting stored during the previous session.


init

function init(server, entity_tree, event_tree, caption, tabs_doc)
This routine is called by the control_tabs.html javascript code after the index.html onload handler detected that all the documents are loaded. Not only the SVG document but also all the HTML documents. The reason that this routine is not called by the index.html javascript code is that we need the instances of the entity/identity hierarchy tree and event parameter tree. Both trees are part of the control_tabs HTML document.

Parameters:
caption - HTML control panel caption element

event_tree - Event parameter tree.

tabs_doc - HTML control_tabs document

server - URL needed to place request to the tracing server.

entity_tree - Entity/Identity hierarchy tree.


north

function north()
Called when the user clicks the page control 'north' button.


operationComplete

function operationComplete(status)


option1

function option1(checkbox)
Callback routine called from the control_tabs HTML page when the user operates on the 'operation to self' checkbox.

Parameters:
checkbox - Checkbox element.


option2

function option2(checkbox)
Callback routine called from the control_tabs HTML page when the user operates on the 'Hide unmatched events' checkbox.

Parameters:
checkbox - Checkbox element.


refresh

function refresh()
This routine (re)calculates the position of the events on the view panel window and calls the updateSVGDocument routine to update the SVG document.


restore_default_menu

function restore_default_menu()
Restores the default (Adobe) context menu


serverRequest

function serverRequest(value)


setHScrollOffset

function setHScrollOffset(px)
Called when the user acts on the page control horizontal slider.


setTooltipSize

function setTooltipSize()
Modifies the size of the tooltip panel so that text set by the addTooltipText routine will fit.


setTrailColor

function setTrailColor(color)
Callback routine called when the user acts on the operation context menu to color a trail.

Parameters:
color - Color to set for the selected trail.


setVScrollOffset

function setVScrollOffset(py)
Called when the user acts on the page control vertical slider.


set_color_menu

function set_color_menu()
Replaced the default (Adobe) context menu with the color menu used to color an invocation trail.


set_event_menu

function set_event_menu()
Replaced the default (Adobe) context menu with the event menu.


set_mouse_ctx

function set_mouse_ctx(evt)
When the user moves the mouse over the graphical representation of an invocation, event, or entity/identity the corresponding SVG element will fire an 'onmouseover' event that is captured using this routine. It is used for one of the following actions:


set_step_size

function set_step_size(p)
Routine is used to set the page control step size. In the x direction the step size is defined as a percentage of the view panel width, in the y direction as a percentage of the number of events that fit on the visible view panel window area.

Parameters:
p - Percentage value set by the user.


show

function show(node, children)
Callback routine called from the entity/identity tree when the user modifies the tree view to visualize a tree fragment.

Parameters:
children - All children underneath the specified node for which the visual flag must be set to true as well.

node - Branch id of the tree node the user operates upon.


showEventTree

function showEventTree()


showEvents

function showEvents()
Callback routine called when the user acts on the event context menu to restore the default view


showOperation

function showOperation(menu)
Callback routine called from the control_tabs HTML page when the user operates on the 'Remove Operation Filter:' menu.

Parameters:
menu - Menu element.


showTooltip

function showTooltip()
called by the set_mouse_ctx routine when the user is hoovering with the mouse over a graphical representation of an event or entity/identity.


south

function south()
Called when the user clicks the page control 'south' button.


timer

function timer()
500 ms timer used to update the status line when retrieving information from the server.


toggleControlView

function toggleControlView(evt)
When the user clicks with the mouse on the graphical representation of an invocation, event, or entity/identity the corresponding SVG element will fire an 'onclick' event that is captured using this routine. Depending on the element clicked, the following happens:


updateControlView

function updateControlView(id, tooltip, img, value)
This routine is called by the operationComplete routine to update the entity/identity hierarchy tree after retrieving entities from the server.

Parameters:
id - Branch id of the parent node this new node must be appended to as a child.

value - Entity/Identity name.

img - Node tree images.

tooltip - Tooltip to show when the user moves with the mouse over this node.


updateFilterMenus

function updateFilterMenus()


updateSVGDocument

function updateSVGDocument()
Updates the SVG document to reflect all the changes.


updateStatus

function updateStatus(window, id)
Called when the user hoovers with the mouse over the text of an entity/identity tree node.

Parameters:
id - Branch id of the tree node.

window - Web browser window.


west

function west()
Called when the user clicks the page control 'west' button.


scroll

<static> function scroll()
Static event listener (Adobe SVGScroll events) callback routine that handles panning events the user can issue by holding the alt key and clicking and dragging with the mouse.


yposIndexOrder

<static> function yposIndexOrder(a,b)
Order function used by the visible events array to sort events with the yposIndex parameter as sort criteria.

Parameters:
a - First event of the two events to sort

b - Second event of the two events to sort


zoom

<static> function zoom()
Static event listener (Adobe SVGZoom events) callback routine that handles zoom in/out events the user can issue using the default Adobe context menu.