org.jpedal.examples.viewer.commands.RotationLeft 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@
*
* ---------------
* RotationLeft.java
* ---------------
*/
package org.jpedal.examples.viewer.commands;
import org.jpedal.examples.viewer.Values;
import org.jpedal.gui.GUIFactory;
/**
* Rotates the current document in the Viewer This class is Generic
* and does not need a specific Swing/JavaFX implementation.
*/
public class RotationLeft {
public static void execute(final GUIFactory currentGUI, final Values commonValues) {
if (commonValues.getSelectedFile() != null) {
int rot = currentGUI.getRotation() - 90;
if (rot < 0) {
rot = 270;
}
currentGUI.setRotationFromExternal(rot);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy