VANET Simulator
 All Classes Functions Variables
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
vanetsim.gui.helpers.MouseClickManager Class Reference
Inheritance diagram for vanetsim.gui.helpers.MouseClickManager:

Public Member Functions

void setActive (boolean active)
 
void setDrawArea (DrawingArea drawArea)
 
synchronized void signalPressed (int x, int y)
 
synchronized void signalReleased (int x, int y)
 
void cleanMarkings ()
 
void run ()
 

Static Public Member Functions

static MouseClickManager getInstance ()
 

Public Attributes

boolean active_ = false
 

Detailed Description

A class to correctly handle mouseclicks and drags on the DrawingArea. Furthermore, this class also handles the display in the information text area.

Member Function Documentation

void vanetsim.gui.helpers.MouseClickManager.cleanMarkings ( )
inline

Cleans markings so that objects can be deleted through garbage collector.

static MouseClickManager vanetsim.gui.helpers.MouseClickManager.getInstance ( )
inlinestatic

Gets the single instance of this manager.

Returns
single instance of this manager
void vanetsim.gui.helpers.MouseClickManager.run ( )
inline

The thread which handles mouse drags and information display.

See Also
java.lang.Thread::run()
void vanetsim.gui.helpers.MouseClickManager.setActive ( boolean  active)
inline

Sets the value for the isActive variable.

Parameters
activetrue to signal this thread that the DrawingArea has been entered,false to signal that the area was left
void vanetsim.gui.helpers.MouseClickManager.setDrawArea ( DrawingArea  drawArea)
inline

Sets the vanetsim.gui.DrawingArea this MouseClickManager is associated with.

Parameters
drawAreathe area on which this MouseClickManager operates
synchronized void vanetsim.gui.helpers.MouseClickManager.signalPressed ( int  x,
int  y 
)
inline

Signals this manager that the mouse was pressed. If the edit mode is currently active, the click is forwarded to the edit panel.

Parameters
xthe x coordinate where mouse was pressed
ythe y coordinate where mouse was pressed
synchronized void vanetsim.gui.helpers.MouseClickManager.signalReleased ( int  x,
int  y 
)
inline

Signals this manager that the mouse was released (used for dragging).

Parameters
xthe x coordinate where mouse was released
ythe y coordinate where mouse was released

Member Data Documentation

boolean vanetsim.gui.helpers.MouseClickManager.active_ = false

true if this manager currently is active,false if it's inactive.


The documentation for this class was generated from the following file: