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 classMainFrame.HideOrDeactivateMenuNested classes/interfaces inherited from class java.awt.Window
Window.TypeNested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior -
Field Summary
Fields Modifier and Type Field Description static booleanblockUpdatesAtomicBooleancancelledSaveActionSet, when external dialog's been cancelled, to restore flow.GraffitiActionfileCloseThe main frame's static actionsstatic DimensionPREFERRED_INTERNALFRAME_SIZEThe size of an internal frame for first displaying.JComponentsidepanelstatic intSIZE_HEIGHTThe default height of the main frame.static intSIZE_WIDTHThe default width of the main frame.static intVERT_SPLITTERThe 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_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields 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 voidaddDetachedFrame(GraffitiFrame frame)JMenuaddMenuItemForAlgorithmOrExtension(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.voidaddNewRecentFileMenuItem(File file)voidaddSelectionListener(SelectionListener sl)Adds aSelectionListener.voidaddSession(Session s)Adds the given session to the list of sessions.voidaddSessionListener(SessionListener sl)Adds aSessionListener.voidaddStatusPanel(JPanel panel)voidaddViewListener(ViewListener vl)voidcloseGravisto()booleancloseSession(Session session)Closes all views of the given session and removes the session from the list of sessions.ViewcreateExternalFrame(String viewClassName, String framename, EditorSession session, boolean otherViewWillBeClosed, boolean fullscreen, int x, int y, int w, int h)ViewcreateExternalFrame(String viewClassName, EditorSession session, boolean otherViewWillBeClosed, boolean fullscreen, int x, int y, int w, int h)JScrollPanecreateInternalFrame(String viewName, String newFrameTitle, boolean returnScrollpane, boolean otherViewWillBeClosed)Creates and adds a new internal frame to the desktop within an existing session.ViewcreateInternalFrame(String viewClassName, String newFrameTitle, EditorSession session, boolean otherViewWillBeClosed)ObjectcreateInternalFrame(String viewName, String newFrameTitle, EditorSession session, boolean returnScrollPane, boolean returnGraffitiFrame, boolean otherViewWillBeClosed)ObjectcreateInternalFrame(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.JScrollPanecreateInternalFrame(String viewName, String newFrameTitle, EditorSession session, boolean returnScrollpane, boolean otherViewWillBeClosed, ConfigureViewAction c)ViewcreateInternalFrame(String viewClassName, EditorSession session, boolean otherViewWillBeClosed)EditorSessioncreateNewSession()Creates and returns a new editor session.EditorSessioncreateNewSession(Graph g)voiddragEnter(DropTargetDragEvent dtde)voiddragExit(DropTargetEvent dte)voiddragOver(DropTargetDragEvent dtde)voiddrop(DropTargetDropEvent e)voiddropActionChanged(DropTargetDragEvent dtde)voidfireSelectionChanged(EditorSession session)voidfireSessionChanged(Session session)Informs allSessionListeners that the active session has changed.voidfireSessionDataChanged(Session session)Called, if the session or data (except graph data) in the session have been changed.voidframeClosing(EditorSession session, View view)URLattributeActionManagergetActionManager()GraffitiFramegetActiveDetachedFrame()EditorSessiongetActiveEditorSession()Returns the current active editor session.SessiongetActiveSession()Returns the current active session.AttributeComponentManagergetAttributeComponentManager()StringgetDefaultView()Returns the defaultView.JDesktopPanegetDesktop()GraffitiFrame[]getDetachedFrames()EditComponentManagergetEditComponentManager()DOCUMENT ME!SessiongetEditorSessionForGraph(Graph graph)static Set<EditorSession>getEditorSessions()GraphgetGraph(File file)GraphgetGraph(String fileName, URL url)GraphgetGraph(IOurl url)GraphgetGraph(IOurl url, String fileName)Will not be able to read cluster information (in separate file) for ".net" files and .gz-filesstatic MainFrame.HideOrDeactivateMenugetHideDeactivateSwitch()InspectorPlugingetInspectorPlugin()static MainFramegetInstance()IOManagergetIoManager()DOCUMENT ME!JMenuBargetJMenuBar()intgetNumberOfOpenSessions()PluginManagergetPluginManager()DOCUMENT ME!static RectanglegetRelativeCenterPosition(JDialog md)SessionManagergetSessionManager()DOCUMENT ME!static Set<Session>getSessions()Iterator<Session>getSessionsIterator()Returns an iterator over all sessions.UndoableEditSupportgetUndoSupport()Returns the class for undoSupport.ViewManagergetViewManager()Returns the viewManager.voidinputSerializerAdded(InputSerializer is)Called, if an input serializer is added to the io manager.voidinstallDragNDropForGraphFiles(JButton target)booleanisGraphLoadingInProgress()booleanisInputSerializerKnown(File file)booleanisSessionActive()Returnstrue, if a session is active.booleanisTaskPanelVisible(String string)static booleanisViewProvidingToolbar(View view)voidloadGraph(File file)Loads a graph from a file;GraphloadGraph(String fileName, URL url)Loads a graph from a file;voidloadGraphInBackground(File[] proposedFiles, ActionEvent ae, boolean autoSwitch)voidloadGraphInBackground(File file, ActionEvent ae, boolean autoSwitch)Loads a graph in the background (using a background thread).booleanlookUpAndSwitchToNamedSession(String fileName)EditorSessionlookUpNamedSession(String fileName)EditorSessionlookUpSession(Graph g, boolean createIfNotFound)voidoutputSerializerAdded(OutputSerializer os)Called, if an output serializer ist added to the io manager.voidpluginAdded(GenericPlugin plugin, PluginDescription desc)Called by the plugin manager, iff a plugin has been added.booleanpromptClosing(Session session)This delegates the session closing down below the method chain, given the user has not chosen 'Cancel'.voidremoveDetachedFrame(GraffitiFrame frame)voidremoveSelectionListener(SelectionListener sl)Removes aSelectionListener.voidremoveSession(Session s)Removes the session from the list of sessions.voidremoveSessionListener(SessionListener sl)Removes aSessionListener.voidsaveActiveFile()voidsaveActiveFileAs()voidsaveGraphAs(Graph graph, String fileName, String fileTypeDescription)voidselectionChanged(SelectionEvent e)Is called, if something in the selection model changed.voidselectionListChanged(SelectionEvent e)Is called, if a named selection is added or removed.voidsessionChanged(Session s)Invoked when the session changed.voidsessionDataChanged(Session s)Invoked when the session data changed.voidsetActiveSession(Session s, View targetView)Sets the current active session.voidsetGUIcomponent(String id, JComponent o)static voidsetHideDeactivateSwitch(MainFrame.HideOrDeactivateMenu hideDeactivateSwitch)voidsetSidePanel(int width)voidsetSidePanel(JToolBar component, int width)voidsetTitle(String title)voidsetVisible(boolean b)voidshowAndHighlightSidePanelSubTab(String tabtitle, String subtabtitle)voidshowAndHighlightSidePanelTab(String title, boolean cycle)voidshowGraph(Graph g, ActionEvent e)voidshowGraph(Graph g, ActionEvent e, LoadSetting interaction)static voidshowMessage(String message, MessageType type)MethodshowMesssagedisplays a message on GUI components according to the specified type.static voidshowMessage(String message, MessageType type, int timeMillis)MethodshowMesssagedisplays a message on GUI components according to the specified type for the given interval.voidshowMessageDialog(String msg)Shows an arbitrary message dialog.static voidshowMessageDialog(String msg, String title)Shows an arbitrary message dialog.static voidshowMessageDialog(String title, JComponent comp)static voidshowMessageDialogPlain(String title, JComponent comp)static voidshowMessageDialogWithScrollBars(String msg, String title)static voidshowMessageDialogWithScrollBars2(String msg, String title)static JFrameshowMessageWindow(String title, JComponent jc)static JFrameshowMessageWindow(String title, JComponent jc, boolean show)static voidshowMessageWindowUpdate(JFrame jf, String title, JComponent jc)JScrollPaneshowViewChooserDialog(boolean returnScrollpane, boolean useDefaultViewForSmallGraphs, ActionEvent ae)MethodshowViewChooserDialoginvokes a view chooser dialog for choosing view types.JScrollPaneshowViewChooserDialog(EditorSession session, boolean returnScrollPane, ActionEvent e)JScrollPaneshowViewChooserDialog(EditorSession session, boolean returnScrollPane, ActionEvent e, LoadSetting interaction)JScrollPaneshowViewChooserDialog(EditorSession session, boolean returnScrollPane, ActionEvent e, LoadSetting interaction, ConfigureViewAction configNewView)MethodshowViewChooserDialoginvokes a view chooser dialog for choosing view types.static voidshowWarningPopup(String text, int time)static voidshowWarningPopup(String text, int time, Collection<WarningButton> bts)voidundoableEditHappened(UndoableEditEvent e)This method is called when an undoableEdit happened.voidupdateActions()Updates the state of the actions.voidviewTypeAdded(String viewType)Called, if a new view type is added to view manager.voidwarnUserAboutFileSaveProblem(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, updateMethods 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, setUndecoratedMethods 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, toFrontMethods 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, validateMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getActiveSessionin 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:
isSessionActivein interfaceSessionManager- Returns:
- DOCUMENT ME!
-
getSessionManager
DOCUMENT ME!- Returns:
- the global Session Manager
-
getSessions
-
getEditorSessions
-
getSessionsIterator
Returns an iterator over all sessions.- Specified by:
getSessionsIteratorin 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:
addSessionin interfaceSessionManager- Parameters:
s- the new session to add.
-
addSessionListener
Adds aSessionListener.- Specified by:
addSessionListenerin 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, ifnullor 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, ifnullor 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 allSessionListeners 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:
fireSessionDataChangedin interfaceSessionManager- Parameters:
session- DOCUMENT ME!
-
inputSerializerAdded
Description copied from interface:IOManager.IOManagerListenerCalled, if an input serializer is added to the io manager.- Specified by:
inputSerializerAddedin 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:
IllegalAccessExceptionInstantiationException
-
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.IOManagerListenerCalled, if an output serializer ist added to the io manager.- Specified by:
outputSerializerAddedin 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:
pluginAddedin 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:
getJMenuBarin 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:
closeSessionin interfaceSessionManager- Parameters:
session- the session to be removed.- Returns:
- true if the session has been closed
-
removeSessionListener
Removes aSessionListener.- Specified by:
removeSessionListenerin interfaceSessionManager- Parameters:
sl- DOCUMENT ME!
-
sessionChanged
Invoked when the session changed.- Specified by:
sessionChangedin interfaceSessionListener- Parameters:
s- the new session.
-
sessionDataChanged
Invoked when the session data changed.- Specified by:
sessionDataChangedin interfaceSessionListener- Parameters:
s- DOCUMENT ME!
-
showMessage
MethodshowMesssagedisplays 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
MethodshowMesssagedisplays 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)MethodshowViewChooserDialoginvokes 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)MethodshowViewChooserDialoginvokes 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:
undoableEditHappenedin interfaceUndoableEditListener- See Also:
UndoableEditListener
-
updateActions
public void updateActions()Updates the state of the actions. -
viewTypeAdded
Description copied from interface:ViewManager.ViewManagerListenerCalled, if a new view type is added to view manager.- Specified by:
viewTypeAddedin 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:SelectionListenerIs called, if something in the selection model changed.- Specified by:
selectionChangedin interfaceSelectionListener
-
selectionListChanged
Description copied from interface:SelectionListenerIs called, if a named selection is added or removed.- Specified by:
selectionListChangedin interfaceSelectionListener
-
getDetachedFrames
-
addDetachedFrame
-
removeDetachedFrame
-
getActiveDetachedFrame
-
getRelativeCenterPosition
-
dragEnter
- Specified by:
dragEnterin interfaceDropTargetListener
-
dragOver
- Specified by:
dragOverin interfaceDropTargetListener
-
dropActionChanged
- Specified by:
dropActionChangedin interfaceDropTargetListener
-
dragExit
- Specified by:
dragExitin interfaceDropTargetListener
-
drop
- Specified by:
dropin interfaceDropTargetListener
-
showMessageDialog
-
showMessageDialogPlain
-
showMessageWindowUpdate
-
showMessageWindow
-
showMessageWindow
-
isTaskPanelVisible
-
lookUpAndSwitchToNamedSession
-
lookUpSession
-
lookUpNamedSession
-
getActionManager
-
frameClosing
-
setVisible
public void setVisible(boolean b)- Overrides:
setVisiblein 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
-