org.graffiti.editor
Class MainFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by org.graffiti.editor.MainFrame
All Implemented Interfaces:
ComponentListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, UndoableEditListener, RootPaneContainer, WindowConstants, EditorDefaultValues, IOManager.IOManagerListener, PluginManagerListener, ViewManager.ViewManagerListener, MessageListener, SessionListener, SessionManager

public class MainFrame
extends JFrame
implements ComponentListener, EditorDefaultValues, IOManager.IOManagerListener, MessageListener, PluginManagerListener, SessionManager, SessionListener, UndoableEditListener, ViewManager.ViewManagerListener, WindowListener

Constructs a new graffiti frame, which contains the main GUI components.

Version:
$Revision: 5887 $
See Also:
Serialized Form

Nested Class Summary
(package private)  class MainFrame.GraffitiInternalFrameListener
          Listener for the internal frames.
(package private)  class MainFrame.GraffitiInternalFrameOrder
          Order the GraffitiInternalFrames according to their session and view id.
 
Nested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrame
 
Nested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
(package private)  List<GraffitiInternalFrame> activeFrames
          Holds all active frames.
(package private)  EditorSession activeSession
          The current active session.
static Dimension PREFERRED_INTERNALFRAME_SIZE
          The size of an internal frame for first displaying.
(package private)  Set<Session> sessions
          Contains all Sessions.
protected  Preferences uiPrefs
          The preferences of the editor's main frame.
(package private)  Map<View,GraffitiInternalFrame> viewFrameMapper
          Maps from views to internal frames.
(package private)  List<Zoomable> zoomListener
          The list of registered Zoomables.
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface org.graffiti.editor.EditorDefaultValues
SIZE_HEIGHT, SIZE_WIDTH, VERT_SPLITTER
 
Fields inherited from interface org.graffiti.plugin.view.MessageListener
ERROR, INFO, PERMANENT_INFO
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
MainFrame(PluginManager pluginmgr, Preferences prefs)
          Constructs a new MainFrame.
 
Method Summary
 void addGUIComponent(String id, JComponent component)
          Adds the JComponent component to the gui-component specified by id.
 Session addNewSession()
           
 void addSelectionListener(SelectionListener sl)
          Adds a SelectionListener.
 void addSession(Session s)
          Adds the given session to the list of sessions.
 void addSessionListener(SessionListener sl)
          Adds a SessionListener.
 void clearMessages()
          Removes any messages displayed by calls to showMessage or showError.
 void componentHidden(ComponentEvent e)
           
 void componentMoved(ComponentEvent e)
           
 void componentResized(ComponentEvent e)
           
 void componentShown(ComponentEvent e)
           
 JComponent createInternalFrame(String viewName, String newFrameTitle, boolean returnScrollpane)
          Creates and adds a new internal frame to the desktop within an existing session.
 JComponent createInternalFrame(String viewName, String newFrameTitle, EditorSession session, boolean returnScrollPane)
          Creates and adds a new internal frame to the desktop within a new session.
 Session createNewSession()
          Creates and returns a new editor session.
 void dispose()
          Disposes the main frame.
 void fireSessionChanged(Session session)
          Informs all SessionListener s that the active session has changed.
 void fireSessionDataChanged(Session session)
          Called, if the session or data (except graph data) in the session have been changed.
(package private)  void fireViewChanged(View newView)
          Method fireViewChanged.
 EditorSession getActiveEditorSession()
          Returns the current active editor session.
 List<GraffitiInternalFrame> getActiveFrames()
          DOCUMENT ME!
 Session getActiveSession()
          Returns the current active session.
 List<GraffitiAction> getAlgorithmActions()
          DOCUMENT ME!
 AlgorithmManager getAlgorithmManager()
          Get the algorithm manager.
 AttributeComponentManager getAttributeComponentManager()
          Get attribute component manager.
protected  String getDefaultTitle()
          Get default title for the main frame.
 String getDefaultView()
          Returns the defaultView.
 EditComponentManager getEditComponentManager()
          DOCUMENT ME!
 CopyAction getEditCopy()
          Returns the editCopy.
 CutAction getEditCut()
          Returns the editCut.
 DeleteAction getEditDelete()
          Returns the editDelete.
 PasteAction getEditPaste()
          Returns the editPaste.
 GraffitiAction getEditRedo()
          Returns the editRedo.
 GraffitiAction getEditSelectAll()
          Returns the editSelectAll.
 GraffitiAction getEditUndo()
          Returns the editUndo.
 GraffitiAction getFileOpen()
          Returns the fileOpen.
 GraffitiAction getFileSave()
          Returns the fileSave.
 GraffitiAction getFileSaveAll()
          Returns the fileSaveAll.
 GraffitiAction getFileSaveAs()
          Returns the fileSaveAs.
 IOManager getIoManager()
          DOCUMENT ME!
 GraffitiAction getNewGraph()
          Returns the newGraph.
 PluginManager getPluginManager()
          DOCUMENT ME!
 SessionManager getSessionManager()
          DOCUMENT ME!
 Set<Session> getSessions()
          DOCUMENT ME!
 Iterator<Session> getSessionsIterator()
          Returns an iterator over all sessions.
 StatusBar getStatusBar()
          Returns the statusBar.
 Preferences getUiPrefs()
          DOCUMENT ME!
 UndoableEditSupport getUndoSupport()
          Returns the class for undoSupport.
 ViewManager getViewManager()
          Returns the viewManager.
 ViewportEventDispatcher getViewportEventDispatcher()
           
 void inputSerializerAdded(InputSerializer is)
          Called, if an input serializer is added to the io manager.
 boolean isSessionActive()
          Returns true, if a session is active.
 boolean loadGraph(File file)
          Loads a graph from a file;
 void outputSerializerAdded(OutputSerializer os)
          Called, if an output serializer ist added to the io manager.
 void pluginAdded(GenericPlugin plugin, PluginDescription desc)
          Called by the plugin manager, iff a plugin has been added.
 void removeSelectionListener(SelectionListener sl)
          Removes a SelectionListener.
 boolean removeSession(Session session)
          Closes all views of the given session and removes the session from the list of sessions.
 void removeSessionListener(SessionListener sl)
          Removes a SessionListener.
 void savePreferences()
          Saves the preferences of the main frame.
 boolean saveSessionCancelled(Session session, boolean onlyIfLastView)
          Check whether the session is modified, ask the user whether to save the session and finally save it.
 void sessionChanged(Session s)
          Invoked when the session changed.
 void sessionDataChanged(Session s)
          Invoked when the session data changed.
 void setActiveSession(Session s)
          Sets the current active session.
 void setDefaultView(String defaultView)
          Sets the defaultView.
protected  void showError(String msg)
          Shows an error in a modal dialog box.
 void showMessageDialog(String msg)
          Shows an arbitrary message dialog.
 void showMessageDialog(String msg, String title)
          Shows an arbitrary message dialog.
 void showMesssage(String message, int type)
          Method showMesssage displays a message on GUI components according to the specified type.
 void showMesssage(String message, int type, int timeMillis)
          Method showMesssage displays a message on GUI components according to the specified type for the given interval.
 JComponent showViewChooserDialog(boolean returnScrollpane)
          Method showViewChooserDialog invokes a view chooser dialog for choosing view types.
 JComponent showViewChooserDialog(EditorSession session, boolean returnScrollPane)
          Method showViewChooserDialog invokes a view chooser dialog for choosing view types.
 void undoableEditHappened(UndoableEditEvent e)
          This method is called when an undoableEdit happened.
 void updateActions()
          Updates the state of the actions.
 void viewTypeAdded(String viewType)
          Called, if a new view type is added to view manager.
 void windowActivated(WindowEvent e)
          Invoked when the Window is set to be the active Window.
 void windowClosed(WindowEvent e)
          Invoked when a window has been closed as the result of calling dispose on the window.
 void windowClosing(WindowEvent e)
          Invoked when the user attempts to close the window from the window's system menu.
 void windowDeactivated(WindowEvent e)
          Invoked when a Window is no longer the active Window.
 void windowDeiconified(WindowEvent e)
          Invoked when a window is changed from a minimized to a normal state.
 void windowIconified(WindowEvent e)
          Invoked when a window is changed from a normal to a minimized state.
 void windowOpened(WindowEvent e)
          Invoked the first time a window is made visible.
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

PREFERRED_INTERNALFRAME_SIZE

public static final Dimension PREFERRED_INTERNALFRAME_SIZE
The size of an internal frame for first displaying.


uiPrefs

protected Preferences uiPrefs
The preferences of the editor's main frame. (e.g.: position and size of the main frame.


activeSession

EditorSession activeSession
The current active session.


activeFrames

List<GraffitiInternalFrame> activeFrames
Holds all active frames.


zoomListener

List<Zoomable> zoomListener
The list of registered Zoomables.


viewFrameMapper

Map<View,GraffitiInternalFrame> viewFrameMapper
Maps from views to internal frames.


sessions

Set<Session> sessions
Contains all Sessions.

Constructor Detail

MainFrame

public MainFrame(PluginManager pluginmgr,
                 Preferences prefs)
Constructs a new MainFrame.

Parameters:
pluginmgr - DOCUMENT ME!
prefs - DOCUMENT ME!
Method Detail

getAttributeComponentManager

public AttributeComponentManager getAttributeComponentManager()
Get attribute component manager. This is used by some export/import modules.

Returns:
The used attribute component manager.

getDefaultTitle

protected String getDefaultTitle()
Get default title for the main frame.

Returns:
The default title.

getActiveEditorSession

public EditorSession getActiveEditorSession()
Returns the current active editor session.

Returns:
the current active editor session.

getActiveFrames

public List<GraffitiInternalFrame> getActiveFrames()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setActiveSession

public void setActiveSession(Session s)
Sets the current active session.

Parameters:
s - The session to be activated.

getActiveSession

public Session getActiveSession()
Returns the current active session.

Specified by:
getActiveSession in interface SessionManager
Returns:
the current active session.

getAlgorithmActions

public List<GraffitiAction> getAlgorithmActions()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getAlgorithmManager

public AlgorithmManager getAlgorithmManager()
Get the algorithm manager.

Returns:
the algorithm manager.

setDefaultView

public void setDefaultView(String defaultView)
Sets the defaultView.

Parameters:
defaultView - The defaultView to set

getDefaultView

public String getDefaultView()
Returns the defaultView.

Returns:
String

getEditComponentManager

public EditComponentManager getEditComponentManager()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getEditCopy

public CopyAction getEditCopy()
Returns the editCopy.

Returns:
Returns the editCopy.

getEditCut

public CutAction getEditCut()
Returns the editCut.

Returns:
Returns the editCut.

getEditDelete

public DeleteAction getEditDelete()
Returns the editDelete.

Returns:
Returns the editDelete.

getEditPaste

public PasteAction getEditPaste()
Returns the editPaste.

Returns:
Returns the editPaste.

getEditRedo

public GraffitiAction getEditRedo()
Returns the editRedo.

Returns:
Returns the editRedo.

getEditSelectAll

public GraffitiAction getEditSelectAll()
Returns the editSelectAll.

Returns:
Returns the editSelectAll.

getEditUndo

public GraffitiAction getEditUndo()
Returns the editUndo.

Returns:
Returns the editUndo.

getFileOpen

public GraffitiAction getFileOpen()
Returns the fileOpen.

Returns:
Returns the fileOpen.

getFileSave

public GraffitiAction getFileSave()
Returns the fileSave.

Returns:
Returns the fileSave.

getFileSaveAll

public GraffitiAction getFileSaveAll()
Returns the fileSaveAll.

Returns:
Returns the fileSaveAll.

getFileSaveAs

public GraffitiAction getFileSaveAs()
Returns the fileSaveAs.

Returns:
Returns the fileSaveAs.

getIoManager

public IOManager getIoManager()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getNewGraph

public GraffitiAction getNewGraph()
Returns the newGraph.

Returns:
Returns the newGraph.

getPluginManager

public PluginManager getPluginManager()
DOCUMENT ME!

Returns:
DOCUMENT ME!

isSessionActive

public boolean isSessionActive()
Returns true, if a session is active.

Specified by:
isSessionActive in interface SessionManager
Returns:
DOCUMENT ME!

getSessionManager

public SessionManager getSessionManager()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getSessions

public Set<Session> getSessions()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getSessionsIterator

public Iterator<Session> getSessionsIterator()
Returns an iterator over all sessions.

Specified by:
getSessionsIterator in interface SessionManager
Returns:
an iterator over all sessions.
See Also:
Session

getUiPrefs

public Preferences getUiPrefs()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getUndoSupport

public UndoableEditSupport getUndoSupport()
Returns the class for undoSupport.

Returns:
the class for undoSupport.

getViewManager

public ViewManager getViewManager()
Returns the viewManager.

Returns:
ViewManager

addGUIComponent

public void addGUIComponent(String id,
                            JComponent component)
Adds the JComponent component to the gui-component specified by id. If the specified gui-component does not exist a new one will be created with id id and the newly created gui-component will be added to the gui of the editor.

Parameters:
id - the id of the gui-component where the component shall be added.
component - the JComponent which shall be added to the specified gui-component.

addSelectionListener

public void addSelectionListener(SelectionListener sl)
Adds a SelectionListener.

Parameters:
sl - DOCUMENT ME!

addSession

public void addSession(Session s)
Adds the given session to the list of sessions.

Specified by:
addSession in interface SessionManager
Parameters:
s - the new session to add.

addSessionListener

public void addSessionListener(SessionListener sl)
Adds a SessionListener.

Specified by:
addSessionListener in interface SessionManager
Parameters:
sl - DOCUMENT ME!

clearMessages

public void clearMessages()
Removes any messages displayed by calls to showMessage or showError.


componentHidden

public void componentHidden(ComponentEvent e)
Specified by:
componentHidden in interface ComponentListener
See Also:
ComponentListener.componentHidden(java.awt.event.ComponentEvent)

componentMoved

public void componentMoved(ComponentEvent e)
Specified by:
componentMoved in interface ComponentListener
See Also:
ComponentListener.componentMoved(java.awt.event.ComponentEvent)

componentResized

public void componentResized(ComponentEvent e)
Specified by:
componentResized in interface ComponentListener
See Also:
ComponentListener.componentResized(java.awt.event.ComponentEvent)

componentShown

public void componentShown(ComponentEvent e)
Specified by:
componentShown in interface ComponentListener
See Also:
ComponentListener.componentShown(java.awt.event.ComponentEvent)

createInternalFrame

public JComponent createInternalFrame(String viewName,
                                      String newFrameTitle,
                                      boolean returnScrollpane)
Creates and adds a new internal frame to the desktop within an existing session.

Parameters:
viewName - a name of the new view
newFrameTitle - the title for the frame, if null or the empty String no title will be set.
returnScrollpane - DOCUMENT ME!
Returns:
DOCUMENT ME!

createInternalFrame

public JComponent createInternalFrame(String viewName,
                                      String newFrameTitle,
                                      EditorSession session,
                                      boolean returnScrollPane)
Creates and adds a new internal frame to the desktop within a new session.

Parameters:
viewName - a name of the new view
newFrameTitle - the title for the frame, if null or the empty String no title will be set.
session - a new session.
returnScrollPane - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
RuntimeException - DOCUMENT ME!

createNewSession

public Session createNewSession()
Creates and returns a new editor session.

Returns:
New session

dispose

public void dispose()
Disposes the main frame. Closes all sessions and saves the state (e.g. size and position) of the frame's GUI elements.

Overrides:
dispose in class Window

saveSessionCancelled

public boolean saveSessionCancelled(Session session,
                                    boolean onlyIfLastView)
Check whether the session is modified, ask the user whether to save the session and finally save it.

Parameters:
session - Session to save.
onlyIfLastView - Only ask if there is one view left.

fireSessionChanged

public void fireSessionChanged(Session session)
Informs all SessionListener s that the active session has changed.

Parameters:
session - DOCUMENT ME!

fireSessionDataChanged

public void fireSessionDataChanged(Session session)
Called, if the session or data (except graph data) in the session have been changed.

Specified by:
fireSessionDataChanged in interface SessionManager
Parameters:
session - DOCUMENT ME!

inputSerializerAdded

public void inputSerializerAdded(InputSerializer is)
Description copied from interface: IOManager.IOManagerListener
Called, if an input serializer is added to the io manager.

Specified by:
inputSerializerAdded in interface IOManager.IOManagerListener
Parameters:
is - the input serializer, which was added to the manager.

loadGraph

public boolean loadGraph(File file)
Loads a graph from a file;

Parameters:
file - File containing the graph;
Returns:
if the loading succeeded.

outputSerializerAdded

public void outputSerializerAdded(OutputSerializer os)
Description copied from interface: IOManager.IOManagerListener
Called, if an output serializer ist added to the io manager.

Specified by:
outputSerializerAdded in interface IOManager.IOManagerListener
Parameters:
os - the output serializer, which was added to the manager.

pluginAdded

public void pluginAdded(GenericPlugin plugin,
                        PluginDescription desc)
Called by the plugin manager, iff a plugin has been added.

Specified by:
pluginAdded in interface PluginManagerListener
Parameters:
plugin - the added plugin.
desc - the description of the new plugin.

removeSelectionListener

public void removeSelectionListener(SelectionListener sl)
Removes a SelectionListener.

Parameters:
sl - DOCUMENT ME!

removeSession

public boolean removeSession(Session session)
Closes all views of the given session and removes the session from the list of sessions.

Specified by:
removeSession in interface SessionManager
Parameters:
session - the session to be removed.
Returns:
true if the remove operation was successful

removeSessionListener

public void removeSessionListener(SessionListener sl)
Removes a SessionListener.

Specified by:
removeSessionListener in interface SessionManager
Parameters:
sl - DOCUMENT ME!

savePreferences

public void savePreferences()
Saves the preferences of the main frame.


sessionChanged

public void sessionChanged(Session s)
Invoked when the session changed.

Specified by:
sessionChanged in interface SessionListener
Parameters:
s - the new session.

sessionDataChanged

public void sessionDataChanged(Session s)
Invoked when the session data changed.

Specified by:
sessionDataChanged in interface SessionListener
Parameters:
s - DOCUMENT ME!

showMessageDialog

public void showMessageDialog(String msg)
Shows an arbitrary message dialog.

Parameters:
msg - the message to be shown.

showMessageDialog

public void showMessageDialog(String msg,
                              String title)
Shows an arbitrary message dialog.

Parameters:
msg - the message to be shown.
title - DOCUMENT ME!

showMesssage

public void showMesssage(String message,
                         int type)
Method showMesssage displays a message on GUI components according to the specified type. The message will be displayed for some defined number of seconds.

Specified by:
showMesssage in interface MessageListener
Parameters:
message - a message string to be displayed
type - a type of the message (e.g. MessageListener.INFO)

showMesssage

public void showMesssage(String message,
                         int type,
                         int timeMillis)
Method showMesssage displays a message on GUI components according to the specified type for the given interval.

Parameters:
message - a message string to be displayed
type - a type of the message (e.g. ERROR)
timeMillis - number of milliseconds the message should be displayed

showViewChooserDialog

public JComponent showViewChooserDialog(boolean returnScrollpane)
Method showViewChooserDialog invokes a view chooser dialog for choosing view types. The parameter withNewSession specifies whether the new view starts within an existing session or within a new session.

Parameters:
returnScrollpane - DOCUMENT ME!
Returns:
DOCUMENT ME!

showViewChooserDialog

public JComponent showViewChooserDialog(EditorSession session,
                                        boolean returnScrollPane)
Method showViewChooserDialog invokes a view chooser dialog for choosing view types. The parameter withNewSession specifies whether the new view starts within an existing session or within a new session.

Parameters:
session - the session in which to open the new view.
returnScrollPane - DOCUMENT ME!
Returns:
DOCUMENT ME!

undoableEditHappened

public void undoableEditHappened(UndoableEditEvent e)
This method is called when an undoableEdit happened.

Specified by:
undoableEditHappened in interface UndoableEditListener
See Also:
UndoableEditListener

updateActions

public void updateActions()
Updates the state of the actions.


viewTypeAdded

public void viewTypeAdded(String viewType)
Description copied from interface: ViewManager.ViewManagerListener
Called, if a new view type is added to view manager.

Specified by:
viewTypeAdded in interface ViewManager.ViewManagerListener
Parameters:
viewType - the type of the new view.

windowActivated

public void windowActivated(WindowEvent e)
Invoked when the Window is set to be the active Window.

Specified by:
windowActivated in interface WindowListener
Parameters:
e - the WindowEvent to be processed.

windowClosed

public void windowClosed(WindowEvent e)
Invoked when a window has been closed as the result of calling dispose on the window.

Specified by:
windowClosed in interface WindowListener
Parameters:
e - the WindowEvent to be processed.

windowClosing

public void windowClosing(WindowEvent e)
Invoked when the user attempts to close the window from the window's system menu.

Specified by:
windowClosing in interface WindowListener
Parameters:
e - the WindowEvent to be processed.

windowDeactivated

public void windowDeactivated(WindowEvent e)
Invoked when a Window is no longer the active Window.

Specified by:
windowDeactivated in interface WindowListener
Parameters:
e - the WindowEvent to be processed.

windowDeiconified

public void windowDeiconified(WindowEvent e)
Invoked when a window is changed from a minimized to a normal state.

Specified by:
windowDeiconified in interface WindowListener
Parameters:
e - the WindowEvent to be processed.

windowIconified

public void windowIconified(WindowEvent e)
Invoked when a window is changed from a normal to a minimized state.

Specified by:
windowIconified in interface WindowListener
Parameters:
e - the WindowEvent to be processed.

windowOpened

public void windowOpened(WindowEvent e)
Invoked the first time a window is made visible.

Specified by:
windowOpened in interface WindowListener
Parameters:
e - the WindowEvent to be processed.

showError

protected void showError(String msg)
Shows an error in a modal dialog box.

Parameters:
msg - the message to be shown.

fireViewChanged

void fireViewChanged(View newView)
Method fireViewChanged.

Parameters:
newView -

getStatusBar

public StatusBar getStatusBar()
Returns the statusBar.

Returns:
the statusBar.

getViewportEventDispatcher

public ViewportEventDispatcher getViewportEventDispatcher()

addNewSession

public Session addNewSession()


Generated at 2012-05-30 11:00:36 PM CEST