org.jpedal.examples.viewer.gui.javafx.JavaFXMousePanMode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of OpenViewerFX Show documentation
Show all versions of OpenViewerFX Show documentation
Open Source (LGPL) JavaFX PDF Viewer
/*
* ===========================================
* Java Pdf Extraction Decoding Access Library
* ===========================================
*
* Project Info: http://www.idrsolutions.com
* Help section for developers at http://www.idrsolutions.com/support/
*
* (C) Copyright 1997-2017 IDRsolutions and Contributors.
*
* This file is part of JPedal/JPDF2HTML5
*
@LICENSE@
*
* ---------------
* JavaFXMousePanMode.java
* ---------------
*/
package org.jpedal.examples.viewer.gui.javafx;
import javafx.scene.Cursor;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import org.jpedal.PdfDecoderFX;
public class JavaFXMousePanMode implements JavaFXMouseFunctionality {
//private Point currentPoint;
//private Rectangle currentView;
private final PdfDecoderFX decode_pdf;
public JavaFXMousePanMode(final PdfDecoderFX decode_pdf) {
this.decode_pdf = decode_pdf;
}
@Override
public void mouseClicked(final MouseEvent e) {
}
@Override
public void mouseEntered(final MouseEvent e) {
}
@Override
public void mouseExited(final MouseEvent e) {
}
@Override
public void mousePressed(final MouseEvent e) {
if (e.getButton().equals(MouseButton.PRIMARY) || e.getButton().equals(MouseButton.MIDDLE)) {
//set cursor
decode_pdf.setCursor(Cursor.CLOSED_HAND);
}
}
@Override
public void mouseReleased(final MouseEvent e) {
decode_pdf.setCursor(Cursor.OPEN_HAND);
}
@Override
public void mouseDragged(final MouseEvent e) {
}
@Override
public void mouseMoved(final MouseEvent e) {
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy