Class NoLongerViewedListener
- java.lang.Object
-
- com.biomatters.geneious.publicapi.plugin.NoLongerViewedListener
-
public abstract class NoLongerViewedListener extends java.lang.Object
May be supplied by aDocumentViewer
(viagetNoLongerViewedListener
) to be notified when they are no longer being viewed.The following example shows how to create a new NoLongerViewedListener as an anonymous inner class.
new NoLongerViewedListener(){ //isTemporary is true if the user is switching to another viewer of the same document //and false otherwise. public void noLongerViewed(NoLongerViewedReason reason, boolean isTemporary){ cancelBackgroundCalculations(); if (!isTemporary) freeSomeSystemResources(); } };
-
-
Constructor Summary
Constructors Constructor Description NoLongerViewedListener()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
noLongerViewed(boolean isTemporary)
The user is no longer interested in viewing this.
-
-
-
Method Detail
-
noLongerViewed
public abstract void noLongerViewed(boolean isTemporary)
The user is no longer interested in viewing this. Note: In previous versions of Geneious, this method was able to return false to prevent this component from losing its view when prompting to save changes, but prompting to save is now handled automatically byActionProvider.getSaveAction()
This method will always be invoked in the AWT thread. This method will be fired (with isTemporary==false) on all viewers when the user unselects a document, even if the user has not switched the viewers tab to show that viewer.- Parameters:
isTemporary
- if true, then this is just a temporary loss of view. The panel will remain in memory, and the user is able to browse back to it. For example, when changing between the viewer/text views.
-
-