Source code: org/fudaa/ebli/impression/EbliPageable.java
1 /*
2 * @file EbliPageable.java
3 * @creation 2001-09-27
4 * @modification $Date: 2002/06/18 14:30:09 $
5 * @license GNU General Public License 2
6 * @copyright (c)1998-2001 CETMEF 2 bd Gambetta F-60231 Compiegne
7 * @mail devel@fudaa.org
8 */
9
10 package org.fudaa.ebli.impression;
11
12
13 import java.awt.Graphics;
14 import java.awt.print.PageFormat;
15 import java.awt.print.Pageable;
16
17 import com.memoire.bu.BuInformationsDocument;
18 import com.memoire.bu.BuInformationsSoftware;
19
20 /**
21 * Une interface qui permet de mieux gerer l'impression des documents. Si
22 * l'interface est etendue par un <code>JComponent</code>, il est possible de
23 * modifier des parametres grace aux proprietes(cf les constantes KEY) avec
24 * la methode <code>JComponent.putClientProperty</code>.Il est conseille de
25 * deleguer les operations a <code>EbliPageableDelegate</code>.Il est possible
26 * de s'inspirer de <code>BGraphe</code> pour l'utilisation de cette interface.
27 *
28 * @version $Id: EbliPageable.java,v 1.4 2002/06/18 14:30:09 deniger Exp $
29 * @author Fred Deniger
30 * @see EbliPageableDelegate
31 * @see org.fudaa.ebli.graphe.BGraphe
32 */
33 public interface EbliPageable extends Pageable
34 {
35
36 /**
37 * La chaine utilisee comme cle dans les "client property" des <code>
38 * JComponent</code> pour retrouver la valeur du
39 * <code>DefaultPageFormat</code>. La valeur correspondante doit donc
40 * etre une instance de <code>EbliPageFormat</code>.
41 */
42 String DEFAULT_PAGE_FORMAT="DefaultPageFormat";
43
44
45 /**
46 * La methode centrale qui permet d'imprimer (idem que celle de l'interface
47 * printable). Le format <code>_format</code> sera celui donne par la methode
48 * <code>Pageable.getPageFormat(int)</code>.
49 *
50 * @return <code>Printable.PAGE_EXISTS</code> si la page existe,
51 * sinon <code>Printable.NO_SUCH_PAGE</code>.
52 */
53 int print(Graphics _g,PageFormat _format, int _page);
54
55 /**
56 * Renvoie les informations sur le document.
57 */
58 BuInformationsDocument getInformationsDocument();
59
60 /**
61 * Renvoie les informations sur l'application.
62 */
63 BuInformationsSoftware getInformationsSoftware();
64
65
66 /**
67 * Renvoie le format par defaut.Cette methode peut etre deleguee.
68 */
69 EbliPageFormat getDefaultEbliPageFormat();
70
71
72
73
74 }