Class DefaultStatusBar

All Implemented Interfaces:
EventListener, ImageMouseMotionListener

public class DefaultStatusBar extends PixelInfoStatusBar implements ImageMouseMotionListener
A default status bar implementation that displays the current mouse position (in pixel coordinates) and the colour of the pixel under the cursor. Author Kazo Csaba
  • Constructor Details

    • DefaultStatusBar

      public DefaultStatusBar()
  • Method Details

    • mouseMoved

      public void mouseMoved(ImageMouseEvent e)
      Invoked when the mouse has entered a pixel of an image.
      Specified by:
      mouseMoved in interface ImageMouseMotionListener
      Parameters:
      e - the event object containing attributes of the event
    • mouseExited

      public void mouseExited(ImageMouseEvent e)
      Invoked when the mouse has left the area of an image.
      Specified by:
      mouseExited in interface ImageMouseMotionListener
      Parameters:
      e - the event object containing attributes of the event
    • mouseEntered

      public void mouseEntered(ImageMouseEvent e)
      Invoked when the mouse has entered the area of an image.
      Specified by:
      mouseEntered in interface ImageMouseMotionListener
      Parameters:
      e - the event object containing attributes of the event
    • mouseDragged

      public void mouseDragged(ImageMouseEvent e)
      Invoked when the mouse is moved while a button is down. Note that the coordinates for the event can be outside the image bounds.
      Specified by:
      mouseDragged in interface ImageMouseMotionListener
      Parameters:
      e - the event object containing attributes of the event
    • register

      protected void register(ImageViewer viewer)
      Called when this status bar is added to an image viewer. Subclasses can override this method to register listeners.
      Overrides:
      register in class PixelInfoStatusBar
      Parameters:
      viewer - the new viewer associated with this status bar
    • unregister

      protected void unregister(ImageViewer viewer)
      Called when this status bar is removed from an image viewer. Subclasses can override this method to remove listeners.
      Overrides:
      unregister in class PixelInfoStatusBar
      Parameters:
      viewer - the viewer that this status bar is removed from