public class SlideSetLauncher extends JFrame implements ActionListener, MouseListener, SlideSetWindow, LogListener
Modifier and Type | Class and Description |
---|---|
private class |
SlideSetLauncher.DropHandler
Drop handler for the main view pains
|
JFrame.AccessibleJFrame
Frame.AccessibleAWTFrame
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private boolean |
changed
Has the open file been changed?
|
private ArrayList<SlideSetWindow> |
childWindows
List of open child windows
|
private CSVService |
csvs |
private DataTypeIDService |
dtid |
private HttpHelpLoader |
helpLoader |
private net.imagej.ImageJ |
ij |
private JTextArea |
info |
private HashMap<SlideSet,String> |
lockedTables
Data tables that are in use (locked) and the threads using them
|
private SlideSetLog |
log |
private JMenuBar |
menuBar |
private String |
openPath
Path to the currently open file
|
private HashMap<Component,JPopupMenu> |
popupMenus |
private SlideSetPluginLoader |
sspl |
private JTree |
tree |
private String |
ver
Application version
|
private XMLService |
xmls |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
SlideSetLauncher(net.imagej.ImageJ context,
DataTypeIDService dtid,
XMLService xmls,
CSVService csvs,
SlideSetLog log) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
ActionListener implementation
|
private void |
buildInfo()
Build the info pane
|
private void |
buildLayout()
Build the window
|
private void |
buildMenuBar()
Build the menu bar
|
private JMenu |
buildOtherCommandsMenu()
Build the menu listing other ImageJ commands
|
private void |
buildPopupMenu()
Build the popup (right-click) menus
|
private JMenu |
buildSlideSetPluginsMenu()
Build the menu listing
SlideSetPlugin s |
private void |
buildTree()
Build the tree pane
|
private void |
checkChanged()
Check if the data set has been changed
and offer to save it if applicable.
|
private void |
checkUpdateSite() |
private void |
closeChildWindows()
Close any open child windows.
|
private void |
deleteTable()
Delete a table
|
private void |
expandAllTreeNodes()
Make sure that all tree nodes are expanded
|
private void |
getHelp(String pageKey)
Load documentation in a web browser.
|
private List<SlideSet> |
getSelectedSlideSets()
Get a list of the
SlideSet s selected in the tree |
private SlideSet |
getTreeRoot()
|
private void |
handleActionEvent(ActionEvent e)
Handle an action event
|
private void |
handleMouseEvent(MouseEvent e,
String type)
Handle a mouse event
|
void |
kill()
Perform any clean-up functions necessary to close the window.
|
private void |
lockSlideSet(SlideSet table)
Check-out a
SlideSet for use. |
void |
logMessage(String message)
Receive a message from the log.
|
void |
mouseClicked(MouseEvent e)
MouseListener implementation
|
void |
mouseEntered(MouseEvent e)
MouseListener implementation
|
void |
mouseExited(MouseEvent e)
MouseListener implementation
|
void |
mousePressed(MouseEvent e)
MouseListener implementation
|
void |
mouseReleased(MouseEvent e)
MouseListener implementation
|
private void |
newFile()
Start a new file
|
private void |
openXML()
Open a new file selected using a dialog - do not run on event thread
|
private void |
openXML(File f)
Open a specified file
|
private void |
pickAndRunCommand()
Launch a
CommandPicker dialog, and run the
selected ImageJ Command . |
private void |
populateTree(DefaultMutableTreeNode node,
SlideSet table)
Iteratively populate the tree pane
|
private void |
printLogHead()
Print a header message to the
info window |
private void |
refreshTree()
Refresh the tree in case any changes have been made to the tables
|
private void |
registerChildWindow(SlideSetWindow w)
Keep track of a child window
|
private void |
releaseSlideSet(SlideSet table)
Release a previously locked
SlideSet for
further use. |
private void |
renameTable()
Rename a table
|
private void |
resetLog()
Get user confirmation to clear the log
|
private void |
runCommandSkeleton()
Run a command skeleton
|
private void |
runSspl(org.scijava.command.CommandInfo commandInfo)
Run an ImageJ
Command |
private void |
runSspl(String className)
Run a SlideSet plugin command
|
private void |
saveCommandSkeleton()
Export command skeleton data
|
private void |
saveCSV()
Export table data as a CSV file
|
private void |
saveLogText()
Write the log window text to a file
|
private void |
saveXML(boolean saveAs)
Save a file
|
void |
setVisible(boolean b) |
private void |
unlockTable()
Clear a read-only flag on a
DataSet table |
private void |
viewRois(int ijVersion)
Launch the
RoiEditor |
private void |
viewTable()
View a
SlideSet |
private void |
viewTableProperties()
View table properties
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
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, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, 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, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addWindowListener
getFont, postEvent
private final net.imagej.ImageJ ij
private final DataTypeIDService dtid
private final XMLService xmls
private final CSVService csvs
private final SlideSetPluginLoader sspl
private final SlideSetLog log
private final HttpHelpLoader helpLoader
private JMenuBar menuBar
private JTextArea info
private JTree tree
private final HashMap<Component,JPopupMenu> popupMenus
private boolean changed
private String openPath
private ArrayList<SlideSetWindow> childWindows
private HashMap<SlideSet,String> lockedTables
private String ver
public SlideSetLauncher(net.imagej.ImageJ context, DataTypeIDService dtid, XMLService xmls, CSVService csvs, SlideSetLog log)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void kill()
SlideSetWindow
kill
in interface SlideSetWindow
public void logMessage(String message)
LogListener
logMessage
in interface LogListener
public void setVisible(boolean b)
setVisible
in class Window
private void buildLayout()
private void buildMenuBar()
private JMenu buildSlideSetPluginsMenu()
SlideSetPlugin
sprivate JMenu buildOtherCommandsMenu()
private void buildInfo()
private void buildTree()
private void buildPopupMenu()
private void handleActionEvent(ActionEvent e)
private void handleMouseEvent(MouseEvent e, String type)
private void runSspl(String className)
className
- The fully-specified class name of the pluginprivate void runSspl(org.scijava.command.CommandInfo commandInfo)
Command
commandInfo
- CommandInfo
specifying the Command
to runprivate void pickAndRunCommand()
CommandPicker
dialog, and run the
selected ImageJ Command
.private void openXML()
private void openXML(File f)
private void populateTree(DefaultMutableTreeNode node, SlideSet table)
node
- The tree node on which to add. Alternatively, null
to
restart the tree from the root.table
- The SlideSet
to add at this levelprivate void refreshTree()
private void expandAllTreeNodes()
private SlideSet getTreeRoot()
private void saveXML(boolean saveAs) throws OperationCanceledException
OperationCanceledException
private void saveCSV()
private void saveCommandSkeleton()
private void runCommandSkeleton()
private void newFile()
private void checkChanged() throws OperationCanceledException
OperationCanceledException
private List<SlideSet> getSelectedSlideSets()
SlideSet
s selected in the treeprivate void viewTable()
SlideSet
private void viewTableProperties()
private void viewRois(int ijVersion)
RoiEditor
private void renameTable()
private void deleteTable()
private void unlockTable()
DataSet
tableprivate void registerChildWindow(SlideSetWindow w)
private void closeChildWindows() throws OperationCanceledException
OperationCanceledException
private void lockSlideSet(SlideSet table) throws OperationCanceledException
SlideSet
for use. Important to prevent
concurrency errors.table
- The SlideSet
to lock.OperationCanceledException
- The SlideSet
is
already in use. Notifies the user with a dialog box, but
it is the caller's responsibility not to proceed with
using the SlideSet
.private void releaseSlideSet(SlideSet table)
SlideSet
for
further use.table
- The SlideSet
to unlock.private void saveLogText()
private void resetLog()
private void printLogHead()
info
windowprivate void getHelp(String pageKey)
pageKey
- Page to load. See HelpLoader.getHelp(java.lang.String)
.private void checkUpdateSite()
Copyright © 2023. All rights reserved.