001 
002 /*
003  *  JavaDoq 1.0 - DOCUment JAVA In Source
004  *  Copyright (C) 2008-2011  J.J.Liu<jianjunliu@126.com> <http://www.javadoq.com>
005  *  
006  *  This program is free software: you can redistribute it and/or modify
007  *  it under the terms of the GNU Affero General Public License as published by
008  *  the Free Software Foundation, either version 3 of the License, or
009  *  (at your option) any later version.
010  *  
011  *  This program is distributed in the hope that it will be useful,
012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014  *  GNU Affero General Public License for more details.
015  *  
016  *  You should have received a copy of the GNU Affero General Public License
017  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
018  */
019 
020 package com.javadoq.html;
021 
022 import java.io.File;
023 
024 import com.javadoq.JavaDoq;
025 
026 /**
027  * <p>Creates "stylesheet.css" file.</p>
028  * <p>Note that a transformer of this type needs to close to close its target file.</p>
029  * 
030  * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.javadoq.com" target="_blank">http://www.javadoq.com</a>
031  */
032 public final class DoqStyleSheet extends Doq
033 {
034     /**
035      * <p>Constructs a {@link DoqStyleSheet} transformer.</p>
036      * <p>This constructor invokes its super constructor to create and open the target file.</p>
037      * @param jdoq The {@link JavaDoq} environment for the transformer.
038      * @since 1.0
039      */
040     public DoqStyleSheet(JavaDoq jdoq) {
041         super(jdoq.dst + File.separator + STYLE_SHEET);
042         writeLine("/* JavaDoq - Style Definitions*/");
043         writeLine("body { background-color: #ffffff; color: #000000}");
044         writeLine("#header { font-family: Arial, Helvetica, sans-serif; color: #0000a0;  background-color:#ccccee}");
045         writeLine("#footer { font-family: Arial, Helvetica, sans-serif; color: #0000a0;  background-color:#ccccee }");
046         writeLine("#line-number { color: #0000a0;  background-color:#ffffff }");
047         writeLine("#java-source a:link      { color: #000000; }");
048         writeLine("#java-source a:visited   { color: #000000; }");
049         writeLine("#java-source pre         { color: #000000; }");
050         writeLine("#abstract        { color: #a00a00 ; font-weight: bold }");
051         writeLine("#boolean         { color: #a00a00 ; font-weight: bold }");
052         writeLine("#break           { color: #a00a00 ; font-weight: bold }");
053         writeLine("#byte            { color: #a00a00 ; font-weight: bold }");
054         writeLine("#case            { color: #a00a00 ; font-weight: bold }");
055         writeLine("#catch           { color: #a00a00 ; font-weight: bold }");
056         writeLine("#char            { color: #a00a00 ; font-weight: bold }");
057         writeLine("#class           { color: #a00a00 ; font-weight: bold }");
058         writeLine("#const           { color: #a00a00 ; font-weight: bold }");
059         writeLine("#continue        { color: #a00a00 ; font-weight: bold }");
060         writeLine("#default         { color: #a00a00 ; font-weight: bold }");
061         writeLine("#do              { color: #a00a00 ; font-weight: bold }");
062         writeLine("#double          { color: #a00a00 ; font-weight: bold }");
063         writeLine("#else            { color: #a00a00 ; font-weight: bold }");
064         writeLine("#extends         { color: #a00a00 ; font-weight: bold }");
065         writeLine("#false           { color: #a00a00 ; font-weight: bold }");
066         writeLine("#final           { color: #a00a00 ; font-weight: bold }");
067         writeLine("#finally         { color: #a00a00 ; font-weight: bold }");
068         writeLine("#float           { color: #a00a00 ; font-weight: bold }");
069         writeLine("#for             { color: #a00a00 ; font-weight: bold }");
070         writeLine("#goto            { color: #a00a00 ; font-weight: bold }");
071         writeLine("#if              { color: #a00a00 ; font-weight: bold }");
072         writeLine("#implements      { color: #a00a00 ; font-weight: bold }");
073         writeLine("#import          { color: #a00a00 ; font-weight: bold }");
074         writeLine("#instanceof      { color: #a00a00 ; font-weight: bold }");
075         writeLine("#int             { color: #a00a00 ; font-weight: bold }");
076         writeLine("#interface       { color: #a00a00 ; font-weight: bold }");
077         writeLine("#long            { color: #a00a00 ; font-weight: bold }");
078         writeLine("#native          { color: #a00a00 ; font-weight: bold }");
079         writeLine("#new             { color: #a00a00 ; font-weight: bold }");
080         writeLine("#package         { color: #a00a00 ; font-weight: bold }");
081         writeLine("#private         { color: #a00a00 ; font-weight: bold }");
082         writeLine("#protected       { color: #a00a00 ; font-weight: bold }");
083         writeLine("#public          { color: #a00a00 ; font-weight: bold }");
084         writeLine("#return          { color: #a00a00 ; font-weight: bold }");
085         writeLine("#short           { color: #a00a00 ; font-weight: bold }");
086         writeLine("#static          { color: #a00a00 ; font-weight: bold }");
087         writeLine("#strictfp        { color: #a00a00 ; font-weight: bold }");
088         writeLine("#super           { color: #a00a00 ; font-weight: bold }");
089         writeLine("#switch          { color: #a00a00 ; font-weight: bold }");
090         writeLine("#synchronized    { color: #a00a00 ; font-weight: bold }");
091         writeLine("#this            { color: #a00a00 ; font-weight: bold }");
092         writeLine("#throw           { color: #a00a00 ; font-weight: bold }");
093         writeLine("#throws          { color: #a00a00 ; font-weight: bold }");
094         writeLine("#transient       { color: #a00a00 ; font-weight: bold }");
095         writeLine("#true            { color: #a00a00 ; font-weight: bold }");
096         writeLine("#try             { color: #a00a00 ; font-weight: bold }");
097         writeLine("#void            { color: #a00a00 ; font-weight: bold }");
098         writeLine("#volatile        { color: #a00a00 ; font-weight: bold }");
099         writeLine("#while           { color: #a00a00 ; font-weight: bold }");
100         writeLine("#single-line-comment                 { color: #00a000; }");
101         writeLine("#formal-comment                      { color: #0000a0; }");
102         writeLine("#multi-line-comment                  { color: #00a000; }");
103         writeLine("#characer-literal                    { color: #0000a0; }");
104         writeLine("#string-literal                      { color: #0000a0; }");
105         writeLine("#decimal-literal                     { color: #000000 }");
106         writeLine("#floating-point-literal              { color: #000000 }");
107         writeLine("#hex-literal                         { color: #000000 }");
108         writeLine("#integer-literal                     { color: #000000 }");
109         writeLine("#octal-literal                       { color: #000000 }");
110         writeLine("#decimal-floating-point-literal      { color: #000000 }");
111         writeLine("#decimal-exponent                    { color: #000000 }");
112         writeLine("#hexa-decimal-floating-point-literal { color: #000000 }");
113         writeLine("#hexa-decimal-exponent               { color: #000000 }");
114         writeLine("#lookahead                           { color: #f000f0 }");
115         writeLine("#ignore-case                         { color: #f000f0 }");
116         writeLine("#parser-begin                        { color: #f000f0 }");
117         writeLine("#parser-end                          { color: #f000f0 }");
118         writeLine("#javacode                            { color: #f000f0 }");
119         writeLine("#token                               { color: #f000f0 }");
120         writeLine("#special-token                       { color: #f000f0 }");
121         writeLine("#more                                { color: #f000f0 }");
122         writeLine("#skip                                { color: #f000f0 }");
123         writeLine("#token-mgr-decls                     { color: #f000f0 }");
124         writeLine("#eof                                 { color: #f000f0 }");
125         writeLine("#left-paren              { color: #000000 }");
126         writeLine("#right-paren             { color: #000000 }");
127         writeLine("#left-brace              { color: #000000 }");
128         writeLine("#right-brace             { color: #000000 }");
129         writeLine("#left-bracket            { color: #000000 }");
130         writeLine("#right-bracket           { color: #000000 }");
131         writeLine("#semi-colon              { color: #000000 }");
132         writeLine("#comma                   { color: #000000 }");
133         writeLine("#dot                     { color: #000000 }");
134         writeLine("#at                      { color: #000000 }");
135         writeLine("#assign                  { color: #000000 }");
136         writeLine("#lt                      { color: #000000 }");
137         writeLine("#bang                    { color: #000000 }");
138         writeLine("#tilde                   { color: #000000 }");
139         writeLine("#hook                    { color: #000000 }");
140         writeLine("#colon                   { color: #000000 }");
141         writeLine("#eq                      { color: #000000 }");
142         writeLine("#le                      { color: #000000 }");
143         writeLine("#ge                      { color: #000000 }");
144         writeLine("#ne                      { color: #000000 }");
145         writeLine("#sc-or                   { color: #f000f0 }");
146         writeLine("#sc-and                  { color: #f000f0 }");
147         writeLine("#incr                    { color: #f000f0 }");
148         writeLine("#decr                    { color: #f000f0 }");
149         writeLine("#plus                    { color: #000000 }");
150         writeLine("#minus                   { color: #000000 }");
151         writeLine("#star                    { color: #000000 }");
152         writeLine("#slash                   { color: #000000 }");
153         writeLine("#bit-and                 { color: #000000 }");
154         writeLine("#bit-or                  { color: #000000 }");
155         writeLine("#xor                     { color: #000000 }");
156         writeLine("#rem                     { color: #000000 }");
157         writeLine("#plus-assign             { color: #000000 }");
158         writeLine("#minus-assign            { color: #000000 }");
159         writeLine("#star-assign             { color: #000000 }");
160         writeLine("#slash-assign            { color: #000000 }");
161         writeLine("#and-assign              { color: #000000 }");
162         writeLine("#or-assign               { color: #000000 }");
163         writeLine("#xor-assign              { color: #000000 }");
164         writeLine("#rem-assign              { color: #000000 }");
165         writeLine("#ellipsis                { color: #000000 }");
166         writeLine("#right-unsigned-shift    { color: #000000 }");
167         writeLine("#right-signed-shift      { color: #000000 }");
168         writeLine("#gt                      { color: #000000 }");
169         writeLine("#identifier              { color: #000000 }");
170         writeLine("#letter                  { color: #f000f0 }");
171         writeLine("#part-letter             { color: #f000f0 }");
172     }
173 }