Source code: jpicedt/format/pstricks/PstricksConstants.java
1 /*
2 PstricksConstants.java - March 1, 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.format.pstricks;
31
32 import jpicedt.graphic.model.Arrow;
33 import java.awt.*;
34
35 /**
36 * Useful constants used across the jpicedt.format.pstricks package.
37 * @author $Author: reynal $
38 * @version $Id: PstricksConstants.java,v 1.2 2002/08/05 16:44:10 reynal Exp $
39 */
40 public interface PstricksConstants {
41
42 /**
43 * Line separator for the current platform (i.e. "\n" on Unix, "\n\r" on Windows, "\r" on Mac,..)
44 */
45 public static final String CR_LF = System.getProperty("line.separator");
46
47 public static final String KEY_FILE_WRAPPER_PROLOG = "pstricks.file-wrapper-prolog";
48 public static final String KEY_FILE_WRAPPER_EPILOG = "pstricks.file-wrapper-epilog";
49
50 public static final String DEFAULT_FILE_WRAPPER_PROLOG =
51 "\\documentclass{article} "+CR_LF+"\\usepackage{pstricks} "+CR_LF+"\\begin{document} "+CR_LF;
52 public static final String DEFAULT_FILE_WRAPPER_EPILOG = "\\end{document}";
53
54 /**
55 * colours natively supported by PsTricks
56 */
57 Color PST_COLORS[] = {
58 Color.black,
59 Color.darkGray,
60 Color.gray,
61 Color.lightGray,
62 Color.white,
63 Color.red,
64 Color.green,
65 Color.blue,
66 Color.cyan,
67 Color.magenta,
68 Color.yellow};
69
70 /**
71 * associate colours name in the PsTricks syntax (cf. PsTricks's doc p.4)
72 */
73 String PST_COLORNAMES[]={
74 "black",
75 "darkgray",
76 "gray",
77 "lightgray",
78 "white",
79 "red",
80 "green",
81 "blue",
82 "cyan",
83 "magenta",
84 "yellow"};
85
86 /** PsTricks supported Arrow's */
87 Arrow[] PST_ARROWS = {
88 Arrow.NONE,
89 Arrow.ARROW_HEAD,
90 Arrow.REVERSE_ARROW_HEAD,
91 Arrow.DOUBLE_ARROW_HEAD,
92 Arrow.DOUBLE_REVERSE_ARROW_HEAD,
93 Arrow.T_BAR_CENTERED,
94 Arrow.T_BAR_FLUSHED,
95 Arrow.SQUARE_BRACKET,
96 Arrow.ROUNDED_BRACKET,
97 Arrow.CIRCLE_FLUSHED,
98 Arrow.CIRCLE_CENTERED,
99 Arrow.DISK_FLUSHED,
100 Arrow.DISK_CENTERED};
101
102 /** Formatted string for a left arrow */
103 String[] PST_ARROWS_LEFT = {
104 "",
105 "<",
106 ">",
107 "<<",
108 ">>",
109 "|*",
110 "|",
111 "[",
112 "(",
113 "oo",
114 "o",
115 "**",
116 "*"};
117
118 /** Formatted string for a right arrow */
119 String[] PST_ARROWS_RIGHT = {
120 "",
121 ">",
122 "<",
123 ">>",
124 "<<",
125 "|*",
126 "|",
127 "]",
128 ")",
129 "oo",
130 "o",
131 "**",
132 "*"};
133
134 }