Package org.loboevolution.img
Class DefaultStatusBar
java.lang.Object
org.loboevolution.img.StatusBar
org.loboevolution.img.PixelInfoStatusBar
org.loboevolution.img.DefaultStatusBar
- All Implemented Interfaces:
EventListener
,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
-
Field Summary
Fields inherited from class org.loboevolution.img.PixelInfoStatusBar
label
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Invoked when the mouse is moved while a button is down.void
Invoked when the mouse has entered the area of an image.void
Invoked when the mouse has left the area of an image.void
Invoked when the mouse has entered a pixel of an image.protected void
register
(ImageViewer viewer) Called when this status bar is added to an image viewer.protected void
unregister
(ImageViewer viewer) Called when this status bar is removed from an image viewer.Methods inherited from class org.loboevolution.img.PixelInfoStatusBar
getComponent, getModel, setModel, setPixel, update, updateLabel, updateLabelNoData
Methods inherited from class org.loboevolution.img.StatusBar
getImageViewer, setImageViewer
-
Constructor Details
-
DefaultStatusBar
public DefaultStatusBar()
-
-
Method Details
-
mouseMoved
Invoked when the mouse has entered a pixel of an image.- Specified by:
mouseMoved
in interfaceImageMouseMotionListener
- Parameters:
e
- the event object containing attributes of the event
-
mouseExited
Invoked when the mouse has left the area of an image.- Specified by:
mouseExited
in interfaceImageMouseMotionListener
- Parameters:
e
- the event object containing attributes of the event
-
mouseEntered
Invoked when the mouse has entered the area of an image.- Specified by:
mouseEntered
in interfaceImageMouseMotionListener
- Parameters:
e
- the event object containing attributes of the event
-
mouseDragged
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 interfaceImageMouseMotionListener
- Parameters:
e
- the event object containing attributes of the event
-
register
Called when this status bar is added to an image viewer. Subclasses can override this method to register listeners.- Overrides:
register
in classPixelInfoStatusBar
- Parameters:
viewer
- the new viewer associated with this status bar
-
unregister
Called when this status bar is removed from an image viewer. Subclasses can override this method to remove listeners.- Overrides:
unregister
in classPixelInfoStatusBar
- Parameters:
viewer
- the viewer that this status bar is removed from
-