br.usp.ime.klava.segmentit.gui
Class ImagesViewer

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by br.usp.ime.klava.segmentit.gui.ImagesViewer
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener

public class ImagesViewer
extends java.awt.event.MouseAdapter
implements java.awt.event.ActionListener

Creates a window that displays images in layers.

Author:
Bruno Klava

Constructor Summary
ImagesViewer(java.lang.String title)
          Creates an ImagesViewer that is not a mainWindow (closing it doesn't exits the application automatically.
ImagesViewer(java.lang.String title, boolean mainWindow)
          Creates an ImagesViewer.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void addImage(java.awt.image.BufferedImage image)
          Adds an image with empty description.
 void addImage(java.awt.image.BufferedImage image, java.lang.String description)
          Adds an image with a description.
 void clear()
          Removes all images
static void main(java.lang.String[] args)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseReleased, mouseWheelMoved
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImagesViewer

public ImagesViewer(java.lang.String title)
Creates an ImagesViewer that is not a mainWindow (closing it doesn't exits the application automatically.

Parameters:
title - a title for this ImagesViewer window

ImagesViewer

public ImagesViewer(java.lang.String title,
                    boolean mainWindow)
Creates an ImagesViewer. If mainWindow is true, closing this window makes the exit automatically.

Parameters:
title - a title for this ImagesViewer window
Method Detail

addImage

public void addImage(java.awt.image.BufferedImage image)
Adds an image with empty description.

Parameters:
image - a BufferedImage

addImage

public void addImage(java.awt.image.BufferedImage image,
                     java.lang.String description)
Adds an image with a description.

Parameters:
image - a BufferedImage
description - a String

clear

public void clear()
Removes all images


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class java.awt.event.MouseAdapter

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class java.awt.event.MouseAdapter

main

public static void main(java.lang.String[] args)