org.problets.lib.conceptmap.view
Class MousePressedInfo

java.lang.Object
  extended by org.problets.lib.conceptmap.view.MousePressedInfo

public class MousePressedInfo
extends java.lang.Object

Used to store information about the mouse pressed event, namely if the mouse was pressed on a node or on a link and.

Author:
Adrain Maries

Constructor Summary
MousePressedInfo(int inNodePressed, boolean inLinkPressed)
          Creates a MousePressedInfo using the flag which indicates if a node was pressed or not and the flag which indicates if a link was pressed or not.
 
Method Summary
 boolean getLinkPressed()
          Returns true if a link was clicked and false otherwise.
 int getNodePressed()
          Returns ROOT_PRESSED if the mouse has been pressed on a root, NON_ROOT_PRESSED if the mouse was pressed on a node other than the root and NO_NODE_PRESSED if the was mouse wasn't pressed on any node.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MousePressedInfo

public MousePressedInfo(int inNodePressed,
                        boolean inLinkPressed)
Creates a MousePressedInfo using the flag which indicates if a node was pressed or not and the flag which indicates if a link was pressed or not.

Parameters:
inNodePressed - ROOT_PRESSED if the mouse has been pressed on a root, NON_ROOT_PRESSED if the mouse was pressed on a node other than the root and NO_NODE_PRESSED if the was mouse wasn't pressed on any node.
inLinkPressed - true if a link was pressed, false otherwise
Method Detail

getNodePressed

public int getNodePressed()
Returns ROOT_PRESSED if the mouse has been pressed on a root, NON_ROOT_PRESSED if the mouse was pressed on a node other than the root and NO_NODE_PRESSED if the was mouse wasn't pressed on any node.

Returns:
the status of the nodePressed flag clicked by the user.

getLinkPressed

public boolean getLinkPressed()
Returns true if a link was clicked and false otherwise.

Returns:
true if a link was clicked and false otherwise

main

public static void main(java.lang.String[] args)