Class SimpleRevisionComparePresenter

java.lang.Object
org.tweetyproject.lp.asp.beliefdynamics.gui.SimpleRevisionComparePresenter
All Implemented Interfaces:
ActionListener, ItemListener, EventListener, ChangeListener

public class SimpleRevisionComparePresenter extends Object implements ItemListener, ChangeListener, ActionListener
This class couples the SimpleRevisionCompare 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. This gui is based on the RevisionCompare gui from the beliefdynamics.gui package.
Author:
Sebastian Homann, Tim Janus
  • Constructor Details

  • Method Details

    • setFileHandler

      public void setFileHandler(SimpleRevisionComparePresenter.FileHandler handler)
      Sets a file handler responsible for filtering the open file dialog and loading 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

      public void actionPerformed(ActionEvent ev)
      Specified by:
      actionPerformed in interface ActionListener
    • stateChanged

      public void stateChanged(ChangeEvent ev)
      Specified by:
      stateChanged in interface ChangeListener
    • itemStateChanged

      public void itemStateChanged(ItemEvent ev)
      Specified by:
      itemStateChanged in interface ItemListener
    • main

      public static void main(String[] args)
      Functional Test method: Only shows the view in a JFrame to test resize behavior.
      Parameters:
      args - some arguments