public class PathManagerUI extends JDialog implements TreeSelectionListener
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 GuiUtils |
guiUtils |
protected static String |
TABLE_TITLE |
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 |
---|
PathManagerUI(SNT plugin)
Instantiates a new Path Manager Dialog.
|
Modifier and Type | Method and Description |
---|---|
void |
applyDefaultTags(String... defaultTags)
Applies a default (built-in) tag to selected Path(s).
|
void |
applySelectionFilter(String query)
Selects paths matching a text-based criteria.
|
void |
applySelectionFilter(String property,
Number criteria)
Selects paths matching a morphometric criteria.
|
void |
applySelectionFilter(String property,
Number min,
Number max)
Selects paths matching a morphometric criteria.
|
void |
applyTag(String customTagOrColor)
Applies a custom tag/ color to selected Path(s).
|
protected void |
cancelFit(boolean updateUIState) |
void |
clearSelection() |
protected void |
closeTable() |
static String |
extractTagsFromPath(Path p) |
Tree |
geSelectedPathsAsTree()
Gets the collection of paths listed in the Path Manager as a
Tree
object. |
JTree |
getJTree() |
protected Collection<Tree> |
getMultipleTrees() |
protected Tree |
getMultipleTreesInASingleContainer() |
PathAndFillManager |
getPathAndFillManager() |
com.jidesoft.swing.Searchable |
getSearchable() |
List<Path> |
getSelectedPaths(boolean ifNoneSelectedGetAll)
Gets the paths currently selected in the Manager's
JTree list. |
Map<String,Tree> |
getSelectedPathsOrganizedByTrees(boolean ifNoneSelectedGetAll)
|
protected Tree |
getSingleTree() |
SNT |
getSNT() |
protected SNTTable |
getTable() |
static void |
main(String[] args) |
protected boolean |
measurementsUnsaved() |
protected void |
quickMeasurementsCmdError(GuiUtils guiUtils) |
void |
reload()
Reloads the contents of
PathAndFillManager |
void |
runCommand(String cmd)
Runs a menu command.
|
void |
runCommand(String cmd,
String... args)
Runs a menu command with options.
|
protected void |
saveTable() |
void |
selectAll() |
protected boolean |
selectionExists() |
void |
setFillList(List<Fill> fillList) |
void |
setPathList(List<Path> pathList,
Path justAdded,
boolean expandAll) |
void |
setSelectedPaths(Collection<Path> selectedPaths,
Object source) |
void |
update()
Refreshes (Repaints) the Path Manager JTree.
|
protected void |
updateTable() |
void |
valueChanged(TreeSelectionEvent e) |
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 static final String TABLE_TITLE
protected final GuiUtils guiUtils
public Map<String,Tree> getSelectedPathsOrganizedByTrees(boolean ifNoneSelectedGetAll)
ifNoneSelectedGetAll
- if true and no paths are currently selected, all
Paths in the list are consideredas keys
getSelectedPaths(boolean)
public List<Path> getSelectedPaths(boolean ifNoneSelectedGetAll)
JTree
list.ifNoneSelectedGetAll
- if true and no paths are currently selected,
all Paths in the list will be returnedprotected boolean selectionExists()
protected void cancelFit(boolean updateUIState)
public void valueChanged(TreeSelectionEvent e)
valueChanged
in interface TreeSelectionListener
public void setSelectedPaths(Collection<Path> selectedPaths, Object source)
protected Tree getSingleTree()
protected Collection<Tree> getMultipleTrees()
protected Tree getMultipleTreesInASingleContainer()
protected void quickMeasurementsCmdError(GuiUtils guiUtils)
public void update()
SNT.isOnlySelectedPathsVisible()
to reflect changes in path colors,
etc.public void reload()
PathAndFillManager
protected void closeTable()
protected void updateTable()
protected SNTTable getTable()
public SNT getSNT()
public PathAndFillManager getPathAndFillManager()
public JTree getJTree()
public com.jidesoft.swing.Searchable getSearchable()
public void applySelectionFilter(String property, Number min, Number max) throws IllegalArgumentException
property
- The morphometric property ("Length", "Path order", etc.) as
listed in the "Morphology filter" menu (case sensitive).min
- the lowest value (exclusive) in the filtermax
- the highest value (exclusive) in the filterIllegalArgumentException
- if property
was not recognized. Note
that some filtering options listed in the
GUI may not be supported.public void applyTag(String customTagOrColor) throws IllegalArgumentException
customTagOrColor
- The tag (or color) to be applied to selected Paths.IllegalArgumentException
public void applyDefaultTags(String... defaultTags) throws IllegalArgumentException
defaultTags
- The tags to be applied to selected Paths, as listed in the
"Tag" menu, e.g,
,
,
, etc.IllegalArgumentException
public void applySelectionFilter(String query) throws IllegalArgumentException
query
- The matching text, as it would have been typed in the "Text
filtering" box.IllegalArgumentException
public void applySelectionFilter(String property, Number criteria) throws IllegalArgumentException
property
- The morphometric property ("Length", "Path order", etc.) as
listed in the "Morphology filter" menu (case sensitive).criteria
- the filtering criteria.IllegalArgumentException
- if property
was not recognized. Note
that some filtering options listed in the
GUI may not be supported.public Tree geSelectedPathsAsTree()
Tree
object. All paths are retrieved if none are currently selected.public void clearSelection()
public void selectAll()
public void runCommand(String cmd) throws IllegalArgumentException
cmd
- The command to be run, exactly as listed in the PathManagerUI's
menu bar or Right-click contextual menuIllegalArgumentException
- if cmd
was not found.public void runCommand(String cmd, String... args) throws IllegalArgumentException, IOException
cmd
- The command to be run, exactly as listed in the PathManagerUI's
menu bar or Right-click contextual menuargs
- the option(s) that would fill the commands's prompt. e.g.,
'runCommand("Color Code Cell(s)...", X coordinates", "Cyan Hot.lut")'IllegalArgumentException
- if cmd
was not found, or if it is
not supported.IOException
protected boolean measurementsUnsaved()
protected void saveTable()
public static void main(String[] args)
Copyright © 2015–2021 Fiji. All rights reserved.