Class EditorSession

java.lang.Object
org.graffiti.session.Session
org.graffiti.session.EditorSession
All Implemented Interfaces:
ActionListener, EventListener, ConstraintCheckerListener

public class EditorSession
extends Session
implements ActionListener
Contains an editor session. An editor session contains a list of views, which can manipulate the graph object. It also contains the current editor mode and the selection model.
Version:
$Revision: 1.18.4.1 $
See Also:
Session
  • Constructor Details

    • EditorSession

      public EditorSession()
      Constructs a new EditorSession with an empty graph instance.
    • EditorSession

      public EditorSession​(Graph graph)
      Constructs a new EditorSession.
      Parameters:
      graph - the Graph object for this session.
  • Method Details

    • setClosing

      public void setClosing()
      Sets the closing state of this session. This may only be done once.
      Throws:
      RuntimeException - DOCUMENT ME!
    • isClosing

      public boolean isClosing()
      Returns true, if the session is currently closing.
      Returns:
      DOCUMENT ME!
    • setFileName

      public void setFileName​(String fileName)
      Sets the fileName.
      Parameters:
      fileName - The fileName to set
    • getFileNameFull

      public String getFileNameFull()
      Returns the full fileName including path of this session's graph.
      Returns:
      the fileName of this session's graph.
    • getFileName

      public String getFileName()
      Get just the file name excluding the path
      Returns:
      a name of the graph file as string
    • getGraphElementsMap

      public Map<GraphElement,​GraphElement> getGraphElementsMap()
      Returns the graphElementMap.
      Returns:
      Map
    • setSelectionModel

      public void setSelectionModel​(SelectionModel selectionModel)
      Sets the selectionModel.
      Parameters:
      selectionModel - The selectionModel to set
    • getSelectionModel

      public SelectionModel getSelectionModel()
      Returns the selectionModel.
      Returns:
      DOCUMENT ME!
    • getUndoManager

      public UndoManager getUndoManager()
      Returns the undoManager for this session.
      Returns:
      the undoManager for this session.
    • actionPerformed

      public void actionPerformed​(ActionEvent e)
      Registrates the selected Tool as an MouseInputListener at the view.
      Specified by:
      actionPerformed in interface ActionListener
      Parameters:
      e - DOCUMENT ME!
    • getWorkSessionFilePath

      public String getWorkSessionFilePath()
    • isSaved

      public boolean isSaved()
    • setFileTypeDescription

      public void setFileTypeDescription​(String fileTypeDescription)
      Sets a file type description which can be used to choose an appropriate output serializer independent of the file extension.
      Parameters:
      fileTypeDescription -
    • getFileTypeDescription

      public String getFileTypeDescription()
      Returns a file type description which can be used to choose an appropriate output serializer independent of the file extension.
      Returns:
      a file type description