org.jpedal.external.FXExternalHandlers 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 for NetBeans plugin
/*
* ===========================================
* 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@
*
* ---------------
* FXExternalHandlers.java
* ---------------
*/
package org.jpedal.external;
import org.jpedal.FileAccess;
import org.jpedal.display.GUIModes;
import org.jpedal.objects.acroforms.javafx.JavaFXFormCreator;
import org.jpedal.objects.javascript.ExpressionEngine;
import org.jpedal.parser.DecoderOptions;
import org.jpedal.parser.PDFtoImageConvertor;
import org.jpedal.parser.fx.PDFtoImageConvertorFX;
import org.jpedal.render.FXDisplay;
/**
* @author markee
*/
public class FXExternalHandlers extends ExternalHandlers {
public FXExternalHandlers(final GUIModes guiModes) {
super(guiModes);
}
@Override
public boolean isJavaFX() {
return true;
}
@Override
public void setDVR(final FileAccess fileAccess) {
fileAccess.setDVR(new FXDisplay(1, fileAccess.getObjectStore(), false));
}
@Override
public PDFtoImageConvertor getConverter(final float multiplyer, final DecoderOptions options) {
return new PDFtoImageConvertorFX(multiplyer, options);
}
@Override
public void openPdfFile(final ExpressionEngine userExpressionEngine) {
initObjects(userExpressionEngine, new JavaFXFormCreator());
}
}