unbbayes.gui
Class UnBBayesFrame.OpenFileUsingModulesActionListener

java.lang.Object
  extended by unbbayes.gui.UnBBayesFrame.OpenFileUsingModulesActionListener
All Implemented Interfaces:
ActionListener, EventListener
Enclosing class:
UnBBayesFrame

public class UnBBayesFrame.OpenFileUsingModulesActionListener
extends Object
implements ActionListener

A listener for opening an existing file using plugins/modules. Can be used in 2 ways: 1 - a file is not specified (in this case a file chooser will be shown to user); 2 - a file is specified (in this case the listener will just open the file)

Author:
Shou Matsumoto

Constructor Summary
UnBBayesFrame.OpenFileUsingModulesActionListener(File file)
          Create a listener in order to open a file treating modules' conflicts.
 
Method Summary
 void actionPerformed(ActionEvent ae)
          If a file is specified, opens it using an appropriate UnBBayesModule.
 File showFileChooser()
          Shows a file chooser to the user, using filters provided by plugins/modules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnBBayesFrame.OpenFileUsingModulesActionListener

public UnBBayesFrame.OpenFileUsingModulesActionListener(File file)
Create a listener in order to open a file treating modules' conflicts.

Parameters:
file - : if set to null, a file chooser will be opened to select a new file.
Method Detail

showFileChooser

public File showFileChooser()
Shows a file chooser to the user, using filters provided by plugins/modules.

Returns:
the selected file. Null if no file was selected.
See Also:
JFileChooser.showOpenDialog(java.awt.Component)

actionPerformed

public void actionPerformed(ActionEvent ae)
If a file is specified, opens it using an appropriate UnBBayesModule. I not, a file chooser will be displayed to user and that file will be opened using an appropriate UnBBayesModule.

Specified by:
actionPerformed in interface ActionListener


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