de.uni_paderborn.fujaba.fsa.listener
Class ComponentCursorListener

java.lang.Object
  extended byjavax.swing.event.MouseInputAdapter
      extended byde.uni_paderborn.fujaba.fsa.listener.ComponentMouseListener
          extended byde.uni_paderborn.fujaba.fsa.listener.ComponentCursorListener
All Implemented Interfaces:
AscendDescendMouseHandler.Ascend, java.util.EventListener, javax.swing.event.MouseInputListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener

public class ComponentCursorListener
extends ComponentMouseListener
implements AscendDescendMouseHandler.Ascend

This listener is responsible to set the cursor of a resizable component.

Version:
$Revision: 1.12 $
Author:
$Author: lowende $

Field Summary
private  java.awt.Cursor[] cursors
          Internal used array to set the different cursors when the mouse is moved on a component.
private  java.awt.Cursor lastCursor
          Internal used attribute to store the cursor of the component before it is changed by this listener.
private static ComponentCursorListener listener
          The attribute to implement the Singleton design pattern.
 
Fields inherited from class de.uni_paderborn.fujaba.fsa.listener.ComponentMouseListener
DISTANCE, EAST, INNER, lastComponent, NORTH, SOUTH, UNKNOWN, WEST
 
Constructor Summary
private ComponentCursorListener()
          The private constructor to implement the Singleton design pattern.
 
Method Summary
static ComponentCursorListener get()
          The public method to get the singleton instance.
 void mouseEntered(java.awt.event.MouseEvent event)
          Overwrites the mouseEntered method of ComponentMouseListener.
 void mouseExited(java.awt.event.MouseEvent event)
          Overwrites the mouseExited method of ComponentMouseListener.
 void mouseMoved(java.awt.event.MouseEvent event)
          Overwrites the mouseMoved method of ComponentMouseListener.
private  void setCursorOfComponent(java.awt.Component comp, java.awt.event.MouseEvent event)
          Internal used method to set the cursor of the component.
 
Methods inherited from class de.uni_paderborn.fujaba.fsa.listener.ComponentMouseListener
getOrientation, setOrientation, setOrientation
 
Methods inherited from class javax.swing.event.MouseInputAdapter
mouseClicked, mouseDragged, mousePressed, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listener

private static ComponentCursorListener listener
The attribute to implement the Singleton design pattern. Only one system wide instance of this kind of listener is needed.


cursors

private java.awt.Cursor[] cursors
Internal used array to set the different cursors when the mouse is moved on a component.


lastCursor

private java.awt.Cursor lastCursor
Internal used attribute to store the cursor of the component before it is changed by this listener.

Constructor Detail

ComponentCursorListener

private ComponentCursorListener()
The private constructor to implement the Singleton design pattern.

Method Detail

get

public static ComponentCursorListener get()
The public method to get the singleton instance.

Returns:
No description provided

setCursorOfComponent

private void setCursorOfComponent(java.awt.Component comp,
                                  java.awt.event.MouseEvent event)
Internal used method to set the cursor of the component.

Parameters:
comp - The new cursorOfComponent value
event - The new cursorOfComponent value

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent event)
Overwrites the mouseEntered method of ComponentMouseListener. An entered event sets the cursor of the component by calling the internal method setCursorOfComponent.

Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
event - No description provided

mouseExited

public void mouseExited(java.awt.event.MouseEvent event)
Overwrites the mouseExited method of ComponentMouseListener. An exited event sets the cursor of the component by calling the internal method setCursorOfComponent.

Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
event - No description provided

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent event)
Overwrites the mouseMoved method of ComponentMouseListener. A moved event sets the cursor of the component by calling the internal method setCursorOfComponent.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Parameters:
event - No description provided