gishur.core.algorithms
Interface TraceVisualizer


public interface TraceVisualizer

Interface for the visualization of algorithm steps (labels) recorded by a Tracer. The interface is e.g. used by TraceBar.

Version:
1.0
Author:
Thomas Wolf

Method Summary
 void clearVisualization()
          Will be called on leaving the visualization mode.
 void initVisualization()
          Will be called on entering the visualization mode.
 float visualize(TraceLabel label)
          This method should visualize the given record step.
 float visualizeAfterLast(TraceLabel label)
          This method should display a post-last step.
 float visualizeBeforeFirst(TraceLabel label)
          This method should display a pre-first step.
 

Method Detail

initVisualization

public void initVisualization()
Will be called on entering the visualization mode.

clearVisualization

public void clearVisualization()
Will be called on leaving the visualization mode.

visualize

public float visualize(TraceLabel label)
This method should visualize the given record step. The step is represented as a TraceLabel. The TraceLabel gives access to the record time and the values of all recorded items at that time.
Parameters:
label - the TraceLabel to visualize
Returns:
time factor, that shows the procentual amount of time to wait relatively to the playback speed (normaly it should be 1.0f).

visualizeBeforeFirst

public float visualizeBeforeFirst(TraceLabel label)
This method should display a pre-first step.
Parameters:
label - the first TraceLabel
Returns:
time factor, that shows the procentual amount of time to wait relatively to the playback speed (normaly it should be 1.0f).

visualizeAfterLast

public float visualizeAfterLast(TraceLabel label)
This method should display a post-last step.
Parameters:
label - the last TraceLabel
Returns:
time factor, that shows the procentual amount of time to wait relatively to the playback speed (normaly it should be 1.0f).