public abstract class NoLongerViewedListener extends Object
DocumentViewer (via getNoLongerViewedListener)
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 and Description |
|---|
NoLongerViewedListener() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
noLongerViewed(boolean isTemporary)
The user is no longer interested in viewing this.
|
public abstract void noLongerViewed(boolean isTemporary)
ActionProvider.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.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.