ides.api.plugin.presentation
Interface Toolset


public interface Toolset

The implementations of this interface provide the required GUI elements to manipulate a given type of DESModel. IDES will display these GUI elements when a model of the type is activated by the user.

To handle a given DESModel type, one needs to register the toolset with ToolsetManager.registerToolset(Class, Toolset). Then, IDES will use ToolsetManager.getToolset(Class) to get the toolset when needed.

Author:
Lenko Grigorov
See Also:
ToolsetManager.registerToolset(Class, Toolset)

Method Summary
 Presentation getModelThumbnail(DESModel model, int width, int height)
          Returns a Presentation element with a thumbnail view of the given DESModel.
 UIDescriptor getUIElements(DESModel model)
          Returns a descriptor of the GUI elements which will be used to display a DESModel.
 

Method Detail

getUIElements

UIDescriptor getUIElements(DESModel model)
                           throws UnsupportedModelException
Returns a descriptor of the GUI elements which will be used to display a DESModel.

Each invocation of this method may create a new descriptor and new GUI elements. Thus, repeated invocation should be avoided until elements from the previous invocations have been disposed.

Parameters:
model - the DESModel to be displayed
Returns:
the descriptor of the GUI elements to be used
Throws:
UnsupportedModelException - when the toolset does not support the type of the given DESModel
See Also:
UIDescriptor

getModelThumbnail

Presentation getModelThumbnail(DESModel model,
                               int width,
                               int height)
                               throws UnsupportedModelException
Returns a Presentation element with a thumbnail view of the given DESModel.

Parameters:
model - DESModel for which to return a thumbnail
width - the desired width of the thumbnail in pixels
height - the desired height of the thumbnail in pixels
Returns:
a Presentation element with a thumbnail view of the DESModel
Throws:
UnsupportedModelException - when the toolset does not support the type of the given DESModel