|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.ceryle.ui.View
org.ceryle.ui.ProjectView
public class ProjectView
A class that extends DocumentView to encapsulate a project.
As with DocumentView, this is meant to be embedded in a ViewFrame.
| Nested Class Summary | |
|---|---|
class |
ProjectView.ProjectGraphView
Extends GraphView by using a different toolbar. |
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected DocumentView |
m_docview
The DocumentView used. |
protected GraphView |
m_graphview
The GraphView used. |
protected URL |
m_protoURL
The URL of the prototype project document. |
static String |
PROPERTY_projSplitLoc
Ceryle property determining the location of the project split pane. |
static int |
SEQ_X
Enumerated value for sequence(int) for left-to-right (horizontal) sequencing. |
static int |
SEQ_Y
Enumerated value for sequence(int) for top-to-bottom (vertical) sequencing. |
protected Topic |
topic_proj
The project Topic instance. |
| Fields inherited from class org.ceryle.ui.View |
|---|
DOCUMENT, GRAPH, isClosing, m_desktop, m_verbose, mh, NOTE, pm, PROJECT, srvs, vf, vmgr |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| 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 |
| Constructor Summary | |
|---|---|
ProjectView(ViewFrame viewframe)
Constructor with a reference to its wrapper ViewFrame (not used with a tabbed pane model). |
|
ProjectView(ViewFrame viewframe,
DocumentView docview)
Constructor with a reference to its wrapper ViewFrame (not used with a tabbed pane model) and a DocumentView to embed. |
|
ProjectView(ViewFrame viewframe,
GraphView graphview)
Constructor with a reference to its wrapper ViewFrame (not used with a tabbed pane model) and a GraphView to embed. |
|
ProjectView(ViewFrame viewframe,
GraphView graphview,
DocumentView docview)
Constructor with a reference to its wrapper ViewFrame (not used with a tabbed pane model) and optional GraphView and DocumentView to embed. |
|
| Method Summary | |
|---|---|
boolean |
addDocument()
Add the currently selected location bar value as an occurrence to the currently-selected component(s). |
boolean |
addDocument(Locator loc)
Add the Locator as an occurrence to the currently-selected component(s). |
void |
addToolExtras(JToolBar tb)
If in developer mode, add some experimental buttons to the right end of the toolbar. |
boolean |
closeProject(boolean forced)
Closes the current project, first checking to be sure that the content is not modified. |
void |
closing()
This method should be called before closing the ProjectView to allow safe closing of any dirty content, removing listeners, etc. |
void |
compose()
Compose a document based on the existing node sequence. |
void |
editCopy()
Copy. |
void |
editCut()
Cut. |
void |
editPaste()
Paste. |
void |
editRedo()
Redo. |
void |
editSelectAll()
Select All. |
void |
editUndo()
Undo. |
boolean |
fileClose(boolean forced)
Closes the current graph. |
boolean |
fileImport(Object source)
If the DocumentView has the focus, imports the provided file of an understood notation into the current DocumentView. |
boolean |
fileNew()
Creates a new, empty Document. |
boolean |
fileOpen(File file)
Passes the message off to fileImport(Object). |
boolean |
fileSave()
Passes this message as fileSave(null) to the currently focused DocumentView or GraphView. |
boolean |
fileSave(File file)
Passes this message off to fileSave(File) with the current setting of m_systemId for this ProjectView, which may have been set by a previous open or import file. |
void |
find()
Find. |
void |
findNext()
Find Next. |
void |
focusGained(FocusEvent e)
Focus gained event, an implementation artifact for the FocusListener API. |
void |
focusLost(FocusEvent e)
Focus lost event, an implementation artifact for the FocusListener API. |
boolean |
focusOnGraph()
Indicates that the graph area has focus. |
DocumentView |
getDocumentView()
Returns the internal DocumentView. |
EditorPanel |
getEditor()
Returns the EditorPanel of the DocumentView. |
GraphView |
getGraphView()
Returns the internal GraphView. |
String |
getProjectTitle()
Returns the title of the project, null if not set. |
ProjectToolBar |
getProjectToolBar()
Returns the Project ToolBar. |
TopicMap |
getProjectTopicMap()
Returns the Topic Map used by this project, null if unavailable. |
URL |
getPrototypeURL()
Sets and returns the URL for the project prototype, null if unavailable. |
String |
getSelectedResource()
Returns the URI (as a String) of the selected resource, within the context of the focused View type, null if unavailable or inappropriate. |
String |
getSystemId()
Returns the systemId of this ProjectView. |
JToolBar |
getToolBar()
Returns the Project ToolBar as a JToolBar. |
boolean |
isDirty()
Returns an indication of true if either the current document or graph has been edited. |
boolean |
isSplitMode()
Returns true if using the split mode, false if tabs. |
boolean |
newComponent(boolean useLocation)
Create a new component node for the current document. |
boolean |
newProject()
Opens a new project prototype. |
void |
openProject(TypedInputSource source)
Opens an existing project source, or if null, based upon a user query for the source systemId. |
void |
packView()
Suggests to the DocumentView that it resize any internal components appropriate to its current size. |
void |
queryProjectTitle(String projtitle)
Queries the user for the title of the project, setting it in the project's TopicMap. |
protected void |
readProjectMetadata()
Restores some of the project metadata from the TopicMap stored in the TMLayoutPanel. |
void |
refresh()
Refreshes the display upon activating this ProjectView, updating both DocumentView and GraphView panels as necessary. |
boolean |
removeDocument()
Remove the occurrences from the currently selected component. |
void |
removeSequence()
Removes any sequence associations in the current graph. |
void |
reorientView()
Toggle the orientation of the views between horizontal and vertical. |
void |
replace()
Replace. |
void |
requestFocus()
Requests the current focus be set to the editor area. |
void |
saveAsProject()
Saves the current project to a new systemId. |
void |
saveProject()
Saves the current project to the current project's systemId. |
protected void |
saveProperties()
Store any properties of the current ProjectView. |
void |
scrollToLine(int line)
Scroll To Line. |
boolean |
selectionHasOccurrence()
Returns true if the currently-selected TNode has an Occurrence whose Locator matches the Locator bar URL. |
void |
sequence(int direction)
Sequence the selected components with direction based on value of direction. |
void |
setFocus(int view)
Requests the current focus be set to either the Document (View.DOCUMENT) or Graph (View.GRAPH) area. |
void |
setProjectTitle(String title)
Set the title of the project toolbar's "Title" field to the String title. |
void |
setProjectToolsVisible(boolean visible)
Set Project Tool Visibility. |
void |
setSplitMode(boolean useSplit)
Sets the display to either use a split pane or a tabbed pane. |
void |
setToolsVisible(boolean visible)
Set Tool Visibility. |
void |
swapView()
Swap position of the document and graph views in split mode. |
void |
update()
Updates the display. |
void |
viewDocuments()
Open the occurrences for the currently selected graph node. |
protected void |
writeProjectMetadata(String projectTitle)
Write the title, created or modified date metadata of the current project to the project instance Topic. |
| Methods inherited from class org.ceryle.ui.View |
|---|
deactivate, fileSaveAs, getDesktop, getTitle, getType, getTypeName, getViewFrame, getViewManager, hasDatabase, hasEditing, hasGraph, isDocumentOrNoteView, isDocumentView, isGraphView, isNoteView, isProjectView, setSystemId, setTitle, setTitle, setViewFrame |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_projSplitLoc
public static final int SEQ_X
sequence(int) for left-to-right (horizontal) sequencing.
public static final int SEQ_Y
sequence(int) for top-to-bottom (vertical) sequencing.
protected Topic topic_proj
protected final GraphView m_graphview
protected final DocumentView m_docview
protected URL m_protoURL
| Constructor Detail |
|---|
public ProjectView(ViewFrame viewframe)
viewframe - the parent ViewFrame container
public ProjectView(ViewFrame viewframe,
GraphView graphview)
viewframe - the parent ViewFrame containergraphview - the GraphView to embed within the new ProjectView
public ProjectView(ViewFrame viewframe,
DocumentView docview)
viewframe - the parent ViewFrame containerdocview - the DocumentView to embed within the new ProjectView
public ProjectView(ViewFrame viewframe,
GraphView graphview,
DocumentView docview)
viewframe - the parent ViewFrame container| Method Detail |
|---|
public void addToolExtras(JToolBar tb)
public boolean isSplitMode()
public void setSplitMode(boolean useSplit)
public void swapView()
public void reorientView()
protected void saveProperties()
public GraphView getGraphView()
public DocumentView getDocumentView()
public EditorPanel getEditor()
getEditor in interface EditViewpublic String getSelectedResource()
getSelectedResource in class ViewViewpublic void focusGained(FocusEvent e)
focusGained in interface FocusListenerpublic void focusLost(FocusEvent e)
focusLost in interface FocusListenerpublic void update()
public void packView()
packView in class Viewpublic boolean focusOnGraph()
public void setFocus(int view)
public void requestFocus()
requestFocus in class Viewpublic void refresh()
refresh in class Viewpublic JToolBar getToolBar()
public ProjectToolBar getProjectToolBar()
getToolBar().
public String getSystemId()
getSystemId in class Viewpublic URL getPrototypeURL()
public TopicMap getProjectTopicMap()
public boolean newProject()
The systemId of its source is read from the properties file as the property http://purl.org/ceryle/prop/#projectPrototype.
public void openProject(TypedInputSource source)
public void saveProject()
public void saveAsProject()
public boolean closeProject(boolean forced)
public boolean newComponent(boolean useLocation)
useLocation - determines whether to use current document or not
public boolean addDocument()
public boolean addDocument(Locator loc)
public void viewDocuments()
public boolean removeDocument()
public boolean selectionHasOccurrence()
public void removeSequence()
public void sequence(int direction)
SEQ_X
sequences from left to right, SEQ_Y from top
to bottom. If two or more nodes share the same horizontal
position (when sequencing horizontally) or vertical position
(when sequencing vertically), the choice as to order between
them is arbitrary.
public void compose()
public void setProjectTitle(String title)
writeProjectMetadata(String).)
public void queryProjectTitle(String projtitle)
public String getProjectTitle()
protected void readProjectMetadata()
protected void writeProjectMetadata(String projectTitle)
public boolean fileNew()
If the graph has the focus, this is a new graph document.
fileNew in class Viewpublic boolean fileOpen(File file)
fileImport(Object).
fileOpen in class Viewpublic boolean fileImport(Object source)
If the GraphView has the focus, this opens it as a graph document.
fileImport in class Viewpublic boolean fileSave()
NOTE: This saves only the focused view!
fileSave in class Viewpublic boolean fileSave(File file)
NOTE: This saves only the focused view!
fileSave in class Viewpublic boolean isDirty()
isDirty in class Viewpublic boolean fileClose(boolean forced)
fileClose in class Viewpublic void closing()
closing in class Viewpublic void editUndo()
editUndo in interface EditViewpublic void editRedo()
editRedo in interface EditViewpublic void editCut()
editCut in interface EditViewpublic void editCopy()
editCopy in interface EditViewpublic void editPaste()
editPaste in interface EditViewpublic void editSelectAll()
editSelectAll in interface EditViewpublic void find()
find in interface EditViewpublic void findNext()
findNext in interface EditViewpublic void replace()
replace in interface EditViewpublic void scrollToLine(int line)
scrollToLine in interface EditViewpublic void setProjectToolsVisible(boolean visible)
public void setToolsVisible(boolean visible)
setToolsVisible in interface EditView
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||