Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: jpicedt/graphic/io/formatter/FormatterFactory.java


1   /*
2    FormatterFactory.java - February 26, 2002 - jPicEdt 1.3.2, a picture editor for LaTeX.
3    Copyright (C) 1999-2002 Sylvain Reynal
4   
5    Département de Physique
6    Ecole Nationale Supérieure de l'Electronique et de ses Applications (ENSEA)
7    6, avenue du Ponceau
8    F-95014 CERGY CEDEX
9   
10   Tel : +33 130 736 245
11   Fax : +33 130 736 667
12   e-mail : reynal@ensea.fr
13   jPicEdt web page : http://www.jpicedt.org
14    
15   This program is free software; you can redistribute it and/or
16   modify it under the terms of the GNU General Public License
17   as published by the Free Software Foundation; either version 2
18   of the License, or any later version.
19    
20   This program is distributed in the hope that it will be useful,
21   but WITHOUT ANY WARRANTY; without even the implied warranty of
22   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23   GNU General Public License for more details.
24    
25   You should have received a copy of the GNU General Public License
26   along with this program; if not, write to the Free Software
27   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
28   */
29  
30  package jpicedt.graphic.io.formatter;
31  
32  import jpicedt.graphic.model.Element;
33  import jpicedt.graphic.model.Drawing;
34  
35  public interface FormatterFactory {
36    
37    /** a constraint to indicate that the created Formatter should be able to 
38     *  create a standalone String which once save, can be directly fed to, e.g., latex or ghostview,...
39     * as opposed to a "picture environment" file which still has to be included in a LaTeX file
40     */
41    public static final String MAKE_STANDALONE_FILE = "make-standalone-file";
42    
43    /** 
44     * @return a Formatter able to format the given Element according to the format of this factory
45     */
46    Formatter createFormatter(Element e);
47    
48    /** 
49     * @return a Formatter able to format the given Drawing according to the format of this factory ;
50     *         this may reliy on calls to <code>createFormatter(Element e)</code> on the elements
51     *         of the drawing, plus creating auxiliary
52     * @param outputConstraint constraint used by the factory to create a specific Formatter on-the-fly
53     */
54    Formatter createFormatter(Drawing d, Object outputConstraint);
55    
56  }