org.grinvin.gred.mouse

Class AddVertices


public class AddVertices
extends NullMouseHandler

Mouse handler that adds a vertex at the given position. Consumes all first button click events.

Method Summary

@Override
boolean canHandle(JComponent parent)
This mouse handler needs a MutableGraphPanel as parent.
static AddVertices
getHandler()
Return the singleton object of this type.
@Override
void doMouseClicked(JComponent parent, MouseEvent mouseEvent)
Adds a new vertex at the position clicked.

Method Details

boolean canHandle

public @Override boolean canHandle(JComponent parent)

getHandler

public static AddVertices getHandler()
Return the singleton object of this type.

void doMouseClicked

public @Override void doMouseClicked(JComponent parent,
                                     MouseEvent mouseEvent)
Adds a new vertex at the position clicked.