org.faceless.pdf2.viewer2
Class PagePanelInteractionEvent

java.lang.Object
  extended by org.faceless.pdf2.viewer2.PagePanelInteractionEvent

public class PagePanelInteractionEvent
extends Object

Represents an interaction (currently only mouse) event on a PagePanel. To capture these events, implement the PagePanelInteractionListener interface and register via the PagePanel.addPagePanelInteractionListener() or DocumentViewport.addPagePanelInteractionListener() methods. Be sure to check the getType() method to see what sort of event it is - current values include:

mouseEnteredRaised when the mouseEntered event is raised
mouseExitedRaised when the mouseExited event is raised
mousePressedRaised when the mousePressed event is raised
mouseReleasedRaised when the mouseReleased event is raised
mouseClickedRaised when the mouseClicked event is raised
mouseMovedRaised when the mouseMoved event is raised
mouseDraggedRaised when the mouseDragged event is raised

This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.

Since:
2.8

Method Summary
 PagePanelInteractionEvent getEventOnNewPanel()
          If the MouseEvent that triggered this event was a "mouseDragged" MouseEvent, and the mouse has been dragged from the original PagePanel to a new PagePanel, return a new PagePanelInteractionEvent which reflects the event on the new PagePanel.
 MouseEvent getMouseEvent()
          Return the MouseEvent that caused this event
 PDFPage getPage()
          Get the Page this event refers to
 PagePanel getPagePanel()
          Get the PagePanel this event refers to
 Point2D getPoint()
          Return the Point in PDF-space where this event occured
 String getType()
          Get the type of event
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public String toString()
Overrides:
toString in class Object

getPagePanel

public PagePanel getPagePanel()
Get the PagePanel this event refers to


getType

public String getType()
Get the type of event


getPage

public PDFPage getPage()
Get the Page this event refers to


getPoint

public Point2D getPoint()
Return the Point in PDF-space where this event occured


getMouseEvent

public MouseEvent getMouseEvent()
Return the MouseEvent that caused this event

Since:
2.8.5

getEventOnNewPanel

public PagePanelInteractionEvent getEventOnNewPanel()
If the MouseEvent that triggered this event was a "mouseDragged" MouseEvent, and the mouse has been dragged from the original PagePanel to a new PagePanel, return a new PagePanelInteractionEvent which reflects the event on the new PagePanel. If the mouse was dragged onto something other than a PagePanel, return null. If the mouse is still on the original PagePanel, return this event.

Since:
2.11.19


Copyright © 2001-2013 Big Faceless Organization