GraphLab Project

graphlab.graph.event
Class GraphEvent

java.lang.Object
  extended by graphlab.graph.event.GraphEvent

public class GraphEvent
extends java.lang.Object

An event which indicates that a graph action occurred.

Author:
Azin Azadi

Field Summary
static int CLICKED
           
static int DRAGGING
          after start of dragging ,DRAGGING mouse move event will occur until the drop action
static int DRAGGING_STARTED
          indicates the start of dragging of mouse on graph.
static int DROPPED
          indicates drop action after a drag event.
static java.lang.String EVENT_KEY
           
 int eventType
           
 GraphModel graph
           
 boolean isMouseEntered
          in the case that event occurs because of a GRAPH_MOUSE_ENTERED_EXITED event isMouseEntered will show that is mouse entered to the vertex (true) otherwise mouse exited from the vertex (false)
 boolean isNotified
          in the case that event occurs because of a NOTIFIED of UNNOTIFIED event isNotified will show that is vertex notified (true) or unNotified (false)
 int modifiers
           
static int MOUSE_ENTERED_EXITED
           
static int MOUSE_MOVED
          indicates moving of the mouse on graph
static int MOUSE_WHEEL_MOVED
          indicates moving the wheel of the mouse on graph
 int mouseBtn
           
 GraphPoint mousePos
          position of mouse according to top left point of graph
 int mouseWheelMoveAmount
          the amount which mouse wheel is scrolled, positive or negative
static int NOTIFIED
           
 
Constructor Summary
GraphEvent(int eventType, GraphModel e, GraphPoint mousePos, int mouseBtn_or_mouseWheelMoveAmount, boolean isNotified, boolean isMouseEntered, boolean isDragged, int modifiersEx)
           
 
Method Summary
static GraphEvent dragging(GraphModel g, GraphPoint mousePos, int mouseBtn, int modifiersEx)
           
static GraphEvent graphNotified(GraphModel g, int modifiersEx)
           
static GraphEvent graphUnNotified(GraphModel g, int modifiersEx)
           
static GraphEvent mouseClicked(GraphModel g, GraphPoint mousePos, int mouseBtn, int modifiersEx)
           
static GraphEvent mouseDraggingStarted(GraphModel g, GraphPoint mousePos, int mouseBtn, int modifiersEx)
           
static GraphEvent mouseDropped(GraphModel g, GraphPoint mousePos, int mouseBtn, int modifiersEx)
           
static GraphEvent mouseEntered(GraphModel g, GraphPoint mousePos, int mouseBtn, int modifiersEx)
           
static GraphEvent mouseExited(GraphModel g, GraphPoint mousePos, int mouseBtn, int modifiersEx)
           
static GraphEvent mouseMoved(GraphModel g, GraphPoint mousePos, int mouseBtn, int modifiersEx)
           
static GraphEvent mouseWheelMoved(GraphModel g, GraphPoint mousePos, int mouseWheelMoveAmount, int modifiersEx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_KEY

public static final java.lang.String EVENT_KEY
See Also:
Constant Field Values

CLICKED

public static final int CLICKED
See Also:
Constant Field Values

MOUSE_ENTERED_EXITED

public static final int MOUSE_ENTERED_EXITED
See Also:
Constant Field Values

NOTIFIED

public static final int NOTIFIED
See Also:
Constant Field Values

DRAGGING_STARTED

public static final int DRAGGING_STARTED
indicates the start of dragging of mouse on graph. It is somehow like Mouse Pressed event in swing.

See Also:
Constant Field Values

DRAGGING

public static final int DRAGGING
after start of dragging ,DRAGGING mouse move event will occur until the drop action

See Also:
Constant Field Values

DROPPED

public static final int DROPPED
indicates drop action after a drag event. (Dragging finished)

See Also:
Constant Field Values

MOUSE_MOVED

public static final int MOUSE_MOVED
indicates moving of the mouse on graph

See Also:
Constant Field Values

MOUSE_WHEEL_MOVED

public static final int MOUSE_WHEEL_MOVED
indicates moving the wheel of the mouse on graph

See Also:
Constant Field Values

eventType

public int eventType

graph

public GraphModel graph

mousePos

public GraphPoint mousePos
position of mouse according to top left point of graph


mouseWheelMoveAmount

public int mouseWheelMoveAmount
the amount which mouse wheel is scrolled, positive or negative

See Also:
MouseWheelEvent

mouseBtn

public int mouseBtn

modifiers

public int modifiers
See Also:
-> getModifiersEx

isMouseEntered

public boolean isMouseEntered
in the case that event occurs because of a GRAPH_MOUSE_ENTERED_EXITED event isMouseEntered will show that is mouse entered to the vertex (true) otherwise mouse exited from the vertex (false)


isNotified

public boolean isNotified
in the case that event occurs because of a NOTIFIED of UNNOTIFIED event isNotified will show that is vertex notified (true) or unNotified (false)

Constructor Detail

GraphEvent

public GraphEvent(int eventType,
                  GraphModel e,
                  GraphPoint mousePos,
                  int mouseBtn_or_mouseWheelMoveAmount,
                  boolean isNotified,
                  boolean isMouseEntered,
                  boolean isDragged,
                  int modifiersEx)
Method Detail

mouseClicked

public static GraphEvent mouseClicked(GraphModel g,
                                      GraphPoint mousePos,
                                      int mouseBtn,
                                      int modifiersEx)

mouseEntered

public static GraphEvent mouseEntered(GraphModel g,
                                      GraphPoint mousePos,
                                      int mouseBtn,
                                      int modifiersEx)

mouseExited

public static GraphEvent mouseExited(GraphModel g,
                                     GraphPoint mousePos,
                                     int mouseBtn,
                                     int modifiersEx)

mouseDraggingStarted

public static GraphEvent mouseDraggingStarted(GraphModel g,
                                              GraphPoint mousePos,
                                              int mouseBtn,
                                              int modifiersEx)

dragging

public static GraphEvent dragging(GraphModel g,
                                  GraphPoint mousePos,
                                  int mouseBtn,
                                  int modifiersEx)

mouseDropped

public static GraphEvent mouseDropped(GraphModel g,
                                      GraphPoint mousePos,
                                      int mouseBtn,
                                      int modifiersEx)

mouseMoved

public static GraphEvent mouseMoved(GraphModel g,
                                    GraphPoint mousePos,
                                    int mouseBtn,
                                    int modifiersEx)

graphNotified

public static GraphEvent graphNotified(GraphModel g,
                                       int modifiersEx)

graphUnNotified

public static GraphEvent graphUnNotified(GraphModel g,
                                         int modifiersEx)

mouseWheelMoved

public static GraphEvent mouseWheelMoved(GraphModel g,
                                         GraphPoint mousePos,
                                         int mouseWheelMoveAmount,
                                         int modifiersEx)

GraphLab Project