gistoolkit.application
Class PopupListener

java.lang.Object
  extended bygistoolkit.application.PopupListener
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, java.awt.event.MouseListener

public class PopupListener
extends java.lang.Object
implements java.awt.event.MouseListener, java.awt.event.ActionListener

Class to listen to the GISDisplay and pop up a context sensative menu when the user right clicks.


Constructor Summary
PopupListener(GISDisplay inDisplay)
          Creates a new instance of PopupListener
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent inAe)
          Invoked when an action occurs.
 void clearSelection()
          Utility class to clear the selection.
 void generatePopup()
          Determine what to put on the popup menu.
 GISDisplay getGISDisplay()
          Return a reference to the GISDisplay.
 Layer getLayer()
          Utility class to get the selected layer from the GISDisplay.
 Record[] getRecords()
          Utility class to get the selected records from the GISDisplay.
 void mouseClicked(java.awt.event.MouseEvent e)
          Invoked when the mouse button has been clicked (pressed and released) on a component.
 void mouseEntered(java.awt.event.MouseEvent e)
          Invoked when the mouse enters a component.
 void mouseExited(java.awt.event.MouseEvent e)
          Invoked when the mouse exits a component.
 void mousePressed(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been pressed on a component.
 void mouseReleased(java.awt.event.MouseEvent e)
          Invoked when a mouse button has been released on a component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupListener

public PopupListener(GISDisplay inDisplay)
Creates a new instance of PopupListener

Method Detail

getGISDisplay

public GISDisplay getGISDisplay()
Return a reference to the GISDisplay.


getRecords

public Record[] getRecords()
Utility class to get the selected records from the GISDisplay.


getLayer

public Layer getLayer()
Utility class to get the selected layer from the GISDisplay.


clearSelection

public void clearSelection()
Utility class to clear the selection.


generatePopup

public void generatePopup()
Determine what to put on the popup menu.


mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse button has been clicked (pressed and released) on a component.

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component.

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component.

Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component.

Specified by:
mouseReleased in interface java.awt.event.MouseListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent inAe)
Invoked when an action occurs.

Specified by:
actionPerformed in interface java.awt.event.ActionListener