Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package hu.kazocsaba.imageviewer;
 
Abstract superclass for status bars of the image viewer.

Author(s):
Kazó Csaba
 
 public abstract class StatusBar {
The ImageViewer associated with this status bar.
Returns the status bar component that can be added to the image viewer GUI.

Returns:
the status bar component
	public abstract JComponent getComponent();

Returns the image viewer that this status bar belongs to.

Returns:
the current image viewer, or null if there is none
	public final ImageViewer getImageViewer() {
		return ;
	}
	final void setImageViewer(ImageViewer imageViewer) {
		if (this.!=null)
		this.=imageViewer;
		if (this.!=null)
	}
Called when this status bar is added to an image viewer. Subclasses can override this method to register listeners.

Parameters:
viewer the new viewer associated with this status bar
	protected void register(ImageViewer viewer) {}
Called when this status bar is removed from an image viewer. Subclasses can override this method to remove listeners.

Parameters:
viewer the viewer that this status bar is removed from
	protected void unregister(ImageViewer viewer) {}
New to GrepCode? Check out our FAQ X