org.ceryle.ui
Class ViewManager

java.lang.Object
  extended by javax.swing.DefaultDesktopManager
      extended by org.ceryle.ui.ViewManager
All Implemented Interfaces:
Serializable, DesktopManager

public class ViewManager
extends DefaultDesktopManager

ViewManager extends javax.swing.DefaultDesktopManager to handle maintenance of various views, and keeping the menubar in sync with the selected window's state.

Provides an processor for managing ViewFrame Notes. In earlier incarnations the 'NoteProcessor' class imported and exported all Notes from a single XHTML file, which stored positioning and style information as metadata. That proved a bit fragile, and didn't take advantage of the metadata capabilities in the internal database. This version now stores the note content and its metadata in the internal XML database, and uses a separate XNode for each note. All specialized support for notes is now done in the ViewManager class, which is also more appropriate.

Since:
JDK1.3
Version:
$Id: ViewManager.java,v 3.37 2007-06-20 01:28:19 altheim Exp $
Author:
Murray Altheim
See Also:
Serialized Form

Field Summary
static Cursor dropCursor
          Cursors supporting drag and drop.
static int hTileLimit
          The maximum number of views to tile horizontally.
protected  DatabaseUtils m_dbutils
          The DatabaseUtils (re-)used as the Views.
protected  JDesktopPane m_dtp
          The JDesktopPane used as the container for most of the UI.
protected  Action newNote
          The Actions used to create new Views.
static Cursor noDropCursor
          Cursors supporting drag and drop.
protected  Action openDocumentView
          The Actions used to create new Views.
protected  Action openGraphView
          The Actions used to create new Views.
protected  Action openProjectView
          The Actions used to create new Views.
protected static boolean useKeyBindings
          When true, set up and use key bindings on the desktop.
static int vTileLimit
          The maximum number of views to tile vertically.
 
Constructor Summary
ViewManager(Desktop desktop)
          Constructor for ViewManager with the parent Desktop desktop.
 
Method Summary
 void activateFrame(JInternalFrame jif)
          Indicates JInternalFrame jif has focus, updating the menubar appropriately.
 boolean activateViewFrame(ViewFrame vf)
          This brings the ViewFrame vf to the front.
 void addPopUpFrame(PopUpWindow popup)
          Adds the PopUpWindow popup to the desktop, setting its size and displaying it.
 View addViewFrame(ViewFrame vf, String title, Rectangle bounds)
          Supplied with a View (e.g., DocumentView, GraphView, etc.), adds the View to a ViewFrame and registers it with this ViewManager.
 ProjectView asProject(View view)
          Embed the provided GraphView or DocumentView within a new ProjectView.
 View backgroundView(int type, String title, Rectangle bounds)
          Does exactly the same thing as createView(int,String,Rectangle) except that it does not set the resulting View as visible.
 void closeAllFrames()
          Closes any open ViewFrames.
 void closeFrame()
          Remove the current JInternalFrame from the registry and update View menu.
 void closeFrame(JInternalFrame jif)
          Remove JInternalFrame jif from the registry and update View menu.
 View createView(int type)
          Creates a new ViewFrame of the type specified, returning a reference to its internal JPanel extension (e.g., DocumentView, GraphView, etc.).
 View createView(int type, String title)
          Depending on the int type, creates a new DocumentView (View.NOTE or View.DOCUMENT), or GraphView (View.GRAPH) whose title is title, adds it to the desktop and the menu-based list of views, and finally, displays it.
 View createView(int type, String title, Rectangle bounds)
          Depending on the int type, creates a new DocumentView (View.NOTE or View.DOCUMENT), or GraphView (View.GRAPH), whose title is title, adds it to the desktop and the menu-based list of views, and finally, displays it.
 void cycleViewFrames(boolean forward)
          Cycle to the previous or next ViewFrame, depending on the boolean next, skipping null slots.
 void editCopy()
          Copy.
 void editCut()
          Cut.
 void editFind()
          Edit Find.
 void editFindNext()
          Edit Find Next.
 void editPaste()
          Paste.
 void editRedo()
          Redo.
 void editReplace()
          Edit Replace.
 void editSelectAll()
          Select All.
 void editUndo()
          Undo.
 void fileClose(boolean forced)
          Close the current document.
 void fileImport()
          Import an external file of an understood notation.
 void fileNew()
          Open a new document.
 void fileOpen()
          Open an external document.
 void fileSave()
          Save the current document to a file.
 void fileSave(File file)
          Save the current document to File file.
 void fileSetTitle()
          Sets the title of the current document.
 void find(boolean next)
          Calls the appropriate find method based on the current view.
 ViewFrame findViewFrame(String systemId)
          Return a ViewFrame whose systemId matches the provided value.
 DocumentView getAnyDocumentView()
          Return any DocumentView window, null if there are none available.
 GraphView getAnyGraphView()
          Return any GraphView window, null if there are none available.
 View getCurrentView()
          Returns the topmost ViewFrame's content View, null if none are available.
protected  ViewFrame getCurrentViewFrame()
          Returns the topmost ViewFrame currently not iconified, null if none are available.
 int getCurrentViewType()
          Return the type of the current view View.NOTE, View.DOCUMENT, or View.GRAPH.
 DatabaseUtils getDatabaseUtils()
          Returns the DatabaseUtils made available by this ViewManager.
 JDesktopPane getDesktop()
          Returns the JDesktopPane used by this ViewManager.
 Point getDesktopGridLocation(int x, int y)
          Return the location on the desktop of the upper-left corner of the quadrant specified by the grid coordinate (x,y), at the current grid resolution.
 DocumentView getDocumentView()
          Return the DocumentView contents of the current front ViewFrame if it is a ProjectView, DocumentView (in either mode), null if some other View type is selected (ie., in front).
 EditView getEditingView()
          Return the EditView API contents of the current front ViewFrame if it is a ProjectView, DocumentView, or NoteView, null if some other View type is selected (ie., in front).
 EditView getEditingView(boolean focusOnly)
          Return the EditView API contents of the current front ViewFrame if it is a ProjectView, DocumentView, or NoteView, null if some other View type is selected (ie., in front).
 Iterator getEditingViews()
          Return an Iterator over all EditView-compatible Views.
 int getFrontViewType()
          Returns the type of the frontmost View, ignoring Notes.
 GraphView getGraphView()
          Return the current front GraphView window, null if some other window type is selected (ie., in front).
 GraphView getGraphView(boolean focusOnly)
          Return the current front GraphView window, null if some other window type is selected (ie., in front).
 Iterator getGraphViews()
          Return an Iterator over all GraphViews.
 Point getGridCoordinate(Point loc)
          Return the closest grid coordinate of a provided Point loc on the desktop.
 IDFactory getIDFactory(String cid)
          Returns a lazily-created IDFactory.
protected  int getNextNoteNumber()
          Returns the next note number in sequence, permanently incrementing the note counter.
 int getNoteCount()
          Returns the current number of Notes.
 String getNotesCollectionID()
          Returns the Collection ID used for notes.
 String getNotesCollectionID(boolean query)
          Returns the Collection ID used for notes.
 DocumentView getNoteView()
          Return the DocumentView contents of the current front ViewFrame only if it is in Note mode.
 Rectangle getPopUpBounds()
          Returns a recommended bounds rectangle (size and location) for PopUpWindows, using the current desktop as a guide.
 ProjectView getProjectView()
          Return the ProjectView contents of the current front ViewFrame, null if some other View type is selected (ie., in front).
 int getViewCount(int type)
          Return the number of ViewFrames of int type.
 ViewFrame getViewFrame(String systemId)
          Returns the first ViewFrame matching the provided systemId, null if none match.
 Iterator getViews(int type)
          Return a Iterator over all ViewFrames of int type, an empty Iterator if there are none.
static int getViewType(ViewFrame viewframe)
          Provided a ViewFrame, returns the type of its internal View.
 void iconifyFrame()
          Indicates the selected JInternalFrame is to be iconified, and selects the next current front frame.
 void iconifyFrame(JInternalFrame jif)
          Indicates JInternalFrame jif is to be iconified, and selects the current front frame.
 boolean isEmpty()
          Returns true if this ViewManager contains no ViewFrames.
 DocumentView isNoteOpen(String nid)
          Returns the corresponding View if a note having the provided ID is open, null if not.
 View isOpen(String systemId)
          If there is an open View whose systemId matches the parameter, returns the View, otherwise null.
 void maximizeFrame()
          Maximizes the currently selected JInternalFrame.
 void maximizeFrame(JInternalFrame jif)
          Indicates JInternalFrame jif is to be maximized.
 void minimizeFrame()
          Indicates JInternalFrame jif is to be minimized (ie., un-maximized).
 void minimizeFrame(JInternalFrame jif)
          Indicates JInternalFrame jif is to be minimized (ie., un-maximized).
 void newNote()
          Creates a new Note, querying for a title, which is used to generate the XNode ID.
 boolean notesVisible()
          Returns true if there are any visible Notes.
 void openNote()
          Open a Note by its ID nid, stored as an XNode in the XNodeStore's default 'notes' Collection.
 void openNote(String nid)
          Open a Note by its ID nid, stored as an XNode in the XNodeStore's default 'notes' Collection.
 void parseBoundsInfo(DocumentView dv, String s)
          Parse the bounds data to set characteristics of the DocumentView.
 void parseStyleInfo(DocumentView dv, String s)
          Parse the style data to set characteristics of the DocumentView.
 void registerFrameTitle(ViewFrame vf)
          Registers a change to the title of the ViewFrame vf, updating the View menu accordingly.
 void scrollToLine(int line)
          Scroll To Line.
 void setDatabaseToolsVisible(boolean visible)
          Toggle Database ToolBar visibility.
 void setDesktopImage()
          Sets an image used as the background of the JDesktopPane.
 void setGridResolution(int resolution)
          Set the grid resolution, i.e., the number of grid squares in which to divide the desktop (x and y resolution is always the same).
 void setNotesVisible(boolean visible)
          Set the visibility of any Notes to the boolean visible.
 void setViewBounds(ViewFrame vf)
          Sets the bounds (size and location) of ViewFrame vf, using the slot number and current desktop size as a guide.
 void tileHorizontally()
          Tiles the current Views horizontally.
 void tileVertically()
          Tiles the current Views vertically.
 void toggleGraphToolsVisibility()
          Toggle Graph ToolBar visibility.
 void toggleQueryToolsVisibility()
          Toggle ToolBar visibility.
 void toggleToolsVisibility()
          Set Tool Visiblity.
 void updateDocumentViews()
          Causes any editing views to re-index their collection and node lists.
 int viewCount(boolean includeNotes)
          Returns the number of ViewFrames, including those iconified.
 
Methods inherited from class javax.swing.DefaultDesktopManager
beginDraggingFrame, beginResizingFrame, deactivateFrame, deiconifyFrame, dragFrame, endDraggingFrame, endResizingFrame, getBoundsForIconOf, getPreviousBounds, openFrame, removeIconFor, resizeFrame, setBoundsForFrame, setPreviousBounds, setWasIcon, wasIcon
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hTileLimit

public static int hTileLimit
The maximum number of views to tile horizontally. Default is 5.


vTileLimit

public static int vTileLimit
The maximum number of views to tile vertically. Default is 5.


m_dtp

protected final JDesktopPane m_dtp
The JDesktopPane used as the container for most of the UI.


m_dbutils

protected DatabaseUtils m_dbutils
The DatabaseUtils (re-)used as the Views.


useKeyBindings

protected static boolean useKeyBindings
When true, set up and use key bindings on the desktop. Default is true.


dropCursor

public static Cursor dropCursor
Cursors supporting drag and drop.


noDropCursor

public static Cursor noDropCursor
Cursors supporting drag and drop.


newNote

protected Action newNote
The Actions used to create new Views.


openProjectView

protected Action openProjectView
The Actions used to create new Views.


openDocumentView

protected Action openDocumentView
The Actions used to create new Views.


openGraphView

protected Action openGraphView
The Actions used to create new Views.

Constructor Detail

ViewManager

public ViewManager(Desktop desktop)
Constructor for ViewManager with the parent Desktop desktop.

Method Detail

getDesktop

public JDesktopPane getDesktop()
Returns the JDesktopPane used by this ViewManager.


getDatabaseUtils

public DatabaseUtils getDatabaseUtils()
Returns the DatabaseUtils made available by this ViewManager. Lazily-created.


getNotesCollectionID

public String getNotesCollectionID()
Returns the Collection ID used for notes.


getNotesCollectionID

public String getNotesCollectionID(boolean query)
Returns the Collection ID used for notes. If the XNodeCollection doesn't exist it the user will be queried if the provided parameter is true, otherwise a null is returned.


setDesktopImage

public void setDesktopImage()
Sets an image used as the background of the JDesktopPane.


createView

public View createView(int type)
Creates a new ViewFrame of the type specified, returning a reference to its internal JPanel extension (e.g., DocumentView, GraphView, etc.). This uses the default title for each type, except for Notes, which involve a user query.

Parameters:
type - the type of View to be created
Returns:
a reference to the View's internal content

createView

public View createView(int type,
                       String title)
Depending on the int type, creates a new DocumentView (View.NOTE or View.DOCUMENT), or GraphView (View.GRAPH) whose title is title, adds it to the desktop and the menu-based list of views, and finally, displays it.

Parameters:
type - the type of View to be created
title - the View title
Returns:
the View content of the ViewFrame (eg., the DocumentView, GraphView, etc.)

createView

public View createView(int type,
                       String title,
                       Rectangle bounds)
Depending on the int type, creates a new DocumentView (View.NOTE or View.DOCUMENT), or GraphView (View.GRAPH), whose title is title, adds it to the desktop and the menu-based list of views, and finally, displays it.

Parameters:
type - the type of View to be created
title - the View title
bounds - the optional bounding rectangle of the created View
Returns:
the View content of the ViewFrame (eg., the DocumentView, GraphView, etc.)

asProject

public ProjectView asProject(View view)
Embed the provided GraphView or DocumentView within a new ProjectView. The ViewFrame of the supplied View will be removed.

Returns:
the newly-created ProjectView

addViewFrame

public View addViewFrame(ViewFrame vf,
                         String title,
                         Rectangle bounds)
Supplied with a View (e.g., DocumentView, GraphView, etc.), adds the View to a ViewFrame and registers it with this ViewManager. This also adds it to the desktop and the menu-based list of views, and finally, displays it.

Parameters:
vf - the ViewFrame to be added
title - the View title
bounds - the optional bounding rectangle of the created View
Returns:
the supplied View content of the ViewFrame is returned

backgroundView

public View backgroundView(int type,
                           String title,
                           Rectangle bounds)
Does exactly the same thing as createView(int,String,Rectangle) except that it does not set the resulting View as visible.

Parameters:
type - the type of View to be created
title - the View title
bounds - the optional bounding rectangle of the created View
Returns:
the View content of the ViewFrame (eg., the DocumentView, GraphView, etc.)

registerFrameTitle

public void registerFrameTitle(ViewFrame vf)
Registers a change to the title of the ViewFrame vf, updating the View menu accordingly. If the ViewFrame is not already registered, a new JMenuItem will be created and added to the View menu as well as the menu item hashtable.


addPopUpFrame

public void addPopUpFrame(PopUpWindow popup)
Adds the PopUpWindow popup to the desktop, setting its size and displaying it.


getViewFrame

public ViewFrame getViewFrame(String systemId)
Returns the first ViewFrame matching the provided systemId, null if none match.


findViewFrame

public ViewFrame findViewFrame(String systemId)
Return a ViewFrame whose systemId matches the provided value. Unlike getViewFrame(String), this tries various alterations of the systemId. Returns null if not found. Note that this locates the first match only.


activateFrame

public void activateFrame(JInternalFrame jif)
Indicates JInternalFrame jif has focus, updating the menubar appropriately.

Specified by:
activateFrame in interface DesktopManager
Overrides:
activateFrame in class DefaultDesktopManager

iconifyFrame

public void iconifyFrame()
Indicates the selected JInternalFrame is to be iconified, and selects the next current front frame.


iconifyFrame

public void iconifyFrame(JInternalFrame jif)
Indicates JInternalFrame jif is to be iconified, and selects the current front frame.

Specified by:
iconifyFrame in interface DesktopManager
Overrides:
iconifyFrame in class DefaultDesktopManager

maximizeFrame

public void maximizeFrame()
Maximizes the currently selected JInternalFrame.


maximizeFrame

public void maximizeFrame(JInternalFrame jif)
Indicates JInternalFrame jif is to be maximized.

Specified by:
maximizeFrame in interface DesktopManager
Overrides:
maximizeFrame in class DefaultDesktopManager

minimizeFrame

public void minimizeFrame()
Indicates JInternalFrame jif is to be minimized (ie., un-maximized).


minimizeFrame

public void minimizeFrame(JInternalFrame jif)
Indicates JInternalFrame jif is to be minimized (ie., un-maximized).

Specified by:
minimizeFrame in interface DesktopManager
Overrides:
minimizeFrame in class DefaultDesktopManager

closeFrame

public void closeFrame()
Remove the current JInternalFrame from the registry and update View menu.


closeFrame

public void closeFrame(JInternalFrame jif)
Remove JInternalFrame jif from the registry and update View menu.

Specified by:
closeFrame in interface DesktopManager
Overrides:
closeFrame in class DefaultDesktopManager

closeAllFrames

public void closeAllFrames()
Closes any open ViewFrames. This is called upon application exit. DocumentView frames in Note mode are stored in the database; other DocumentView frames are sent fileClose(boolean) messages, allowing saving of any unsaved content.


tileHorizontally

public void tileHorizontally()
Tiles the current Views horizontally. This only functions for the number Views set by hTileLimit, ignoring subsequent ones (sending them to the back).


tileVertically

public void tileVertically()
Tiles the current Views vertically. This only functions for the number Views set by vTileLimit, ignoring subsequent ones (sending them to the back).


setViewBounds

public void setViewBounds(ViewFrame vf)
Sets the bounds (size and location) of ViewFrame vf, using the slot number and current desktop size as a guide.


getPopUpBounds

public Rectangle getPopUpBounds()
Returns a recommended bounds rectangle (size and location) for PopUpWindows, using the current desktop as a guide.


setGridResolution

public void setGridResolution(int resolution)
Set the grid resolution, i.e., the number of grid squares in which to divide the desktop (x and y resolution is always the same).


getGridCoordinate

public Point getGridCoordinate(Point loc)
Return the closest grid coordinate of a provided Point loc on the desktop. For example, if loc is in the middle of the desktop whose grid whose resolution is 10 (i.e., 10 by 10), the returned grid location would be (5,5) regardless of the size or aspect ratio of the desktop.

Returns:
the grid coordinate of the provided desktop location, as a Point

getDesktopGridLocation

public Point getDesktopGridLocation(int x,
                                    int y)
Return the location on the desktop of the upper-left corner of the quadrant specified by the grid coordinate (x,y), at the current grid resolution.

Returns:
the desktop location of the provided grid coordinate, as a Point

cycleViewFrames

public void cycleViewFrames(boolean forward)
Cycle to the previous or next ViewFrame, depending on the boolean next, skipping null slots.


activateViewFrame

public boolean activateViewFrame(ViewFrame vf)
This brings the ViewFrame vf to the front. Returns true if the specified view was activated.


viewCount

public int viewCount(boolean includeNotes)
Returns the number of ViewFrames, including those iconified. If includeNotes is true, include them in the count.


isEmpty

public boolean isEmpty()
Returns true if this ViewManager contains no ViewFrames. (Note that it may possibly contain other view types.) This is a convenience method.


newNote

public void newNote()
Creates a new Note, querying for a title, which is used to generate the XNode ID.


getNoteCount

public int getNoteCount()
Returns the current number of Notes. This number is dynamically generated from the current View list.


getFrontViewType

public int getFrontViewType()
Returns the type of the frontmost View, ignoring Notes. If there are no non-Note Views, returns -1.


isOpen

public View isOpen(String systemId)
If there is an open View whose systemId matches the parameter, returns the View, otherwise null.


getNextNoteNumber

protected int getNextNoteNumber()
Returns the next note number in sequence, permanently incrementing the note counter.


notesVisible

public boolean notesVisible()
Returns true if there are any visible Notes.


setNotesVisible

public void setNotesVisible(boolean visible)
Set the visibility of any Notes to the boolean visible. This also sets the state for new notes.


isNoteOpen

public DocumentView isNoteOpen(String nid)
Returns the corresponding View if a note having the provided ID is open, null if not.


openNote

public void openNote()
Open a Note by its ID nid, stored as an XNode in the XNodeStore's default 'notes' Collection. If the Collection does not exist, or if the specified node does not exist, nothing happens (surprise!). If the provided ID is '*' this will open all of the Notes.


openNote

public void openNote(String nid)
Open a Note by its ID nid, stored as an XNode in the XNodeStore's default 'notes' Collection. If the Collection does not exist, or if the specified node does not exist, nothing happens (surprise!). If the provided ID is '*' this will open all of the Notes.


parseStyleInfo

public void parseStyleInfo(DocumentView dv,
                           String s)
Parse the style data to set characteristics of the DocumentView.


parseBoundsInfo

public void parseBoundsInfo(DocumentView dv,
                            String s)
Parse the bounds data to set characteristics of the DocumentView.


updateDocumentViews

public void updateDocumentViews()
Causes any editing views to re-index their collection and node lists.


getCurrentViewFrame

protected ViewFrame getCurrentViewFrame()
Returns the topmost ViewFrame currently not iconified, null if none are available.


getCurrentView

public View getCurrentView()
Returns the topmost ViewFrame's content View, null if none are available.


getViews

public Iterator getViews(int type)
Return a Iterator over all ViewFrames of int type, an empty Iterator if there are none. Allowed types are the set found in ViewFrame, such as View.GRAPH. If type is 0 (zero), all Views are returned.


getViewCount

public int getViewCount(int type)
Return the number of ViewFrames of int type. Allowed types are the set found in ViewFrame, such as View.GRAPH. If type is 0 (zero), all Views are counted.


getEditingView

public EditView getEditingView()
Return the EditView API contents of the current front ViewFrame if it is a ProjectView, DocumentView, or NoteView, null if some other View type is selected (ie., in front). If the current View is a ProjectView, its EditView is returned regardless of focus.


getEditingView

public EditView getEditingView(boolean focusOnly)
Return the EditView API contents of the current front ViewFrame if it is a ProjectView, DocumentView, or NoteView, null if some other View type is selected (ie., in front).


getEditingViews

public Iterator getEditingViews()
Return an Iterator over all EditView-compatible Views.


getGraphViews

public Iterator getGraphViews()
Return an Iterator over all GraphViews. This includes Graph, Image and Project ViewFrames.


getProjectView

public ProjectView getProjectView()
Return the ProjectView contents of the current front ViewFrame, null if some other View type is selected (ie., in front).


getDocumentView

public DocumentView getDocumentView()
Return the DocumentView contents of the current front ViewFrame if it is a ProjectView, DocumentView (in either mode), null if some other View type is selected (ie., in front).


getNoteView

public DocumentView getNoteView()
Return the DocumentView contents of the current front ViewFrame only if it is in Note mode.


getAnyDocumentView

public DocumentView getAnyDocumentView()
Return any DocumentView window, null if there are none available. If the front window is a DocumentView it is returned, otherwise returns the first one encountered when iterating through the array returned by getAllFrames().

Note that this will return DocumentView frames in either editor or note mode, and if the front window is a ProjectView, its DocumentView content is returned.

This is a convenience method.


getGraphView

public GraphView getGraphView()
Return the current front GraphView window, null if some other window type is selected (ie., in front). This may be the embedded GraphView of a ProjectView, in which case focus is disregarded.


getGraphView

public GraphView getGraphView(boolean focusOnly)
Return the current front GraphView window, null if some other window type is selected (ie., in front). This may be the embedded GraphView of a ProjectView. In this case, if focusOnly is true, the embedded GraphView is returned only if it has the focus.


getAnyGraphView

public GraphView getAnyGraphView()
Return any GraphView window, null if there are none available. If the front window is a GraphView it is returned, otherwise returns the first one encountered when iterating through the array returned by getAllFrames().

This is a convenience method.


getViewType

public static int getViewType(ViewFrame viewframe)
Provided a ViewFrame, returns the type of its internal View. This is a convenience method that returns viewframe.getView().getType().

See Also:
View.NOTE, View.DOCUMENT, View.GRAPH, View.PROJECT

getCurrentViewType

public int getCurrentViewType()
Return the type of the current view View.NOTE, View.DOCUMENT, or View.GRAPH. Returns -1 if there is currently no open view window.

See Also:
View.NOTE, View.DOCUMENT, View.GRAPH, View.PROJECT

find

public void find(boolean next)
Calls the appropriate find method based on the current view. The supplied boolean should be true for "find next", false for a normal "find". This may not be supported in all Views.


getIDFactory

public IDFactory getIDFactory(String cid)
Returns a lazily-created IDFactory. If cid is non-null, the IDFactory will be populated with the current set of Node IDs for the specified Collection (provided, of course, that cid matches an existing Collection ID).


fileNew

public void fileNew()
Open a new document. This method simply passes off the message to the currently open view.


fileOpen

public void fileOpen()
Open an external document. This method simply passes off the message to the currently open view. The GraphView interprets this the same as fileImport().


fileImport

public void fileImport()
Import an external file of an understood notation. This method simply passes off the message to the currently open view.


fileSave

public void fileSave()
Save the current document to a file. This method simply passes off the message to the currently open view.


fileSave

public void fileSave(File file)
Save the current document to File file. When a null parameter is passed, this acts as a "Save As" command. This method simply passes off the message to the currently open view.


fileClose

public void fileClose(boolean forced)
Close the current document. This method simply passes off the message to the currently open view.


fileSetTitle

public void fileSetTitle()
Sets the title of the current document. This method passes off the message to the currently open ViewFrame's embedded View (e.g., DocumentView, GraphView, etc.).


editUndo

public void editUndo()
Undo. This method simply passes off the message to the currently open DocumentView.


editRedo

public void editRedo()
Redo. This method simply passes off the message to the currently open DocumentView.


editCut

public void editCut()
Cut. This method simply passes off the message to the currently open DocumentView.


editCopy

public void editCopy()
Copy. This method simply passes off the message to the currently open DocumentView.


editPaste

public void editPaste()
Paste. This method simply passes off the message to the currently open DocumentView.


editSelectAll

public void editSelectAll()
Select All. This method simply passes off the message to the currently open EditView.


editFind

public void editFind()
Edit Find. This method simply passes off the message to the currently open DocumentView.


editFindNext

public void editFindNext()
Edit Find Next. This method simply passes off the message to the currently open DocumentView.


editReplace

public void editReplace()
Edit Replace. This method simply passes off the message to the currently open DocumentView.


scrollToLine

public void scrollToLine(int line)
Scroll To Line. This method simply passes off the message to the currently open DocumentView.


toggleToolsVisibility

public void toggleToolsVisibility()
Set Tool Visiblity.


setDatabaseToolsVisible

public void setDatabaseToolsVisible(boolean visible)
Toggle Database ToolBar visibility.


toggleQueryToolsVisibility

public void toggleQueryToolsVisibility()
Toggle ToolBar visibility.


toggleGraphToolsVisibility

public void toggleGraphToolsVisibility()
Toggle Graph ToolBar visibility.



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.