public class PluginOutputMatcherFrame extends JFrame implements PluginOutputPicker, SlideSetWindow, ActionListener
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 |
active |
private ArrayList<JTextField> |
base
The default link prefix field
|
private boolean |
cancelPressed |
private ArrayList<JTextField> |
dir
The default link directory field
|
private DataTypeIDService |
dtid |
private ArrayList<JTextField> |
ext
The default link extension field
|
private int |
gap
Padding
|
private JLabel |
headLable
Header labels
|
private JLabel |
headLink |
private JLabel |
headType |
private net.imagej.ImageJ |
ij |
private boolean |
initialized |
private ArrayList<JCheckBoxMenuItem> |
inputs
Include inputs in output check boxes
|
private JPopupMenu |
inputsMenu
Include inputs in output menu
|
private ArrayList<ArrayList<Boolean>> |
isOptionLink
Index of which
TypeCode options represent file references |
private ArrayList<JLabel> |
labels
The result labels
|
private static String |
linkDirDefault |
private ArrayList<String[]> |
linkDirDefaults
Default link directories for each field and option
|
private static String |
linkExtDefault |
private ArrayList<String[]> |
linkExtDefaults
Default link file prefixes for each field and option
|
private static String |
linkPreDefault |
private ArrayList<String[]> |
linkPreDefaults
Default link file prefixes for each field and option
|
private BoxLayout |
lman
The layout manager
|
private boolean |
okPressed |
private ArrayList<ArrayList<String>> |
optionIndex
Index of
TypeCode options |
private ArrayList<JComboBox> |
types
The result type combo box
|
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 |
---|
PluginOutputMatcherFrame(net.imagej.ImageJ context,
DataTypeIDService dtid) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
void |
addOutput(String label,
String[] choices,
boolean[] link,
String[] linkDir,
String[] linkPre,
String[] linkExt)
Register a plugin output and available
options for handling its value.
|
void |
getOutputChoices(ArrayList<Integer> outputChoices,
ArrayList<Integer> selectedParentFields,
ArrayList<String> linkDir,
ArrayList<String> linkPre,
ArrayList<String> linkExt)
Get chosen options for handling of each plugin output
value, as well as fields from the parent table
that should be copied to the results table.
|
private void |
handleActionEvent(ActionEvent e) |
void |
kill()
Perform any clean-up functions necessary to close the window.
|
private void |
layoutHeaders() |
private void |
outputSanityChecks() |
void |
setParentFieldLabels(String[] labels)
Add a popup menu to allow selection of parent
fields that should be included in the
results table.
|
void |
setVisible(boolean visible)
Control dialog visibility.
|
private void |
showAndWait()
Show the dialog and wait for a user response
|
private void |
updateControlState(int i) |
private void |
updateControlStates() |
private boolean |
wasCanceled()
Did the user press Cancel?
|
private boolean |
wasOKed()
Did the user press OK?
|
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 net.imagej.ImageJ ij
private DataTypeIDService dtid
private boolean active
private boolean initialized
private boolean okPressed
private boolean cancelPressed
private JLabel headLable
private JLabel headType
private JLabel headLink
private final JPopupMenu inputsMenu
private final ArrayList<JCheckBoxMenuItem> inputs
private final ArrayList<JTextField> dir
private final ArrayList<JTextField> base
private final ArrayList<JTextField> ext
private final ArrayList<ArrayList<Boolean>> isOptionLink
TypeCode
options represent file referencesprivate final ArrayList<String[]> linkDirDefaults
private static final String linkDirDefault
private final ArrayList<String[]> linkPreDefaults
private static final String linkPreDefault
private final ArrayList<String[]> linkExtDefaults
private static final String linkExtDefault
private BoxLayout lman
private final int gap
public PluginOutputMatcherFrame(net.imagej.ImageJ context, DataTypeIDService dtid)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void kill()
SlideSetWindow
kill
in interface SlideSetWindow
public void addOutput(String label, String[] choices, boolean[] link, String[] linkDir, String[] linkPre, String[] linkExt)
PluginOutputPicker
addOutput
in interface PluginOutputPicker
label
- Human-readable name of the output,
i.e. for labeling a drop-down box.
choices
- Human-readable names for each
available option for handling the output value.
link
- Indicator for an output handling option
that should be treated as a file link, and will
require values for the link path, file name
prefix, and file extension.
linkDir
- Default path used to write output
data for output handling options using file
links (ignored for others). May be null
,
in which case this PluginOutputPicker
will determine the default.
linkPre
- Default file prefix used to write output
data for output handling options using file
links (ignored for others). May be null
,
in which case this PluginOutputPicker
will determine the default.
linkExt
- Default file extension used to write
output data for output handling options using file
links (ignored for others). May be null
,
in which case this PluginOutputPicker
will determine the default.public void setParentFieldLabels(String[] labels)
setParentFieldLabels
in interface PluginOutputPicker
labels
- List
of human-readable
names for the input parameterspublic void getOutputChoices(ArrayList<Integer> outputChoices, ArrayList<Integer> selectedParentFields, ArrayList<String> linkDir, ArrayList<String> linkPre, ArrayList<String> linkExt) throws OperationCanceledException
PluginOutputPicker
getOutputChoices
in interface PluginOutputPicker
outputChoices
- Empty list to be filled with index
values of the selected output handling methods. The order of
values corresponds to the order in which the plugin
outputs were registered through addOutput
.
The values correspond to the indeces of the selected
option in the choices
array passed to addOutput
.
selectedParentFields
- Empty list to be filled with
index values of the fields from the parent table that
have been selected for copying to the results table.
Values correspond to the indeces of selected fields
in the labels
array passed to
setParentFieldLabels
.
linkDir
- Empty list to be filled with default paths
to be used to write output data, or null
if
the selected plugin output handling method does not
require a file link.
linkPre
- Empty list to be filled with default file
prefixes to be used to write output data, or null
if
the selected plugin output handling method does not
require a file link.
linkExt
- Empty list to be filled with default file
extensions to be used to write output data, or null
if
the selected plugin output handling method does not
require a file link.OperationCanceledException
- If the user aborts
the plugin, for example, by dismissing a dialog box
without making the required selections.public void setVisible(boolean visible)
showAndWait
for convenience.setVisible
in class Window
private void handleActionEvent(ActionEvent e)
private void layoutHeaders()
private void updateControlStates()
private void updateControlState(int i)
private void outputSanityChecks() throws OperationCanceledException
OperationCanceledException
private boolean wasOKed()
private boolean wasCanceled()
private void showAndWait()
Copyright © 2023. All rights reserved.