KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lowagie > text > pdf > codec > postscript > PAToken


1 /*
2  * Copyright 1998 by Sun Microsystems, Inc.,
3  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
4  * All rights reserved.
5  *
6  * This software is the confidential and proprietary information
7  * of Sun Microsystems, Inc. ("Confidential Information"). You
8  * shall not disclose such Confidential Information and shall use
9  * it only in accordance with the terms of the license agreement
10  * you entered into with Sun.
11  */

12
13 package com.lowagie.text.pdf.codec.postscript;
14
15 import java.lang.*;
16 import java.lang.reflect.*;
17 import java.util.*;
18 import java.awt.*;
19 import java.awt.geom.*;
20 import java.awt.color.*;
21 import java.awt.font.*;
22
23 public class PAToken extends Object {
24
25     static public final int IDENTIFIER = 0;
26     static public final int KEY = 1;
27     static public final int PROCEDURE = 2;
28     static public final int MARK = 3;
29     static public final int START_PROCEDURE = 4;
30     static public final int END_PROCEDURE = 5;
31     static public final int IMMEDIATE = 6;
32     static public final int START_ARRAY = 7;
33     static public final int END_ARRAY = 8;
34
35     public Object value;
36     public int type;
37
38     public PAToken(Object value, int type){
39         super();
40         this.value = value;
41         this.type = type;
42     }
43
44     public String toString(){
45         switch(this.type){
46         case IDENTIFIER:
47             return "IDENTIFIER " + this.value.toString();
48         case KEY:
49             return "KEY " + this.value.toString();
50         case PROCEDURE:
51             return "PROCEDURE " + this.value.toString();
52         case MARK:
53             return "MARK";
54         case START_PROCEDURE:
55             return "START_PROCEDURE";
56         case END_PROCEDURE:
57             return "END_PROCEDURE";
58         case IMMEDIATE:
59             return "IMMEDIATE " + this.value.toString();
60         case START_ARRAY:
61             return "START_ARRAY";
62         case END_ARRAY:
63             return "END_ARRAY";
64         }
65         return this.value.toString();
66     }
67
68 }
69
70
Popular Tags