public class SlideSetViewer extends JFrame implements ActionListener, MouseListener, SlideSetWindow
SlideSet
Modifier and Type | Class and Description |
---|---|
private class |
SlideSetViewer.DropHandler
Drop handler for the table header
|
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 static int |
COLWIDTH |
private SlideSet |
data |
private DataTypeIDService |
dtid |
private net.imagej.ImageJ |
ij |
private Point |
lastPopupPoint
Location where the last popup menu was triggered
|
private boolean |
locked
Read-only mode
|
private SlideSetLog |
log |
private JMenuBar |
menuBar |
private JPopupMenu |
menuColP
Column header popup menu
|
private JPopupMenu |
menuP
Table popup menu
|
private JScrollPane |
pane |
private HashMap<Component,JPopupMenu> |
popupMenuHash
Index specifying popup menus associated with various components
|
private JTable |
table |
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 |
---|
SlideSetViewer(SlideSet data,
net.imagej.ImageJ context,
DataTypeIDService dtid,
SlideSetLog log,
boolean locked) |
SlideSetViewer(SlideSet data,
net.imagej.ImageJ context,
DataTypeIDService dtid,
SlideSetLog log,
boolean locked,
Component parent) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
ActionListener implementation
|
private JMenu |
buildElementTypeMenuTree(String commandPrefix)
Build a
JMenu filled with available type codes |
private void |
buildLayout(Component parent)
Build the window
|
private void |
buildMenuBar()
Setup the main menu
|
private void |
buildMenuColP()
Set up the column header popup menu
|
private void |
buildMenuP()
Set up the table pop-up menu
|
private void |
buildTableLayout()
Set up the table itself
|
private int[] |
getColumnFromHeaderEvent(ActionEvent e)
Find out which column header triggered a popup menu
|
private void |
handleActionEvent(ActionEvent e)
Handle an action event
|
private void |
handleError(Exception e)
Record an error
|
private void |
handleMouseEvent(MouseEvent e)
Handle a mouse event
|
void |
kill()
Perform any clean-up functions necessary to close the window.
|
void |
mouseClicked(MouseEvent e)
MouseListener implementation
|
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
private void |
parseRecursiveMenuAdd(String[] labels,
String command,
JMenu m)
Deprecated.
Use
UIUtil.parseRecursiveMenuAdd(java.lang.String[], java.lang.String, javax.swing.JMenu, java.awt.event.ActionListener) instead
Add a menu item to a menu tree, along with sub-menu nodes if needed |
private void |
renameTable()
Rename this table
|
private void |
setFromSequence()
Set values of selected cells using a sequence
|
private void |
viewTableProperties()
View this table's 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, setVisible, 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 SlideSet data
private final net.imagej.ImageJ ij
private final DataTypeIDService dtid
private final SlideSetLog log
private JScrollPane pane
private JTable table
private JMenuBar menuBar
private final HashMap<Component,JPopupMenu> popupMenuHash
private JPopupMenu menuP
private JPopupMenu menuColP
private Point lastPopupPoint
private boolean locked
private static final int COLWIDTH
public SlideSetViewer(SlideSet data, net.imagej.ImageJ context, DataTypeIDService dtid, SlideSetLog log, boolean locked)
public SlideSetViewer(SlideSet data, net.imagej.ImageJ context, DataTypeIDService dtid, SlideSetLog log, boolean locked, Component parent)
public void kill()
SlideSetWindow
kill
in interface SlideSetWindow
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
private void buildLayout(Component parent)
private void buildTableLayout()
private void buildMenuP()
private void buildMenuColP()
private void buildMenuBar()
private JMenu buildElementTypeMenuTree(String commandPrefix)
JMenu
filled with available type codescommandPrefix
- A prefix to add to the ActionCommand
before the element type and mime type. For example, if
this is set to "+col
", the selected element
type is "class
", and the selected mime type
is "text/plain
", the resulting
ActionCommand
will be
"+col|class|text/plain
".private void parseRecursiveMenuAdd(String[] labels, String command, JMenu m)
UIUtil.parseRecursiveMenuAdd(java.lang.String[], java.lang.String, javax.swing.JMenu, java.awt.event.ActionListener)
instead
Add a menu item to a menu tree, along with sub-menu nodes if needed
labels
- An array of menu labels where the last String
the menu item and all other Strings represent
the sub-menu tree in which the item should be placedcommand
- The command string to send to the menu listener
when this item is selectedm
- The top menu tree to start withprivate void handleActionEvent(ActionEvent e)
private int[] getColumnFromHeaderEvent(ActionEvent e)
private void handleMouseEvent(MouseEvent e)
private void renameTable()
private void viewTableProperties()
private void setFromSequence()
private void handleError(Exception e)
Copyright © 2023. All rights reserved.