ides.api.plugin.presentation
Interface Presentation

All Known Subinterfaces:
CopyPastePresentation, GlobalFontSizePresentation, LatexPresentation, ZoomablePresentation

public interface Presentation

The interface for a class which will render a DESModel. The model has to be rendered in the JComponent returned by getGUI().

Author:
Lenko Grigorov
See Also:
getGUI()

Method Summary
 void forceRepaint()
          Forces a repaint of the presentation.
 javax.swing.JComponent getGUI()
          Returns the JComponent in which the DESModel is rendered.
 DESModel getModel()
          Retrieve the model rendered in the presentation.
 java.lang.String getName()
          Returns the title of this presentation.
 void release()
          Detach from the underlying DESModel and releases any resources used to present it.
 void setTrackModel(boolean b)
          Sets if changes in the DESModel have to be tracked by this presentation or not.
 

Method Detail

getName

java.lang.String getName()
Returns the title of this presentation.

Returns:
the title of this presentation

getGUI

javax.swing.JComponent getGUI()
Returns the JComponent in which the DESModel is rendered. This method can be called by IDES directly or through a Toolset.

Returns:
the JComponent in which the DESModel is rendered

getModel

DESModel getModel()
Retrieve the model rendered in the presentation.

Returns:
the model rendered in the presentation

setTrackModel

void setTrackModel(boolean b)
Sets if changes in the DESModel have to be tracked by this presentation or not.

The implementation of this method is optional. Some presentations may always track changes (especially if the presentations allows modifications to the underlying DESModel). Some presentations may always ignore changes.

Parameters:
b - if true, the presentation should register with the underlying DESModel to track changes and update itself dynamically. If false, the presentation should unregister itself with the underlying DESModel and ignore any changes to it.

release

void release()
Detach from the underlying DESModel and releases any resources used to present it. For example, the presentation should unsubscribe from listening to changes in the DESModel.

Once this method is called, the behavior of the presentation should no longer be considered deterministic.


forceRepaint

void forceRepaint()
Forces a repaint of the presentation.