Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package hu.kazocsaba.imageviewer;

A default status bar implementation that displays the current mouse position (in pixel coordinates) and the colour of the pixel under the cursor.

Author(s):
Kazó Csaba
 
 public class DefaultStatusBar extends PixelInfoStatusBar implements ImageMouseMotionListener {
 	
	public void mouseMoved(ImageMouseEvent e) {
		setPixel(e.getX(), e.getY());
	}
	public void mouseExited(ImageMouseEvent e) {
		setPixel(-1, -1);
	}
	public void mouseEntered(ImageMouseEvent e) {}
	public void mouseDragged(ImageMouseEvent e) {}
	protected void register(ImageViewer viewer) {
		super.register(viewer);
	}
	protected void unregister(ImageViewer viewer) {
		super.unregister(viewer);
	}
New to GrepCode? Check out our FAQ X