org.sump.analyzer.tools
Interface Tool

All Known Implementing Classes:
Base, I2CProtocolAnalysis, SPIProtocolAnalysis, StateAnalysis

public interface Tool

Interface for pluggable tools.

All tools implementing this interface that are added to the tools class list will be automatically added to the tools menu in the client.

Version:
0.7
Author:
Michael "Mr. Sump" Poppitz

Method Summary
 java.lang.String getName()
          Is called to get the name for the menu entry.
 void init(java.awt.Frame frame)
          Performs tool initialization.
 CapturedData process(CapturedData data)
          This method is invoked when the tool is selected from the Tools menu.
 CapturedData process(CapturedData data, int group, int channel, int position)
          This method is invoked when the tool is selected from the context menu after right clicking someplace in the diagram.
 

Method Detail

getName

java.lang.String getName()
Is called to get the name for the menu entry. The name must be unique among all tools. Should end in "..." if it opens a dialog window.

Returns:
name for this tool

init

void init(java.awt.Frame frame)
Performs tool initialization. This method should also prepare the dialog, if one is needed

Parameters:
frame - main window's frame (needed for modal dialogs)

process

CapturedData process(CapturedData data)
This method is invoked when the tool is selected from the Tools menu. It should request any missing information using a dialog and perform the tool's actual task.

Parameters:
data - currently displayed captured data
Returns:
new CapturedData if provided data has been altered or null otherwise

process

CapturedData process(CapturedData data,
                     int group,
                     int channel,
                     int position)
This method is invoked when the tool is selected from the context menu after right clicking someplace in the diagram. It should request any missing information using a dialog and perform the tool's actual task.

Parameters:
data - currently displayed captured data
group - channel group at the mouse position where the menu was openend
channel - number of channel at the mouse position where the menu was openend
position - number of sample at the mouse position where the menu was openend
Returns:
new CapturedData if provided data has been altered or null otherwise