Class GraphEditor

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class GraphEditor extends JPanel
Main editor panel for interactive visualization and manipulation of SNT graphs. Provides layout algorithms, styling controls, undo/redo functionality, and integration with data analysis tools for graph-based visualization of neuronal structures.
See Also:
  • Field Details

    • graphComponent

      protected com.mxgraph.swing.mxGraphComponent graphComponent
    • graphOutline

      protected com.mxgraph.swing.mxGraphOutline graphOutline
    • libraryPane

      protected JTabbedPane libraryPane
    • undoManager

      protected com.mxgraph.util.mxUndoManager undoManager
    • appTitle

      protected String appTitle
    • statusBar

      protected JLabel statusBar
    • currentFile

      protected File currentFile
    • rubberband

      protected com.mxgraph.swing.handler.mxRubberband rubberband
    • keyboardHandler

      protected com.mxgraph.swing.handler.mxKeyboardHandler keyboardHandler
    • toolbar

      protected sc.fiji.snt.viewer.geditor.EditorToolBar toolbar
    • animateLayoutChange

      protected boolean animateLayoutChange
    • modified

      protected boolean modified
      Flag indicating whether the current graph has been modified
    • undoHandler

      protected final com.mxgraph.util.mxEventSource.mxIEventListener undoHandler
    • changeTracker

      protected final com.mxgraph.util.mxEventSource.mxIEventListener changeTracker
  • Constructor Details

    • GraphEditor

      public GraphEditor(String appTitle, com.mxgraph.swing.mxGraphComponent component)
  • Method Details

    • setContext

      public void setContext(org.scijava.Context context)
    • createUndoManager

      protected com.mxgraph.util.mxUndoManager createUndoManager()
    • installHandlers

      protected void installHandlers()
    • createToolBar

      protected sc.fiji.snt.viewer.geditor.EditorToolBar createToolBar()
    • createStatusBar

      protected JLabel createStatusBar()
    • refresh

      protected void refresh()
    • installListeners

      protected void installListeners()
    • setCurrentFile

      public void setCurrentFile(File file)
    • getCurrentFile

      public File getCurrentFile()
    • setModified

      public void setModified(boolean modified)
    • isModified

      public boolean isModified()
      Returns:
      whether the current graph has been modified
    • getGraphComponent

      public com.mxgraph.swing.mxGraphComponent getGraphComponent()
    • getGraphOutline

      public com.mxgraph.swing.mxGraphOutline getGraphOutline()
    • getLibraryPane

      public JTabbedPane getLibraryPane()
    • getUndoManager

      public com.mxgraph.util.mxUndoManager getUndoManager()
    • bind

      public Action bind(String name, Action action)
      Parameters:
      name -
      action -
      Returns:
      a new Action bound to the specified string name
    • bind

      public Action bind(String name, Action action, String ignored)
      Parameters:
      name -
      action -
      Returns:
      a new Action bound to the specified string name
    • bind

      public Action bind(String name, Action action, Icon icon)
    • status

      public void status(String msg)
    • status

      public void status(String msg, boolean error)
    • updateTitle

      public void updateTitle()
    • exit

      public void exit()
    • setLookAndFeel

      protected void setLookAndFeel(String lookAndFeelName)
    • createFrame

      public JFrame createFrame(org.scijava.Context context)
    • graphLayout

      public Action graphLayout(String key)
      Creates an action that executes the specified layout.
      Parameters:
      key - Key to be used for getting the label from mxResources and also to create the layout instance for the commercial graph editor example.
      Returns:
      an action that executes the specified layout
    • applyLayout

      public void applyLayout(com.mxgraph.layout.mxIGraphLayout layout)
    • createLayout

      protected com.mxgraph.layout.mxIGraphLayout createLayout(String ident)
      Creates a layout instance for the given identifier.
    • setBottomPaneVisible

      public void setBottomPaneVisible(boolean visible)
    • getConsole

      public sc.fiji.snt.viewer.geditor.EditorConsole getConsole()
    • setLegend

      public void setLegend(String colorTable, double min, double max)
    • setLegend

      public void setLegend(String colorTable, String label, double min, double max)
    • setLegend

      public void setLegend(net.imglib2.display.ColorTable colorTable, String label, double min, double max)
    • getBottomPanel

      public JSplitPane getBottomPanel()