org.problets.lib.conceptmap.view.userbuilt
Class UserBuiltLinkView
java.lang.Object
org.problets.lib.conceptmap.view.LinkView
org.problets.lib.conceptmap.view.userbuilt.UserBuiltLinkView
public class UserBuiltLinkView
- extends LinkView
Derived from LinkView. Adds to the functionality of a
link view in order to handle a user-built node view. User-built
link views have an extra flag, isCorrect, which enable them to
give feedback to the user (by being drawn red for incorrect and
green for correct)
- Author:
- Adrian Maries
Method Summary |
boolean |
isOnLink(int xPos,
int yPos)
Checks if any mouse event (given by the coordinates passed as arguments)
occurred inside this link view. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserBuiltLinkView
public UserBuiltLinkView(UserBuiltNodeView source,
UserBuiltNodeView target,
UserBuiltLinkModel linkModel)
- Creates a UserBuiltLinkView object using the source and target node
views and the link model as arguments.
- Parameters:
source
- the source (originating) node viewtarget
- the target (destinatiuon) node viewlinkModel
- the link model for which this view is created
isOnLink
public boolean isOnLink(int xPos,
int yPos)
- Checks if any mouse event (given by the coordinates passed as arguments)
occurred inside this link view.
- Parameters:
x
- the x-coordinate of the mouse eventy
- the y-coordinate of the mouse event
- Returns:
- true if a mouse event occurred inside this link view, false otherwise
main
public static void main(java.lang.String[] args)