Prefix classes

This commit is contained in:
Sebastián Katzer 2019-01-29 01:39:49 +01:00
parent 6c16959267
commit fc2bbeca53
4 changed files with 19 additions and 20 deletions

View File

@ -104,17 +104,17 @@
<source-file src="src/android/AssetUtil.java"
target-dir="src/de/appplant/cordova/plugin/printer" />
<source-file src="src/android/Options.java"
target-dir="src/de/appplant/cordova/plugin/printer" />
<source-file src="src/android/PdfAdapter.java"
target-dir="src/de/appplant/cordova/plugin/printer" />
<source-file src="src/android/Printer.java"
target-dir="src/de/appplant/cordova/plugin/printer" />
<source-file src="src/android/PrintManager.java"
target-dir="src/de/appplant/cordova/plugin/printer" />
<source-file src="src/android/PrintOptions.java"
target-dir="src/de/appplant/cordova/plugin/printer" />
<source-file src="src/android/PrintPdfAdapter.java"
target-dir="src/de/appplant/cordova/plugin/printer" />
</platform>
<!-- windows -->

View File

@ -24,7 +24,6 @@ package de.appplant.cordova.plugin.printer;
import android.content.Context;
import android.graphics.Bitmap;
import android.print.PrintAttributes;
import android.print.PrintDocumentAdapter;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.print.PrintHelper;
@ -125,9 +124,9 @@ class PrintManager {
private void printPdf (String path, JSONObject settings,
@Nullable PrintHelper.OnPrintFinishCallback callback)
{
Options options = new Options(settings);
PrintOptions options = new PrintOptions(settings);
String jobName = options.getJobName();
PrintDocumentAdapter adapter = new PdfAdapter(path, context);
PrintPdfAdapter adapter = new PrintPdfAdapter(path, context);
PrintAttributes attributes = options.toPrintAttributes();
getPrintService().print(jobName, adapter, attributes);
@ -148,7 +147,7 @@ class PrintManager {
if (bitmap == null) return;
Options options = new Options(settings);
PrintOptions options = new PrintOptions(settings);
PrintHelper printer = new PrintHelper(context);
String jobName = options.getJobName();

View File

@ -40,7 +40,7 @@ import static android.support.v4.print.PrintHelper.SCALE_MODE_FIT;
/**
* Wrapper for the print job settings.
*/
class Options {
class PrintOptions {
// The print job settings
private @NonNull JSONObject spec;
@ -50,7 +50,7 @@ class Options {
*
* @param spec The print job settings.
*/
Options (@NonNull JSONObject spec)
PrintOptions (@NonNull JSONObject spec)
{
this.spec = spec;
}

View File

@ -39,7 +39,7 @@ import static android.print.PrintDocumentInfo.CONTENT_TYPE_DOCUMENT;
/**
* Document adapter to render and print PDF files.
*/
class PdfAdapter extends PrintDocumentAdapter {
class PrintPdfAdapter extends PrintDocumentAdapter {
// The application context
private @NonNull Context context;
@ -52,7 +52,7 @@ class PdfAdapter extends PrintDocumentAdapter {
*
* @param context The context where to look for.
*/
PdfAdapter (@NonNull String path, @NonNull Context context)
PrintPdfAdapter (@NonNull String path, @NonNull Context context)
{
this.path = path;
this.context = context;