verinec.gui.configurator
Class WireConnectionListener

java.lang.Object
  extended by java.awt.event.MouseAdapter
      extended by verinec.gui.configurator.WireConnectionListener
All Implemented Interfaces:
MouseListener, MouseMotionListener, EventListener

 class WireConnectionListener
extends MouseAdapter
implements MouseMotionListener

Mouse listener for MultiBindings and SingleInterfaces to detect connection of a wire. In order to get a preview, listens also to drag events.


Field Summary
private  Configurator configurator
           
private  int oldState
          Store the old edit state of the panel.
private  VerinecStudio studio
           
private  NwComponent target
           
 
Constructor Summary
WireConnectionListener(Configurator configurator, VerinecStudio studio)
          Constructor for the listener.
 
Method Summary
 void mouseDragged(MouseEvent e)
          Dragging on the interface must be forwared to the DrawPanel.
 void mouseMoved(MouseEvent e)
          Ignore.
 void mousePressed(MouseEvent e)
          When an interface is selected with left button, we want to connect it to other interface or hub.
 void mouseReleased(MouseEvent e)
          Determines where the binding should be added to.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configurator

private final Configurator configurator

studio

private final VerinecStudio studio

target

private NwComponent target

oldState

private int oldState
Store the old edit state of the panel.

Constructor Detail

WireConnectionListener

public WireConnectionListener(Configurator configurator,
                              VerinecStudio studio)
Constructor for the listener.

Parameters:
configurator - The configuration module class.
studio - The main application class.
Method Detail

mouseReleased

public void mouseReleased(MouseEvent e)
Determines where the binding should be added to.

Specified by:
mouseReleased in interface MouseListener
Overrides:
mouseReleased in class MouseAdapter
Parameters:
e - The mouse click event.

mousePressed

public void mousePressed(MouseEvent e)
When an interface is selected with left button, we want to connect it to other interface or hub. Tell DrawPanel about it.

Specified by:
mousePressed in interface MouseListener
Overrides:
mousePressed in class MouseAdapter
Parameters:
e - The event.

mouseDragged

public void mouseDragged(MouseEvent e)
Dragging on the interface must be forwared to the DrawPanel.

Specified by:
mouseDragged in interface MouseMotionListener
Parameters:
e - The event.

mouseMoved

public void mouseMoved(MouseEvent e)
Ignore. This is an event required by MouseMotionListener.

Specified by:
mouseMoved in interface MouseMotionListener
Parameters:
e - The event.

Copyright © 2005 Verinec, DIUF