Package ca.phon.app.opgraph.editor
Class OpgraphEditorModel
java.lang.Object
ca.phon.opgraph.app.GraphEditorModel
ca.phon.app.opgraph.editor.OpgraphEditorModel
- Direct Known Subclasses:
AnalysisOpGraphEditorModel
,MacroOpgraphEditorModel
,OpGraphSyllabifierEditorModel
,ReportOpGraphEditorModel
public abstract class OpgraphEditorModel
extends ca.phon.opgraph.app.GraphEditorModel
Base model for the opgraph editor.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn a list of all available view names.ca.phon.opgraph.app.components.canvas.GraphCanvas
Get the default folder when displaying the open/save dialog.getIconForView
(String viewName) Get the view icongetInitialViewBounds
(String viewName) Get initial view location as a rectangle.Get custom node library view.ca.phon.opgraph.app.components.NodeSettingsPanel
getNoun()
Return the noun associated with the type of graph.abstract String
getTitle()
Return the editor title for the given model.Get specified view componentprotected Map<String,
JComponent> getViewMinimizeLocation
(String viewName) Get the minimize location for the given viewboolean
isInitiallyMinimized
(String viewName) void
setupContext
(ca.phon.opgraph.OpContext context) Called just before starting debuging.boolean
validate()
Validate document before saving.Methods inherited from class ca.phon.opgraph.app.GraphEditorModel
getBreadcrumb, getConsolePanel, getDebugInfoPanel, getDocument, getGraphOutline, getMenuProviders, getNodeFieldsPanel, getNodeLibrary
-
Constructor Details
-
OpgraphEditorModel
public OpgraphEditorModel() -
OpgraphEditorModel
public OpgraphEditorModel(ca.phon.opgraph.OpGraph opgraph)
-
-
Method Details
-
getViewMap
-
getNodeSettings
public ca.phon.opgraph.app.components.NodeSettingsPanel getNodeSettings()- Overrides:
getNodeSettings
in classca.phon.opgraph.app.GraphEditorModel
-
getLibraryView
Get custom node library view.- Returns:
- node library view
-
getTitle
Return the editor title for the given model.- Returns:
- title
-
getDefaultFolder
Get the default folder when displaying the open/save dialog.- Returns:
- folder path
-
getAvailableViewNames
Return a list of all available view names. Custom views should be added to this list by subclasses.- Returns:
- list of available view names
-
getView
Get specified view component- Parameters:
viewName
-- Returns:
-
getScriptNodeEditor
-
getCanvas
public ca.phon.opgraph.app.components.canvas.GraphCanvas getCanvas()- Overrides:
getCanvas
in classca.phon.opgraph.app.GraphEditorModel
-
isInitiallyMinimized
-
getInitialViewBounds
Get initial view location as a rectangle.- Parameters:
viewName
-- Returns:
- initial view rect
-
getIconForView
Get the view icon- Parameters:
viewName
-- Returns:
- icon for view
-
getViewMinimizeLocation
Get the minimize location for the given view- Parameters:
viewName
-- Returns:
- minimize location for view
-
getNoun
Return the noun associated with the type of graph. The first element of theTuple
is the singleton version, while the second element is the plural. String should be returned as all lower case.- Returns:
- Tupleinvalid input: '<'String, String>
-
validate
public boolean validate()Validate document before saving.- Returns:
true
if document (graph) is valid,false
otherwise
-
setupContext
public void setupContext(ca.phon.opgraph.OpContext context) Called just before starting debuging.- Parameters:
context
-
-