nl.lxtreme.ols.api.tools
Interface Tool<RESULT_TYPE>


public interface Tool<RESULT_TYPE>

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.

Author:
Michael "Mr. Sump" Poppitz, J.W. Janssen

Method Summary
 ToolTask<RESULT_TYPE> createToolTask(ToolContext aContext, ToolProgressListener aProgressListener, AnnotationListener aAnnotationListener)
          Factory method for creating a new ToolTask instance.
 ToolCategory getCategory()
          Returns the category for this tool.
 String getName()
          Is called to get the name for the menu entry.
 void invoke(Window aParent, ToolContext aContext)
          Allows this tool controller to set up the tool by means of presenting an UI.
 

Method Detail

createToolTask

ToolTask<RESULT_TYPE> createToolTask(ToolContext aContext,
                                     ToolProgressListener aProgressListener,
                                     AnnotationListener aAnnotationListener)
Factory method for creating a new ToolTask instance.

Parameters:
aContext - the tool context to use within the tool taks, cannot be null;
aProgressListener - the tool progress listener the tool can use to report its progress, cannot be null.

getCategory

ToolCategory getCategory()
Returns the category for this tool.

Each tool must provide a category in order to be grouped correctly.

Returns:
a category, cannot be null.

getName

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

invoke

void invoke(Window aParent,
            ToolContext aContext)
Allows this tool controller to set up the tool by means of presenting an UI.

Parameters:
aParent - the parent window that can be used to display (modal) dialogs, can be null;
aContext - the context in which the tool should be run, cannot be null;


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.