public class Sync_Windows extends ij.plugin.frame.PlugInFrame implements ActionListener, MouseMotionListener, MouseListener, DisplayChangeListener, ItemListener, ij.ImageListener
Optionally passes on change of z-slice of a stack to other stacks; Optionally translates positions to different windows via offscreen coordinates, i.e. correctly translates coordinates to windows with a different zoom; Updates the list of windows by click of a button;
Works with Image5DWindows
Frame.AccessibleAWTFrame
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected Button |
bSyncAll
Buttons for user control.
|
protected Button |
bUnsyncAll
Buttons for user control.
|
protected Checkbox |
cChannel
Checkboxes for user control.
|
protected Checkbox |
cCoords
Checkboxes for user control.
|
protected Checkbox |
cCursor
Checkboxes for user control.
|
protected Checkbox |
cFrame
Checkboxes for user control.
|
protected Checkbox |
cScaling
Checkboxes for user control.
|
protected Checkbox |
cSlice
Checkboxes for user control.
|
protected ij.ImageJ |
ijInstance
reference to current instance of ImageJ (to avoid repeated IJ.getInstance() s)
|
protected int |
oldX |
protected int |
oldY |
protected Panel |
panel
Panel for GUI
|
protected static String |
VERSIONSTRING |
protected Vector |
vListMap
Hashtable to map list ids to image window ids.
|
protected Vector |
vwins
Indices of synchronized image windows are maintained in this
Vector.
|
protected List |
wList
List of currently displayed windows retrieved from ImageJ
window manager.
|
protected int |
x |
protected int |
y |
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
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
Sync_Windows()
Create window sync frame.
|
Sync_Windows(String s) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e)
Implementation of ActionListener interface.
|
protected Rectangle |
boundingRect(int x,
int y,
int oldX,
int oldY)
Compute bounding rectangle given current and old cursor
locations.
|
protected Panel |
buildControlPanel()
Builds panel containing control buttons.
|
protected Component |
buildWindowList()
Builds list of open ImageWindows
|
protected Panel |
controlPanel()
Build window list display and button controls.
|
void |
displayChanged(DisplayChangeEvent e)
Method to pass on changes of the z-slice of a stack.
|
ij.ImagePlus |
getImageFromVector(int n)
Get ImagePlus from Windows-Vector vwins.
|
String |
getImageTitleFromVector(int n)
Get the title of image n from Windows-Vector vwins.
|
int |
getIndexOfImage(ij.ImagePlus image)
Get index of "image" in vector of synchronized windows, if image is in vector.
|
protected Point |
getMatchingCoords(ImageCanvas ic,
ImageCanvas icc,
int x,
int y)
Get Screen Coordinates for ImageCanvas ic matching
the OffScreen Coordinates of the current ImageCanvas.
|
void |
imageClosed(ij.ImagePlus imp)
Implementation of ImageListener interface: update window list, if image is opened or closed
|
void |
imageOpened(ij.ImagePlus imp)
Implementation of ImageListener interface: update window list, if image is opened or closed
|
void |
imageUpdated(ij.ImagePlus imp) |
void |
itemStateChanged(ItemEvent e)
Item Listener method
|
void |
mouseClicked(MouseEvent e)
Propagate mouse clicked events to all synchronized windows.
|
void |
mouseDragged(MouseEvent e)
Propagate mouse dragged events to all synchronized windows.
|
void |
mouseEntered(MouseEvent e)
Propagate mouse entered events to all synchronized windows.
|
void |
mouseExited(MouseEvent e)
Propagate mouse exited events to all synchronized windows.
|
void |
mouseMoved(MouseEvent e)
Draws the "synchronize" cursor in each of the synchronized
windows.
|
void |
mousePressed(MouseEvent e)
Propagate mouse pressed events to all synchronized windows.
|
void |
mouseReleased(MouseEvent e)
Propagate mouse released events to all synchronized
windows.
|
void |
run(String args)
Show the frame, making it accessible to users.
|
protected void |
showAbout() |
protected void |
updateWindowList() |
void |
windowClosing(WindowEvent e)
Override parent windowClosing method to clean up synchronized
resources on exit.
|
close, focusGained, focusLost, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpened
addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setBackground, setCursor, setExtendedState, setIconImage, 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, processWindowEvent, 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, addImpl, 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, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, 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, getGraphics, 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, 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
getFont, postEvent
protected static final String VERSIONSTRING
protected Vector vwins
protected int oldX
protected int oldY
protected int x
protected int y
protected List wList
protected Panel panel
protected Checkbox cCursor
protected Checkbox cSlice
protected Checkbox cChannel
protected Checkbox cFrame
protected Checkbox cCoords
protected Checkbox cScaling
protected Button bSyncAll
protected Button bUnsyncAll
protected Vector vListMap
protected final ij.ImageJ ijInstance
public Sync_Windows()
public Sync_Windows(String s)
public void run(String args)
run
in interface ij.plugin.PlugIn
run
in class ij.plugin.frame.PlugInFrame
public void displayChanged(DisplayChangeEvent e)
displayChanged
in interface DisplayChangeListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
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 actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener
public void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
windowClosing
in class ij.plugin.frame.PlugInFrame
public void imageOpened(ij.ImagePlus imp)
imageOpened
in interface ij.ImageListener
public void imageClosed(ij.ImagePlus imp)
imageClosed
in interface ij.ImageListener
public void imageUpdated(ij.ImagePlus imp)
imageUpdated
in interface ij.ImageListener
protected Panel controlPanel()
protected Component buildWindowList()
protected Panel buildControlPanel()
protected Rectangle boundingRect(int x, int y, int oldX, int oldY)
protected void updateWindowList()
public ij.ImagePlus getImageFromVector(int n)
public String getImageTitleFromVector(int n)
public int getIndexOfImage(ij.ImagePlus image)
protected Point getMatchingCoords(ImageCanvas ic, ImageCanvas icc, int x, int y)
protected void showAbout()
Copyright © 2015–2021 Fiji. All rights reserved.