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.
  • Constructor Details

    • OpgraphEditorModel

      public OpgraphEditorModel()
    • OpgraphEditorModel

      public OpgraphEditorModel(ca.phon.opgraph.OpGraph opgraph)
  • Method Details

    • getViewMap

      protected Map<String,JComponent> getViewMap()
    • getNodeSettings

      public ca.phon.opgraph.app.components.NodeSettingsPanel getNodeSettings()
      Overrides:
      getNodeSettings in class ca.phon.opgraph.app.GraphEditorModel
    • getLibraryView

      public LibraryView getLibraryView()
      Get custom node library view.
      Returns:
      node library view
    • getTitle

      public abstract String getTitle()
      Return the editor title for the given model.
      Returns:
      title
    • getDefaultFolder

      public String getDefaultFolder()
      Get the default folder when displaying the open/save dialog.
      Returns:
      folder path
    • getAvailableViewNames

      public List<String> 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

      public JComponent getView(String viewName)
      Get specified view component
      Parameters:
      viewName -
      Returns:
    • getScriptNodeEditor

      public OpgraphScriptEditor getScriptNodeEditor()
    • getCanvas

      public ca.phon.opgraph.app.components.canvas.GraphCanvas getCanvas()
      Overrides:
      getCanvas in class ca.phon.opgraph.app.GraphEditorModel
    • isInitiallyMinimized

      public boolean isInitiallyMinimized(String viewName)
    • getInitialViewBounds

      public Rectangle getInitialViewBounds(String viewName)
      Get initial view location as a rectangle.
      Parameters:
      viewName -
      Returns:
      initial view rect
    • getIconForView

      public Icon getIconForView(String viewName)
      Get the view icon
      Parameters:
      viewName -
      Returns:
      icon for view
    • getViewMinimizeLocation

      public OpgraphEditorModel.ViewLocation getViewMinimizeLocation(String viewName)
      Get the minimize location for the given view
      Parameters:
      viewName -
      Returns:
      minimize location for view
    • getNoun

      public abstract Tuple<String,String> getNoun()
      Return the noun associated with the type of graph. The first element of the Tuple 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 -