Package sc.fiji.snt.viewer.geditor
Class GraphEditor
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
sc.fiji.snt.viewer.geditor.GraphEditor
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected Stringprotected final com.mxgraph.util.mxEventSource.mxIEventListenerprotected Fileprotected com.mxgraph.swing.mxGraphComponentprotected com.mxgraph.swing.mxGraphOutlineprotected com.mxgraph.swing.handler.mxKeyboardHandlerprotected JTabbedPaneprotected booleanFlag indicating whether the current graph has been modifiedprotected com.mxgraph.swing.handler.mxRubberbandprotected JLabelprotected sc.fiji.snt.viewer.geditor.EditorToolBarprotected final com.mxgraph.util.mxEventSource.mxIEventListenerprotected com.mxgraph.util.mxUndoManagerFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyLayout(com.mxgraph.layout.mxIGraphLayout layout) createFrame(org.scijava.Context context) protected com.mxgraph.layout.mxIGraphLayoutcreateLayout(String ident) Creates a layout instance for the given identifier.protected JLabelprotected sc.fiji.snt.viewer.geditor.EditorToolBarprotected com.mxgraph.util.mxUndoManagervoidexit()sc.fiji.snt.viewer.geditor.EditorConsolecom.mxgraph.swing.mxGraphComponentcom.mxgraph.swing.mxGraphOutlinecom.mxgraph.util.mxUndoManagergraphLayout(String key) Creates an action that executes the specified layout.protected voidprotected voidbooleanprotected voidrefresh()voidsetBottomPaneVisible(boolean visible) voidsetContext(org.scijava.Context context) voidsetCurrentFile(File file) voidvoidvoidprotected voidsetLookAndFeel(String lookAndFeelName) voidsetModified(boolean modified) voidvoidvoidMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
graphComponent
protected com.mxgraph.swing.mxGraphComponent graphComponent -
graphOutline
protected com.mxgraph.swing.mxGraphOutline graphOutline -
libraryPane
-
undoManager
protected com.mxgraph.util.mxUndoManager undoManager -
appTitle
-
statusBar
-
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 modifiedFlag 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
-
-
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
-
refresh
protected void refresh() -
installListeners
protected void installListeners() -
setCurrentFile
-
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
-
getUndoManager
public com.mxgraph.util.mxUndoManager getUndoManager() -
bind
- Parameters:
name-action-- Returns:
- a new Action bound to the specified string name
-
bind
- Parameters:
name-action-- Returns:
- a new Action bound to the specified string name
-
bind
-
status
-
status
-
updateTitle
public void updateTitle() -
exit
public void exit() -
setLookAndFeel
-
createFrame
-
graphLayout
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
Creates a layout instance for the given identifier. -
setBottomPaneVisible
public void setBottomPaneVisible(boolean visible) -
getConsole
public sc.fiji.snt.viewer.geditor.EditorConsole getConsole() -
setLegend
-
setLegend
-
setLegend
public void setLegend(net.imglib2.display.ColorTable colorTable, String label, double min, double max) -
getBottomPanel
-