Documentation of 'ij.plugin.frame.SyncWindows' Java class
SyncWindows
ij.plugin.frame

Class SyncWindows

  • All Implemented Interfaces:
    ImageListener, PlugIn, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible


    public class SyncWindows
    extends PlugInFrame
    implements java.awt.event.ActionListener, java.awt.event.MouseMotionListener, java.awt.event.MouseListener, java.awt.event.ItemListener, ImageListener
    This class "synchronizes" mouse input in multiple windows. Once several windows are synchronized, mouse events in any one of the synchronized windows are propagated to the others. Note, the notion of synchronization use by the SyncWindows class here (i.e. multiple windows that all get the same mouse input) is somewhat different than the use of the synchronize keyword in the Java language. (In Java, synchronize has to do w/ critical section access by multiple threads.)

    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;

    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.Window

        java.awt.Window.Type
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.BaselineResizeBehavior
    • Field Summary

      • Fields inherited from class java.awt.Frame

        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
      • Fields inherited from class java.awt.Component

        BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor and Description
      SyncWindows()
      Create window sync frame.
      SyncWindows(java.lang.String s) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void actionPerformed(java.awt.event.ActionEvent e)
      Implementation of ActionListener interface.
      void close()
      Closes this window.
      void displayChanged(ij.plugin.frame.DisplayChangeEvent e)
      Method to pass on changes of the z-slice of a stack.
      ImagePlus getImageFromVector(int n)
      Get ImagePlus from Windows-Vector vwins.
      java.lang.String getImageTitleFromVector(int n)
      Get the title of image n from Windows-Vector vwins.
      int getIndexOfImage(ImagePlus image)
      Get index of "image" in vector of synchronized windows, if image is in vector.
      java.awt.Insets getInsets() 
      static SyncWindows getInstance() 
      void imageClosed(ImagePlus imp)
      Implementation of ImageListener interface: update window list, if image is opened or closed
      void imageOpened(ImagePlus imp)
      Implementation of ImageListener interface: update window list, if image is opened or closed
      void imageUpdated(ImagePlus imp) 
      void itemStateChanged(java.awt.event.ItemEvent e)
      Item Listener method
      void mouseClicked(java.awt.event.MouseEvent e)
      Propagate mouse clicked events to all synchronized windows.
      void mouseDragged(java.awt.event.MouseEvent e)
      Propagate mouse dragged events to all synchronized windows.
      void mouseEntered(java.awt.event.MouseEvent e)
      Propagate mouse entered events to all synchronized windows.
      void mouseExited(java.awt.event.MouseEvent e)
      Propagate mouse exited events to all synchronized windows.
      void mouseMoved(java.awt.event.MouseEvent e)
      Draws the "synchronize" cursor in each of the synchronized windows.
      void mousePressed(java.awt.event.MouseEvent e)
      Propagate mouse pressed events to all synchronized windows.
      void mouseReleased(java.awt.event.MouseEvent e)
      Propagate mouse released events to all synchronized windows.
      static void setC(ImageWindow source, int channel) 
      void setCursor(ImagePlus imp, Roi cursor) 
      static void setT(ImageWindow source, int frame) 
      static void setZ(ImageWindow source, int slice) 
      void windowClosing(java.awt.event.WindowEvent e)
      Override parent windowClosing method to clean up synchronized resources on exit.
      • Methods inherited from class java.awt.Frame

        addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
      • Methods inherited from class java.awt.Window

        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, 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
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, 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, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.awt.MenuContainer

        getFont, postEvent
    • Constructor Detail

      • SyncWindows

        public SyncWindows()
        Create window sync frame. Frame is shown via call to show() or by invoking run method.
      • SyncWindows

        public SyncWindows(java.lang.String s)
    • Method Detail

      • setC

        public static void setC(ImageWindow source,
                                int channel)
      • setZ

        public static void setZ(ImageWindow source,
                                int slice)
      • setT

        public static void setT(ImageWindow source,
                                int frame)
      • displayChanged

        public void displayChanged(ij.plugin.frame.DisplayChangeEvent e)
        Method to pass on changes of the z-slice of a stack.
      • mouseMoved

        public void mouseMoved(java.awt.event.MouseEvent e)
        Draws the "synchronize" cursor in each of the synchronized windows.
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
      • mouseDragged

        public void mouseDragged(java.awt.event.MouseEvent e)
        Propagate mouse dragged events to all synchronized windows.
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
      • mouseClicked

        public void mouseClicked(java.awt.event.MouseEvent e)
        Propagate mouse clicked events to all synchronized windows.
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
      • mouseEntered

        public void mouseEntered(java.awt.event.MouseEvent e)
        Propagate mouse entered events to all synchronized windows.
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
      • mouseExited

        public void mouseExited(java.awt.event.MouseEvent e)
        Propagate mouse exited events to all synchronized windows.
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
      • mousePressed

        public void mousePressed(java.awt.event.MouseEvent e)
        Propagate mouse pressed events to all synchronized windows.
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
      • mouseReleased

        public void mouseReleased(java.awt.event.MouseEvent e)
        Propagate mouse released events to all synchronized windows.
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
      • actionPerformed

        public void actionPerformed(java.awt.event.ActionEvent e)
        Implementation of ActionListener interface.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • itemStateChanged

        public void itemStateChanged(java.awt.event.ItemEvent e)
        Item Listener method
        Specified by:
        itemStateChanged in interface java.awt.event.ItemListener
      • windowClosing

        public void windowClosing(java.awt.event.WindowEvent e)
        Override parent windowClosing method to clean up synchronized resources on exit.
        Specified by:
        windowClosing in interface java.awt.event.WindowListener
        Overrides:
        windowClosing in class PlugInFrame
      • imageOpened

        public void imageOpened(ImagePlus imp)
        Implementation of ImageListener interface: update window list, if image is opened or closed
        Specified by:
        imageOpened in interface ImageListener
      • imageClosed

        public void imageClosed(ImagePlus imp)
        Implementation of ImageListener interface: update window list, if image is opened or closed
        Specified by:
        imageClosed in interface ImageListener
      • setCursor

        public void setCursor(ImagePlus imp,
                              Roi cursor)
      • getImageFromVector

        public ImagePlus getImageFromVector(int n)
        Get ImagePlus from Windows-Vector vwins.
      • getImageTitleFromVector

        public java.lang.String getImageTitleFromVector(int n)
        Get the title of image n from Windows-Vector vwins. If the image ends with .tif, the extension is removed.
      • getIndexOfImage

        public int getIndexOfImage(ImagePlus image)
        Get index of "image" in vector of synchronized windows, if image is in vector. Else return -1.
      • getInsets

        public java.awt.Insets getInsets()
        Overrides:
        getInsets in class java.awt.Container
      • getInstance

        public static SyncWindows getInstance()

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.