public class DefaultMouseManager extends Object implements MouseManager
Modifier and Type | Field and Description |
---|---|
protected GraphicElement |
curElement |
protected GraphicGraph |
graph
The graph to modify according to the view actions.
|
protected View |
view
The view this manager operates upon.
|
protected float |
x1 |
protected float |
y1 |
Constructor and Description |
---|
DefaultMouseManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
elementMoving(GraphicElement element,
MouseEvent event) |
void |
init(GraphicGraph graph,
View view)
Make the manager active on the given graph and view.
|
protected void |
mouseButtonPress(MouseEvent event) |
protected void |
mouseButtonPressOnElement(GraphicElement element,
MouseEvent event) |
protected void |
mouseButtonRelease(MouseEvent event,
ArrayList<GraphicElement> elementsInArea) |
protected void |
mouseButtonReleaseOffElement(GraphicElement element,
MouseEvent event) |
void |
mouseClicked(MouseEvent event) |
void |
mouseDragged(MouseEvent event) |
void |
mouseEntered(MouseEvent event) |
void |
mouseExited(MouseEvent event) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent event) |
void |
mouseReleased(MouseEvent event) |
void |
release()
Release the links between this manager and the view and the graph.
|
protected GraphicGraph graph
protected GraphicElement curElement
protected float x1
protected float y1
public DefaultMouseManager()
public void init(GraphicGraph graph, View view)
MouseManager
init
in interface MouseManager
graph
- The graph to control.view
- The view to control.public void release()
MouseManager
release
in interface MouseManager
protected void mouseButtonPress(MouseEvent event)
protected void mouseButtonRelease(MouseEvent event, ArrayList<GraphicElement> elementsInArea)
protected void mouseButtonPressOnElement(GraphicElement element, MouseEvent event)
protected void elementMoving(GraphicElement element, MouseEvent event)
protected void mouseButtonReleaseOffElement(GraphicElement element, MouseEvent event)
public void mouseClicked(MouseEvent event)
mouseClicked
in interface MouseListener
public void mousePressed(MouseEvent event)
mousePressed
in interface MouseListener
public void mouseDragged(MouseEvent event)
mouseDragged
in interface MouseMotionListener
public void mouseReleased(MouseEvent event)
mouseReleased
in interface MouseListener
public void mouseEntered(MouseEvent event)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent event)
mouseExited
in interface MouseListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses