ch.epfl.craft.maglib.event
Class UpdateEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bych.epfl.craft.maglib.event.UpdateEvent
All Implemented Interfaces:
java.io.Serializable

public class UpdateEvent
extends java.util.EventObject

This kind of event indicates that a change has occured in the state of this application that requires an update of the MagnetNodes positions.

Author:
Jerome Caffaro
See Also:
Serialized Form

Field Summary
static int ADDED_OR_REMOVED_MAGNET
          A magnet has been added or removed
static int ADDED_OR_REMOVED_VISIBLE_NODES
          The number of visible nodes has changed
static int FORCE_FIELD_CHANGED
          The force field of a magnet has changed
static int NODE_DRAGGED
          A node was dragged in the view
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
UpdateEvent(java.lang.Object source, int kind)
          Instantiates a new UpdateEvent object with a given kind.
 
Method Summary
 int getKind()
          Returns the kind of this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NODE_DRAGGED

public static int NODE_DRAGGED
A node was dragged in the view


ADDED_OR_REMOVED_MAGNET

public static int ADDED_OR_REMOVED_MAGNET
A magnet has been added or removed


ADDED_OR_REMOVED_VISIBLE_NODES

public static int ADDED_OR_REMOVED_VISIBLE_NODES
The number of visible nodes has changed


FORCE_FIELD_CHANGED

public static int FORCE_FIELD_CHANGED
The force field of a magnet has changed

Constructor Detail

UpdateEvent

public UpdateEvent(java.lang.Object source,
                   int kind)
Instantiates a new UpdateEvent object with a given kind.

Parameters:
source - the source on wich the event occured
kind - the kind of event
Method Detail

getKind

public int getKind()
Returns the kind of this event.

Returns:
the kind of this event


Copyright © CRAFT EPFL. All Rights Reserved.