public class SNTUI extends JDialog
JDialog.AccessibleJDialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected boolean |
askUserConfirmation |
protected boolean |
confirmTemporarySegments |
protected boolean |
discardOnDoubleCancellation |
static int |
EDITING
Flag specifying UI is currently waiting for user to edit a selected Path
|
protected boolean |
finishOnDoubleConfimation |
static int |
FITTING_PATHS
Flag specifying UI is currently waiting for fitting operations to conclude
|
protected GuiUtils |
guiUtils |
protected sc.fiji.snt.SNTUI.GuiListener |
listener |
static int |
LOADING
Flag specifying UI is currently waiting for I/0 operations to conclude
|
protected JSpinner |
nearbyFieldSpinner |
static int |
READY
Flag specifying that image data is available and the UI is not waiting on any
pending operations, thus 'ready to trace'
|
protected Viewer3D |
recViewer |
protected Frame |
recViewerFrame |
static int |
RUNNING_CMD |
protected SciViewSNT |
sciViewSNT |
protected JCheckBox |
showPartsNearby |
protected JSpinner |
snapWindowXYsizeSpinner |
protected JSpinner |
snapWindowZsizeSpinner |
static int |
SNT_PAUSED
Flag specifying all SNT are temporarily disabled (all user interactions are
waived back to ImageJ)
|
static int |
TRACING_PAUSED
Flag specifying tracing functions are (currently) disabled.
|
protected JCheckBox |
useSnapWindow |
static int |
WAITING_FOR_SIGMA_POINT_I |
accessibleContext, rootPane, rootPaneCheckingEnabled
DEFAULT_MODALITY_TYPE
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
SNTUI(SNT plugin)
Instantiates SNT's main UI and associated
PathManagerUI and
FillManagerUI instances. |
Modifier and Type | Method and Description |
---|---|
protected void |
abortCurrentOperation() |
protected static JPanel |
buttonPanel(JButton... buttons) |
void |
changeState(int newState)
Changes this UI to a new state.
|
protected void |
disableImageDependentComponents() |
protected void |
displayOnStarting() |
protected void |
enableAStarGUI(boolean enable)
Should only be called by
SNT.enableAstar(boolean) |
protected void |
enableSecondaryLayerBuiltin(boolean enable) |
protected void |
enableSecondaryLayerExternal(boolean enable) |
void |
error(String msg) |
protected void |
exitRequested() |
protected void |
gaussianCalculated(boolean succeeded) |
FillManagerUI |
getFillManager()
Gets the Fill Manager dialog.
|
PathManagerUI |
getPathManager()
Gets the Path Manager dialog.
|
Viewer3D |
getReconstructionViewer(boolean initializeIfNull)
Gets the Reconstruction Viewer.
|
SciViewSNT |
getSciViewSNT(boolean initializeIfNull)
Gets the active getSciViewSNT (SciView<>SNT bridge) instance.
|
int |
getState()
Gets the current UI state.
|
protected void |
inputImageChanged() |
boolean |
isReady()
Assesses whether the UI is blocked.
|
protected void |
launchSigmaPaletteAround(int x,
int y) |
protected void |
loadImagefromGUI(int newC,
int newT) |
protected boolean |
nearbySlices() |
protected void |
noValidImageDataError() |
protected File |
openFile(String promptMsg,
File suggestedFile) |
protected File |
openFile(String promptMsg,
String extension) |
void |
refresh() |
protected void |
reset() |
protected void |
resetState() |
protected static void |
runCommand(JMenuBar menuBar,
String cmd) |
void |
runCommand(String cmd)
Runs a menu command (as listed in the menu bar hierarchy).
|
protected boolean |
saveAllPathsToSwc(String filePath) |
protected File |
saveFile(String promptMsg,
String suggestedFileName,
String fallbackExtension) |
protected boolean |
saveToXML(File file) |
void |
setEnableDebugMode(boolean enable)
Enables/disables debug mode
|
protected void |
setFillListVisible(boolean makeVisible) |
void |
setLookAndFeel(String lookAndFeelName) |
protected void |
setReconstructionViewer(Viewer3D recViewer) |
protected void |
setSciViewSNT(SciViewSNT sciViewSNT) |
protected void |
setSecondaryLayerTracingSelected(boolean enable) |
void |
setSigmaPaletteListener(SigmaPaletteListener listener) |
void |
showMessage(String msg,
String title) |
void |
showStatus(String msg,
boolean temporary)
Updates the status bar.
|
protected void |
toggleChannelAndFrameChoice() |
protected void |
togglePartsChoice() |
protected void |
togglePathsChoice() |
protected void |
toggleSecondaryLayerBuiltin() |
protected void |
toggleSecondaryLayerExternal() |
protected void |
toggleSecondaryLayerTracing() |
protected void |
updateExternalImgWidgets() |
protected void |
updateSettingsString() |
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected JCheckBox showPartsNearby
protected JCheckBox useSnapWindow
protected JSpinner snapWindowXYsizeSpinner
protected JSpinner snapWindowZsizeSpinner
protected JSpinner nearbyFieldSpinner
protected final GuiUtils guiUtils
protected Viewer3D recViewer
protected Frame recViewerFrame
protected SciViewSNT sciViewSNT
protected final sc.fiji.snt.SNTUI.GuiListener listener
public static final int READY
public static final int RUNNING_CMD
public static final int WAITING_FOR_SIGMA_POINT_I
public static final int LOADING
public static final int FITTING_PATHS
public static final int EDITING
public static final int SNT_PAUSED
public static final int TRACING_PAUSED
protected boolean confirmTemporarySegments
protected boolean finishOnDoubleConfimation
protected boolean discardOnDoubleCancellation
protected boolean askUserConfirmation
public SNTUI(SNT plugin)
PathManagerUI
and
FillManagerUI
instances.plugin
- the SNT
instance associated with this
UIpublic int getState()
READY
,
RUNNING_CMD
, etc.public boolean isReady()
public void setEnableDebugMode(boolean enable)
enable
- true to enable debug mode, otherwise falsepublic void runCommand(String cmd) throws IllegalArgumentException
cmd
- The command to be run, exactly as listed in its menu (either in
the this dialog, or PathManagerUI
)IllegalArgumentException
- if cmd
was not found.protected static void runCommand(JMenuBar menuBar, String cmd) throws IllegalArgumentException
IllegalArgumentException
protected void gaussianCalculated(boolean succeeded)
public void refresh()
protected void updateSettingsString()
protected void exitRequested()
protected void disableImageDependentComponents()
public void changeState(int newState)
newState
is the
current UI statenewState
- the new state, e.g., READY
,
TRACING_PAUSED
, etc.protected void resetState()
public void error(String msg)
protected void loadImagefromGUI(int newC, int newT)
protected File saveFile(String promptMsg, String suggestedFileName, String fallbackExtension)
protected void updateExternalImgWidgets()
public void showStatus(String msg, boolean temporary)
msg
- the text to displayed. Set it to null (or empty String) to
reset the status bar.temporary
- if true and msg
is valid, text is displayed
transiently for a couple of secondspublic void setLookAndFeel(String lookAndFeelName)
protected void displayOnStarting()
protected void setFillListVisible(boolean makeVisible)
protected boolean nearbySlices()
public void setSigmaPaletteListener(SigmaPaletteListener listener)
public PathManagerUI getPathManager()
PathManagerUI
associated with this UIpublic FillManagerUI getFillManager()
FillManagerUI
associated with this UIpublic Viewer3D getReconstructionViewer(boolean initializeIfNull)
initializeIfNull
- it true, initializes the Viewer if it has not yet
been initializedpublic SciViewSNT getSciViewSNT(boolean initializeIfNull)
initializeIfNull
- it true, initializes SciView if it has not yet
been initializedprotected void setReconstructionViewer(Viewer3D recViewer)
protected void setSciViewSNT(SciViewSNT sciViewSNT)
protected void reset()
protected void inputImageChanged()
protected void abortCurrentOperation()
protected void launchSigmaPaletteAround(int x, int y)
protected void togglePathsChoice()
protected void setSecondaryLayerTracingSelected(boolean enable)
protected void toggleSecondaryLayerTracing()
protected void toggleSecondaryLayerBuiltin()
protected void toggleSecondaryLayerExternal()
protected void enableSecondaryLayerBuiltin(boolean enable)
protected void enableSecondaryLayerExternal(boolean enable)
protected void enableAStarGUI(boolean enable)
SNT.enableAstar(boolean)
protected void togglePartsChoice()
protected void toggleChannelAndFrameChoice()
protected void noValidImageDataError()
protected boolean saveToXML(File file)
protected boolean saveAllPathsToSwc(String filePath)
Copyright © 2015–2021 Fiji. All rights reserved.