blob: c41905ce0a3a8f85437f0082940c479ec5af614e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!-- Created by htmlize-0.67 in css mode. -->
<html>
<head>
<title>BorderCommonStyle.java</title>
<style type="text/css">
<!--
body {
color: #000000;
background-color: #faf0e6;
} /* default */
.variable-name {
color: #8b008b;
background-color: #faf0e6;
} /* font-lock-variable-name-face */
.jde-java-font-lock-package {
color: #0000cd;
background-color: #faf0e6;
} /* jde-java-font-lock-package-face */
.jde-java-font-lock-constant {
color: #5f9ea0;
background-color: #faf0e6;
} /* jde-java-font-lock-constant-face */
.keyword {
color: #8b0000;
background-color: #faf0e6;
} /* font-lock-keyword-face */
.string {
color: #008b00;
background-color: #faf0e6;
} /* font-lock-string-face */
.jde-java-font-lock-number {
color: #bc8f8f;
background-color: #faf0e6;
} /* jde-java-font-lock-number-face */
.type {
color: #4682b4;
background-color: #faf0e6;
} /* font-lock-type-face */
.jde-java-font-lock-modifier {
color: #da70d6;
background-color: #faf0e6;
} /* jde-java-font-lock-modifier-face */
.comment {
color: #00008b;
background-color: #faf0e6;
} /* font-lock-comment-face */
.function-name {
color: #8b2323;
background-color: #faf0e6;
} /* font-lock-function-name-face */
a {
color: inherit;
background-color: inherit;
font: inherit;
text-decoration: inherit;
}
a:hover {
text-decoration: underline;
}
-->
</style>
</head>
<body>
<pre>
<span class="keyword">package</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>;
<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">expr</span>.<span class="type">PropertyException</span>;
<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">fo</span>.<span class="jde-java-font-lock-package">properties</span>.<span class="type">Property</span>;
<span class="keyword">import</span> <span class="jde-java-font-lock-package">org</span>.<span class="jde-java-font-lock-package">apache</span>.<span class="jde-java-font-lock-package">fop</span>.<span class="jde-java-font-lock-package">datatypes</span>.<span class="type">Ints</span>;
<span class="keyword">import</span> <span class="jde-java-font-lock-package">java</span>.<span class="jde-java-font-lock-package">util</span>.<span class="type">HashMap</span>;
<span class="comment">/**
* Pseudo-property class for common border style values occurring in a
* number of classes.
*/</span>
<span class="jde-java-font-lock-modifier">public</span> <span class="keyword">class</span> <span class="function-name" id="BorderCommonStyleClass">BorderCommonStyle</span> <span class="keyword">extends</span> <span class="type">Property</span> {
<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="HIDDEN">HIDDEN</span> = <span class="jde-java-font-lock-number">1</span>;
<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="DOTTED">DOTTED</span> = <span class="jde-java-font-lock-number">2</span>;
<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="DASHED">DASHED</span> = <span class="jde-java-font-lock-number">3</span>;
<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="SOLID">SOLID</span> = <span class="jde-java-font-lock-number">4</span>;
<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="DOUBLE">DOUBLE</span> = <span class="jde-java-font-lock-number">5</span>;
<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="GROOVE">GROOVE</span> = <span class="jde-java-font-lock-number">6</span>;
<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="RIDGE">RIDGE</span> = <span class="jde-java-font-lock-number">7</span>;
<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="INSET">INSET</span> = <span class="jde-java-font-lock-number">8</span>;
<span class="jde-java-font-lock-modifier">public</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">int</span> <span class="variable-name" id="OUTSET">OUTSET</span> = <span class="jde-java-font-lock-number">9</span>;
<span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">String</span>[] <span class="variable-name" id="rwEnums">rwEnums</span> = {
<span class="jde-java-font-lock-constant" id="null">null</span>
,"<span class="string">hidden</span>"
,"<span class="string">dotted</span>"
,"<span class="string">dashed</span>"
,"<span class="string">solid</span>"
,"<span class="string">double</span>"
,"<span class="string">groove</span>"
,"<span class="string">ridge</span>"
,"<span class="string">inset</span>"
,"<span class="string">outset</span>"
};
<span class="jde-java-font-lock-modifier">private</span> <span class="jde-java-font-lock-modifier">static</span> <span class="jde-java-font-lock-modifier">final</span> <span class="type">HashMap</span> <span class="variable-name" id="rwEnumHash">rwEnumHash</span>;
<span class="jde-java-font-lock-modifier">static</span> {
rwEnumHash = <span class="keyword">new</span> <span class="type">HashMap</span>(rwEnums.length);
<span class="keyword">for</span> (<span class="type">int</span> <span class="variable-name" id="i">i</span> = <span class="jde-java-font-lock-number">1</span>; i < rwEnums.length; i++ ) {
rwEnumHash.put((<span class="type">Object</span>)rwEnums[i],
(<span class="type">Object</span>) Ints.consts.get(i));
}
}
<span class="jde-java-font-lock-modifier">public</span> <span class="type">int</span> <span class="function-name" id="getEnumIndex">getEnumIndex</span>(<span class="type">String</span> <span class="variable-name" id="enum">enum</span>)
<span class="keyword">throws</span> <span class="type">PropertyException</span>
{
<span class="type">Integer</span> <span class="variable-name" id="ii">ii</span> = (<span class="type">Integer</span>)(rwEnumHash.get(enum));
<span class="keyword">if</span> (ii == <span class="jde-java-font-lock-constant">null</span>)
<span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">Unknown enum value: </span>" + enum);
<span class="keyword">return</span> ii.intValue();
}
<span class="jde-java-font-lock-modifier">public</span> <span class="type">String</span> <span class="function-name" id="getEnumText">getEnumText</span>(<span class="type">int</span> <span class="variable-name" id="index">index</span>)
<span class="keyword">throws</span> <span class="type">PropertyException</span>
{
<span class="keyword">if</span> (index < <span class="jde-java-font-lock-number">1</span> || index >= rwEnums.length)
<span class="keyword">throw</span> <span class="keyword">new</span> <span class="type">PropertyException</span>("<span class="string">index out of range: </span>" + index);
<span class="keyword">return</span> rwEnums[index];
}
}
</pre>
</body>
</html>
|