Package org.graffiti.session
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 Summary
Constructors Constructor Description EditorSession()Constructs a newEditorSessionwith an empty graph instance.EditorSession(Graph graph)Constructs a newEditorSession. -
Method Summary
Modifier and Type Method Description voidactionPerformed(ActionEvent e)Registrates the selectedToolas anMouseInputListenerat the view.StringgetFileName()Get just the file name excluding the pathStringgetFileNameFull()Returns the full fileName including path of this session's graph.StringgetFileTypeDescription()Returns a file type description which can be used to choose an appropriate output serializer independent of the file extension.Map<GraphElement,GraphElement>getGraphElementsMap()Returns the graphElementMap.SelectionModelgetSelectionModel()Returns the selectionModel.UndoManagergetUndoManager()Returns the undoManager for this session.StringgetWorkSessionFilePath()booleanisClosing()Returnstrue, if the session is currently closing.booleanisSaved()voidsetClosing()Sets the closing state of this session.voidsetFileName(String fileName)Sets the fileName.voidsetFileTypeDescription(String fileTypeDescription)Sets a file type description which can be used to choose an appropriate output serializer independent of the file extension.voidsetSelectionModel(SelectionModel selectionModel)Sets the selectionModel.Methods inherited from class org.graffiti.session.Session
addView, changeActiveMode, checkFailed, close, getActiveMode, getActiveView, getClassName, getGraph, getViews, isModified, pluginAdded, removeView, setActiveView, toString
-
Constructor Details
-
EditorSession
public EditorSession()Constructs a newEditorSessionwith an empty graph instance. -
EditorSession
Constructs a newEditorSession.- Parameters:
graph- theGraphobject 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()Returnstrue, if the session is currently closing.- Returns:
- DOCUMENT ME!
-
setFileName
Sets the fileName.- Parameters:
fileName- The fileName to set
-
getFileNameFull
Returns the full fileName including path of this session's graph.- Returns:
- the fileName of this session's graph.
-
getFileName
Get just the file name excluding the path- Returns:
- a name of the graph file as string
-
getGraphElementsMap
Returns the graphElementMap.- Returns:
- Map
-
setSelectionModel
Sets the selectionModel.- Parameters:
selectionModel- The selectionModel to set
-
getSelectionModel
Returns the selectionModel.- Returns:
- DOCUMENT ME!
-
getUndoManager
Returns the undoManager for this session.- Returns:
- the undoManager for this session.
-
actionPerformed
Registrates the selectedToolas anMouseInputListenerat the view.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
e- DOCUMENT ME!
-
getWorkSessionFilePath
-
isSaved
public boolean isSaved() -
setFileTypeDescription
Sets a file type description which can be used to choose an appropriate output serializer independent of the file extension.- Parameters:
fileTypeDescription-
-
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
-