Class RevisionComparePresenter
java.lang.Object
org.tweetyproject.beliefdynamics.gui.RevisionComparePresenter
- All Implemented Interfaces:
ActionListener
,ItemListener
,EventListener
,ChangeListener
public class RevisionComparePresenter
extends Object
implements ItemListener, ChangeListener, ActionListener
This class couples the RevisionCompare View and Model, it needs to know the
implementation used to
load external belief base files, see FileHandler interface. The presenter
reacts to user inputs on
the view and proofs if the changes are valid and then delegates them to the
model. It also registers
the view as a PropertyListener to the correct model.
- Author:
- Tim Janus
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface for handling file operations related to formulas. -
Constructor Summary
ConstructorDescriptionDefault Ctor: registers the view as listener to the correct model. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
static void
Functional Test method: Only shows the view in a JFrame to test resize behavior.void
Sets a file handler which is responsible to filter the open file dialog and to load the selected file.void
-
Constructor Details
-
RevisionComparePresenter
Default Ctor: registers the view as listener to the correct model.- Parameters:
model
- a revision compare modelview
- a view
-
-
Method Details
-
setFileHandler
Sets a file handler which is responsible to filter the open file dialog and to load the selected file.- Parameters:
handler
- An implementation of the FileHandler interface or null. If null is given then the default handler is used which cannot open any files.
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
stateChanged
- Specified by:
stateChanged
in interfaceChangeListener
-
itemStateChanged
- Specified by:
itemStateChanged
in interfaceItemListener
-
main
Functional Test method: Only shows the view in a JFrame to test resize behavior.- Parameters:
args
- arguments
-