unbbayes.gui
Interface IPersistenceAwareWindow

All Known Implementing Classes:
NetworkWindow, UnBBayesModule

public interface IPersistenceAwareWindow

Interface for JInternalWindow's subclasses (like NetworkWindow) which are aware of what file extension is to be used and what extensions should be used for file chooser's filter.

Version:
1.2 : changed this interface in order to represent JInternalWindows which are aware of persistence level implementation.
Author:
Shou Matsumoto

Method Summary
 JInternalFrame getInternalFrame()
          Obtains the internal frame to be created by UnBBayes Swing core when a file listed within #getSupportedFileExtensions() is opened by the user.
 BaseIO getIO()
          Returns the I/O class that is responsible to open/save files of a extension declared in #getSupportedFileExtensions()
 Graph getPersistingGraph()
          Obtains the graph to be persisted or is being edited by this window.
 String getSavingMessage()
          Obtains a message to be shown to user while saving a net editted by a window implementing this interface.
 String[] getSupportedFileExtensions(boolean isLoadOnly)
          Deprecated. use BaseIO.getSupportedFileExtensions(boolean)
 String getSupportedFilesDescription(boolean isLoadOnly)
          Deprecated. use BaseIO.getSupportedFilesDescription(boolean)
 

Method Detail

getSupportedFileExtensions

String[] getSupportedFileExtensions(boolean isLoadOnly)
Deprecated. use BaseIO.getSupportedFileExtensions(boolean)

Obtains an array of file extensions supported by this network window. The file extensions should come without the dot

Parameters:
isLoadOnly - : if set to true, it should consider file extensions for file loading (input). If set to false, it should consider both saving and loading. Note that not every module/plugin can implement both loading and saving, and this parameter may separate such special behaviors.
Returns:
See Also:
getIO()

getSupportedFilesDescription

String getSupportedFilesDescription(boolean isLoadOnly)
Deprecated. use BaseIO.getSupportedFilesDescription(boolean)

Gets a description of supported file extensions, which may be shown to the user through file chooser's file filter to explain what file format are supported. E.g. "Net (.net), XMLBIF(.xml), UnBBayes File (.ubf)"

Parameters:
isLoadOnly - : if set to true, it should consider file extensions for file loading (input). If set to false, it should consider both saving and loading. Note that not every module/plugin can implement both loading and saving, and this parameter may separate such special behaviors.
See Also:
getIO()

getSavingMessage

String getSavingMessage()
Obtains a message to be shown to user while saving a net editted by a window implementing this interface. For example, you may want a FileChooser to show personalized title depending on what you are saving.

Returns:

getInternalFrame

JInternalFrame getInternalFrame()
Obtains the internal frame to be created by UnBBayes Swing core when a file listed within #getSupportedFileExtensions() is opened by the user.

Returns:
a instance of JInternalFrame

getIO

BaseIO getIO()
Returns the I/O class that is responsible to open/save files of a extension declared in #getSupportedFileExtensions()

Returns:
instance of BaseIO. BaseIO#supportsExtension(String) must return true in this case.
See Also:
BaseIO#supportsExtension(String)

getPersistingGraph

Graph getPersistingGraph()
Obtains the graph to be persisted or is being edited by this window.

Returns:


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.