Package org.graffiti.editor
Class MainFrame
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.graffiti.editor.MainFrame
- All Implemented Interfaces:
DropTargetListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
,UndoableEditListener
,RootPaneContainer
,WindowConstants
,IOManager.IOManagerListener
,PluginManagerListener
,ViewManager.ViewManagerListener
,SelectionListener
,SessionListener
,SessionManager
public class MainFrame extends JFrame implements SessionManager, SessionListener, PluginManagerListener, UndoableEditListener, IOManager.IOManagerListener, ViewManager.ViewManagerListener, SelectionListener, DropTargetListener
Constructs a new graffiti frame, which contains the main gui components.
- Version:
- $Revision: 1.164.2.2 $
- See Also:
- Serialized Form
- Recent revisions:
- 2.7.0
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MainFrame.HideOrDeactivateMenu
Nested classes/interfaces inherited from class java.awt.Window
Window.Type
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior
-
Field Summary
Fields Modifier and Type Field Description static boolean
blockUpdates
AtomicBoolean
cancelledSaveAction
Set, when external dialog's been cancelled, to restore flow.GraffitiAction
fileClose
The main frame's static actionsstatic Dimension
PREFERRED_INTERNALFRAME_SIZE
The size of an internal frame for first displaying.JComponent
sidepanel
static int
SIZE_HEIGHT
The default height of the main frame.static int
SIZE_WIDTH
The default width of the main frame.static int
VERT_SPLITTER
The number of pixels for the vertical splitter's divider location.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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
-
Constructor Summary
Constructors Constructor Description MainFrame()
MainFrame(PluginManager pluginmgr, Preferences prefs)
Constructs a newMainFrame
.MainFrame(PluginManager pluginmgr, Preferences prefs, JPanel progressPanel, boolean showVantedHelp)
Constructs a newMainFrame
. -
Method Summary
Modifier and Type Method Description void
addDetachedFrame(GraffitiFrame frame)
JMenu
addMenuItemForAlgorithmOrExtension(JMenuItem item, String cat)
Adds a menu item to the menu given a category The menuitem's action should be a GraffitiAction with the implemented Action that is called, when the user clicks on that menu item The category string defines the place, where this item is places The category string is a '.'-separated string, where each token represents a parental level of the items path e.g.void
addNewRecentFileMenuItem(File file)
void
addSelectionListener(SelectionListener sl)
Adds aSelectionListener
.void
addSession(Session s)
Adds the given session to the list of sessions.void
addSessionListener(SessionListener sl)
Adds aSessionListener
.void
addStatusPanel(JPanel panel)
void
addViewListener(ViewListener vl)
void
closeGravisto()
boolean
closeSession(Session session)
Closes all views of the given session and removes the session from the list of sessions.View
createExternalFrame(String viewClassName, String framename, EditorSession session, boolean otherViewWillBeClosed, boolean fullscreen, int x, int y, int w, int h)
View
createExternalFrame(String viewClassName, EditorSession session, boolean otherViewWillBeClosed, boolean fullscreen, int x, int y, int w, int h)
JScrollPane
createInternalFrame(String viewName, String newFrameTitle, boolean returnScrollpane, boolean otherViewWillBeClosed)
Creates and adds a new internal frame to the desktop within an existing session.View
createInternalFrame(String viewClassName, String newFrameTitle, EditorSession session, boolean otherViewWillBeClosed)
Object
createInternalFrame(String viewName, String newFrameTitle, EditorSession session, boolean returnScrollPane, boolean returnGraffitiFrame, boolean otherViewWillBeClosed)
Object
createInternalFrame(String viewName, String newFrameTitle, EditorSession session, boolean returnScrollPane, boolean returnGraffitiFrame, boolean otherViewWillBeClosed, ConfigureViewAction configNewView, boolean addViewToEditorSession)
Creates and adds a new internal frame to the desktop within a new session.JScrollPane
createInternalFrame(String viewName, String newFrameTitle, EditorSession session, boolean returnScrollpane, boolean otherViewWillBeClosed, ConfigureViewAction c)
View
createInternalFrame(String viewClassName, EditorSession session, boolean otherViewWillBeClosed)
EditorSession
createNewSession()
Creates and returns a new editor session.EditorSession
createNewSession(Graph g)
void
dragEnter(DropTargetDragEvent dtde)
void
dragExit(DropTargetEvent dte)
void
dragOver(DropTargetDragEvent dtde)
void
drop(DropTargetDropEvent e)
void
dropActionChanged(DropTargetDragEvent dtde)
void
fireSelectionChanged(EditorSession session)
void
fireSessionChanged(Session session)
Informs allSessionListener
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.void
frameClosing(EditorSession session, View view)
URLattributeActionManager
getActionManager()
GraffitiFrame
getActiveDetachedFrame()
EditorSession
getActiveEditorSession()
Returns the current active editor session.Session
getActiveSession()
Returns the current active session.AttributeComponentManager
getAttributeComponentManager()
String
getDefaultView()
Returns the defaultView.JDesktopPane
getDesktop()
GraffitiFrame[]
getDetachedFrames()
EditComponentManager
getEditComponentManager()
DOCUMENT ME!Session
getEditorSessionForGraph(Graph graph)
static Set<EditorSession>
getEditorSessions()
Graph
getGraph(File file)
Graph
getGraph(String fileName, URL url)
Graph
getGraph(IOurl url)
Graph
getGraph(IOurl url, String fileName)
Will not be able to read cluster information (in separate file) for ".net" files and .gz-filesstatic MainFrame.HideOrDeactivateMenu
getHideDeactivateSwitch()
InspectorPlugin
getInspectorPlugin()
static MainFrame
getInstance()
IOManager
getIoManager()
DOCUMENT ME!JMenuBar
getJMenuBar()
int
getNumberOfOpenSessions()
PluginManager
getPluginManager()
DOCUMENT ME!static Rectangle
getRelativeCenterPosition(JDialog md)
SessionManager
getSessionManager()
DOCUMENT ME!static Set<Session>
getSessions()
Iterator<Session>
getSessionsIterator()
Returns an iterator over all sessions.UndoableEditSupport
getUndoSupport()
Returns the class for undoSupport.ViewManager
getViewManager()
Returns the viewManager.void
inputSerializerAdded(InputSerializer is)
Called, if an input serializer is added to the io manager.void
installDragNDropForGraphFiles(JButton target)
boolean
isGraphLoadingInProgress()
boolean
isInputSerializerKnown(File file)
boolean
isSessionActive()
Returnstrue
, if a session is active.boolean
isTaskPanelVisible(String string)
static boolean
isViewProvidingToolbar(View view)
void
loadGraph(File file)
Loads a graph from a file;Graph
loadGraph(String fileName, URL url)
Loads a graph from a file;void
loadGraphInBackground(File[] proposedFiles, ActionEvent ae, boolean autoSwitch)
void
loadGraphInBackground(File file, ActionEvent ae, boolean autoSwitch)
Loads a graph in the background (using a background thread).boolean
lookUpAndSwitchToNamedSession(String fileName)
EditorSession
lookUpNamedSession(String fileName)
EditorSession
lookUpSession(Graph g, boolean createIfNotFound)
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.boolean
promptClosing(Session session)
This delegates the session closing down below the method chain, given the user has not chosen 'Cancel'.void
removeDetachedFrame(GraffitiFrame frame)
void
removeSelectionListener(SelectionListener sl)
Removes aSelectionListener
.void
removeSession(Session s)
Removes the session from the list of sessions.void
removeSessionListener(SessionListener sl)
Removes aSessionListener
.void
saveActiveFile()
void
saveActiveFileAs()
void
saveGraphAs(Graph graph, String fileName, String fileTypeDescription)
void
selectionChanged(SelectionEvent e)
Is called, if something in the selection model changed.void
selectionListChanged(SelectionEvent e)
Is called, if a named selection is added or removed.void
sessionChanged(Session s)
Invoked when the session changed.void
sessionDataChanged(Session s)
Invoked when the session data changed.void
setActiveSession(Session s, View targetView)
Sets the current active session.void
setGUIcomponent(String id, JComponent o)
static void
setHideDeactivateSwitch(MainFrame.HideOrDeactivateMenu hideDeactivateSwitch)
void
setSidePanel(int width)
void
setSidePanel(JToolBar component, int width)
void
setTitle(String title)
void
setVisible(boolean b)
void
showAndHighlightSidePanelSubTab(String tabtitle, String subtabtitle)
void
showAndHighlightSidePanelTab(String title, boolean cycle)
void
showGraph(Graph g, ActionEvent e)
void
showGraph(Graph g, ActionEvent e, LoadSetting interaction)
static void
showMessage(String message, MessageType type)
MethodshowMesssage
displays a message on GUI components according to the specified type.static void
showMessage(String message, MessageType type, int timeMillis)
MethodshowMesssage
displays a message on GUI components according to the specified type for the given interval.void
showMessageDialog(String msg)
Shows an arbitrary message dialog.static void
showMessageDialog(String msg, String title)
Shows an arbitrary message dialog.static void
showMessageDialog(String title, JComponent comp)
static void
showMessageDialogPlain(String title, JComponent comp)
static void
showMessageDialogWithScrollBars(String msg, String title)
static void
showMessageDialogWithScrollBars2(String msg, String title)
static JFrame
showMessageWindow(String title, JComponent jc)
static JFrame
showMessageWindow(String title, JComponent jc, boolean show)
static void
showMessageWindowUpdate(JFrame jf, String title, JComponent jc)
JScrollPane
showViewChooserDialog(boolean returnScrollpane, boolean useDefaultViewForSmallGraphs, ActionEvent ae)
MethodshowViewChooserDialog
invokes a view chooser dialog for choosing view types.JScrollPane
showViewChooserDialog(EditorSession session, boolean returnScrollPane, ActionEvent e)
JScrollPane
showViewChooserDialog(EditorSession session, boolean returnScrollPane, ActionEvent e, LoadSetting interaction)
JScrollPane
showViewChooserDialog(EditorSession session, boolean returnScrollPane, ActionEvent e, LoadSetting interaction, ConfigureViewAction configNewView)
MethodshowViewChooserDialog
invokes a view chooser dialog for choosing view types.static void
showWarningPopup(String text, int time)
static void
showWarningPopup(String text, int time, Collection<WarningButton> bts)
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
warnUserAboutFileSaveProblem(Exception ioe)
Methods inherited from class javax.swing.JFrame
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, 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, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
PREFERRED_INTERNALFRAME_SIZE
The size of an internal frame for first displaying. -
blockUpdates
public static boolean blockUpdates -
fileClose
The main frame's static actions -
sidepanel
-
cancelledSaveAction
Set, when external dialog's been cancelled, to restore flow. -
SIZE_WIDTH
static final int SIZE_WIDTHThe default width of the main frame.- See Also:
- Constant Field Values
-
SIZE_HEIGHT
static final int SIZE_HEIGHTThe default height of the main frame.- See Also:
- Constant Field Values
-
VERT_SPLITTER
static final int VERT_SPLITTERThe number of pixels for the vertical splitter's divider location.- See Also:
- Constant Field Values
-
-
Constructor Details
-
MainFrame
public MainFrame() -
MainFrame
Constructs a newMainFrame
.- Parameters:
pluginmgr
- DOCUMENT ME!prefs
- DOCUMENT ME!
-
MainFrame
public MainFrame(PluginManager pluginmgr, Preferences prefs, JPanel progressPanel, boolean showVantedHelp)Constructs a newMainFrame
.- Parameters:
pluginmgr
- DOCUMENT ME!prefs
- DOCUMENT ME!
-
-
Method Details
-
setTitle
-
getHideDeactivateSwitch
-
setHideDeactivateSwitch
-
getActiveEditorSession
Returns the current active editor session.- Returns:
- the current active editor session.
-
getActiveSession
Returns the current active session.- Specified by:
getActiveSession
in interfaceSessionManager
- Returns:
- the current active session.
-
setActiveSession
Sets the current active session.- Parameters:
s
- The session to be activated.
-
getDefaultView
Returns the defaultView.- Returns:
- String
-
getAttributeComponentManager
- Returns:
- the global Attribute Component Manager
- Since:
- 2.7.0
-
getEditComponentManager
DOCUMENT ME!- Returns:
- the global Edit Component Manager
-
getIoManager
DOCUMENT ME!- Returns:
- the global IO Manager
-
getPluginManager
DOCUMENT ME!- Returns:
- the global Plugin Manager
-
isSessionActive
public boolean isSessionActive()Returnstrue
, if a session is active.- Specified by:
isSessionActive
in interfaceSessionManager
- Returns:
- DOCUMENT ME!
-
getSessionManager
DOCUMENT ME!- Returns:
- the global Session Manager
-
getSessions
-
getEditorSessions
-
getSessionsIterator
Returns an iterator over all sessions.- Specified by:
getSessionsIterator
in interfaceSessionManager
- Returns:
- an iterator over all sessions.
- See Also:
Session
-
getUndoSupport
Returns the class for undoSupport.- Returns:
- the class for undoSupport.
-
getViewManager
Returns the viewManager.- Returns:
- ViewManager
-
addSelectionListener
Adds aSelectionListener
.- Parameters:
sl
- DOCUMENT ME!
-
removeSession
Removes the session from the list of sessions.- Parameters:
s
- the session to remove.- Since:
- 2.7.0
-
addSession
Adds the given session to the list of sessions.- Specified by:
addSession
in interfaceSessionManager
- Parameters:
s
- the new session to add.
-
addSessionListener
Adds aSessionListener
.- Specified by:
addSessionListener
in interfaceSessionManager
- Parameters:
sl
- DOCUMENT ME!
-
addViewListener
-
createInternalFrame
public JScrollPane createInternalFrame(String viewName, String newFrameTitle, boolean returnScrollpane, boolean otherViewWillBeClosed)Creates and adds a new internal frame to the desktop within an existing session.- Parameters:
viewName
- a name of the new viewnewFrameTitle
- the title for the frame, ifnull
or the empty String no title will be set.returnScrollpane
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
createInternalFrame
public JScrollPane createInternalFrame(String viewName, String newFrameTitle, EditorSession session, boolean returnScrollpane, boolean otherViewWillBeClosed, ConfigureViewAction c) -
createInternalFrame
public Object createInternalFrame(String viewName, String newFrameTitle, EditorSession session, boolean returnScrollPane, boolean returnGraffitiFrame, boolean otherViewWillBeClosed) -
createInternalFrame
public Object createInternalFrame(String viewName, String newFrameTitle, EditorSession session, boolean returnScrollPane, boolean returnGraffitiFrame, boolean otherViewWillBeClosed, ConfigureViewAction configNewView, boolean addViewToEditorSession)Creates and adds a new internal frame to the desktop within a new session.- Parameters:
viewName
- a name of the new viewnewFrameTitle
- the title for the frame, ifnull
or the empty String no title will be set.session
- a new session.returnScrollPane
- A scrollpane or a graffitiinternalframe- Returns:
- DOCUMENT ME!
- Throws:
RuntimeException
- DOCUMENT ME!
-
createNewSession
Creates and returns a new editor session.- Returns:
- New session
-
createNewSession
-
fireSessionChanged
Informs allSessionListener
s that the active session has changed.- Parameters:
session
- DOCUMENT ME!
-
fireSelectionChanged
-
fireSessionDataChanged
Called, if the session or data (except graph data) in the session have been changed.- Specified by:
fireSessionDataChanged
in interfaceSessionManager
- Parameters:
session
- DOCUMENT ME!
-
inputSerializerAdded
Description copied from interface:IOManager.IOManagerListener
Called, if an input serializer is added to the io manager.- Specified by:
inputSerializerAdded
in interfaceIOManager.IOManagerListener
- Parameters:
is
- the input serializer, which was added to the manager.
-
loadGraph
Loads a graph from a file;- Parameters:
file
- File containing the graph;
-
getGraph
-
loadGraphInBackground
public void loadGraphInBackground(File file, ActionEvent ae, boolean autoSwitch) throws IllegalAccessException, InstantiationExceptionLoads a graph in the background (using a background thread). During loading a progress bar is shown. Do not use this command if you want to work with a given graph after loading a file. The graph will not be completely loaded or shown after this method returns. Instead the graph will be shown as soon as the file loading is finished.- Parameters:
file
- or url- Throws:
IllegalAccessException
InstantiationException
-
loadGraphInBackground
public void loadGraphInBackground(File[] proposedFiles, ActionEvent ae, boolean autoSwitch) throws IllegalAccessException, InstantiationException -
addNewRecentFileMenuItem
-
loadGraph
Loads a graph from a file;- Parameters:
file
- File containing the graph;
-
getGraph
- Throws:
Exception
-
getGraph
- Throws:
Exception
-
getGraph
Will not be able to read cluster information (in separate file) for ".net" files and .gz-files- Parameters:
inps
-fileName
-- Returns:
- Throws:
Exception
-
isInputSerializerKnown
-
saveGraphAs
- Throws:
Exception
-
showGraph
-
showGraph
-
outputSerializerAdded
Description copied from interface:IOManager.IOManagerListener
Called, if an output serializer ist added to the io manager.- Specified by:
outputSerializerAdded
in interfaceIOManager.IOManagerListener
- Parameters:
os
- the output serializer, which was added to the manager.
-
pluginAdded
Called by the plugin manager, iff a plugin has been added.- Specified by:
pluginAdded
in interfacePluginManagerListener
- Parameters:
plugin
- the added plugin.desc
- the description of the new plugin.
-
getInspectorPlugin
-
addMenuItemForAlgorithmOrExtension
Adds a menu item to the menu given a category The menuitem's action should be a GraffitiAction with the implemented Action that is called, when the user clicks on that menu item The category string defines the place, where this item is places The category string is a '.'-separated string, where each token represents a parental level of the items path e.g. cat="New.Random" would put the menuitem 'item' in the submenu Random under New- Parameters:
action
-cat
-
-
getJMenuBar
- Overrides:
getJMenuBar
in classJFrame
-
removeSelectionListener
Removes aSelectionListener
.- Parameters:
sl
- DOCUMENT ME!
-
saveActiveFileAs
public void saveActiveFileAs() -
saveActiveFile
public void saveActiveFile() -
promptClosing
This delegates the session closing down below the method chain, given the user has not chosen 'Cancel'. In this case it simply returns. Used for processing the closing of the external GraffitiFrame, encapsulating the above mentioned goals.Code originates from the closeSession() method. Now there is placed only a method call instead.
- Parameters:
session
- current active Session- Returns:
- true if the frame should be closed.
-
closeSession
Closes all views of the given session and removes the session from the list of sessions.- Specified by:
closeSession
in interfaceSessionManager
- Parameters:
session
- the session to be removed.- Returns:
- true if the session has been closed
-
removeSessionListener
Removes aSessionListener
.- Specified by:
removeSessionListener
in interfaceSessionManager
- Parameters:
sl
- DOCUMENT ME!
-
sessionChanged
Invoked when the session changed.- Specified by:
sessionChanged
in interfaceSessionListener
- Parameters:
s
- the new session.
-
sessionDataChanged
Invoked when the session data changed.- Specified by:
sessionDataChanged
in interfaceSessionListener
- Parameters:
s
- DOCUMENT ME!
-
showMessage
MethodshowMesssage
displays a message on GUI components according to the specified type. The message will be displayed for some defined number of seconds. This method can be called from a background thread.- Parameters:
message
- a message string to be displayedtype
- a type of the message (e.g. MessageType.INFO)
-
showMessage
MethodshowMesssage
displays a message on GUI components according to the specified type for the given interval. This method is thread safe.- Parameters:
message
- a message string to be displayedtype
- a type of the message (e.g. ERROR)timeMillis
- number of milliseconds the message should be displayed
-
showViewChooserDialog
public JScrollPane showViewChooserDialog(boolean returnScrollpane, boolean useDefaultViewForSmallGraphs, ActionEvent ae)MethodshowViewChooserDialog
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 JScrollPane showViewChooserDialog(EditorSession session, boolean returnScrollPane, ActionEvent e) -
showViewChooserDialog
public JScrollPane showViewChooserDialog(EditorSession session, boolean returnScrollPane, ActionEvent e, LoadSetting interaction) -
showViewChooserDialog
public JScrollPane showViewChooserDialog(EditorSession session, boolean returnScrollPane, ActionEvent e, LoadSetting interaction, ConfigureViewAction configNewView)MethodshowViewChooserDialog
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!e
-interaction
-- Returns:
- DOCUMENT ME!
-
undoableEditHappened
This method is called when an undoableEdit happened.- Specified by:
undoableEditHappened
in interfaceUndoableEditListener
- See Also:
UndoableEditListener
-
updateActions
public void updateActions()Updates the state of the actions. -
viewTypeAdded
Description copied from interface:ViewManager.ViewManagerListener
Called, if a new view type is added to view manager.- Specified by:
viewTypeAdded
in interfaceViewManager.ViewManagerListener
- Parameters:
viewType
- the type of the new view.
-
showMessageDialog
Shows an arbitrary message dialog.- Parameters:
msg
- the message to be shown.
-
setGUIcomponent
-
showMessageDialog
Shows an arbitrary message dialog.- Parameters:
msg
- the message to be shown.
-
showMessageDialogWithScrollBars
-
showMessageDialogWithScrollBars2
-
getInstance
-
installDragNDropForGraphFiles
-
closeGravisto
public void closeGravisto() -
addStatusPanel
- Parameters:
panel
- A status panel that will be shown in the progress area. A timer calls isVisible to this panel. If it is not visible any more, it will be removed from the status area.
-
selectionChanged
Description copied from interface:SelectionListener
Is called, if something in the selection model changed.- Specified by:
selectionChanged
in interfaceSelectionListener
-
selectionListChanged
Description copied from interface:SelectionListener
Is called, if a named selection is added or removed.- Specified by:
selectionListChanged
in interfaceSelectionListener
-
getDetachedFrames
-
addDetachedFrame
-
removeDetachedFrame
-
getActiveDetachedFrame
-
getRelativeCenterPosition
-
dragEnter
- Specified by:
dragEnter
in interfaceDropTargetListener
-
dragOver
- Specified by:
dragOver
in interfaceDropTargetListener
-
dropActionChanged
- Specified by:
dropActionChanged
in interfaceDropTargetListener
-
dragExit
- Specified by:
dragExit
in interfaceDropTargetListener
-
drop
- Specified by:
drop
in interfaceDropTargetListener
-
showMessageDialog
-
showMessageDialogPlain
-
showMessageWindowUpdate
-
showMessageWindow
-
showMessageWindow
-
isTaskPanelVisible
-
lookUpAndSwitchToNamedSession
-
lookUpSession
-
lookUpNamedSession
-
getActionManager
-
frameClosing
-
setVisible
public void setVisible(boolean b)- Overrides:
setVisible
in classWindow
-
createExternalFrame
public View createExternalFrame(String viewClassName, EditorSession session, boolean otherViewWillBeClosed, boolean fullscreen, int x, int y, int w, int h) -
createExternalFrame
public View createExternalFrame(String viewClassName, String framename, EditorSession session, boolean otherViewWillBeClosed, boolean fullscreen, int x, int y, int w, int h) -
createInternalFrame
public View createInternalFrame(String viewClassName, EditorSession session, boolean otherViewWillBeClosed) -
createInternalFrame
public View createInternalFrame(String viewClassName, String newFrameTitle, EditorSession session, boolean otherViewWillBeClosed) -
showAndHighlightSidePanelSubTab
-
showAndHighlightSidePanelTab
-
setSidePanel
-
setSidePanel
public void setSidePanel(int width) -
warnUserAboutFileSaveProblem
-
getDesktop
-
isViewProvidingToolbar
-
getEditorSessionForGraph
- Parameters:
graph
-- Returns:
-
getNumberOfOpenSessions
public int getNumberOfOpenSessions() -
isGraphLoadingInProgress
public boolean isGraphLoadingInProgress() -
showWarningPopup
-
showWarningPopup
-