13 |
ilm |
1 |
/*
|
|
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
|
|
3 |
*
|
185 |
ilm |
4 |
* Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
|
13 |
ilm |
5 |
*
|
|
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
|
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
|
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
|
|
9 |
* language governing permissions and limitations under the License.
|
|
|
10 |
*
|
|
|
11 |
* When distributing the software, include this License Header Notice in each file.
|
|
|
12 |
*/
|
|
|
13 |
|
|
|
14 |
package org.jopendocument.link;
|
|
|
15 |
|
149 |
ilm |
16 |
import java.awt.print.PrinterJob;
|
13 |
ilm |
17 |
import java.io.File;
|
|
|
18 |
import java.util.Map;
|
|
|
19 |
import java.util.concurrent.Future;
|
|
|
20 |
|
|
|
21 |
public abstract class Component {
|
|
|
22 |
|
|
|
23 |
private final OOConnexion parent;
|
|
|
24 |
|
|
|
25 |
protected Component(OOConnexion parent) {
|
|
|
26 |
super();
|
|
|
27 |
this.parent = parent;
|
|
|
28 |
}
|
|
|
29 |
|
|
|
30 |
public OOConnexion getParent() {
|
|
|
31 |
return this.parent;
|
|
|
32 |
}
|
|
|
33 |
|
149 |
ilm |
34 |
public abstract void printDocument(PrinterJob job);
|
13 |
ilm |
35 |
|
|
|
36 |
public final void printDocument(final Map<String, ?> printProps) {
|
|
|
37 |
printDocument(printProps, null);
|
|
|
38 |
}
|
|
|
39 |
|
|
|
40 |
/**
|
93 |
ilm |
41 |
* Force le recalcul des formules. (Les formules ne sont plus actualisées à l'ouverture du
|
|
|
42 |
* document à partir de LO 4)
|
|
|
43 |
*
|
|
|
44 |
* @throws Exception if the component couldn't be obtained or the refresh failed.
|
|
|
45 |
*/
|
|
|
46 |
public abstract void refreshFormulas() throws Exception;
|
|
|
47 |
|
|
|
48 |
/**
|
13 |
ilm |
49 |
* Impression d'un document sur une imprimante spécifique
|
|
|
50 |
*
|
|
|
51 |
* @param printProps Propriétés de l'imprimante (nom, ...) si null alors conserve les propriétés
|
|
|
52 |
* par défaut du modéle
|
|
|
53 |
* @param printOpt
|
|
|
54 |
*/
|
149 |
ilm |
55 |
public abstract void printDocument(final Map<String, ?> printProps, final Map<String, ?> printOpt) throws IllegalArgumentException;
|
13 |
ilm |
56 |
|
93 |
ilm |
57 |
public abstract Future<String> save();
|
|
|
58 |
|
13 |
ilm |
59 |
public final Future<File> saveToPDF(final File dest) {
|
|
|
60 |
return saveToPDF(dest, "calc_pdf_Export");
|
|
|
61 |
}
|
|
|
62 |
|
|
|
63 |
public abstract Future<File> saveToPDF(final File dest, final String filter);
|
|
|
64 |
|
|
|
65 |
public abstract void close();
|
|
|
66 |
}
|