public interface PreviewMouseListener
Listener for mouse events in Preview.
Listeners will always receive left mouse button events. Right button is reserved for zooming and moving the canvas
In order to enable a PreviewMouseListener
, annotate it with ServiceProvider
annotation and implement MouseResponsiveRenderer
in a Renderer
and return true for the listener in the needsPreviewMouseListener
method.
Modifier and Type | Method and Description |
---|---|
void |
mouseClicked(PreviewMouseEvent event,
PreviewProperties properties,
Workspace workspace)
A single click event.
|
void |
mouseDragged(PreviewMouseEvent event,
PreviewProperties properties,
Workspace workspace)
If your listener needs to receive drag events, you must mark the previous press event as consumed.
|
void |
mousePressed(PreviewMouseEvent event,
PreviewProperties properties,
Workspace workspace)
A mouse press event.
|
void |
mouseReleased(PreviewMouseEvent event,
PreviewProperties properties,
Workspace workspace)
If your listener needs to receive release events, you must mark the previous press event as consumed.
|
void mouseClicked(PreviewMouseEvent event, PreviewProperties properties, Workspace workspace)
event
- Mouse eventproperties
- Preview properties for the workspaceworkspace
- Current workspacevoid mousePressed(PreviewMouseEvent event, PreviewProperties properties, Workspace workspace)
event
- Mouse eventproperties
- Preview properties for the workspaceworkspace
- Current workspacevoid mouseDragged(PreviewMouseEvent event, PreviewProperties properties, Workspace workspace)
event
- Mouse eventproperties
- Preview properties for the workspaceworkspace
- Current workspacevoid mouseReleased(PreviewMouseEvent event, PreviewProperties properties, Workspace workspace)
event
- Mouse eventproperties
- Preview properties for the workspaceworkspace
- Current workspaceCopyright © 2007–2017 Gephi Consortium. All rights reserved.