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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked when the mouse is moved while a button is down.voidInvoked when the mouse has entered the area of an image.voidInvoked when the mouse has left the area of an image.voidInvoked when the mouse has entered a pixel of an image.protected voidregister(ImageViewer viewer) Called when this status bar is added to an image viewer.protected voidunregister(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, updateLabelNoDataMethods 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:
mouseMovedin 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:
mouseExitedin 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:
mouseEnteredin 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:
mouseDraggedin 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:
registerin 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:
unregisterin classPixelInfoStatusBar- Parameters:
viewer- the viewer that this status bar is removed from
-