Commit fb0ef6e2 authored by claes's avatar claes

New ge fetched from 3.9

parent 53d04b2f
......@@ -8,4 +8,5 @@ public class Ge {
public static final int DIRECTION_LEFT = 2;
public static final int DIRECTION_UP = 3;
public static final int DIRECTION_DOWN = 4;
public static final float cJBean_Offset = 2;
}
......@@ -4,18 +4,89 @@ import java.awt.*;
public class GeColor {
// Color tones
public static final int COLOR_TONE_NO = 0;
public static final int COLOR_TONE_GRAY = 1;
public static final int COLOR_TONE_YELLOW = 2;
public static final int COLOR_TONE_GOLD = 3;
public static final int COLOR_TONE_ORANGE = 4;
public static final int COLOR_TONE_RED = 5;
public static final int COLOR_TONE_MAGENTA = 6;
public static final int COLOR_TONE_BLUE = 7;
public static final int COLOR_TONE_SEABLUE = 8;
public static final int COLOR_TONE_GREEN = 9;
public static final int COLOR_TONE_DARKGRAY = 10;
public static final int COLOR_TONE_MAX = 10;
public static final int COLOR_TONE_NO = 0;
public static final int COLOR_TONE_GRAY = 1;
public static final int COLOR_TONE_YELLOWGREEN = 2;
public static final int COLOR_TONE_YELLOW = 3;
public static final int COLOR_TONE_ORANGE = 4;
public static final int COLOR_TONE_RED = 5;
public static final int COLOR_TONE_MAGENTA = 6;
public static final int COLOR_TONE_BLUE = 7;
public static final int COLOR_TONE_SEABLUE = 8;
public static final int COLOR_TONE_GREEN = 9;
public static final int COLOR_TONE_DARKGRAY = 10;
public static final int COLOR_TONE_DARKYELLOWGREEN = 11;
public static final int COLOR_TONE_DARKYELLOW = 12;
public static final int COLOR_TONE_DARKORANGE = 13;
public static final int COLOR_TONE_DARKRED = 14;
public static final int COLOR_TONE_DARKMAGENTA = 15;
public static final int COLOR_TONE_DARKBLUE = 16;
public static final int COLOR_TONE_DARKSEABLUE = 17;
public static final int COLOR_TONE_DARKGREEN = 18;
public static final int COLOR_TONE_LIGHTGRAY = 19;
public static final int COLOR_TONE_LIGHTYELLOWGREEN = 20;
public static final int COLOR_TONE_LIGHTYELLOW = 21;
public static final int COLOR_TONE_LIGHTORANGE = 22;
public static final int COLOR_TONE_LIGHTRED = 23;
public static final int COLOR_TONE_LIGHTMAGENTA = 24;
public static final int COLOR_TONE_LIGHTBLUE = 25;
public static final int COLOR_TONE_LIGHTSEABLUE = 26;
public static final int COLOR_TONE_LIGHTGREEN = 27;
public static final int COLOR_TONE_GRAYHIGHSATURATION = 28;
public static final int COLOR_TONE_YELLOWGREENHIGHSATURATION = 29;
public static final int COLOR_TONE_YELLOWHIGHSATURATION = 30;
public static final int COLOR_TONE_ORANGEHIGHSATURATION = 31;
public static final int COLOR_TONE_REDHIGHSATURATION = 32;
public static final int COLOR_TONE_MAGENTAHIGHSATURATION = 33;
public static final int COLOR_TONE_BLUEHIGHSATURATION = 34;
public static final int COLOR_TONE_SEABLUEHIGHSATURATION = 35;
public static final int COLOR_TONE_GREENHIGHSATURATION = 36;
public static final int COLOR_TONE_DARKGRAYHIGHSATURATION = 37;
public static final int COLOR_TONE_DARKYELLOWGREENHIGHSATURATION = 38;
public static final int COLOR_TONE_DARKYELLOWHIGHSATURATION = 39;
public static final int COLOR_TONE_DARKORANGEHIGHSATURATION = 40;
public static final int COLOR_TONE_DARKREDHIGHSATURATION = 41;
public static final int COLOR_TONE_DARKMAGENTAHIGHSATURATION = 42;
public static final int COLOR_TONE_DARKBLUEHIGHSATURATION = 43;
public static final int COLOR_TONE_DARKSEABLUEHIGHSATURATION = 44;
public static final int COLOR_TONE_DARKGREENHIGHSATURATION = 45;
public static final int COLOR_TONE_LIGHTGRAYHIGHSATURATION = 46;
public static final int COLOR_TONE_LIGHTYELLOWGREENHIGHSATURATION = 47;
public static final int COLOR_TONE_LIGHTYELLOWHIGHSATURATION = 48;
public static final int COLOR_TONE_LIGHTORANGEHIGHSATURATION = 49;
public static final int COLOR_TONE_LIGHTREDHIGHSATURATION = 50;
public static final int COLOR_TONE_LIGHTMAGENTAHIGHSATURATION = 51;
public static final int COLOR_TONE_LIGHTBLUEHIGHSATURATION = 52;
public static final int COLOR_TONE_LIGHTSEABLUEHIGHSATURATION = 53;
public static final int COLOR_TONE_LIGHTGREENHIGHSATURATION = 54;
public static final int COLOR_TONE_GRAYLOWSATURATION = 55;
public static final int COLOR_TONE_YELLOWGREENLOWSATURATION = 56;
public static final int COLOR_TONE_YELLOWLOWSATURATION = 57;
public static final int COLOR_TONE_ORANGELOWSATURATION = 58;
public static final int COLOR_TONE_REDLOWSATURATION = 59;
public static final int COLOR_TONE_MAGENTALOWSATURATION = 60;
public static final int COLOR_TONE_BLUELOWSATURATION = 61;
public static final int COLOR_TONE_SEABLUELOWSATURATION = 62;
public static final int COLOR_TONE_GREENLOWSATURATION = 63;
public static final int COLOR_TONE_DARKGRAYLOWSATURATION = 64;
public static final int COLOR_TONE_DARKYELLOWGREENLOWSATURATION = 65;
public static final int COLOR_TONE_DARKYELLOWLOWSATURATION = 66;
public static final int COLOR_TONE_DARKORANGELOWSATURATION = 67;
public static final int COLOR_TONE_DARKREDLOWSATURATION = 68;
public static final int COLOR_TONE_DARKMAGENTALOWSATURATION = 69;
public static final int COLOR_TONE_DARKBLUELOWSATURATION = 70;
public static final int COLOR_TONE_DARKSEABLUELOWSATURATION = 71;
public static final int COLOR_TONE_DARKGREENLOWSATURATION = 72;
public static final int COLOR_TONE_LIGHTGRAYLOWSATURATION = 73;
public static final int COLOR_TONE_LIGHTYELLOWGREENLOWSATURATION = 74;
public static final int COLOR_TONE_LIGHTYELLOWLOWSATURATION = 75;
public static final int COLOR_TONE_LIGHTORANGELOWSATURATION = 76;
public static final int COLOR_TONE_LIGHTREDLOWSATURATION = 77;
public static final int COLOR_TONE_LIGHTMAGENTALOWSATURATION = 78;
public static final int COLOR_TONE_LIGHTBLUELOWSATURATION = 79;
public static final int COLOR_TONE_LIGHTSEABLUELOWSATURATION = 80;
public static final int COLOR_TONE_LIGHTGREENLOWSATURATION = 81;
public static final int COLOR_TONE_MAX = 81;
public static final int COLOR_BLACK = 0;
public static final int COLOR_RED = 1;
......@@ -121,151 +192,430 @@ public class GeColor {
public static final int COLOR_98 = 97;
public static final int COLOR_99 = 98;
public static final int COLOR_100 = 99;
public static final int COLOR_101 = 100;
public static final int COLOR_102 = 101;
public static final int COLOR_103 = 102;
public static final int COLOR_104 = 103;
public static final int COLOR_105 = 104;
public static final int COLOR_106 = 105;
public static final int COLOR_107 = 106;
public static final int COLOR_108 = 107;
public static final int COLOR_109 = 108;
public static final int COLOR_110 = 109;
public static final int COLOR_111 = 110;
public static final int COLOR_112 = 111;
public static final int COLOR_113 = 112;
public static final int COLOR_114 = 113;
public static final int COLOR_115 = 114;
public static final int COLOR_116 = 115;
public static final int COLOR_117 = 116;
public static final int COLOR_118 = 117;
public static final int COLOR_119 = 118;
public static final int COLOR_120 = 119;
public static final int COLOR_121 = 120;
public static final int COLOR_122 = 121;
public static final int COLOR_123 = 122;
public static final int COLOR_124 = 123;
public static final int COLOR_125 = 124;
public static final int COLOR_126 = 125;
public static final int COLOR_127 = 126;
public static final int COLOR_128 = 127;
public static final int COLOR_129 = 128;
public static final int COLOR_130 = 129;
public static final int COLOR_131 = 130;
public static final int COLOR_132 = 131;
public static final int COLOR_133 = 132;
public static final int COLOR_134 = 133;
public static final int COLOR_135 = 134;
public static final int COLOR_136 = 135;
public static final int COLOR_137 = 136;
public static final int COLOR_138 = 137;
public static final int COLOR_139 = 138;
public static final int COLOR_140 = 139;
public static final int COLOR_141 = 140;
public static final int COLOR_142 = 141;
public static final int COLOR_143 = 142;
public static final int COLOR_144 = 143;
public static final int COLOR_145 = 144;
public static final int COLOR_146 = 145;
public static final int COLOR_147 = 146;
public static final int COLOR_148 = 147;
public static final int COLOR_149 = 148;
public static final int COLOR_150 = 149;
public static final int COLOR_151 = 150;
public static final int COLOR_152 = 151;
public static final int COLOR_153 = 152;
public static final int COLOR_154 = 153;
public static final int COLOR_155 = 154;
public static final int COLOR_156 = 155;
public static final int COLOR_157 = 156;
public static final int COLOR_158 = 157;
public static final int COLOR_159 = 158;
public static final int COLOR_160 = 159;
public static final int COLOR_161 = 160;
public static final int COLOR_162 = 161;
public static final int COLOR_163 = 162;
public static final int COLOR_164 = 163;
public static final int COLOR_165 = 164;
public static final int COLOR_166 = 165;
public static final int COLOR_167 = 166;
public static final int COLOR_168 = 167;
public static final int COLOR_169 = 168;
public static final int COLOR_170 = 169;
public static final int COLOR_171 = 170;
public static final int COLOR_172 = 171;
public static final int COLOR_173 = 172;
public static final int COLOR_174 = 173;
public static final int COLOR_175 = 174;
public static final int COLOR_176 = 175;
public static final int COLOR_177 = 176;
public static final int COLOR_178 = 177;
public static final int COLOR_179 = 178;
public static final int COLOR_180 = 179;
public static final int COLOR_181 = 180;
public static final int COLOR_182 = 181;
public static final int COLOR_183 = 182;
public static final int COLOR_184 = 183;
public static final int COLOR_185 = 184;
public static final int COLOR_186 = 185;
public static final int COLOR_187 = 186;
public static final int COLOR_188 = 187;
public static final int COLOR_189 = 188;
public static final int COLOR_190 = 189;
public static final int COLOR_191 = 190;
public static final int COLOR_192 = 191;
public static final int COLOR_193 = 192;
public static final int COLOR_194 = 193;
public static final int COLOR_195 = 194;
public static final int COLOR_196 = 195;
public static final int COLOR_197 = 196;
public static final int COLOR_198 = 197;
public static final int COLOR_199 = 198;
public static final int COLOR_200 = 199;
public static final int COLOR_201 = 200;
public static final int COLOR_202 = 201;
public static final int COLOR_203 = 202;
public static final int COLOR_204 = 203;
public static final int COLOR_205 = 204;
public static final int COLOR_206 = 205;
public static final int COLOR_207 = 206;
public static final int COLOR_208 = 207;
public static final int COLOR_209 = 208;
public static final int COLOR_210 = 209;
public static final int COLOR_211 = 210;
public static final int COLOR_212 = 211;
public static final int COLOR_213 = 212;
public static final int COLOR_214 = 213;
public static final int COLOR_215 = 214;
public static final int COLOR_216 = 215;
public static final int COLOR_217 = 216;
public static final int COLOR_218 = 217;
public static final int COLOR_219 = 218;
public static final int COLOR_220 = 219;
public static final int COLOR_221 = 220;
public static final int COLOR_222 = 221;
public static final int COLOR_223 = 222;
public static final int COLOR_224 = 223;
public static final int COLOR_225 = 224;
public static final int COLOR_226 = 225;
public static final int COLOR_227 = 226;
public static final int COLOR_228 = 227;
public static final int COLOR_229 = 228;
public static final int COLOR_230 = 229;
public static final int COLOR_231 = 230;
public static final int COLOR_232 = 231;
public static final int COLOR_233 = 232;
public static final int COLOR_234 = 233;
public static final int COLOR_235 = 234;
public static final int COLOR_236 = 235;
public static final int COLOR_237 = 236;
public static final int COLOR_238 = 237;
public static final int COLOR_239 = 238;
public static final int COLOR_240 = 239;
public static final int COLOR_241 = 240;
public static final int COLOR_242 = 241;
public static final int COLOR_243 = 242;
public static final int COLOR_244 = 243;
public static final int COLOR_245 = 244;
public static final int COLOR_246 = 245;
public static final int COLOR_247 = 246;
public static final int COLOR_248 = 247;
public static final int COLOR_249 = 248;
public static final int COLOR_250 = 249;
public static final int COLOR_251 = 250;
public static final int COLOR_252 = 251;
public static final int COLOR_253 = 252;
public static final int COLOR_254 = 253;
public static final int COLOR_255 = 254;
public static final int COLOR_256 = 255;
public static final int COLOR_257 = 256;
public static final int COLOR_258 = 257;
public static final int COLOR_259 = 258;
public static final int COLOR_260 = 259;
public static final int COLOR_261 = 260;
public static final int COLOR_262 = 261;
public static final int COLOR_263 = 262;
public static final int COLOR_264 = 263;
public static final int COLOR_265 = 264;
public static final int COLOR_266 = 265;
public static final int COLOR_267 = 266;
public static final int COLOR_268 = 267;
public static final int COLOR_269 = 268;
public static final int COLOR_270 = 269;
public static final int COLOR_271 = 270;
public static final int COLOR_272 = 271;
public static final int COLOR_273 = 272;
public static final int COLOR_274 = 273;
public static final int COLOR_275 = 274;
public static final int COLOR_276 = 275;
public static final int COLOR_277 = 276;
public static final int COLOR_278 = 277;
public static final int COLOR_279 = 278;
public static final int COLOR_280 = 279;
public static final int COLOR_281 = 280;
public static final int COLOR_282 = 281;
public static final int COLOR_283 = 282;
public static final int COLOR_284 = 283;
public static final int COLOR_285 = 284;
public static final int COLOR_286 = 285;
public static final int COLOR_287 = 286;
public static final int COLOR_288 = 287;
public static final int COLOR_289 = 288;
public static final int COLOR_290 = 289;
public static final int COLOR_291 = 290;
public static final int COLOR_292 = 291;
public static final int COLOR_293 = 292;
public static final int COLOR_294 = 293;
public static final int COLOR_295 = 294;
public static final int COLOR_296 = 295;
public static final int COLOR_297 = 296;
public static final int COLOR_298 = 297;
public static final int COLOR_299 = 298;
public static final int COLOR_300 = 299;
public static final int COLOR_INHERIT = 9999;
public static final int COLOR_NO = 10000;
static final double colorValues[] = {
0, 0, 0, // 4 Black
1, 0.2, 0.2, // 4 Red
0.7, 0.7, 0.7, // 4 Gray
1, 1, 1, // 4 White
0, 0.8714, 0.2857, // 5 SpringGreen3
1, 1, 0, // 6 Yellow
0.2879, 0.4945, 0.9067, // 7 SteelBlue3
0.593, 0, 0.6421, // 8 Magenta3
0.270, 0.270, 0.270, // 9 Grey
0.160, 0.160, 0.160, // 10 Grey
// Grey
0.950, 0.950, 0.950, // 1 Grey
0.900, 0.900, 0.900, // 2 Grey
0.850, 0.850, 0.850, // 3 Grey
0.700, 0.700, 0.700, // 4 Grey93
0.500, 0.500, 0.500, // 5 Grey80
0.935, 0.935, 0.935, // 6 Grey68
0.880, 0.880, 0.880, // 7 Grey48
0.750, 0.750, 0.750, // 8 Grey35
0.550, 0.550, 0.550, // 9 Grey
0.350, 0.350, 0.350, // 10 Grey
1, 1, 0.878, // 1 LightYellow0
1, 1, 0.640, // 2 LightYellow1
0.900, 0.900, 0.500, // 3 LightYellow2
0.804, 0.804, 0.400, // 4 LightYellow3
0.545, 0.545, 0.300, // 5 LightYellow4
1, 1, 0.300, // 6 yellow0
1, 1, 0, // 7 yellow1
0.933, 0.933, 0, // 8 yellow2
0.804, 0.804, 0, // 9 yellow3
0.545, 0.545, 0, // 10 yellow4
1, 0.970, 0.800, // 1 Lightgoldenrod0
1, 0.925, 0.545, // 2 Lightgoldenrod1
0.933, 0.862, 0.510, // 3 Lightgoldenrod2
0.804, 0.745, 0.439, // 4 Lightgoldenrod3
0.545, 0.506, 0.298, // 5 Lightgoldenrod4
1, 0.930, 0.500, // 6 gold00
1, 0.843, 0, // 7 gold1
0.933, 0.788, 0, // 8 gold2
0.804, 0.678, 0, // 9 gold3
0.545, 0.459, 0, // 10 gold4
1, 0.941, 0.800, // 1 LightOrange (Modified)
0.950, 0.870, 0.678, // 2 NavajoWhite
0.900, 0.628, 0.478, // 3 LightSalmon1
0.804, 0.506, 0.384, // 4 LightSalmon3
0.545, 0.341, 0.259, // 5 LightSalmon4
1, 0.850, 0.550, // 6 DarkOrange (Modified)
1, 0.650, 0.300, // 7 DarkOrange (Modified)
1, 0.498, 0, // 8 DarkOrange1
0.804, 0.400, 0, // 9 DarkOrange3
0.545, 0.153, 0, // 10 DarkOrange4
1, 0.894, 0.867, // 1 MistyRose1
0.933, 0.835, 0.823, // 2 MistyRose2
0.933, 0.682, 0.725, // 3 LightPink (Modified)
0.804, 0.547, 0.584, // 4 LightPink3
0.545, 0.357, 0.396, // 5 LightPink4
1, 0.733, 0.733, // 6 IndianRed0 (Modified)
1, 0.415, 0.415, // 7 IndianRed1
1, 0.188, 0.188, // 8 firebrick1
0.804, 0.149, 0.149, // 9 firebrick3
0.545, 0.102, 0.102, // 10 firebrick4
1, 0.890, 1, // 1 Plum1 (Modified)
1, 0.733, 1, // 2 Plum1
0.933, 0.682, 0.933, // 3 Plum2
0.804, 0.588, 0.804, // 4 Plum3
0.545, 0.400, 0.545, // 5 Plum4
1, 0.800, 1, // 6 Magenta00 (Mofified)
1, 0.500, 1, // 7 Magenta0 (Modified)
1, 0, 1, // 8 Magenta1
0.804, 0, 0.804, // 9 Magenta3
0.545, 0, 0.545, // 10 Magenta4
0.829, 0.919, 1, // 1 LightSteelBlue1 (Modified)
0.792, 0.882, 1, // 2 LightSteelBlue1
0.737, 0.823, 0.933, // 3 LightSteelBlue2
0.635, 0.710, 0.804, // 4 LightSteelBlue3
0.431, 0.482, 0.545, // 5 LightSteelBlue4
0.829, 0.919, 1, // 6 LightCyan
0.690, 0.878, 0.902, // 7 Powder blue
0.388, 0.722, 1, // 8 SteelBlue1
0.275, 0.510, 0.706, // 9 SteelBlue
0, 0, 0.545, // 10 blue4
// Bluegreen
0.700, 0.960, 0.900, // 1 aquamarine4 (Modified)
0.600, 0.930, 0.850, // 2 aquamarine4
0.463, 0.900, 0.700, // 3 aquamarine4
0.400, 0.804, 0.667, // 4 aquamarine4
0.271, 0.545, 0.455, // 5 aquamarine4
0.600, 1, 0.950, // 6 turqoise
0, 0.930, 0.930, // 7 turqoise
0, 0.870, 0.720, // 8 turqoise
0, 0.700, 0.500, // 9 turqoise
0, 0.500, 0.300, // 10 turqoise
0.829, 1, 0.7, // 1 DarkOliveGreen1 (Modified)
0.737, 0.933, 0.408, // 2 DarkOliveGreen2
0.635, 0.804, 0.353, // 3 DarkOliveGreen3
0.520, 0.700, 0.275, // 4 DarkOliveGreen4
0.333, 0.420, 0.184, // 5 DarkOliveGreen
0.698, 1, 0.400, // 6 chartreuse
0.463, 0.933, 0, // 7 chartreuse2
0.4, 0.804, 0, // 8 chartreuse3
0.27, 0.545, 0, // 9 chartreuse4
0, 0.392, 0}; // 10 DarkGreen
static Color[] colors = new Color[100];
1, 1, 1}; // 4 White
static Color[] colors = new Color[300];
public static final int NO_COLOR = 9999;
public static final int NO_TONE = 0;
public static Color getColor( int idx, int default_color) {
if ( default_color < 100)
{
if ( default_color < 300) {
// System.out.println("Using default color");
idx = default_color;
}
// System.out.println("Using ge color");
if ( idx < 0 || idx > 99)
if ( idx < 0 || idx > 299)
idx = 1;
if ( colors[idx] == null)
colors[idx] = new Color( (int)(colorValues[3*idx] * 255),
colors[idx] = rgbColor( idx);
return colors[idx];
}
static public class Rgb {
public Rgb() {}
double r;
double g;
double b;
}
static Rgb hisToRgb( double h, double i, double s) {
double m1, m2, i1;
m1 = s * Math.sin( h * Math.PI/180);
m2 = s * Math.cos( h * Math.PI/180);
i1 = i / Math.sqrt(3);
Rgb rgb = new Rgb();
rgb.r = m1 * 2 / Math.sqrt(6) + i1 / Math.sqrt(3);
rgb.g = - m1 / Math.sqrt(6) + m2 / Math.sqrt(2) + i1 / Math.sqrt(3);
rgb.b = - m1 / Math.sqrt(6) - m2 / Math.sqrt(2) + i1 / Math.sqrt(3);
rgb.r = rgb.r / 2 + 0.5;
rgb.g = rgb.g / 2 + 0.5;
rgb.b = rgb.b / 2 + 0.5;
if ( rgb.r > 1) rgb.r = 1;
if ( rgb.r < 0) rgb.r = 0;
if ( rgb.g > 1) rgb.g = 1;
if ( rgb.g < 0) rgb.g = 0;
if ( rgb.b > 1) rgb.b = 1;
if ( rgb.b < 0) rgb.b = 0;
return rgb;
}
static final double rgbTab[] = {
0.254, 0.329, 0, // YellowGreen
0.357, 0.459, 0,
0.498, 0.639, 0,
0.624, 0.800, 0,
0.764, 0.976, 0,
0.808, 1.000, 0.129,
0.847, 1.000, 0.310,
0.898, 1.000, 0.537,
0.933, 1.000, 0.710,
0.949, 1.000, 0.776,
0., 0., 0, // Yellow
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0, // Orange
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
1.000, 0.725, 0.420,
1.000, 0.796, 0.569,
1.000, 0.886, 0.667,
1.000, 0.937, 0.820};
static final double ctab[] = {
18, -20.0, 0.2, -1.4, 2.8, .9, 0.5, -1.4, 3, .9, 1.5, -3.5, 5.0, 1.0, // YellowGreen
28, 10.0, 0.2, -1.4, 2.8, .9, 0.5, -1.4, 3, .9, 1.5, -3.5, 5.0, 1.0, // Yellow
45, 20.0, 0.2, -1.3, 2.8, .9, 0.5, -1.3, 3, .9, 1.5, -3.5, 4.5, 1.0, // Orange
90, 0.0, 0.2, -1.1, 2.8, .9, 0.5, -1.1, 3, .9, 1.5, -4.5, 4.5, 1.0, // Red
150, 0.0, 0.2, -1., 2.8, .9, 0.5, -1., 3, .9, 1.5, -3.5, 5.9, 1.0, // Violet
240, 0.0, 0.2, -1., 2.8, .9, 0.4, -1., 3, .9, 1.5, -3.5, 5.5, 1.0, // Blue
280, 0.0, 0.2, -1., 2.8, .9, 0.4, -1., 3, .9, 1.5, -3.5, 5.5, 1.0, // Seablue
355, -20.0, 0.2, -1., 2.8, .9, 0.4, -1., 3, .9, 1.5, -4.5, 3.5, 1.0}; // Green
public static Color rgbColor( int idx) {
double gray_i0 = 0.32;
double gray_i1 = 0.95;
double h1, i1, s1;
double r, g, b;
int i, j, k;
Rgb rgb;
Color color = null;
if ( idx < 4)
color = new Color( (int)(colorValues[3*idx] * 255),
(int)(colorValues[3*idx + 1] * 255),
(int)(colorValues[3*idx + 2] * 255));
return colors[idx];
else if ( idx < 20) {
h1 = 360. * (idx - 4) / 16;
s1 = 1.5;
i1 = 1;
rgb = hisToRgb( h1, i1, s1);
color = new Color( (int)(rgb.r * 255), (int)(rgb.g * 255),(int)(rgb.b * 255));
}
else if ( idx < 60) {
int val;
if ( idx < 30 || (50 <= idx && idx < 60))
gray_i0 = 0.25F;
val = (int)( (gray_i0 + (gray_i1 - gray_i0) * Math.pow( (double)(9 - idx % 10) / 9, 0.9)) * 255);
color = new Color( val, val, val);
}
else if ( idx < 300) {
double i_min, i_max, s, a, h, hk;
i = (idx - 60) / 30;
j = (idx - 60 - i * 30) / 10;
k = 9 - (idx - 60 - i * 30 - j * 10 );
h = ctab[i * 14];
hk = ctab[i * 14 + 1];
s = ctab[i*14 + 2 + j*4];
i_min = ctab[i*14 + 2 + j*4 + 1];
i_max = ctab[i*14 + 2 + j*4 + 2];
a = ctab[i*14 + 2 + j*4 + 3];
s1 = s;
i1 = i_min + (i_max - i_min) *
Math.pow((double)k/9, a);
h1 = h + hk * k / 9;
if ( (i == 0 && j == 2) ||
(i == 2 && j == 2 && k > 5)) {
// Formula doesn't work for yellow...
rgb = new Rgb();
rgb.r = rgbTab[ (i * 10 + k) * 3];
rgb.g = rgbTab[ (i * 10 + k) * 3 + 1];
rgb.b = rgbTab[ (i * 10 + k) * 3 + 2];
}
else
rgb = hisToRgb( h1, i1, s1);
color = new Color( (int)(rgb.r * 255), (int)(rgb.g * 255),(int)(rgb.b * 255));
}
return color;
}
public static Color getColor( int local_drawtype, int color_tone, int color_shift,
public static Color shiftColor( int dt, int shift, int color_inverse) {
int incr;
int baseDrawtype;
int drawtype;
if ( color_inverse != 0)
shift = -shift;
if ( dt >= 20) {
baseDrawtype = dt / 10 * 10;
incr = shift + dt - baseDrawtype;
if ( incr < 0)
drawtype = COLOR_4; // White
else if ( incr >= 10)
drawtype = COLOR_30; // DarkGrey
else
drawtype = baseDrawtype + incr;
}
else
drawtype = dt;
if ( colors[drawtype] == null)
colors[drawtype] = rgbColor( drawtype);
return colors[drawtype];
}
public static int getDrawtype( int local_drawtype, int color_tone, int color_shift,
int color_intensity,
int color_brightness, int color_inverse, int default_color) {
int drawtype;
int base_drawtype;
int incr;
int intensity = color_intensity;
int brightness = color_brightness;
if ( default_color == NO_COLOR && color_tone != NO_TONE) {
if ( local_drawtype > 10) {
if ( color_tone == COLOR_TONE_DARKGRAY) {
switch( local_drawtype % 5) {
case 0: drawtype = COLOR_14; break;
case 1: drawtype = COLOR_19; break;
case 2: drawtype = COLOR_15; break;
case 3: drawtype = COLOR_20; break;
default: drawtype = COLOR_9;
}
}
else
drawtype = (local_drawtype - local_drawtype / 10 * 10 +
10 * color_tone);
int tone = color_tone;
if ( local_drawtype > 30) {
if ( tone >= COLOR_TONE_GRAYHIGHSATURATION &&
tone < COLOR_TONE_GRAYLOWSATURATION) {
tone -= 27;
intensity += 2;
}
else if ( color_tone >= COLOR_TONE_GRAYLOWSATURATION) {
tone -= 2 * 27;
intensity -= 1;
}
if ( tone >= COLOR_TONE_DARKGRAY &&
tone < COLOR_TONE_LIGHTGRAY) {
tone -= 9;
brightness -= 2;
}
else if ( color_tone >= COLOR_TONE_LIGHTGRAY) {
tone -= 18;
brightness += 2;
}
drawtype = (local_drawtype - local_drawtype / 30 * 30 +
30 * tone);
}
else
drawtype = local_drawtype;
......@@ -276,63 +626,74 @@ public class GeColor {
else
drawtype = local_drawtype;
if ( color_brightness != 0) {
if ( local_drawtype >= 10) {
base_drawtype = drawtype / 5 * 5;
incr = -color_brightness + drawtype - base_drawtype;
if ( brightness != 0) {
if ( local_drawtype >= 30) {
base_drawtype = drawtype / 10 * 10;
incr = -brightness + drawtype - base_drawtype;
if ( incr < 0)
drawtype = 3; // White
else if ( incr >= 5)
drawtype = 9; // DarkGrey
else if ( incr >= 10)
drawtype = 29; // DarkGrey
else
drawtype = (base_drawtype + incr);
}
}
if ( color_intensity != 0 ) {
if ( drawtype >= 20) {
base_drawtype = drawtype / 10 * 10;
if ( intensity != 0 ) {
if ( drawtype >= 60) {
base_drawtype = drawtype / 30 * 30;
incr = drawtype - base_drawtype;
if ( 0 <= incr && incr < 5) {
if ( color_intensity > 0)
drawtype = ( drawtype + 5);
else
drawtype = ( 15 + incr);
}
else {
if ( color_intensity == -1)
drawtype = ( drawtype - 5);
else if ( color_intensity < 0)
drawtype = ( 15 + incr - 5);
}
drawtype += Math.min( 2 - incr / 10, intensity) * 10;
if ( drawtype < base_drawtype)
drawtype = 40 + incr;
}
}
if ( color_shift != 0) {
if ( drawtype >= 20) {
if ( drawtype >= 60) {
incr = color_shift -
color_shift / 8 * 8;
if ( incr < 0)
incr += 8;
incr = drawtype + incr * 10;
if ( incr >= 100)
incr -= 80;
incr = drawtype + incr * 30;
if ( incr >= 300)
incr -= 240;
drawtype = incr;
}
}
if ( color_inverse == 1)
{
if ( drawtype >= 10)
drawtype = drawtype + 5 - 2 * (drawtype % 5) - 1;
drawtype = drawtype + 10 - 2 * (drawtype % 10) - 1;
}
if ( drawtype < 0 || drawtype >= 100) {
if ( drawtype < 0 || drawtype >= 300) {
System.out.println("** Invalid drawtype");
drawtype = 0;
}
return drawtype;
}
public static Color getColor( int drawtype) {
if ( colors[drawtype] == null)
colors[drawtype] = new Color( (int)(colorValues[3*drawtype] * 255),
(int)(colorValues[3*drawtype + 1] * 255),
(int)(colorValues[3*drawtype + 2] * 255));
colors[drawtype] = rgbColor( drawtype);
return colors[drawtype];
}
public static Color getColor( int local_drawtype, int color_tone, int color_shift,
int color_intensity,
int color_brightness, int color_inverse, int default_color) {
int drawtype = getDrawtype( local_drawtype, color_tone, color_shift, color_intensity,
color_brightness, color_inverse, default_color);
if ( colors[drawtype] == null)
colors[drawtype] = rgbColor( drawtype);
return colors[drawtype];
}
}
......@@ -16,106 +16,306 @@ public class GeColorEditor extends PropertyEditorSupport {
public GeColorEditor() {
}
private static String[] tagStrings = {
"Black",
"Red",
"Gray",
"White",
"SpringGreen",
"Yellow",
"SteelBlue",
"Magenta",
"Grey73",
"Grey84",
"Grey5",
"Grey10",
"Grey15",
"Grey30",
"Grey50",
"Grey7",
"Grey12",
"Grey25",
"Grey45",
"Grey65",
"LightYellow0",
"LightYellow1",
"LightYellow2",
"LightYellow3",
"LightYellow4",
"yellow0",
"yellow1",
"yellow2",
"yellow3",
"yellow4",
"Lightgoldenrod0",
"Lightgoldenrod1",
"Lightgoldenrod2",
"Lightgoldenrod3",
"Lightgoldenrod4",
"gold00",
"gold1",
"gold2",
"gold3",
"gold4",
"LightOrange",
"NavajoWhite",
"LightSalmon1",
"LightSalmon3",
"LightSalmon4",
"DarkOrange",
"DarkOrange0",
"DarkOrange1",
"DarkOrange3",
"DarkOrange4",
"MistyRose1",
"MistyRose2",
"LightPink",
"LightPink3",
"LightPink4",
"IndianRed0",
"IndianRed1",
"firebrick1",
"firebrick3",
"firebrick4",
"Plum1 ",
"Plum1",
"Plum2",
"Plum3",
"Plum4",
"Magenta00",
"Magenta0",
"Magenta1",
"Magenta3",
"Magenta4",
"LightSteelBlue1",
"LightSteelBlue1",
"LightSteelBlue2",
"LightSteelBlue3",
"LightSteelBlue4",
"LightCyan",
"PowderBlue",
"SteelBlue1",
"SteelBlue",
"blue4",
"aquamarine0",
"aquamarine1",
"aquamarine2",
"aquamarine3",
"aquamarine4",
"turqoise0",
"turqoise1",
"turqoise2",
"turqoise3",
"turqoise4",
"DarkOliveGreen1",
"DarkOliveGreen2",
"DarkOliveGreen3",
"DarkOliveGreen4",
"DarkOliveGreen5",
"chartreuse",
"chartreuse2",
"chartreuse3",
"chartreuse4",
"DarkGreen",
/* glow_eDrawType_Line */ "Black",
/* glow_eDrawType_LineRed */ "Red",
/* glow_eDrawType_LineGray */ "Grey",
/* glow_eDrawType_Color4 */ "White",
/* glow_eDrawType_Color5 */ "YellowGreen",
/* glow_eDrawType_Color6 */ "Yellow",
/* glow_eDrawType_Color7 */ "Gold",
/* glow_eDrawType_Color8 */ "Orange",
/* glow_eDrawType_Color9 */ "OrangeRed",
/* glow_eDrawType_Color10 */ "Red",
/* glow_eDrawType_Color11 */ "RedViolet",
/* glow_eDrawType_Color12 */ "Violet",
/* glow_eDrawType_Color13 */ "BlueViolet",
/* glow_eDrawType_Color14 */ "BlueBlueViolet",
/* glow_eDrawType_Color15 */ "Blue",
/* glow_eDrawType_Color16 */ "BlueBlueGreen",
/* glow_eDrawType_Color17 */ "BlueGreen",
/* glow_eDrawType_Color18 */ "GreenGreenBlue",
/* glow_eDrawType_Color19 */ "Green",
/* glow_eDrawType_Color20 */ "GreenGreenYellow",
/* glow_eDrawType_Color21 */ "GrayFix1",
/* glow_eDrawType_Color22 */ "GrayFix2",
/* glow_eDrawType_Color23 */ "GrayFix3",
/* glow_eDrawType_Color24 */ "GrayFix4",
/* glow_eDrawType_Color25 */ "GrayFix5",
/* glow_eDrawType_Color26 */ "GrayFix6",
/* glow_eDrawType_Color27 */ "GrayFix7",
/* glow_eDrawType_Color28 */ "GrayFix8",
/* glow_eDrawType_Color29 */ "GrayFix9",
/* glow_eDrawType_Color30 */ "GrayFix10",
/* glow_eDrawType_Color31 */ "GrayLow1",
/* glow_eDrawType_Color32 */ "GrayLow2",
/* glow_eDrawType_Color33 */ "GrayLow3",
/* glow_eDrawType_Color34 */ "GrayLow4",
/* glow_eDrawType_Color35 */ "GrayLow5",
/* glow_eDrawType_Color36 */ "GrayLow6",
/* glow_eDrawType_Color37 */ "GrayLow7",
/* glow_eDrawType_Color38 */ "GrayLow8",
/* glow_eDrawType_Color39 */ "GrayLow9",
/* glow_eDrawType_Color40 */ "GrayLow10",
/* glow_eDrawType_Color41 */ "GrayMedium1",
/* glow_eDrawType_Color42 */ "GrayMedium2",
/* glow_eDrawType_Color43 */ "GrayMedium3",
/* glow_eDrawType_Color44 */ "GrayMedium4",
/* glow_eDrawType_Color45 */ "GrayMedium5",
/* glow_eDrawType_Color46 */ "GrayMedium6",
/* glow_eDrawType_Color47 */ "GrayMedium7",
/* glow_eDrawType_Color48 */ "GrayMedium8",
/* glow_eDrawType_Color49 */ "GrayMedium9",
/* glow_eDrawType_Color50 */ "GrayMedium10",
/* glow_eDrawType_Color51 */ "GrayHigh1",
/* glow_eDrawType_Color52 */ "GrayHigh2",
/* glow_eDrawType_Color53 */ "GrayHigh3",
/* glow_eDrawType_Color54 */ "GrayHigh4",
/* glow_eDrawType_Color55 */ "GrayHigh5",
/* glow_eDrawType_Color56 */ "GrayHigh6",
/* glow_eDrawType_Color57 */ "GrayHigh7",
/* glow_eDrawType_Color58 */ "GrayHigh8",
/* glow_eDrawType_Color59 */ "GrayHigh9",
/* glow_eDrawType_Color60 */ "GrayHigh10",
/* glow_eDrawType_Color61 */ "YellowGreenLow1",
/* glow_eDrawType_Color62 */ "YellowGreenLow2",
/* glow_eDrawType_Color63 */ "YellowGreenLow3",
/* glow_eDrawType_Color64 */ "YellowGreenLow4",
/* glow_eDrawType_Color65 */ "YellowGreenLow5",
/* glow_eDrawType_Color66 */ "YellowGreenLow6",
/* glow_eDrawType_Color67 */ "YellowGreenLow7",
/* glow_eDrawType_Color68 */ "YellowGreenLow8",
/* glow_eDrawType_Color69 */ "YellowGreenLow9",
/* glow_eDrawType_Color70 */ "YellowGreenLow10",
/* glow_eDrawType_Color71 */ "YellowGreenMedium1",
/* glow_eDrawType_Color72 */ "YellowGreenMedium2",
/* glow_eDrawType_Color73 */ "YellowGreenMedium3",
/* glow_eDrawType_Color74 */ "YellowGreenMedium4",
/* glow_eDrawType_Color75 */ "YellowGreenMedium5",
/* glow_eDrawType_Color76 */ "YellowGreenMedium6",
/* glow_eDrawType_Color77 */ "YellowGreenMedium7",
/* glow_eDrawType_Color78 */ "YellowGreenMedium8",
/* glow_eDrawType_Color79 */ "YellowGreenMedium9",
/* glow_eDrawType_Color80 */ "YellowGreenMedium10",
/* glow_eDrawType_Color81 */ "YellowGreenHigh1",
/* glow_eDrawType_Color82 */ "YellowGreenHigh2",
/* glow_eDrawType_Color83 */ "YellowGreenHigh3",
/* glow_eDrawType_Color84 */ "YellowGreenHigh4",
/* glow_eDrawType_Color85 */ "YellowGreenHigh5",
/* glow_eDrawType_Color86 */ "YellowGreenHigh6",
/* glow_eDrawType_Color87 */ "YellowGreenHigh7",
/* glow_eDrawType_Color88 */ "YellowGreenHigh8",
/* glow_eDrawType_Color89 */ "YellowGreenHigh9",
/* glow_eDrawType_Color90 */ "YellowGreenHigh10",
/* glow_eDrawType_Color91 */ "YellowLow1",
/* glow_eDrawType_Color92 */ "YellowLow2",
/* glow_eDrawType_Color93 */ "YellowLow3",
/* glow_eDrawType_Color94 */ "YellowLow4",
/* glow_eDrawType_Color95 */ "YellowLow5",
/* glow_eDrawType_Color96 */ "YellowLow6",
/* glow_eDrawType_Color97 */ "YellowLow7",
/* glow_eDrawType_Color98 */ "YellowLow8",
/* glow_eDrawType_Color99 */ "YellowLow9",
/* glow_eDrawType_Color100 */ "YellowLow10",
/* glow_eDrawType_Color101 */ "YellowMedium1",
/* glow_eDrawType_Color102 */ "YellowMedium2",
/* glow_eDrawType_Color103 */ "YellowMedium3",
/* glow_eDrawType_Color104 */ "YellowMedium4",
/* glow_eDrawType_Color105 */ "YellowMedium5",
/* glow_eDrawType_Color106 */ "YellowMedium6",
/* glow_eDrawType_Color107 */ "YellowMedium7",
/* glow_eDrawType_Color108 */ "YellowMedium8",
/* glow_eDrawType_Color109 */ "YellowMedium9",
/* glow_eDrawType_Color110 */ "YellowMedium10",
/* glow_eDrawType_Color111 */ "YellowHigh1",
/* glow_eDrawType_Color112 */ "YellowHigh2",
/* glow_eDrawType_Color113 */ "YellowHigh3",
/* glow_eDrawType_Color114 */ "YellowHigh4",
/* glow_eDrawType_Color115 */ "YellowHigh5",
/* glow_eDrawType_Color116 */ "YellowHigh6",
/* glow_eDrawType_Color117 */ "YellowHigh7",
/* glow_eDrawType_Color118 */ "YellowHigh8",
/* glow_eDrawType_Color119 */ "YellowHigh9",
/* glow_eDrawType_Color120 */ "YellowHigh10",
/* glow_eDrawType_Color121 */ "OrangeLow1",
/* glow_eDrawType_Color122 */ "OrangeLow2",
/* glow_eDrawType_Color123 */ "OrangeLow3",
/* glow_eDrawType_Color124 */ "OrangeLow4",
/* glow_eDrawType_Color125 */ "OrangeLow5",
/* glow_eDrawType_Color126 */ "OrangeLow6",
/* glow_eDrawType_Color127 */ "OrangeLow7",
/* glow_eDrawType_Color128 */ "OrangeLow8",
/* glow_eDrawType_Color129 */ "OrangeLow9",
/* glow_eDrawType_Color130 */ "OrangeLow10",
/* glow_eDrawType_Color131 */ "OrangeMedium1",
/* glow_eDrawType_Color132 */ "OrangeMedium2",
/* glow_eDrawType_Color133 */ "OrangeMedium3",
/* glow_eDrawType_Color134 */ "OrangeMedium4",
/* glow_eDrawType_Color135 */ "OrangeMedium5",
/* glow_eDrawType_Color136 */ "OrangeMedium6",
/* glow_eDrawType_Color137 */ "OrangeMedium7",
/* glow_eDrawType_Color138 */ "OrangeMedium8",
/* glow_eDrawType_Color139 */ "OrangeMedium9",
/* glow_eDrawType_Color140 */ "OrangeMedium10",
/* glow_eDrawType_Color141 */ "OrangeHigh1",
/* glow_eDrawType_Color142 */ "OrangeHigh2",
/* glow_eDrawType_Color143 */ "OrangeHigh3",
/* glow_eDrawType_Color144 */ "OrangeHigh4",
/* glow_eDrawType_Color145 */ "OrangeHigh5",
/* glow_eDrawType_Color146 */ "OrangeHigh6",
/* glow_eDrawType_Color147 */ "OrangeHigh7",
/* glow_eDrawType_Color148 */ "OrangeHigh8",
/* glow_eDrawType_Color149 */ "OrangeHigh9",
/* glow_eDrawType_Color150 */ "OrangeHigh10",
/* glow_eDrawType_Color151 */ "RedLow1",
/* glow_eDrawType_Color152 */ "RedLow2",
/* glow_eDrawType_Color153 */ "RedLow3",
/* glow_eDrawType_Color154 */ "RedLow4",
/* glow_eDrawType_Color155 */ "RedLow5",
/* glow_eDrawType_Color156 */ "RedLow6",
/* glow_eDrawType_Color157 */ "RedLow7",
/* glow_eDrawType_Color158 */ "RedLow8",
/* glow_eDrawType_Color159 */ "RedLow9",
/* glow_eDrawType_Color160 */ "RedLow10",
/* glow_eDrawType_Color161 */ "RedMedium1",
/* glow_eDrawType_Color162 */ "RedMedium2",
/* glow_eDrawType_Color163 */ "RedMedium3",
/* glow_eDrawType_Color164 */ "RedMedium4",
/* glow_eDrawType_Color165 */ "RedMedium5",
/* glow_eDrawType_Color166 */ "RedMedium6",
/* glow_eDrawType_Color167 */ "RedMedium7",
/* glow_eDrawType_Color168 */ "RedMedium8",
/* glow_eDrawType_Color169 */ "RedMedium9",
/* glow_eDrawType_Color170 */ "RedMedium10",
/* glow_eDrawType_Color171 */ "RedHigh1",
/* glow_eDrawType_Color172 */ "RedHigh2",
/* glow_eDrawType_Color173 */ "RedHigh3",
/* glow_eDrawType_Color174 */ "RedHigh4",
/* glow_eDrawType_Color175 */ "RedHigh5",
/* glow_eDrawType_Color176 */ "RedHigh6",
/* glow_eDrawType_Color177 */ "RedHigh7",
/* glow_eDrawType_Color178 */ "RedHigh8",
/* glow_eDrawType_Color179 */ "RedHigh9",
/* glow_eDrawType_Color180 */ "RedHigh10",
/* glow_eDrawType_Color181 */ "MagentaLow1",
/* glow_eDrawType_Color182 */ "MagentaLow2",
/* glow_eDrawType_Color183 */ "MagentaLow3",
/* glow_eDrawType_Color184 */ "MagentaLow4",
/* glow_eDrawType_Color185 */ "MagentaLow5",
/* glow_eDrawType_Color186 */ "MagentaLow6",
/* glow_eDrawType_Color187 */ "MagentaLow7",
/* glow_eDrawType_Color188 */ "MagentaLow8",
/* glow_eDrawType_Color189 */ "MagentaLow9",
/* glow_eDrawType_Color190 */ "MagentaLow10",
/* glow_eDrawType_Color191 */ "MagentaMedium1",
/* glow_eDrawType_Color192 */ "MagentaMedium2",
/* glow_eDrawType_Color193 */ "MagentaMedium3",
/* glow_eDrawType_Color194 */ "MagentaMedium4",
/* glow_eDrawType_Color195 */ "MagentaMedium5",
/* glow_eDrawType_Color196 */ "MagentaMedium6",
/* glow_eDrawType_Color197 */ "MagentaMedium7",
/* glow_eDrawType_Color198 */ "MagentaMedium8",
/* glow_eDrawType_Color199 */ "MagentaMedium9",
/* glow_eDrawType_Color200 */ "MagentaMedium10",
/* glow_eDrawType_Color201 */ "MagentaHigh1",
/* glow_eDrawType_Color202 */ "MagentaHigh2",
/* glow_eDrawType_Color203 */ "MagentaHigh3",
/* glow_eDrawType_Color204 */ "MagentaHigh4",
/* glow_eDrawType_Color205 */ "MagentaHigh5",
/* glow_eDrawType_Color206 */ "MagentaHigh6",
/* glow_eDrawType_Color207 */ "MagentaHigh7",
/* glow_eDrawType_Color208 */ "MagentaHigh8",
/* glow_eDrawType_Color209 */ "MagentaHigh9",
/* glow_eDrawType_Color210 */ "MagentaHigh10",
/* glow_eDrawType_Color211 */ "BlueLow1",
/* glow_eDrawType_Color212 */ "BlueLow2",
/* glow_eDrawType_Color213 */ "BlueLow3",
/* glow_eDrawType_Color214 */ "BlueLow4",
/* glow_eDrawType_Color215 */ "BlueLow5",
/* glow_eDrawType_Color216 */ "BlueLow6",
/* glow_eDrawType_Color217 */ "BlueLow7",
/* glow_eDrawType_Color218 */ "BlueLow8",
/* glow_eDrawType_Color219 */ "BlueLow9",
/* glow_eDrawType_Color220 */ "BlueLow10",
/* glow_eDrawType_Color221 */ "BlueMedium1",
/* glow_eDrawType_Color222 */ "BlueMedium2",
/* glow_eDrawType_Color223 */ "BlueMedium3",
/* glow_eDrawType_Color224 */ "BlueMedium4",
/* glow_eDrawType_Color225 */ "BlueMedium5",
/* glow_eDrawType_Color226 */ "BlueMedium6",
/* glow_eDrawType_Color227 */ "BlueMedium7",
/* glow_eDrawType_Color228 */ "BlueMedium8",
/* glow_eDrawType_Color229 */ "BlueMedium9",
/* glow_eDrawType_Color230 */ "BlueMedium10",
/* glow_eDrawType_Color231 */ "BlueHigh1",
/* glow_eDrawType_Color232 */ "BlueHigh2",
/* glow_eDrawType_Color233 */ "BlueHigh3",
/* glow_eDrawType_Color234 */ "BlueHigh4",
/* glow_eDrawType_Color235 */ "BlueHigh5",
/* glow_eDrawType_Color236 */ "BlueHigh6",
/* glow_eDrawType_Color237 */ "BlueHigh7",
/* glow_eDrawType_Color238 */ "BlueHigh8",
/* glow_eDrawType_Color239 */ "BlueHigh9",
/* glow_eDrawType_Color240 */ "BlueHigh10",
/* glow_eDrawType_Color241 */ "SeaBlueLow1",
/* glow_eDrawType_Color242 */ "SeaBlueLow2",
/* glow_eDrawType_Color243 */ "SeaBlueLow3",
/* glow_eDrawType_Color244 */ "SeaBlueLow4",
/* glow_eDrawType_Color245 */ "SeaBlueLow5",
/* glow_eDrawType_Color246 */ "SeaBlueLow6",
/* glow_eDrawType_Color247 */ "SeaBlueLow7",
/* glow_eDrawType_Color248 */ "SeaBlueLow8",
/* glow_eDrawType_Color249 */ "SeaBlueLow9",
/* glow_eDrawType_Color250 */ "SeaBlueLow10",
/* glow_eDrawType_Color251 */ "SeaBlueMedium1",
/* glow_eDrawType_Color252 */ "SeaBlueMedium2",
/* glow_eDrawType_Color253 */ "SeaBlueMedium3",
/* glow_eDrawType_Color224 */ "SeaBlueMedium4",
/* glow_eDrawType_Color255 */ "SeaBlueMedium5",
/* glow_eDrawType_Color256 */ "SeaBlueMedium6",
/* glow_eDrawType_Color257 */ "SeaBlueMedium7",
/* glow_eDrawType_Color258 */ "SeaBlueMedium8",
/* glow_eDrawType_Color259 */ "SeaBlueMedium9",
/* glow_eDrawType_Color260 */ "SeaBlueMedium10",
/* glow_eDrawType_Color261 */ "SeaBlueHigh1",
/* glow_eDrawType_Color262 */ "SeaBlueHigh2",
/* glow_eDrawType_Color263 */ "SeaBlueHigh3",
/* glow_eDrawType_Color264 */ "SeaBlueHigh4",
/* glow_eDrawType_Color265 */ "SeaBlueHigh5",
/* glow_eDrawType_Color266 */ "SeaBlueHigh6",
/* glow_eDrawType_Color267 */ "SeaBlueHigh7",
/* glow_eDrawType_Color268 */ "SeaBlueHigh8",
/* glow_eDrawType_Color269 */ "SeaBlueHigh9",
/* glow_eDrawType_Color270 */ "SeaBlueHigh10",
/* glow_eDrawType_Color271 */ "GreenLow1",
/* glow_eDrawType_Color272 */ "GreenLow2",
/* glow_eDrawType_Color273 */ "GreenLow3",
/* glow_eDrawType_Color274 */ "GreenLow4",
/* glow_eDrawType_Color275 */ "GreenLow5",
/* glow_eDrawType_Color276 */ "GreenLow6",
/* glow_eDrawType_Color277 */ "GreenLow7",
/* glow_eDrawType_Color278 */ "GreenLow8",
/* glow_eDrawType_Color279 */ "GreenLow9",
/* glow_eDrawType_Color280 */ "GreenLow10",
/* glow_eDrawType_Color281 */ "GreenMedium1",
/* glow_eDrawType_Color282 */ "GreenMedium2",
/* glow_eDrawType_Color283 */ "GreenMedium3",
/* glow_eDrawType_Color284 */ "GreenMedium4",
/* glow_eDrawType_Color285 */ "GreenMedium5",
/* glow_eDrawType_Color286 */ "GreenMedium6",
/* glow_eDrawType_Color287 */ "GreenMedium7",
/* glow_eDrawType_Color288 */ "GreenMedium8",
/* glow_eDrawType_Color289 */ "GreenMedium9",
/* glow_eDrawType_Color290 */ "GreenMedium10",
/* glow_eDrawType_Color291 */ "GreenHigh1",
/* glow_eDrawType_Color292 */ "GreenHigh2",
/* glow_eDrawType_Color293 */ "GreenHigh3",
/* glow_eDrawType_Color294 */ "GreenHigh4",
/* glow_eDrawType_Color295 */ "GreenHigh5",
/* glow_eDrawType_Color296 */ "GreenHigh6",
/* glow_eDrawType_Color297 */ "GreenHigh7",
/* glow_eDrawType_Color298 */ "GreenHigh8",
/* glow_eDrawType_Color299 */ "GreenHigh9",
/* glow_eDrawType_Color300 */ "GreenHigh10",
"Inherit",
};
public String[] getTags() {
......@@ -126,106 +326,318 @@ public class GeColorEditor extends PropertyEditorSupport {
}
public void setAsText(String s) throws IllegalArgumentException {
if (s.equals("Inherit")) setValue( new Integer(GeColor.COLOR_INHERIT));
else if (s.equals("Black")) setValue( new Integer(GeColor.COLOR_1));
else if (s.equals("Red")) setValue( new Integer(GeColor.COLOR_2));
else if (s.equals("Gray")) setValue( new Integer(GeColor.COLOR_3));
else if (s.equals("White")) setValue( new Integer(GeColor.COLOR_4));
else if (s.equals("SpringGreen")) setValue( new Integer(GeColor.COLOR_5));
else if (s.equals("Yellow")) setValue( new Integer(GeColor.COLOR_6));
else if (s.equals("SteelBlue")) setValue( new Integer(GeColor.COLOR_7));
else if (s.equals("Magenta")) setValue( new Integer(GeColor.COLOR_8));
else if (s.equals("Grey73")) setValue( new Integer(GeColor.COLOR_9));
else if (s.equals("Grey84")) setValue( new Integer(GeColor.COLOR_10));
else if (s.equals("Grey5")) setValue( new Integer(GeColor.COLOR_11));
else if (s.equals("Grey10")) setValue( new Integer(GeColor.COLOR_12));
else if (s.equals("Grey15")) setValue( new Integer(GeColor.COLOR_13));
else if (s.equals("Grey30")) setValue( new Integer(GeColor.COLOR_14));
else if (s.equals("Grey50")) setValue( new Integer(GeColor.COLOR_15));
else if (s.equals("Grey7")) setValue( new Integer(GeColor.COLOR_16));
else if (s.equals("Grey12")) setValue( new Integer(GeColor.COLOR_17));
else if (s.equals("Grey25")) setValue( new Integer(GeColor.COLOR_18));
else if (s.equals("Grey45")) setValue( new Integer(GeColor.COLOR_19));
else if (s.equals("Grey65")) setValue( new Integer(GeColor.COLOR_20));
else if (s.equals("LightYellow0")) setValue( new Integer(GeColor.COLOR_21));
else if (s.equals("LightYellow1")) setValue( new Integer(GeColor.COLOR_22));
else if (s.equals("LightYellow2")) setValue( new Integer(GeColor.COLOR_23));
else if (s.equals("LightYellow3")) setValue( new Integer(GeColor.COLOR_24));
else if (s.equals("LightYellow4")) setValue( new Integer(GeColor.COLOR_25));
else if (s.equals("yellow0")) setValue( new Integer(GeColor.COLOR_26));
else if (s.equals("yellow1")) setValue( new Integer(GeColor.COLOR_27));
else if (s.equals("yellow2")) setValue( new Integer(GeColor.COLOR_28));
else if (s.equals("yellow3")) setValue( new Integer(GeColor.COLOR_29));
else if (s.equals("yellow4")) setValue( new Integer(GeColor.COLOR_30));
else if (s.equals("Lightgoldenrod0")) setValue( new Integer(GeColor.COLOR_31));
else if (s.equals("Lightgoldenrod1")) setValue( new Integer(GeColor.COLOR_32));
else if (s.equals("Lightgoldenrod2")) setValue( new Integer(GeColor.COLOR_33));
else if (s.equals("Lightgoldenrod3")) setValue( new Integer(GeColor.COLOR_34));
else if (s.equals("Lightgoldenrod4")) setValue( new Integer(GeColor.COLOR_35));
else if (s.equals("gold00")) setValue( new Integer(GeColor.COLOR_36));
else if (s.equals("gold1")) setValue( new Integer(GeColor.COLOR_37));
else if (s.equals("gold2")) setValue( new Integer(GeColor.COLOR_38));
else if (s.equals("gold3")) setValue( new Integer(GeColor.COLOR_39));
else if (s.equals("gold4")) setValue( new Integer(GeColor.COLOR_40));
else if (s.equals("LightOrange")) setValue( new Integer(GeColor.COLOR_41));
else if (s.equals("NavajoWhite")) setValue( new Integer(GeColor.COLOR_42));
else if (s.equals("LightSalmon1")) setValue( new Integer(GeColor.COLOR_43));
else if (s.equals("LightSalmon3")) setValue( new Integer(GeColor.COLOR_44));
else if (s.equals("LightSalmon4")) setValue( new Integer(GeColor.COLOR_45));
else if (s.equals("DarkOrange")) setValue( new Integer(GeColor.COLOR_46));
else if (s.equals("DarkOrange0")) setValue( new Integer(GeColor.COLOR_47));
else if (s.equals("DarkOrange1")) setValue( new Integer(GeColor.COLOR_48));
else if (s.equals("DarkOrange3")) setValue( new Integer(GeColor.COLOR_49));
else if (s.equals("DarkOrange4")) setValue( new Integer(GeColor.COLOR_50));
else if (s.equals("MistyRose1")) setValue( new Integer(GeColor.COLOR_51));
else if (s.equals("MistyRose2")) setValue( new Integer(GeColor.COLOR_52));
else if (s.equals("LightPink")) setValue( new Integer(GeColor.COLOR_53));
else if (s.equals("LightPink3")) setValue( new Integer(GeColor.COLOR_54));
else if (s.equals("LightPink4")) setValue( new Integer(GeColor.COLOR_55));
else if (s.equals("IndianRed0")) setValue( new Integer(GeColor.COLOR_56));
else if (s.equals("IndianRed1")) setValue( new Integer(GeColor.COLOR_57));
else if (s.equals("firebrick1")) setValue( new Integer(GeColor.COLOR_58));
else if (s.equals("firebrick3")) setValue( new Integer(GeColor.COLOR_59));
else if (s.equals("firebrick4")) setValue( new Integer(GeColor.COLOR_60));
else if (s.equals("Plum1")) setValue( new Integer(GeColor.COLOR_61));
else if (s.equals("Plum1")) setValue( new Integer(GeColor.COLOR_62));
else if (s.equals("Plum2")) setValue( new Integer(GeColor.COLOR_63));
else if (s.equals("Plum3")) setValue( new Integer(GeColor.COLOR_64));
else if (s.equals("Plum4")) setValue( new Integer(GeColor.COLOR_65));
else if (s.equals("Magenta00")) setValue( new Integer(GeColor.COLOR_66));
else if (s.equals("Magenta0")) setValue( new Integer(GeColor.COLOR_67));
else if (s.equals("Magenta1")) setValue( new Integer(GeColor.COLOR_68));
else if (s.equals("Magenta3")) setValue( new Integer(GeColor.COLOR_69));
else if (s.equals("Magenta4")) setValue( new Integer(GeColor.COLOR_70));
else if (s.equals("LightSteelBlue1")) setValue( new Integer(GeColor.COLOR_71));
else if (s.equals("LightSteelBlue1")) setValue( new Integer(GeColor.COLOR_72));
else if (s.equals("LightSteelBlue2")) setValue( new Integer(GeColor.COLOR_73));
else if (s.equals("LightSteelBlue3")) setValue( new Integer(GeColor.COLOR_74));
else if (s.equals("LightSteelBlue4")) setValue( new Integer(GeColor.COLOR_75));
else if (s.equals("LightCyan")) setValue( new Integer(GeColor.COLOR_76));
else if (s.equals("PowderBlue")) setValue( new Integer(GeColor.COLOR_77));
else if (s.equals("SteelBlue1")) setValue( new Integer(GeColor.COLOR_78));
else if (s.equals("SteelBlue")) setValue( new Integer(GeColor.COLOR_79));
else if (s.equals("blue4")) setValue( new Integer(GeColor.COLOR_80));
else if (s.equals("aquamarine0")) setValue( new Integer(GeColor.COLOR_81));
else if (s.equals("aquamarine1")) setValue( new Integer(GeColor.COLOR_82));
else if (s.equals("aquamarine2")) setValue( new Integer(GeColor.COLOR_83));
else if (s.equals("aquamarine3")) setValue( new Integer(GeColor.COLOR_84));
else if (s.equals("aquamarine4")) setValue( new Integer(GeColor.COLOR_85));
else if (s.equals("turqoise0")) setValue( new Integer(GeColor.COLOR_86));
else if (s.equals("turqoise1")) setValue( new Integer(GeColor.COLOR_87));
else if (s.equals("turqoise2")) setValue( new Integer(GeColor.COLOR_88));
else if (s.equals("turqoise3")) setValue( new Integer(GeColor.COLOR_89));
else if (s.equals("turqoise4")) setValue( new Integer(GeColor.COLOR_90));
else if (s.equals("DarkOliveGreen1")) setValue( new Integer(GeColor.COLOR_91));
else if (s.equals("DarkOliveGreen2")) setValue( new Integer(GeColor.COLOR_92));
else if (s.equals("DarkOliveGreen3")) setValue( new Integer(GeColor.COLOR_93));
else if (s.equals("DarkOliveGreen4")) setValue( new Integer(GeColor.COLOR_94));
else if (s.equals("DarkOliveGreen5")) setValue( new Integer(GeColor.COLOR_95));
else if (s.equals("chartreuse")) setValue( new Integer(GeColor.COLOR_96));
else if (s.equals("chartreuse2")) setValue( new Integer(GeColor.COLOR_97));
else if (s.equals("chartreuse3")) setValue( new Integer(GeColor.COLOR_98));
else if (s.equals("chartreuse4")) setValue( new Integer(GeColor.COLOR_99));
else if (s.equals("DarkGreen")) setValue( new Integer(GeColor.COLOR_100));
/* glow_eDrawType_Line */ else if (s.equals("Black")) setValue( new Integer(GeColor.COLOR_1));
/* glow_eDrawType_LineRed */ else if (s.equals("Red")) setValue( new Integer(GeColor.COLOR_2));
/* glow_eDrawType_LineGray */ else if (s.equals("Grey")) setValue( new Integer(GeColor.COLOR_3));
/* glow_eDrawType_Color4 */ else if (s.equals("White")) setValue( new Integer(GeColor.COLOR_4));
/* glow_eDrawType_Color5 */ else if (s.equals("YellowGreen")) setValue( new Integer(GeColor.COLOR_5));
/* glow_eDrawType_Color6 */ else if (s.equals("Yellow")) setValue( new Integer(GeColor.COLOR_6));
/* glow_eDrawType_Color7 */ else if (s.equals("Gold")) setValue( new Integer(GeColor.COLOR_7));
/* glow_eDrawType_Color8 */ else if (s.equals("Orange")) setValue( new Integer(GeColor.COLOR_8));
/* glow_eDrawType_Color9 */ else if (s.equals("OrangeRed")) setValue( new Integer(GeColor.COLOR_9));
/* glow_eDrawType_Color10 */ else if (s.equals("Red")) setValue( new Integer(GeColor.COLOR_10));
/* glow_eDrawType_Color11 */ else if (s.equals("RedViolet")) setValue( new Integer(GeColor.COLOR_11));
/* glow_eDrawType_Color12 */ else if (s.equals("Violet")) setValue( new Integer(GeColor.COLOR_12));
/* glow_eDrawType_Color13 */ else if (s.equals("BlueViolet")) setValue( new Integer(GeColor.COLOR_13));
/* glow_eDrawType_Color14 */ else if (s.equals("BlueBlueViolet")) setValue( new Integer(GeColor.COLOR_14));
/* glow_eDrawType_Color15 */ else if (s.equals("Blue")) setValue( new Integer(GeColor.COLOR_15));
/* glow_eDrawType_Color16 */ else if (s.equals("BlueBlueGreen")) setValue( new Integer(GeColor.COLOR_16));
/* glow_eDrawType_Color17 */ else if (s.equals("BlueGreen")) setValue( new Integer(GeColor.COLOR_17));
/* glow_eDrawType_Color18 */ else if (s.equals("GreenGreenBlue")) setValue( new Integer(GeColor.COLOR_18));
/* glow_eDrawType_Color19 */ else if (s.equals("Green")) setValue( new Integer(GeColor.COLOR_19));
/* glow_eDrawType_Color20 */ else if (s.equals("GreenGreenYellow")) setValue( new Integer(GeColor.COLOR_20));
/* glow_eDrawType_Color21 */ else if (s.equals("GrayFix1")) setValue( new Integer(GeColor.COLOR_21));
/* glow_eDrawType_Color22 */ else if (s.equals("GrayFix2")) setValue( new Integer(GeColor.COLOR_22));
/* glow_eDrawType_Color23 */ else if (s.equals("GrayFix3")) setValue( new Integer(GeColor.COLOR_23));
/* glow_eDrawType_Color24 */ else if (s.equals("GrayFix4")) setValue( new Integer(GeColor.COLOR_24));
/* glow_eDrawType_Color25 */ else if (s.equals("GrayFix5")) setValue( new Integer(GeColor.COLOR_25));
/* glow_eDrawType_Color26 */ else if (s.equals("GrayFix6")) setValue( new Integer(GeColor.COLOR_26));
/* glow_eDrawType_Color27 */ else if (s.equals("GrayFix7")) setValue( new Integer(GeColor.COLOR_27));
/* glow_eDrawType_Color28 */ else if (s.equals("GrayFix8")) setValue( new Integer(GeColor.COLOR_28));
/* glow_eDrawType_Color29 */ else if (s.equals("GrayFix9")) setValue( new Integer(GeColor.COLOR_29));
/* glow_eDrawType_Color30 */ else if (s.equals("GrayFix10")) setValue( new Integer(GeColor.COLOR_30));
/* glow_eDrawType_Color31 */ else if (s.equals("GrayLow1")) setValue( new Integer(GeColor.COLOR_31));
/* glow_eDrawType_Color32 */ else if (s.equals("GrayLow2")) setValue( new Integer(GeColor.COLOR_32));
/* glow_eDrawType_Color33 */ else if (s.equals("GrayLow3")) setValue( new Integer(GeColor.COLOR_33));
/* glow_eDrawType_Color34 */ else if (s.equals("GrayLow4")) setValue( new Integer(GeColor.COLOR_34));
/* glow_eDrawType_Color35 */ else if (s.equals("GrayLow5")) setValue( new Integer(GeColor.COLOR_35));
/* glow_eDrawType_Color36 */ else if (s.equals("GrayLow6")) setValue( new Integer(GeColor.COLOR_36));
/* glow_eDrawType_Color37 */ else if (s.equals("GrayLow7")) setValue( new Integer(GeColor.COLOR_37));
/* glow_eDrawType_Color38 */ else if (s.equals("GrayLow8")) setValue( new Integer(GeColor.COLOR_38));
/* glow_eDrawType_Color39 */ else if (s.equals("GrayLow9")) setValue( new Integer(GeColor.COLOR_39));
/* glow_eDrawType_Color40 */ else if (s.equals("GrayLow10")) setValue( new Integer(GeColor.COLOR_40));
/* glow_eDrawType_Color41 */ else if (s.equals("GrayMedium1")) setValue( new Integer(GeColor.COLOR_41));
/* glow_eDrawType_Color42 */ else if (s.equals("GrayMedium2")) setValue( new Integer(GeColor.COLOR_42));
/* glow_eDrawType_Color43 */ else if (s.equals("GrayMedium3")) setValue( new Integer(GeColor.COLOR_43));
/* glow_eDrawType_Color44 */ else if (s.equals("GrayMedium4")) setValue( new Integer(GeColor.COLOR_44));
/* glow_eDrawType_Color45 */ else if (s.equals("GrayMedium5")) setValue( new Integer(GeColor.COLOR_45));
/* glow_eDrawType_Color46 */ else if (s.equals("GrayMedium6")) setValue( new Integer(GeColor.COLOR_46));
/* glow_eDrawType_Color47 */ else if (s.equals("GrayMedium7")) setValue( new Integer(GeColor.COLOR_47));
/* glow_eDrawType_Color48 */ else if (s.equals("GrayMedium8")) setValue( new Integer(GeColor.COLOR_48));
/* glow_eDrawType_Color49 */ else if (s.equals("GrayMedium9")) setValue( new Integer(GeColor.COLOR_49));
/* glow_eDrawType_Color50 */ else if (s.equals("GrayMedium10")) setValue( new Integer(GeColor.COLOR_50));
/* glow_eDrawType_Color51 */ else if (s.equals("GrayHigh1")) setValue( new Integer(GeColor.COLOR_51));
/* glow_eDrawType_Color52 */ else if (s.equals("GrayHigh2")) setValue( new Integer(GeColor.COLOR_52));
/* glow_eDrawType_Color53 */ else if (s.equals("GrayHigh3")) setValue( new Integer(GeColor.COLOR_53));
/* glow_eDrawType_Color54 */ else if (s.equals("GrayHigh4")) setValue( new Integer(GeColor.COLOR_54));
/* glow_eDrawType_Color55 */ else if (s.equals("GrayHigh5")) setValue( new Integer(GeColor.COLOR_55));
/* glow_eDrawType_Color56 */ else if (s.equals("GrayHigh6")) setValue( new Integer(GeColor.COLOR_56));
/* glow_eDrawType_Color57 */ else if (s.equals("GrayHigh7")) setValue( new Integer(GeColor.COLOR_57));
/* glow_eDrawType_Color58 */ else if (s.equals("GrayHigh8")) setValue( new Integer(GeColor.COLOR_58));
/* glow_eDrawType_Color59 */ else if (s.equals("GrayHigh9")) setValue( new Integer(GeColor.COLOR_59));
/* glow_eDrawType_Color60 */ else if (s.equals("GrayHigh10")) setValue( new Integer(GeColor.COLOR_60));
/* glow_eDrawType_Color61 */ else if (s.equals("YellowGreenLow1")) setValue( new Integer(GeColor.COLOR_61));
/* glow_eDrawType_Color62 */ else if (s.equals("YellowGreenLow2")) setValue( new Integer(GeColor.COLOR_62));
/* glow_eDrawType_Color63 */ else if (s.equals("YellowGreenLow3")) setValue( new Integer(GeColor.COLOR_63));
/* glow_eDrawType_Color64 */ else if (s.equals("YellowGreenLow4")) setValue( new Integer(GeColor.COLOR_64));
/* glow_eDrawType_Color65 */ else if (s.equals("YellowGreenLow5")) setValue( new Integer(GeColor.COLOR_65));
/* glow_eDrawType_Color66 */ else if (s.equals("YellowGreenLow6")) setValue( new Integer(GeColor.COLOR_66));
/* glow_eDrawType_Color67 */ else if (s.equals("YellowGreenLow7")) setValue( new Integer(GeColor.COLOR_67));
/* glow_eDrawType_Color68 */ else if (s.equals("YellowGreenLow8")) setValue( new Integer(GeColor.COLOR_68));
/* glow_eDrawType_Color69 */ else if (s.equals("YellowGreenLow9")) setValue( new Integer(GeColor.COLOR_69));
/* glow_eDrawType_Color70 */ else if (s.equals("YellowGreenLow10")) setValue( new Integer(GeColor.COLOR_70));
/* glow_eDrawType_Color71 */ else if (s.equals("YellowGreenMedium1")) setValue( new Integer(GeColor.COLOR_71));
/* glow_eDrawType_Color72 */ else if (s.equals("YellowGreenMedium2")) setValue( new Integer(GeColor.COLOR_72));
/* glow_eDrawType_Color73 */ else if (s.equals("YellowGreenMedium3")) setValue( new Integer(GeColor.COLOR_73));
/* glow_eDrawType_Color74 */ else if (s.equals("YellowGreenMedium4")) setValue( new Integer(GeColor.COLOR_74));
/* glow_eDrawType_Color75 */ else if (s.equals("YellowGreenMedium5")) setValue( new Integer(GeColor.COLOR_75));
/* glow_eDrawType_Color76 */ else if (s.equals("YellowGreenMedium6")) setValue( new Integer(GeColor.COLOR_76));
/* glow_eDrawType_Color77 */ else if (s.equals("YellowGreenMedium7")) setValue( new Integer(GeColor.COLOR_77));
/* glow_eDrawType_Color78 */ else if (s.equals("YellowGreenMedium8")) setValue( new Integer(GeColor.COLOR_78));
/* glow_eDrawType_Color79 */ else if (s.equals("YellowGreenMedium9")) setValue( new Integer(GeColor.COLOR_79));
/* glow_eDrawType_Color80 */ else if (s.equals("YellowGreenMedium10")) setValue( new Integer(GeColor.COLOR_80));
/* glow_eDrawType_Color81 */ else if (s.equals("YellowGreenHigh1")) setValue( new Integer(GeColor.COLOR_81));
/* glow_eDrawType_Color82 */ else if (s.equals("YellowGreenHigh2")) setValue( new Integer(GeColor.COLOR_82));
/* glow_eDrawType_Color83 */ else if (s.equals("YellowGreenHigh3")) setValue( new Integer(GeColor.COLOR_83));
/* glow_eDrawType_Color84 */ else if (s.equals("YellowGreenHigh4")) setValue( new Integer(GeColor.COLOR_84));
/* glow_eDrawType_Color85 */ else if (s.equals("YellowGreenHigh5")) setValue( new Integer(GeColor.COLOR_85));
/* glow_eDrawType_Color86 */ else if (s.equals("YellowGreenHigh6")) setValue( new Integer(GeColor.COLOR_86));
/* glow_eDrawType_Color87 */ else if (s.equals("YellowGreenHigh7")) setValue( new Integer(GeColor.COLOR_87));
/* glow_eDrawType_Color88 */ else if (s.equals("YellowGreenHigh8")) setValue( new Integer(GeColor.COLOR_88));
/* glow_eDrawType_Color89 */ else if (s.equals("YellowGreenHigh9")) setValue( new Integer(GeColor.COLOR_89));
/* glow_eDrawType_Color90 */ else if (s.equals("YellowGreenHigh10")) setValue( new Integer(GeColor.COLOR_90));
/* glow_eDrawType_Color91 */ else if (s.equals("YellowLow1")) setValue( new Integer(GeColor.COLOR_91));
/* glow_eDrawType_Color92 */ else if (s.equals("YellowLow2")) setValue( new Integer(GeColor.COLOR_92));
/* glow_eDrawType_Color93 */ else if (s.equals("YellowLow3")) setValue( new Integer(GeColor.COLOR_93));
/* glow_eDrawType_Color94 */ else if (s.equals("YellowLow4")) setValue( new Integer(GeColor.COLOR_94));
/* glow_eDrawType_Color95 */ else if (s.equals("YellowLow5")) setValue( new Integer(GeColor.COLOR_95));
/* glow_eDrawType_Color96 */ else if (s.equals("YellowLow6")) setValue( new Integer(GeColor.COLOR_96));
/* glow_eDrawType_Color97 */ else if (s.equals("YellowLow7")) setValue( new Integer(GeColor.COLOR_97));
/* glow_eDrawType_Color98 */ else if (s.equals("YellowLow8")) setValue( new Integer(GeColor.COLOR_98));
/* glow_eDrawType_Color99 */ else if (s.equals("YellowLow9")) setValue( new Integer(GeColor.COLOR_99));
/* glow_eDrawType_Color100 */ else if (s.equals("YellowLow10")) setValue( new Integer(GeColor.COLOR_100));
/* glow_eDrawType_Color101 */ else if (s.equals("YellowMedium1")) setValue( new Integer(GeColor.COLOR_101));
/* glow_eDrawType_Color102 */ else if (s.equals("YellowMedium2")) setValue( new Integer(GeColor.COLOR_102));
/* glow_eDrawType_Color103 */ else if (s.equals("YellowMedium3")) setValue( new Integer(GeColor.COLOR_103));
/* glow_eDrawType_Color104 */ else if (s.equals("YellowMedium4")) setValue( new Integer(GeColor.COLOR_104));
/* glow_eDrawType_Color105 */ else if (s.equals("YellowMedium5")) setValue( new Integer(GeColor.COLOR_105));
/* glow_eDrawType_Color106 */ else if (s.equals("YellowMedium6")) setValue( new Integer(GeColor.COLOR_106));
/* glow_eDrawType_Color107 */ else if (s.equals("YellowMedium7")) setValue( new Integer(GeColor.COLOR_107));
/* glow_eDrawType_Color108 */ else if (s.equals("YellowMedium8")) setValue( new Integer(GeColor.COLOR_108));
/* glow_eDrawType_Color109 */ else if (s.equals("YellowMedium9")) setValue( new Integer(GeColor.COLOR_109));
/* glow_eDrawType_Color110 */ else if (s.equals("YellowMedium10")) setValue( new Integer(GeColor.COLOR_110));
/* glow_eDrawType_Color111 */ else if (s.equals("YellowHigh1")) setValue( new Integer(GeColor.COLOR_111));
/* glow_eDrawType_Color112 */ else if (s.equals("YellowHigh2")) setValue( new Integer(GeColor.COLOR_112));
/* glow_eDrawType_Color113 */ else if (s.equals("YellowHigh3")) setValue( new Integer(GeColor.COLOR_113));
/* glow_eDrawType_Color114 */ else if (s.equals("YellowHigh4")) setValue( new Integer(GeColor.COLOR_114));
/* glow_eDrawType_Color115 */ else if (s.equals("YellowHigh5")) setValue( new Integer(GeColor.COLOR_115));
/* glow_eDrawType_Color116 */ else if (s.equals("YellowHigh6")) setValue( new Integer(GeColor.COLOR_116));
/* glow_eDrawType_Color117 */ else if (s.equals("YellowHigh7")) setValue( new Integer(GeColor.COLOR_117));
/* glow_eDrawType_Color118 */ else if (s.equals("YellowHigh8")) setValue( new Integer(GeColor.COLOR_118));
/* glow_eDrawType_Color119 */ else if (s.equals("YellowHigh9")) setValue( new Integer(GeColor.COLOR_119));
/* glow_eDrawType_Color120 */ else if (s.equals("YellowHigh10")) setValue( new Integer(GeColor.COLOR_120));
/* glow_eDrawType_Color121 */ else if (s.equals("OrangeLow1")) setValue( new Integer(GeColor.COLOR_121));
/* glow_eDrawType_Color122 */ else if (s.equals("OrangeLow2")) setValue( new Integer(GeColor.COLOR_122));
/* glow_eDrawType_Color123 */ else if (s.equals("OrangeLow3")) setValue( new Integer(GeColor.COLOR_123));
/* glow_eDrawType_Color124 */ else if (s.equals("OrangeLow4")) setValue( new Integer(GeColor.COLOR_124));
/* glow_eDrawType_Color125 */ else if (s.equals("OrangeLow5")) setValue( new Integer(GeColor.COLOR_125));
/* glow_eDrawType_Color126 */ else if (s.equals("OrangeLow6")) setValue( new Integer(GeColor.COLOR_126));
/* glow_eDrawType_Color127 */ else if (s.equals("OrangeLow7")) setValue( new Integer(GeColor.COLOR_127));
/* glow_eDrawType_Color128 */ else if (s.equals("OrangeLow8")) setValue( new Integer(GeColor.COLOR_128));
/* glow_eDrawType_Color129 */ else if (s.equals("OrangeLow9")) setValue( new Integer(GeColor.COLOR_129));
/* glow_eDrawType_Color130 */ else if (s.equals("OrangeLow10")) setValue( new Integer(GeColor.COLOR_130));
/* glow_eDrawType_Color131 */ else if (s.equals("OrangeMedium1")) setValue( new Integer(GeColor.COLOR_131));
/* glow_eDrawType_Color132 */ else if (s.equals("OrangeMedium2")) setValue( new Integer(GeColor.COLOR_132));
/* glow_eDrawType_Color133 */ else if (s.equals("OrangeMedium3")) setValue( new Integer(GeColor.COLOR_133));
/* glow_eDrawType_Color134 */ else if (s.equals("OrangeMedium4")) setValue( new Integer(GeColor.COLOR_134));
/* glow_eDrawType_Color135 */ else if (s.equals("OrangeMedium5")) setValue( new Integer(GeColor.COLOR_135));
/* glow_eDrawType_Color136 */ else if (s.equals("OrangeMedium6")) setValue( new Integer(GeColor.COLOR_136));
/* glow_eDrawType_Color137 */ else if (s.equals("OrangeMedium7")) setValue( new Integer(GeColor.COLOR_137));
/* glow_eDrawType_Color138 */ else if (s.equals("OrangeMedium8")) setValue( new Integer(GeColor.COLOR_138));
/* glow_eDrawType_Color139 */ else if (s.equals("OrangeMedium9")) setValue( new Integer(GeColor.COLOR_139));
/* glow_eDrawType_Color140 */ else if (s.equals("OrangeMedium10")) setValue( new Integer(GeColor.COLOR_140));
/* glow_eDrawType_Color141 */ else if (s.equals("OrangeHigh1")) setValue( new Integer(GeColor.COLOR_141));
/* glow_eDrawType_Color142 */ else if (s.equals("OrangeHigh2")) setValue( new Integer(GeColor.COLOR_142));
/* glow_eDrawType_Color143 */ else if (s.equals("OrangeHigh3")) setValue( new Integer(GeColor.COLOR_143));
/* glow_eDrawType_Color144 */ else if (s.equals("OrangeHigh4")) setValue( new Integer(GeColor.COLOR_144));
/* glow_eDrawType_Color145 */ else if (s.equals("OrangeHigh5")) setValue( new Integer(GeColor.COLOR_145));
/* glow_eDrawType_Color146 */ else if (s.equals("OrangeHigh6")) setValue( new Integer(GeColor.COLOR_146));
/* glow_eDrawType_Color147 */ else if (s.equals("OrangeHigh7")) setValue( new Integer(GeColor.COLOR_147));
/* glow_eDrawType_Color148 */ else if (s.equals("OrangeHigh8")) setValue( new Integer(GeColor.COLOR_148));
/* glow_eDrawType_Color149 */ else if (s.equals("OrangeHigh9")) setValue( new Integer(GeColor.COLOR_149));
/* glow_eDrawType_Color150 */ else if (s.equals("OrangeHigh10")) setValue( new Integer(GeColor.COLOR_150));
/* glow_eDrawType_Color151 */ else if (s.equals("RedLow1")) setValue( new Integer(GeColor.COLOR_151));
/* glow_eDrawType_Color152 */ else if (s.equals("RedLow2")) setValue( new Integer(GeColor.COLOR_152));
/* glow_eDrawType_Color153 */ else if (s.equals("RedLow3")) setValue( new Integer(GeColor.COLOR_153));
/* glow_eDrawType_Color154 */ else if (s.equals("RedLow4")) setValue( new Integer(GeColor.COLOR_154));
/* glow_eDrawType_Color155 */ else if (s.equals("RedLow5")) setValue( new Integer(GeColor.COLOR_155));
/* glow_eDrawType_Color156 */ else if (s.equals("RedLow6")) setValue( new Integer(GeColor.COLOR_156));
/* glow_eDrawType_Color157 */ else if (s.equals("RedLow7")) setValue( new Integer(GeColor.COLOR_157));
/* glow_eDrawType_Color158 */ else if (s.equals("RedLow8")) setValue( new Integer(GeColor.COLOR_158));
/* glow_eDrawType_Color159 */ else if (s.equals("RedLow9")) setValue( new Integer(GeColor.COLOR_159));
/* glow_eDrawType_Color160 */ else if (s.equals("RedLow10")) setValue( new Integer(GeColor.COLOR_160));
/* glow_eDrawType_Color161 */ else if (s.equals("RedMedium1")) setValue( new Integer(GeColor.COLOR_161));
/* glow_eDrawType_Color162 */ else if (s.equals("RedMedium2")) setValue( new Integer(GeColor.COLOR_162));
/* glow_eDrawType_Color163 */ else if (s.equals("RedMedium3")) setValue( new Integer(GeColor.COLOR_163));
/* glow_eDrawType_Color164 */ else if (s.equals("RedMedium4")) setValue( new Integer(GeColor.COLOR_164));
/* glow_eDrawType_Color165 */ else if (s.equals("RedMedium5")) setValue( new Integer(GeColor.COLOR_165));
/* glow_eDrawType_Color166 */ else if (s.equals("RedMedium6")) setValue( new Integer(GeColor.COLOR_166));
/* glow_eDrawType_Color167 */ else if (s.equals("RedMedium7")) setValue( new Integer(GeColor.COLOR_167));
/* glow_eDrawType_Color168 */ else if (s.equals("RedMedium8")) setValue( new Integer(GeColor.COLOR_168));
/* glow_eDrawType_Color169 */ else if (s.equals("RedMedium9")) setValue( new Integer(GeColor.COLOR_169));
/* glow_eDrawType_Color170 */ else if (s.equals("RedMedium10")) setValue( new Integer(GeColor.COLOR_170));
/* glow_eDrawType_Color171 */ else if (s.equals("RedHigh1")) setValue( new Integer(GeColor.COLOR_171));
/* glow_eDrawType_Color172 */ else if (s.equals("RedHigh2")) setValue( new Integer(GeColor.COLOR_172));
/* glow_eDrawType_Color173 */ else if (s.equals("RedHigh3")) setValue( new Integer(GeColor.COLOR_173));
/* glow_eDrawType_Color174 */ else if (s.equals("RedHigh4")) setValue( new Integer(GeColor.COLOR_174));
/* glow_eDrawType_Color175 */ else if (s.equals("RedHigh5")) setValue( new Integer(GeColor.COLOR_175));
/* glow_eDrawType_Color176 */ else if (s.equals("RedHigh6")) setValue( new Integer(GeColor.COLOR_176));
/* glow_eDrawType_Color177 */ else if (s.equals("RedHigh7")) setValue( new Integer(GeColor.COLOR_177));
/* glow_eDrawType_Color178 */ else if (s.equals("RedHigh8")) setValue( new Integer(GeColor.COLOR_178));
/* glow_eDrawType_Color179 */ else if (s.equals("RedHigh9")) setValue( new Integer(GeColor.COLOR_179));
/* glow_eDrawType_Color180 */ else if (s.equals("RedHigh10")) setValue( new Integer(GeColor.COLOR_180));
/* glow_eDrawType_Color181 */ else if (s.equals("MagentaLow1")) setValue( new Integer(GeColor.COLOR_181));
/* glow_eDrawType_Color182 */ else if (s.equals("MagentaLow2")) setValue( new Integer(GeColor.COLOR_182));
/* glow_eDrawType_Color183 */ else if (s.equals("MagentaLow3")) setValue( new Integer(GeColor.COLOR_183));
/* glow_eDrawType_Color184 */ else if (s.equals("MagentaLow4")) setValue( new Integer(GeColor.COLOR_184));
/* glow_eDrawType_Color185 */ else if (s.equals("MagentaLow5")) setValue( new Integer(GeColor.COLOR_185));
/* glow_eDrawType_Color186 */ else if (s.equals("MagentaLow6")) setValue( new Integer(GeColor.COLOR_186));
/* glow_eDrawType_Color187 */ else if (s.equals("MagentaLow7")) setValue( new Integer(GeColor.COLOR_187));
/* glow_eDrawType_Color188 */ else if (s.equals("MagentaLow8")) setValue( new Integer(GeColor.COLOR_188));
/* glow_eDrawType_Color189 */ else if (s.equals("MagentaLow9")) setValue( new Integer(GeColor.COLOR_189));
/* glow_eDrawType_Color190 */ else if (s.equals("MagentaLow10")) setValue( new Integer(GeColor.COLOR_190));
/* glow_eDrawType_Color191 */ else if (s.equals("MagentaMedium1")) setValue( new Integer(GeColor.COLOR_191));
/* glow_eDrawType_Color192 */ else if (s.equals("MagentaMedium2")) setValue( new Integer(GeColor.COLOR_192));
/* glow_eDrawType_Color193 */ else if (s.equals("MagentaMedium3")) setValue( new Integer(GeColor.COLOR_193));
/* glow_eDrawType_Color194 */ else if (s.equals("MagentaMedium4")) setValue( new Integer(GeColor.COLOR_194));
/* glow_eDrawType_Color195 */ else if (s.equals("MagentaMedium5")) setValue( new Integer(GeColor.COLOR_195));
/* glow_eDrawType_Color196 */ else if (s.equals("MagentaMedium6")) setValue( new Integer(GeColor.COLOR_196));
/* glow_eDrawType_Color197 */ else if (s.equals("MagentaMedium7")) setValue( new Integer(GeColor.COLOR_197));
/* glow_eDrawType_Color198 */ else if (s.equals("MagentaMedium8")) setValue( new Integer(GeColor.COLOR_198));
/* glow_eDrawType_Color199 */ else if (s.equals("MagentaMedium9")) setValue( new Integer(GeColor.COLOR_199));
/* glow_eDrawType_Color200 */ else if (s.equals("MagentaMedium10")) setValue( new Integer(GeColor.COLOR_200));
/* glow_eDrawType_Color201 */ else if (s.equals("MagentaHigh1")) setValue( new Integer(GeColor.COLOR_201));
/* glow_eDrawType_Color202 */ else if (s.equals("MagentaHigh2")) setValue( new Integer(GeColor.COLOR_202));
/* glow_eDrawType_Color203 */ else if (s.equals("MagentaHigh3")) setValue( new Integer(GeColor.COLOR_203));
/* glow_eDrawType_Color204 */ else if (s.equals("MagentaHigh4")) setValue( new Integer(GeColor.COLOR_204));
/* glow_eDrawType_Color205 */ else if (s.equals("MagentaHigh5")) setValue( new Integer(GeColor.COLOR_205));
/* glow_eDrawType_Color206 */ else if (s.equals("MagentaHigh6")) setValue( new Integer(GeColor.COLOR_206));
/* glow_eDrawType_Color207 */ else if (s.equals("MagentaHigh7")) setValue( new Integer(GeColor.COLOR_207));
/* glow_eDrawType_Color208 */ else if (s.equals("MagentaHigh8")) setValue( new Integer(GeColor.COLOR_208));
/* glow_eDrawType_Color209 */ else if (s.equals("MagentaHigh9")) setValue( new Integer(GeColor.COLOR_209));
/* glow_eDrawType_Color210 */ else if (s.equals("MagentaHigh10")) setValue( new Integer(GeColor.COLOR_210));
/* glow_eDrawType_Color211 */ else if (s.equals("BlueLow1")) setValue( new Integer(GeColor.COLOR_211));
/* glow_eDrawType_Color212 */ else if (s.equals("BlueLow2")) setValue( new Integer(GeColor.COLOR_212));
/* glow_eDrawType_Color213 */ else if (s.equals("BlueLow3")) setValue( new Integer(GeColor.COLOR_213));
/* glow_eDrawType_Color214 */ else if (s.equals("BlueLow4")) setValue( new Integer(GeColor.COLOR_214));
/* glow_eDrawType_Color215 */ else if (s.equals("BlueLow5")) setValue( new Integer(GeColor.COLOR_215));
/* glow_eDrawType_Color216 */ else if (s.equals("BlueLow6")) setValue( new Integer(GeColor.COLOR_216));
/* glow_eDrawType_Color217 */ else if (s.equals("BlueLow7")) setValue( new Integer(GeColor.COLOR_217));
/* glow_eDrawType_Color218 */ else if (s.equals("BlueLow8")) setValue( new Integer(GeColor.COLOR_218));
/* glow_eDrawType_Color219 */ else if (s.equals("BlueLow9")) setValue( new Integer(GeColor.COLOR_219));
/* glow_eDrawType_Color220 */ else if (s.equals("BlueLow10")) setValue( new Integer(GeColor.COLOR_220));
/* glow_eDrawType_Color221 */ else if (s.equals("BlueMedium1")) setValue( new Integer(GeColor.COLOR_221));
/* glow_eDrawType_Color222 */ else if (s.equals("BlueMedium2")) setValue( new Integer(GeColor.COLOR_222));
/* glow_eDrawType_Color223 */ else if (s.equals("BlueMedium3")) setValue( new Integer(GeColor.COLOR_223));
/* glow_eDrawType_Color224 */ else if (s.equals("BlueMedium4")) setValue( new Integer(GeColor.COLOR_224));
/* glow_eDrawType_Color225 */ else if (s.equals("BlueMedium5")) setValue( new Integer(GeColor.COLOR_225));
/* glow_eDrawType_Color226 */ else if (s.equals("BlueMedium6")) setValue( new Integer(GeColor.COLOR_226));
/* glow_eDrawType_Color227 */ else if (s.equals("BlueMedium7")) setValue( new Integer(GeColor.COLOR_227));
/* glow_eDrawType_Color228 */ else if (s.equals("BlueMedium8")) setValue( new Integer(GeColor.COLOR_228));
/* glow_eDrawType_Color229 */ else if (s.equals("BlueMedium9")) setValue( new Integer(GeColor.COLOR_229));
/* glow_eDrawType_Color230 */ else if (s.equals("BlueMedium10")) setValue( new Integer(GeColor.COLOR_230));
/* glow_eDrawType_Color231 */ else if (s.equals("BlueHigh1")) setValue( new Integer(GeColor.COLOR_231));
/* glow_eDrawType_Color232 */ else if (s.equals("BlueHigh2")) setValue( new Integer(GeColor.COLOR_232));
/* glow_eDrawType_Color233 */ else if (s.equals("BlueHigh3")) setValue( new Integer(GeColor.COLOR_233));
/* glow_eDrawType_Color234 */ else if (s.equals("BlueHigh4")) setValue( new Integer(GeColor.COLOR_234));
/* glow_eDrawType_Color235 */ else if (s.equals("BlueHigh5")) setValue( new Integer(GeColor.COLOR_235));
/* glow_eDrawType_Color236 */ else if (s.equals("BlueHigh6")) setValue( new Integer(GeColor.COLOR_236));
/* glow_eDrawType_Color237 */ else if (s.equals("BlueHigh7")) setValue( new Integer(GeColor.COLOR_237));
/* glow_eDrawType_Color238 */ else if (s.equals("BlueHigh8")) setValue( new Integer(GeColor.COLOR_238));
/* glow_eDrawType_Color239 */ else if (s.equals("BlueHigh9")) setValue( new Integer(GeColor.COLOR_239));
/* glow_eDrawType_Color240 */ else if (s.equals("BlueHigh10")) setValue( new Integer(GeColor.COLOR_240));
/* glow_eDrawType_Color241 */ else if (s.equals("SeaBlueLow1")) setValue( new Integer(GeColor.COLOR_241));
/* glow_eDrawType_Color242 */ else if (s.equals("SeaBlueLow2")) setValue( new Integer(GeColor.COLOR_242));
/* glow_eDrawType_Color243 */ else if (s.equals("SeaBlueLow3")) setValue( new Integer(GeColor.COLOR_243));
/* glow_eDrawType_Color244 */ else if (s.equals("SeaBlueLow4")) setValue( new Integer(GeColor.COLOR_244));
/* glow_eDrawType_Color245 */ else if (s.equals("SeaBlueLow5")) setValue( new Integer(GeColor.COLOR_245));
/* glow_eDrawType_Color246 */ else if (s.equals("SeaBlueLow6")) setValue( new Integer(GeColor.COLOR_246));
/* glow_eDrawType_Color247 */ else if (s.equals("SeaBlueLow7")) setValue( new Integer(GeColor.COLOR_247));
/* glow_eDrawType_Color248 */ else if (s.equals("SeaBlueLow8")) setValue( new Integer(GeColor.COLOR_248));
/* glow_eDrawType_Color249 */ else if (s.equals("SeaBlueLow9")) setValue( new Integer(GeColor.COLOR_249));
/* glow_eDrawType_Color250 */ else if (s.equals("SeaBlueLow10")) setValue( new Integer(GeColor.COLOR_250));
/* glow_eDrawType_Color251 */ else if (s.equals("SeaBlueMedium1")) setValue( new Integer(GeColor.COLOR_251));
/* glow_eDrawType_Color252 */ else if (s.equals("SeaBlueMedium2")) setValue( new Integer(GeColor.COLOR_252));
/* glow_eDrawType_Color253 */ else if (s.equals("SeaBlueMedium3")) setValue( new Integer(GeColor.COLOR_253));
/* glow_eDrawType_Color224 */ else if (s.equals("SeaBlueMedium4")) setValue( new Integer(GeColor.COLOR_254));
/* glow_eDrawType_Color255 */ else if (s.equals("SeaBlueMedium5")) setValue( new Integer(GeColor.COLOR_255));
/* glow_eDrawType_Color256 */ else if (s.equals("SeaBlueMedium6")) setValue( new Integer(GeColor.COLOR_256));
/* glow_eDrawType_Color257 */ else if (s.equals("SeaBlueMedium7")) setValue( new Integer(GeColor.COLOR_257));
/* glow_eDrawType_Color258 */ else if (s.equals("SeaBlueMedium8")) setValue( new Integer(GeColor.COLOR_258));
/* glow_eDrawType_Color259 */ else if (s.equals("SeaBlueMedium9")) setValue( new Integer(GeColor.COLOR_259));
/* glow_eDrawType_Color260 */ else if (s.equals("SeaBlueMedium10")) setValue( new Integer(GeColor.COLOR_260));
/* glow_eDrawType_Color261 */ else if (s.equals("SeaBlueHigh1")) setValue( new Integer(GeColor.COLOR_261));
/* glow_eDrawType_Color262 */ else if (s.equals("SeaBlueHigh2")) setValue( new Integer(GeColor.COLOR_262));
/* glow_eDrawType_Color263 */ else if (s.equals("SeaBlueHigh3")) setValue( new Integer(GeColor.COLOR_263));
/* glow_eDrawType_Color264 */ else if (s.equals("SeaBlueHigh4")) setValue( new Integer(GeColor.COLOR_264));
/* glow_eDrawType_Color265 */ else if (s.equals("SeaBlueHigh5")) setValue( new Integer(GeColor.COLOR_265));
/* glow_eDrawType_Color266 */ else if (s.equals("SeaBlueHigh6")) setValue( new Integer(GeColor.COLOR_266));
/* glow_eDrawType_Color267 */ else if (s.equals("SeaBlueHigh7")) setValue( new Integer(GeColor.COLOR_267));
/* glow_eDrawType_Color268 */ else if (s.equals("SeaBlueHigh8")) setValue( new Integer(GeColor.COLOR_268));
/* glow_eDrawType_Color269 */ else if (s.equals("SeaBlueHigh9")) setValue( new Integer(GeColor.COLOR_269));
/* glow_eDrawType_Color270 */ else if (s.equals("SeaBlueHigh10")) setValue( new Integer(GeColor.COLOR_270));
/* glow_eDrawType_Color271 */ else if (s.equals("GreenLow1")) setValue( new Integer(GeColor.COLOR_271));
/* glow_eDrawType_Color272 */ else if (s.equals("GreenLow2")) setValue( new Integer(GeColor.COLOR_272));
/* glow_eDrawType_Color273 */ else if (s.equals("GreenLow3")) setValue( new Integer(GeColor.COLOR_273));
/* glow_eDrawType_Color274 */ else if (s.equals("GreenLow4")) setValue( new Integer(GeColor.COLOR_274));
/* glow_eDrawType_Color275 */ else if (s.equals("GreenLow5")) setValue( new Integer(GeColor.COLOR_275));
/* glow_eDrawType_Color276 */ else if (s.equals("GreenLow6")) setValue( new Integer(GeColor.COLOR_276));
/* glow_eDrawType_Color277 */ else if (s.equals("GreenLow7")) setValue( new Integer(GeColor.COLOR_277));
/* glow_eDrawType_Color278 */ else if (s.equals("GreenLow8")) setValue( new Integer(GeColor.COLOR_278));
/* glow_eDrawType_Color279 */ else if (s.equals("GreenLow9")) setValue( new Integer(GeColor.COLOR_279));
/* glow_eDrawType_Color280 */ else if (s.equals("GreenLow10")) setValue( new Integer(GeColor.COLOR_280));
/* glow_eDrawType_Color281 */ else if (s.equals("GreenMedium1")) setValue( new Integer(GeColor.COLOR_281));
/* glow_eDrawType_Color282 */ else if (s.equals("GreenMedium2")) setValue( new Integer(GeColor.COLOR_282));
/* glow_eDrawType_Color283 */ else if (s.equals("GreenMedium3")) setValue( new Integer(GeColor.COLOR_283));
/* glow_eDrawType_Color284 */ else if (s.equals("GreenMedium4")) setValue( new Integer(GeColor.COLOR_284));
/* glow_eDrawType_Color285 */ else if (s.equals("GreenMedium5")) setValue( new Integer(GeColor.COLOR_285));
/* glow_eDrawType_Color286 */ else if (s.equals("GreenMedium6")) setValue( new Integer(GeColor.COLOR_286));
/* glow_eDrawType_Color287 */ else if (s.equals("GreenMedium7")) setValue( new Integer(GeColor.COLOR_287));
/* glow_eDrawType_Color288 */ else if (s.equals("GreenMedium8")) setValue( new Integer(GeColor.COLOR_288));
/* glow_eDrawType_Color289 */ else if (s.equals("GreenMedium9")) setValue( new Integer(GeColor.COLOR_289));
/* glow_eDrawType_Color290 */ else if (s.equals("GreenMedium10")) setValue( new Integer(GeColor.COLOR_290));
/* glow_eDrawType_Color291 */ else if (s.equals("GreenHigh1")) setValue( new Integer(GeColor.COLOR_291));
/* glow_eDrawType_Color292 */ else if (s.equals("GreenHigh2")) setValue( new Integer(GeColor.COLOR_292));
/* glow_eDrawType_Color293 */ else if (s.equals("GreenHigh3")) setValue( new Integer(GeColor.COLOR_293));
/* glow_eDrawType_Color294 */ else if (s.equals("GreenHigh4")) setValue( new Integer(GeColor.COLOR_294));
/* glow_eDrawType_Color295 */ else if (s.equals("GreenHigh5")) setValue( new Integer(GeColor.COLOR_295));
/* glow_eDrawType_Color296 */ else if (s.equals("GreenHigh6")) setValue( new Integer(GeColor.COLOR_296));
/* glow_eDrawType_Color297 */ else if (s.equals("GreenHigh7")) setValue( new Integer(GeColor.COLOR_297));
/* glow_eDrawType_Color298 */ else if (s.equals("GreenHigh8")) setValue( new Integer(GeColor.COLOR_298));
/* glow_eDrawType_Color299 */ else if (s.equals("GreenHigh9")) setValue( new Integer(GeColor.COLOR_299));
/* glow_eDrawType_Color300 */ else if (s.equals("GreenHigh10")) setValue( new Integer(GeColor.COLOR_300));
else throw new IllegalArgumentException(s);
}
}
......@@ -16,106 +16,82 @@ public class GeColorToneEditor extends PropertyEditorSupport {
public GeColorToneEditor() {
}
private static String[] tagStrings = {
"NoTone",
"ToneGray",
"ToneYellow",
"ToneGold",
"ToneOrange",
"ToneRed",
"ToneMagenta",
"ToneBlue",
"ToneSeablue",
"ToneGreen",
"Grey5",
"Grey10",
"Grey15",
"Grey30",
"Grey50",
"Grey7",
"Grey12",
"Grey25",
"Grey45",
"Grey65",
"LightYellow0",
"LightYellow1",
"LightYellow2",
"LightYellow3",
"LightYellow4",
"yellow0",
"yellow1",
"yellow2",
"yellow3",
"yellow4",
"Lightgoldenrod0",
"Lightgoldenrod1",
"Lightgoldenrod2",
"Lightgoldenrod3",
"Lightgoldenrod4",
"gold00",
"gold1",
"gold2",
"gold3",
"gold4",
"LightOrange",
"NavajoWhite",
"LightSalmon1",
"LightSalmon3",
"LightSalmon4",
"DarkOrange",
"DarkOrange0",
"DarkOrange1",
"DarkOrange3",
"DarkOrange4",
"MistyRose1",
"MistyRose2",
"LightPink",
"LightPink3",
"LightPink4",
"IndianRed0",
"IndianRed1",
"firebrick1",
"firebrick3",
"firebrick4",
"Plum1 ",
"Plum1",
"Plum2",
"Plum3",
"Plum4",
"Magenta00",
"Magenta0",
"Magenta1",
"Magenta3",
"Magenta4",
"LightSteelBlue1",
"LightSteelBlue1",
"LightSteelBlue2",
"LightSteelBlue3",
"LightSteelBlue4",
"LightCyan",
"PowderBlue",
"SteelBlue1",
"SteelBlue",
"blue4",
"aquamarine0",
"aquamarine1",
"aquamarine2",
"aquamarine3",
"aquamarine4",
"turqoise0",
"turqoise1",
"turqoise2",
"turqoise3",
"turqoise4",
"DarkOliveGreen1",
"DarkOliveGreen2",
"DarkOliveGreen3",
"DarkOliveGreen4",
"DarkOliveGreen5",
"chartreuse",
"chartreuse2",
"chartreuse3",
"chartreuse4",
"DarkGreen",
/* glow_eDrawTone_No */ "NoTone",
/* glow_eDrawTone_Gray */ "ToneGray",
/* glow_eDrawTone_YellowGreen */ "ToneYellowGreen",
/* glow_eDrawTone_Yellow */ "ToneYellow",
/* glow_eDrawTone_Orange */ "ToneOrange",
/* glow_eDrawTone_Red */ "ToneRed",
/* glow_eDrawTone_Magenta */ "ToneMagenta",
/* glow_eDrawTone_Blue */ "ToneBlue",
/* glow_eDrawTone_Seablue */ "ToneSeablue",
/* glow_eDrawTone_Green */ "ToneGreen",
/* glow_eDrawTone_DarkGray */ "ToneDarkGray",
/* glow_eDrawTone_LightGray */ "ToneLightGray",
/* glow_eDrawTone_DarkYellowGreen */ "ToneDarkYellowGreen",
/* glow_eDrawTone_LightYellowGreen */ "ToneLightYellowGreen",
/* glow_eDrawTone_YellowGreenHighSaturation */ "ToneYellowGreenHighSaturation",
/* glow_eDrawTone_YellowGreenLowSaturation */ "ToneYellowGreenLowSaturation",
/* glow_eDrawTone_DarkYellowGreenHighSaturation */ "ToneDarkYellowGreenHighSaturation",
/* glow_eDrawTone_DarkYellowGreenLowSaturation */ "ToneDarkYellowGreenLowSaturation",
/* glow_eDrawTone_LightYellowGreenHighSaturation */ "ToneLightYellowGreenHighSaturation",
/* glow_eDrawTone_LightYellowGreenLowSaturation */ "ToneLightYellowGreenLowSaturation",
/* glow_eDrawTone_DarkYellow */ "ToneDarkYellow",
/* glow_eDrawTone_LightYellow */ "ToneLightYellow",
/* glow_eDrawTone_YellowHighSaturation */ "ToneYellowHighSaturation",
/* glow_eDrawTone_YellowLowSaturation */ "ToneYellowLowSaturation",
/* glow_eDrawTone_DarkYellowHighSaturation */ "ToneDarkYellowHighSaturation",
/* glow_eDrawTone_DarkYellowLowSaturation */ "ToneDarkYellowLowSaturation",
/* glow_eDrawTone_LightYellowHighSaturation */ "ToneLightYellowHighSaturation",
/* glow_eDrawTone_LightYellowLowSaturation */ "ToneLightYellowLowSaturation",
/* glow_eDrawTone_DarkOrange */ "ToneDarkOrange",
/* glow_eDrawTone_LightOrange */ "ToneLightOrange",
/* glow_eDrawTone_OrangeHighSaturation */ "ToneOrangeHighSaturation",
/* glow_eDrawTone_OrangeLowSaturation */ "ToneOrangeLowSaturation",
/* glow_eDrawTone_DarkOrangeHighSaturation */ "ToneDarkOrangeHighSaturation",
/* glow_eDrawTone_DarkOrangeLowSaturation */ "ToneDarkOrangeLowSaturation",
/* glow_eDrawTone_LightOrangeHighSaturation */ "ToneLightOrangeHighSaturation",
/* glow_eDrawTone_LightOrangeLowSaturation */ "ToneLightOrangeLowSaturation",
/* glow_eDrawTone_DarkRed */ "ToneDarkRed",
/* glow_eDrawTone_LightRed */ "ToneLightRed",
/* glow_eDrawTone_RedHighSaturation */ "ToneRedHighSaturation",
/* glow_eDrawTone_RedLowSaturation */ "ToneRedLowSaturation",
/* glow_eDrawTone_DarkRedHighSaturation */ "ToneDarkRedHighSaturation",
/* glow_eDrawTone_DarkRedLowSaturation */ "ToneDarkRedLowSaturation",
/* glow_eDrawTone_LightRedHighSaturation */ "ToneLightRedHighSaturation",
/* glow_eDrawTone_LightRedLowSaturation */ "ToneLightRedLowSaturation",
/* glow_eDrawTone_DarkMagenta */ "ToneDarkMagenta",
/* glow_eDrawTone_LightMagenta */ "ToneLightMagenta",
/* glow_eDrawTone_MagentaHighSaturation */ "ToneMagentaHighSaturation",
/* glow_eDrawTone_MagentaLowSaturation */ "ToneMagentaLowSaturation",
/* glow_eDrawTone_DarkMagentaHighSaturation */ "ToneDarkMagentaHighSaturation",
/* glow_eDrawTone_DarkMagentaLowSaturation */ "ToneDarkMagentaLowSaturation",
/* glow_eDrawTone_LightMagentaHighSaturation */ "ToneLightMagentaHighSaturation",
/* glow_eDrawTone_LightMagentaLowSaturation */ "ToneLightMagentaLowSaturation",
/* glow_eDrawTone_DarkBlue */ "ToneDarkBlue",
/* glow_eDrawTone_LightBlue */ "ToneLightBlue",
/* glow_eDrawTone_BlueHighSaturation */ "ToneBlueHighSaturation",
/* glow_eDrawTone_BlueLowSaturation */ "ToneBlueLowSaturation",
/* glow_eDrawTone_DarkBlueHighSaturation */ "ToneDarkBlueHighSaturation",
/* glow_eDrawTone_DarkBlueLowSaturation */ "ToneDarkBlueLowSaturation",
/* glow_eDrawTone_LightBlueHighSaturation */ "ToneLightBlueHighSaturation",
/* glow_eDrawTone_LightBlueLowSaturation */ "ToneLightBlueLowSaturation",
/* glow_eDrawTone_DarkSeablue */ "ToneDarkSeablue",
/* glow_eDrawTone_LightSeablue */ "ToneLightSeablue",
/* glow_eDrawTone_SeablueHighSaturation */ "ToneSeablueHighSaturation",
/* glow_eDrawTone_SeablueLowSaturation */ "ToneSeablueLowSaturation",
/* glow_eDrawTone_DarkSeablueHighSaturation */ "ToneDarkSeablueHighSaturation",
/* glow_eDrawTone_DarkSeablueLowSaturation */ "ToneDarkSeablueLowSaturation",
/* glow_eDrawTone_LightSeablueHighSaturation */ "ToneLightSeablueHighSaturation",
/* glow_eDrawTone_LightSeablueLowSaturation */ "ToneLightSeablueLowSaturation",
/* glow_eDrawTone_DarkGreen */ "ToneDarkGreen",
/* glow_eDrawTone_LightGreen */ "ToneLightGreen",
/* glow_eDrawTone_GreenHighSaturation */ "ToneGreenHighSaturation",
/* glow_eDrawTone_GreenLowSaturation */ "ToneGreenLowSaturation",
/* glow_eDrawTone_DarkGreenHighSaturation */ "ToneDarkGreenHighSaturation",
/* glow_eDrawTone_DarkGreenLowSaturation */ "ToneDarkGreenLowSaturation",
/* glow_eDrawTone_LightGreenHighSaturation */ "ToneLightGreenHighSaturation",
/* glow_eDrawTone_LightGreenLowSaturation */ "ToneLightGreenLowSaturation",
};
public String[] getTags() {
return tagStrings;
......@@ -125,105 +101,83 @@ public class GeColorToneEditor extends PropertyEditorSupport {
}
public void setAsText(String s) throws IllegalArgumentException {
if (s.equals("NoTone")) setValue( new Integer(GeColor.COLOR_TONE_NO));
else if (s.equals("ToneGray")) setValue( new Integer(GeColor.COLOR_TONE_GRAY));
else if (s.equals("ToneYellow")) setValue( new Integer(GeColor.COLOR_TONE_YELLOW));
else if (s.equals("ToneGold")) setValue( new Integer(GeColor.COLOR_TONE_GOLD));
else if (s.equals("ToneOrange")) setValue( new Integer(GeColor.COLOR_TONE_ORANGE));
else if (s.equals("ToneRed")) setValue( new Integer(GeColor.COLOR_TONE_RED));
else if (s.equals("ToneMagenta")) setValue( new Integer(GeColor.COLOR_TONE_MAGENTA));
else if (s.equals("ToneBlue")) setValue( new Integer(GeColor.COLOR_TONE_BLUE));
else if (s.equals("ToneSeablue")) setValue( new Integer(GeColor.COLOR_TONE_SEABLUE));
else if (s.equals("ToneGreen")) setValue( new Integer(GeColor.COLOR_TONE_GREEN));
else if (s.equals("Grey5")) setValue( new Integer(GeColor.COLOR_11));
else if (s.equals("Grey10")) setValue( new Integer(GeColor.COLOR_12));
else if (s.equals("Grey15")) setValue( new Integer(GeColor.COLOR_13));
else if (s.equals("Grey30")) setValue( new Integer(GeColor.COLOR_14));
else if (s.equals("Grey50")) setValue( new Integer(GeColor.COLOR_15));
else if (s.equals("Grey7")) setValue( new Integer(GeColor.COLOR_16));
else if (s.equals("Grey12")) setValue( new Integer(GeColor.COLOR_17));
else if (s.equals("Grey25")) setValue( new Integer(GeColor.COLOR_18));
else if (s.equals("Grey45")) setValue( new Integer(GeColor.COLOR_19));
else if (s.equals("Grey65")) setValue( new Integer(GeColor.COLOR_20));
else if (s.equals("LightYellow0")) setValue( new Integer(GeColor.COLOR_21));
else if (s.equals("LightYellow1")) setValue( new Integer(GeColor.COLOR_22));
else if (s.equals("LightYellow2")) setValue( new Integer(GeColor.COLOR_23));
else if (s.equals("LightYellow3")) setValue( new Integer(GeColor.COLOR_24));
else if (s.equals("LightYellow4")) setValue( new Integer(GeColor.COLOR_25));
else if (s.equals("yellow0")) setValue( new Integer(GeColor.COLOR_26));
else if (s.equals("yellow1")) setValue( new Integer(GeColor.COLOR_27));
else if (s.equals("yellow2")) setValue( new Integer(GeColor.COLOR_28));
else if (s.equals("yellow3")) setValue( new Integer(GeColor.COLOR_29));
else if (s.equals("yellow4")) setValue( new Integer(GeColor.COLOR_30));
else if (s.equals("Lightgoldenrod0")) setValue( new Integer(GeColor.COLOR_31));
else if (s.equals("Lightgoldenrod1")) setValue( new Integer(GeColor.COLOR_32));
else if (s.equals("Lightgoldenrod2")) setValue( new Integer(GeColor.COLOR_33));
else if (s.equals("Lightgoldenrod3")) setValue( new Integer(GeColor.COLOR_34));
else if (s.equals("Lightgoldenrod4")) setValue( new Integer(GeColor.COLOR_35));
else if (s.equals("gold00")) setValue( new Integer(GeColor.COLOR_36));
else if (s.equals("gold1")) setValue( new Integer(GeColor.COLOR_37));
else if (s.equals("gold2")) setValue( new Integer(GeColor.COLOR_38));
else if (s.equals("gold3")) setValue( new Integer(GeColor.COLOR_39));
else if (s.equals("gold4")) setValue( new Integer(GeColor.COLOR_40));
else if (s.equals("LightOrange")) setValue( new Integer(GeColor.COLOR_41));
else if (s.equals("NavajoWhite")) setValue( new Integer(GeColor.COLOR_42));
else if (s.equals("LightSalmon1")) setValue( new Integer(GeColor.COLOR_43));
else if (s.equals("LightSalmon3")) setValue( new Integer(GeColor.COLOR_44));
else if (s.equals("LightSalmon4")) setValue( new Integer(GeColor.COLOR_45));
else if (s.equals("DarkOrange")) setValue( new Integer(GeColor.COLOR_46));
else if (s.equals("DarkOrange0")) setValue( new Integer(GeColor.COLOR_47));
else if (s.equals("DarkOrange1")) setValue( new Integer(GeColor.COLOR_48));
else if (s.equals("DarkOrange3")) setValue( new Integer(GeColor.COLOR_49));
else if (s.equals("DarkOrange4")) setValue( new Integer(GeColor.COLOR_50));
else if (s.equals("MistyRose1")) setValue( new Integer(GeColor.COLOR_51));
else if (s.equals("MistyRose2")) setValue( new Integer(GeColor.COLOR_52));
else if (s.equals("LightPink")) setValue( new Integer(GeColor.COLOR_53));
else if (s.equals("LightPink3")) setValue( new Integer(GeColor.COLOR_54));
else if (s.equals("LightPink4")) setValue( new Integer(GeColor.COLOR_55));
else if (s.equals("IndianRed0")) setValue( new Integer(GeColor.COLOR_56));
else if (s.equals("IndianRed1")) setValue( new Integer(GeColor.COLOR_57));
else if (s.equals("firebrick1")) setValue( new Integer(GeColor.COLOR_58));
else if (s.equals("firebrick3")) setValue( new Integer(GeColor.COLOR_59));
else if (s.equals("firebrick4")) setValue( new Integer(GeColor.COLOR_60));
else if (s.equals("Plum1")) setValue( new Integer(GeColor.COLOR_61));
else if (s.equals("Plum1")) setValue( new Integer(GeColor.COLOR_62));
else if (s.equals("Plum2")) setValue( new Integer(GeColor.COLOR_63));
else if (s.equals("Plum3")) setValue( new Integer(GeColor.COLOR_64));
else if (s.equals("Plum4")) setValue( new Integer(GeColor.COLOR_65));
else if (s.equals("Magenta00")) setValue( new Integer(GeColor.COLOR_66));
else if (s.equals("Magenta0")) setValue( new Integer(GeColor.COLOR_67));
else if (s.equals("Magenta1")) setValue( new Integer(GeColor.COLOR_68));
else if (s.equals("Magenta3")) setValue( new Integer(GeColor.COLOR_69));
else if (s.equals("Magenta4")) setValue( new Integer(GeColor.COLOR_70));
else if (s.equals("LightSteelBlue1")) setValue( new Integer(GeColor.COLOR_71));
else if (s.equals("LightSteelBlue1")) setValue( new Integer(GeColor.COLOR_72));
else if (s.equals("LightSteelBlue2")) setValue( new Integer(GeColor.COLOR_73));
else if (s.equals("LightSteelBlue3")) setValue( new Integer(GeColor.COLOR_74));
else if (s.equals("LightSteelBlue4")) setValue( new Integer(GeColor.COLOR_75));
else if (s.equals("LightCyan")) setValue( new Integer(GeColor.COLOR_76));
else if (s.equals("PowderBlue")) setValue( new Integer(GeColor.COLOR_77));
else if (s.equals("SteelBlue1")) setValue( new Integer(GeColor.COLOR_78));
else if (s.equals("SteelBlue")) setValue( new Integer(GeColor.COLOR_79));
else if (s.equals("blue4")) setValue( new Integer(GeColor.COLOR_80));
else if (s.equals("aquamarine0")) setValue( new Integer(GeColor.COLOR_81));
else if (s.equals("aquamarine1")) setValue( new Integer(GeColor.COLOR_82));
else if (s.equals("aquamarine2")) setValue( new Integer(GeColor.COLOR_83));
else if (s.equals("aquamarine3")) setValue( new Integer(GeColor.COLOR_84));
else if (s.equals("aquamarine4")) setValue( new Integer(GeColor.COLOR_85));
else if (s.equals("turqoise0")) setValue( new Integer(GeColor.COLOR_86));
else if (s.equals("turqoise1")) setValue( new Integer(GeColor.COLOR_87));
else if (s.equals("turqoise2")) setValue( new Integer(GeColor.COLOR_88));
else if (s.equals("turqoise3")) setValue( new Integer(GeColor.COLOR_89));
else if (s.equals("turqoise4")) setValue( new Integer(GeColor.COLOR_90));
else if (s.equals("DarkOliveGreen1")) setValue( new Integer(GeColor.COLOR_91));
else if (s.equals("DarkOliveGreen2")) setValue( new Integer(GeColor.COLOR_92));
else if (s.equals("DarkOliveGreen3")) setValue( new Integer(GeColor.COLOR_93));
else if (s.equals("DarkOliveGreen4")) setValue( new Integer(GeColor.COLOR_94));
else if (s.equals("DarkOliveGreen5")) setValue( new Integer(GeColor.COLOR_95));
else if (s.equals("chartreuse")) setValue( new Integer(GeColor.COLOR_96));
else if (s.equals("chartreuse2")) setValue( new Integer(GeColor.COLOR_97));
else if (s.equals("chartreuse3")) setValue( new Integer(GeColor.COLOR_98));
else if (s.equals("chartreuse4")) setValue( new Integer(GeColor.COLOR_99));
else if (s.equals("DarkGreen")) setValue( new Integer(GeColor.COLOR_100));
/* glow_eDrawTone_Gray */ else if (s.equals("ToneGray")) setValue( new Integer(GeColor.COLOR_TONE_GRAY));
/* glow_eDrawTone_YellowGreen */ else if (s.equals("ToneYellowGreen")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWGREEN));
/* glow_eDrawTone_Yellow */ else if (s.equals("ToneYellow")) setValue( new Integer(GeColor.COLOR_TONE_YELLOW));
/* glow_eDrawTone_Orange */ else if (s.equals("ToneOrange")) setValue( new Integer(GeColor.COLOR_TONE_ORANGE));
/* glow_eDrawTone_Red */ else if (s.equals("ToneRed")) setValue( new Integer(GeColor.COLOR_TONE_RED));
/* glow_eDrawTone_Magenta */ else if (s.equals("ToneMagenta")) setValue( new Integer(GeColor.COLOR_TONE_MAGENTA));
/* glow_eDrawTone_Blue */ else if (s.equals("ToneBlue")) setValue( new Integer(GeColor.COLOR_TONE_BLUE));
/* glow_eDrawTone_Seablue */ else if (s.equals("ToneSeablue")) setValue( new Integer(GeColor.COLOR_TONE_SEABLUE));
/* glow_eDrawTone_Green */ else if (s.equals("ToneGreen")) setValue( new Integer(GeColor.COLOR_TONE_GREEN));
/* glow_eDrawTone_DarkGray */ else if (s.equals("ToneDarkGray")) setValue( new Integer(GeColor.COLOR_TONE_DARKGRAY));
/* glow_eDrawTone_LightGray */ else if (s.equals("ToneLightGray")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTGRAY));
/* glow_eDrawTone_DarkYellowGreen */ else if (s.equals("ToneDarkYellowGreen")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWGREEN));
/* glow_eDrawTone_LightYellowGreen */ else if (s.equals("ToneLightYellowGreen")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWGREEN));
/* glow_eDrawTone_YellowGreenHighSaturation */ else if (s.equals("ToneYellowGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWGREEN));
/* glow_eDrawTone_YellowGreenLowSaturation */ else if (s.equals("ToneYellowGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWGREENLOWSATURATION));
/* glow_eDrawTone_DarkYellowGreenHighSaturation */ else if (s.equals("ToneDarkYellowGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWGREENHIGHSATURATION));
/* glow_eDrawTone_DarkYellowGreenLowSaturation */ else if (s.equals("ToneDarkYellowGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWGREENLOWSATURATION));
/* glow_eDrawTone_LightYellowGreenHighSaturation */ else if (s.equals("ToneLightYellowGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWGREENHIGHSATURATION));
/* glow_eDrawTone_LightYellowGreenLowSaturation */ else if (s.equals("ToneLightYellowGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWGREENLOWSATURATION));
/* glow_eDrawTone_DarkYellow */ else if (s.equals("ToneDarkYellow")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOW));
/* glow_eDrawTone_LightYellow */ else if (s.equals("ToneLightYellow")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOW));
/* glow_eDrawTone_YellowHighSaturation */ else if (s.equals("ToneYellowHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWHIGHSATURATION));
/* glow_eDrawTone_YellowLowSaturation */ else if (s.equals("ToneYellowLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWLOWSATURATION));
/* glow_eDrawTone_DarkYellowHighSaturation */ else if (s.equals("ToneDarkYellowHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWHIGHSATURATION));
/* glow_eDrawTone_DarkYellowLowSaturation */ else if (s.equals("ToneDarkYellowLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWLOWSATURATION));
/* glow_eDrawTone_LightYellowHighSaturation */ else if (s.equals("ToneLightYellowHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWHIGHSATURATION));
/* glow_eDrawTone_LightYellowLowSaturation */ else if (s.equals("ToneLightYellowLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWLOWSATURATION));
/* glow_eDrawTone_DarkOrange */ else if (s.equals("ToneDarkOrange")) setValue( new Integer(GeColor.COLOR_TONE_DARKORANGE));
/* glow_eDrawTone_LightOrange */ else if (s.equals("ToneLightOrange")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTORANGE));
/* glow_eDrawTone_OrangeHighSaturation */ else if (s.equals("ToneOrangeHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_ORANGEHIGHSATURATION));
/* glow_eDrawTone_OrangeLowSaturation */ else if (s.equals("ToneOrangeLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_ORANGELOWSATURATION));
/* glow_eDrawTone_DarkOrangeHighSaturation */ else if (s.equals("ToneDarkOrangeHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKORANGEHIGHSATURATION));
/* glow_eDrawTone_DarkOrangeLowSaturation */ else if (s.equals("ToneDarkOrangeLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKORANGELOWSATURATION));
/* glow_eDrawTone_LightOrangeHighSaturation */ else if (s.equals("ToneLightOrangeHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTORANGEHIGHSATURATION));
/* glow_eDrawTone_LightOrangeLowSaturation */ else if (s.equals("ToneLightOrangeLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTORANGELOWSATURATION));
/* glow_eDrawTone_DarkRed */ else if (s.equals("ToneDarkRed")) setValue( new Integer(GeColor.COLOR_TONE_DARKRED));
/* glow_eDrawTone_LightRed */ else if (s.equals("ToneLightRed")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTRED));
/* glow_eDrawTone_RedHighSaturation */ else if (s.equals("ToneRedHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_REDHIGHSATURATION));
/* glow_eDrawTone_RedLowSaturation */ else if (s.equals("ToneRedLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_REDLOWSATURATION));
/* glow_eDrawTone_DarkRedHighSaturation */ else if (s.equals("ToneDarkRedHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKREDHIGHSATURATION));
/* glow_eDrawTone_DarkRedLowSaturation */ else if (s.equals("ToneDarkRedLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKREDLOWSATURATION));
/* glow_eDrawTone_LightRedHighSaturation */ else if (s.equals("ToneLightRedHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTREDHIGHSATURATION));
/* glow_eDrawTone_LightRedLowSaturation */ else if (s.equals("ToneLightRedLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTREDLOWSATURATION));
/* glow_eDrawTone_DarkMagenta */ else if (s.equals("ToneDarkMagenta")) setValue( new Integer(GeColor.COLOR_TONE_DARKMAGENTA));
/* glow_eDrawTone_LightMagenta */ else if (s.equals("ToneLightMagenta")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTMAGENTA));
/* glow_eDrawTone_MagentaHighSaturation */ else if (s.equals("ToneMagentaHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_MAGENTAHIGHSATURATION));
/* glow_eDrawTone_MagentaLowSaturation */ else if (s.equals("ToneMagentaLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_MAGENTALOWSATURATION));
/* glow_eDrawTone_DarkMagentaHighSaturation */ else if (s.equals("ToneDarkMagentaHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKMAGENTAHIGHSATURATION));
/* glow_eDrawTone_DarkMagentaLowSaturation */ else if (s.equals("ToneDarkMagentaLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKMAGENTALOWSATURATION));
/* glow_eDrawTone_LightMagentaHighSaturation */ else if (s.equals("ToneLightMagentaHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTMAGENTAHIGHSATURATION));
/* glow_eDrawTone_LightMagentaLowSaturation */ else if (s.equals("ToneLightMagentaLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTMAGENTALOWSATURATION));
/* glow_eDrawTone_DarkBlue */ else if (s.equals("ToneDarkBlue")) setValue( new Integer(GeColor.COLOR_TONE_DARKBLUE));
/* glow_eDrawTone_LightBlue */ else if (s.equals("ToneLightBlue")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTBLUE));
/* glow_eDrawTone_BlueHighSaturation */ else if (s.equals("ToneBlueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_BLUEHIGHSATURATION));
/* glow_eDrawTone_BlueLowSaturation */ else if (s.equals("ToneBlueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_BLUELOWSATURATION));
/* glow_eDrawTone_DarkBlueHighSaturation */ else if (s.equals("ToneDarkBlueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKBLUEHIGHSATURATION));
/* glow_eDrawTone_DarkBlueLowSaturation */ else if (s.equals("ToneDarkBlueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKBLUELOWSATURATION));
/* glow_eDrawTone_LightBlueHighSaturation */ else if (s.equals("ToneLightBlueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTBLUEHIGHSATURATION));
/* glow_eDrawTone_LightBlueLowSaturation */ else if (s.equals("ToneLightBlueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTBLUELOWSATURATION));
/* glow_eDrawTone_DarkSeablue */ else if (s.equals("ToneDarkSeablue")) setValue( new Integer(GeColor.COLOR_TONE_DARKSEABLUE));
/* glow_eDrawTone_LightSeablue */ else if (s.equals("ToneLightSeablue")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTSEABLUE));
/* glow_eDrawTone_SeablueHighSaturation */ else if (s.equals("ToneSeablueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_SEABLUEHIGHSATURATION));
/* glow_eDrawTone_SeablueLowSaturation */ else if (s.equals("ToneSeablueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_SEABLUELOWSATURATION));
/* glow_eDrawTone_DarkSeablueHighSaturation */ else if (s.equals("ToneDarkSeablueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKSEABLUEHIGHSATURATION));
/* glow_eDrawTone_DarkSeablueLowSaturation */ else if (s.equals("ToneDarkSeablueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKSEABLUELOWSATURATION));
/* glow_eDrawTone_LightSeablueHighSaturation */ else if (s.equals("ToneLightSeablueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTSEABLUEHIGHSATURATION));
/* glow_eDrawTone_LightSeablueLowSaturation */ else if (s.equals("ToneLightSeablueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTSEABLUELOWSATURATION));
/* glow_eDrawTone_DarkGreen */ else if (s.equals("ToneDarkGreen")) setValue( new Integer(GeColor.COLOR_TONE_DARKGREEN));
/* glow_eDrawTone_LightGreen */ else if (s.equals("ToneLightGreen")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTGREEN));
/* glow_eDrawTone_GreenHighSaturation */ else if (s.equals("ToneGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_GREENHIGHSATURATION));
/* glow_eDrawTone_GreenLowSaturation */ else if (s.equals("ToneGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_GREENLOWSATURATION));
/* glow_eDrawTone_DarkGreenHighSaturation */ else if (s.equals("ToneDarkGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKGREENHIGHSATURATION));
/* glow_eDrawTone_DarkGreenLowSaturation */ else if (s.equals("ToneDarkGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKGREENLOWSATURATION));
/* glow_eDrawTone_LightGreenHighSaturation */ else if (s.equals("ToneLightGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTGREENHIGHSATURATION));
/* glow_eDrawTone_LightGreenLowSaturation */ else if (s.equals("ToneLightGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTGREENLOWSATURATION));
else throw new IllegalArgumentException(s);
}
}
......@@ -9,40 +9,29 @@ import javax.swing.Timer;
import java.awt.event.*;
import jpwr.rt.*;
public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
ActionListener {
public class GeComponent extends JComponent implements GeComponentIfc,
JopDynamic, JopConfirm, ActionListener {
public Dimension size;
public Object root;
public JopEngine en;
public GeDyndata dd = new GeDyndata();
public GeDyn dd = new GeDyn( this);
public int level;
Timer timer = new Timer(100, this);
StringBuffer sb = new StringBuffer();
public JopSession session;
public GeComponent component = this;
public GeComponent()
public GeComponent( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.session = session;
timer.start();
dd.setSession( session);
en = session.getEngine();
}
public void actionPerformed(ActionEvent e) {
boolean engine_found = false;
root = getTopLevelAncestor();
if ( root != null) {
if ( root instanceof JopApplet)
session = ((JopApplet)root).session;
else if ( root instanceof JopFrame)
session = ((JopFrame) root).session;
en = session.getEngine();
// Get level
Container parent = getParent();
......@@ -59,242 +48,77 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
if ( engine_found) {
timer.stop();
timer = null;
if ( (dd.type >= 1000 && en.gdh.isAuthorized( dd.access)) ||
dd.refObject != null) {
if ( dd.actionType != 0 && en.gdh.isAuthorized( dd.access)) {
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if ( e.isPopupTrigger()) {
if ( dd.refObject != null) {
if ( dd.refObject.startsWith("!")) {
// Name of an attribute that contains the objid of the reference object
CdhrObjid reto = en.gdh.getObjectInfoObjid( dd.refObject.substring(1));
if ( reto.oddSts() && !reto.objid.isNull()) {
CdhrString rets = en.gdh.objidToName( reto.objid, Cdh.mName_volumeStrict);
System.out.println( "str: " + rets.str + " " + rets.getSts());
if ( rets.oddSts() && ! rets.str.equals(""))
new JopMethodsMenu( session, rets.str, JopUtility.GRAPH,
component, e.getX(), e.getY());
}
}
else {
new JopMethodsMenu( session, dd.refObject, JopUtility.GRAPH,
component, e.getX(), e.getY());
}
}
return;
}
if ( !en.gdh.isAuthorized( dd.access) || (e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0)
return;
colorInverse = 0;
repaintForeground();
// public void mouseClicked(MouseEvent e) {
PwrtStatus sts;
String attrName;
switch ( dd.type) {
case GeDyndata.eTrace_SetDig:
case GeDyndata.eTrace_SetDigWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_ResetDig:
case GeDyndata.eTrace_ResetDigWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, false);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_ToggleDig:
case GeDyndata.eTrace_ToggleDigWithTone:
case GeDyndata.eTrace_DigShiftWithToggleDig:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.toggleObjectInfo( attrName);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_StoDigWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, false);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_IncrAnalog:
attrName = dd.getAttrName( dd.data[0]);
CdhrFloat ret = en.gdh.getObjectInfoFloat( attrName);
float incr, minvalue, maxvalue;
if ( ret.evenSts())
System.out.println( "getObjectInfoError " + ret.getSts());
// Increment value
try {
incr = Float.valueOf( dd.data[1]).floatValue();
}
catch ( NumberFormatException e_format) {
incr = 1;
}
// Minimum value
try {
minvalue = Float.valueOf( dd.data[2]).floatValue();
}
catch ( NumberFormatException e_format) {
minvalue = 0;
}
// Maximum value
try {
maxvalue = Float.valueOf( dd.data[3]).floatValue();
}
catch ( NumberFormatException e_format) {
maxvalue = 0;
}
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Up, e);
}
ret.value += incr;
if ( !( minvalue == 0 && maxvalue == 0)) {
if ( ret.value < minvalue)
ret.value = minvalue;
if ( ret.value > maxvalue)
ret.value = maxvalue;
}
sts = en.gdh.setObjectInfo( attrName, ret.value);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_Command:
if ( dd.data[0].compareTo("") != 0)
Jop.executeCommand( session, dd.data[0]);
break;
case GeDyndata.eTrace_DigWithCommand:
case GeDyndata.eTrace_DigWithErrorAndCommand:
case GeDyndata.eTrace_DigToneWithCommand:
case GeDyndata.eTrace_DigToneWithErrorAndCommand:
case GeDyndata.eTrace_DigTwoWithCommand:
case GeDyndata.eTrace_DigToneTwoWithCommand:
if ( dd.data[3].compareTo("") != 0)
Jop.executeCommand( session, dd.data[3]);
break;
case GeDyndata.eTrace_SetDigConfirm:
case GeDyndata.eTrace_ResetDigConfirm:
case GeDyndata.eTrace_ToggleDigConfirm:
case GeDyndata.eTrace_CommandConfirm:
case GeDyndata.eTrace_SetDigConfirmWithTone:
case GeDyndata.eTrace_ResetDigConfirmWithTone:
case GeDyndata.eTrace_ToggleDigConfirmWithTone:
// TODO...
JopConfirmDialog.open( component, dd.data[1]);
// JOptionPane.showMessageDialog( (Component) root, dd.data[1],
// "Click OK", JOptionPane.INFORMATION_MESSAGE);
break;
case GeDyndata.eTrace_AnnotInput:
case GeDyndata.eTrace_AnnotInputWithTone:
// TODO...
break;
case GeDyndata.eTrace_RadioButton:
// Get all radiobutton in the same group
Container parent = getParent();
if ( parent == null) break;
for ( int i = 0; i < parent.getComponentCount(); i++) {
GeComponent c = (GeComponent) parent.getComponent(i);
if ( c.dd.type == GeDyndata.eTrace_RadioButton &&
c.dd.data[0] != dd.data[0]) {
attrName = dd.getAttrName( c.dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, false);
}
}
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
}
}
public void mousePressed(MouseEvent e) {
if ( e.isPopupTrigger()) {
if ( dd.refObject != null) {
if ( dd.refObject.startsWith("!")) {
// Name of an attribute that contains the objid of the reference object
CdhrObjid reto = en.gdh.getObjectInfoObjid( dd.refObject.substring(1));
System.out.println( "Ref: " + dd.refObject.substring(1) + " " + reto.getSts());
if ( reto.oddSts() && !reto.objid.isNull()) {
CdhrString rets = en.gdh.objidToName( reto.objid, Cdh.mName_volumeStrict);
if ( rets.oddSts() && ! rets.str.equals(""))
new JopMethodsMenu( session, rets.str, JopUtility.GRAPH,
component, e.getX(), e.getY());
}
}
else {
new JopMethodsMenu( session, dd.refObject, JopUtility.GRAPH,
component, e.getX(), e.getY());
}
}
return;
}
if ( !en.gdh.isAuthorized( dd.access) || (e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0)
return;
colorInverse = 1;
repaintForeground();
PwrtStatus sts;
String attrName;
switch ( dd.type) {
case GeDyndata.eTrace_StoDigWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
}
}
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Down, e);
}
public void mouseClicked(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Click, e);
}
});
if ( (dd.actionType & GeDyn.mActionType_Slider) != 0) {
this.addMouseMotionListener( new MouseMotionAdapter() {
public void mouseDragged(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_SliderMoved, e);
}
});
}
}
}
}
public void confirmNo() {}
public void confirmYes() {
PwrtStatus sts;
String attrName;
switch ( dd.type) {
case GeDyndata.eTrace_SetDigConfirm:
case GeDyndata.eTrace_SetDigConfirmWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_ResetDigConfirm:
case GeDyndata.eTrace_ResetDigConfirmWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, false);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_ToggleDigConfirm:
case GeDyndata.eTrace_ToggleDigConfirmWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.toggleObjectInfo( attrName);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_CommandConfirm:
if ( dd.data[0].compareTo("") != 0)
Jop.executeCommand( session, dd.data[0]);
break;
}
dd.confirmedAction( GeDyn.eEvent_MB1Click, null);
}
public String annot1 = new String();
// GeComponents Ifc
public void tsetFillColor( int fillColor) { this.fillColor = fillColor;}
public void tsetColorTone( int colorTone) { this.colorTone = colorTone;}
public void tsetBorderColor( int borderColor) { this.borderColor = borderColor;}
public void tsetTextColor( int textColor) { this.textColor = textColor;}
public void setColorInverse( int colorInverse) { this.colorInverse = colorInverse;}
public void resetFillColor() { fillColor = originalFillColor;}
public void resetColorTone() { colorTone = originalColorTone; }
public void resetBorderColor() { borderColor = originalBorderColor;}
public void resetTextColor() { textColor = originalTextColor;}
public String getAnnot1() { return annot1;}
public void setAnnot1( String s) { annot1 = s;}
public Object getDd() { return dd;}
public void setFillLevel( float fillLevel) { this.fillLevel = fillLevel;}
public void setLevelDirection( int levelDirection) { this.levelDirection = levelDirection;}
public void setLevelColorTone( int levelColorTone) { this.levelColorTone = levelColorTone;}
public void setLevelFillColor( int levelFillColor) { this.levelFillColor = levelFillColor;}
public String annot1 = new String();
public Font annot1Font = new Font("Helvetica", Font.BOLD, 14);
public void setAnnot1Font( Font font) { annot1Font = font;}
public Font getAnnot1Font() { return annot1Font;}
public int fillColor = 9999;
public int originalFillColor = 9999;
public int borderColor = 9999;
public int originalTextColor = 9999;
public int textColor = 9999;
public int originalBorderColor = 9999;
public int colorTone = 0;
public int originalColorTone = 0;
......@@ -306,6 +130,11 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
public int originalColorIntensity = 0;
public int colorInverse = 0;
public int originalColorInverse = 0;
public float fillLevel = 1F;
public int levelDirection = 0;
public int levelColorTone = 0;
public int levelFillColor = 0;
public int shadow = 0;
public void setColorTone( int colorTone) {
this.colorTone = colorTone;
originalColorTone = colorTone;
......@@ -338,9 +167,6 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
this.fillColor = fillColor;
this.originalFillColor = fillColor;
}
public void resetFillColor() {
fillColor = originalFillColor;
}
public int getFillColor() {
return fillColor;
}
......@@ -351,6 +177,16 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
public int getBorderColor() {
return borderColor;
}
public void setTextColor( int textColor) {
this.textColor = textColor;
this.originalTextColor = textColor;
}
public int getTextColor() {
return textColor;
}
public void setShadow( int shadow) {
this.shadow = shadow;
}
public int animationCount = 1;
public int page = 1;
public int pages = 1;
......@@ -389,1593 +225,21 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
return root;
}
public void dynamicOpen() {
String attrName;
if ( en.isInstance())
dd.setInstance( en.getInstance());
switch ( dd.type) {
case GeDyndata.eTrace_Dig:
case GeDyndata.eTrace_DigWithCommand:
case GeDyndata.eTrace_DigBorder:
case GeDyndata.eTrace_DigTone:
case GeDyndata.eTrace_DigToneWithCommand:
attrName = dd.getAttrName( dd.data[0]);
// System.out.println("Attribute: " + attrName + " inv " +
// GeDyndata.getAttrInverted( dd.data[0]));
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
}
}
if ( dd.data[1] != null) {
attrName = dd.getAttrName( dd.data[1]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[1]);
}
}
}
break;
case GeDyndata.eTrace_Invisible:
case GeDyndata.eTrace_RadioButton:
attrName = dd.getAttrName( dd.data[0]);
// System.out.println("Attribute: " + attrName + " inv " +
// GeDyndata.getAttrInverted( dd.data[0]));
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
}
}
break;
case GeDyndata.eTrace_DigShiftWithToggleDig:
attrName = dd.getAttrName( dd.data[1]);
// System.out.println("Attribute: " + attrName + " inv " +
// GeDyndata.getAttrInverted( dd.data[1]));
if ( attrName.compareTo("") == 0)
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
}
}
break;
case GeDyndata.eTrace_DigWithText:
attrName = dd.getAttrName( dd.data[0]);
// System.out.println("Attribute: " + attrName + " inv " +
// GeDyndata.getAttrInverted( dd.data[0]));
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
dd.lowText = dd.data[1];
dd.highText = getAnnot1();
}
}
break;
case GeDyndata.eTrace_DigWithError:
case GeDyndata.eTrace_DigWithErrorAndCommand:
case GeDyndata.eTrace_DigToneWithError:
case GeDyndata.eTrace_DigToneWithErrorAndCommand:
case GeDyndata.eTrace_DigTwo:
case GeDyndata.eTrace_DigTwoWithCommand:
case GeDyndata.eTrace_DigToneTwo:
case GeDyndata.eTrace_DigToneTwoWithCommand:
case GeDyndata.eTrace_AnalogShift:
case GeDyndata.eTrace_Animation:
case GeDyndata.eTrace_AnimationForwBack:
case GeDyndata.eTrace_DigAnimation:
case GeDyndata.eTrace_DigShift:
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
}
}
attrName = dd.getAttrName( dd.data[1]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[1]);
}
}
if (dd.data[2] != null) {
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[2] = true;
dd.p[2] = ret.id;
dd.subid[2] = ret.refid;
dd.typeId[2] = ret.typeId;
dd.inverted[2] = GeDyndata.getAttrInverted( dd.data[2]);
}
}
}
break;
case GeDyndata.eTrace_Annot:
case GeDyndata.eTrace_AnnotInput:
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.setFormat( dd.data[1]);
}
}
break;
case GeDyndata.eTrace_AnnotWithTone:
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.setFormat( dd.data[1]);
}
}
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[2]);
}
}
attrName = dd.getAttrName( dd.data[3]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[2] = true;
dd.p[2] = ret.id;
dd.subid[2] = ret.refid;
dd.typeId[2] = ret.typeId;
dd.inverted[2] = GeDyndata.getAttrInverted( dd.data[3]);
}
}
break;
case GeDyndata.eTrace_AnnotInputWithTone:
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.setFormat( dd.data[1]);
}
}
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[2]);
}
}
break;
case GeDyndata.eTrace_Move:
// XAttr
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
}
}
// YAttr
attrName = dd.getAttrName( dd.data[1]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
}
}
// ToneAttr
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[2] = true;
dd.p[2] = ret.id;
dd.subid[2] = ret.refid;
dd.typeId[2] = ret.typeId;
}
}
// InvisAttr
attrName = dd.getAttrName( dd.data[3]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[3] = true;
dd.p[3] = ret.id;
dd.subid[3] = ret.refid;
dd.typeId[3] = ret.typeId;
}
}
// ScaleXAttr
attrName = dd.getAttrName( dd.data[4]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[4] = true;
dd.p[4] = ret.id;
dd.subid[4] = ret.refid;
dd.typeId[4] = ret.typeId;
}
}
// ScaleYAttr
attrName = dd.getAttrName( dd.data[5]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[5] = true;
dd.p[5] = ret.id;
dd.subid[5] = ret.refid;
dd.typeId[5] = ret.typeId;
}
}
break;
case GeDyndata.eTrace_Rotate:
// Attr
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
}
}
// ToneAttr
attrName = dd.getAttrName( dd.data[3]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[3] = true;
dd.p[3] = ret.id;
dd.subid[3] = ret.refid;
dd.typeId[3] = ret.typeId;
}
}
// InvisAttr
attrName = dd.getAttrName( dd.data[4]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[4] = true;
dd.p[4] = ret.id;
dd.subid[4] = ret.refid;
dd.typeId[4] = ret.typeId;
}
}
break;
case GeDyndata.eTrace_SetDigConfirmWithTone:
case GeDyndata.eTrace_ResetDigConfirmWithTone:
case GeDyndata.eTrace_ToggleDigConfirmWithTone:
case GeDyndata.eTrace_SetDigWithTone:
case GeDyndata.eTrace_ResetDigWithTone:
case GeDyndata.eTrace_ToggleDigWithTone:
case GeDyndata.eTrace_StoDigWithTone:
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[2]);
dd.lowText = dd.data[4];
dd.highText = getAnnot1();
}
}
attrName = dd.getAttrName( dd.data[3]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[3]);
}
}
break;
}
dd.connect();
}
public void dynamicClose() {
for ( int i = 0; i < 6; i++) {
if ( dd.attrFound[i])
en.gdh.unrefObjectInfo( dd.subid[i]);
}
dd.disconnect();
}
public void dynamicUpdate( boolean animationOnly) {
// System.out.println( "Dynamic update: " + this);
if ( animationOnly &&
!( dd.type == GeDyndata.eTrace_Animation ||
dd.type == GeDyndata.eTrace_AnimationForwBack ||
dd.type == GeDyndata.eTrace_DigAnimation))
(dd.dynType & GeDyndata.eTrace_Animation) == 0)
return;
switch ( dd.type) {
case GeDyndata.eTrace_Dig:
case GeDyndata.eTrace_DigWithCommand:
{
boolean repaintNow = false;
if ( !dd.attrFound[0] && !dd.attrFound[1])
return;
if ( dd.attrFound[0]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && !value) || (dd.inverted[0] && value))
fillColor = dd.color;
else
fillColor = originalFillColor;
repaintNow = true;
dd.oldValueB[0] = value;
}
}
if ( dd.attrFound[1]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value) || (dd.inverted[1] && !value))
dd.invisible = true;
else
dd.invisible = false;
repaintNow = true;
dd.oldValueB[1] = value;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigWithText:
{
if ( !dd.attrFound[0])
return;
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && value) || (dd.inverted[0] && !value)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
if ( dd.lowText != null && !dd.lowText.equals(new String("")))
setAnnot1( dd.highText);
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
if ( dd.lowText != null && !dd.lowText.equals(new String("")))
setAnnot1( dd.lowText);
}
repaintForeground();
dd.oldValueB[0] = value;
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigBorder:
{
boolean repaintNow = false;
if ( !dd.attrFound[0] && !dd.attrFound[1])
return;
if ( dd.attrFound[0]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && !value) || (dd.inverted[0] && value))
borderColor = dd.color;
else
borderColor = originalBorderColor;
repaintNow = true;
dd.oldValueB[0] = value;
}
}
if ( dd.attrFound[1]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value) || (dd.inverted[1] && !value))
dd.invisible = true;
else
dd.invisible = false;
repaintNow = true;
dd.oldValueB[1] = value;
}
}
if ( repaintNow)
repaintForeground();
if ( !dd.attrFound[0])
return;
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && !value) || (dd.inverted[0] && value))
borderColor = dd.color;
else
borderColor = originalBorderColor;
repaintForeground();
dd.oldValueB[0] = value;
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Invisible:
{
boolean repaintNow = false;
if ( !dd.attrFound[0])
return;
if ( dd.attrFound[0]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && value) || (dd.inverted[0] && !value))
dd.invisible = true;
else
dd.invisible = false;
repaintNow = true;
dd.oldValueB[0] = value;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigWithError:
case GeDyndata.eTrace_DigWithErrorAndCommand:
{
if ( !dd.attrFound[0])
return;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
boolean value1;
boolean value2;
if ( dd.attrFound[1] && !dd.attrFound[2]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = GeColor.COLOR_RED;
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && !dd.attrFound[1]) {
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2))
fillColor = GeColor.COLOR_6; // Yellow
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value1 != dd.oldValueB[1] ||
value0 != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = GeColor.COLOR_RED;
else if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2))
fillColor = GeColor.COLOR_6; // Yellow
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else {
if ( dd.oldValueB[0] != value0 || dd.firstScan) {
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[0] = value0;
}
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigTwo:
case GeDyndata.eTrace_DigTwoWithCommand:
{
if ( !dd.attrFound[0])
return;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
boolean value1;
boolean value2;
if ( dd.attrFound[1] && !dd.attrFound[2]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = GeColor.COLOR_RED;
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && !dd.attrFound[1]) {
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2))
fillColor = dd.color2;
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value1 != dd.oldValueB[1] ||
value0 != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = GeColor.COLOR_RED;
else if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2))
fillColor = dd.color2;
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else {
if ( dd.oldValueB[0] != value0 || dd.firstScan) {
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[0] = value0;
}
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigTone:
case GeDyndata.eTrace_DigToneWithCommand:
case GeDyndata.eTrace_SetDigConfirmWithTone:
case GeDyndata.eTrace_ResetDigConfirmWithTone:
case GeDyndata.eTrace_ToggleDigConfirmWithTone:
case GeDyndata.eTrace_SetDigWithTone:
case GeDyndata.eTrace_ResetDigWithTone:
case GeDyndata.eTrace_ToggleDigWithTone:
case GeDyndata.eTrace_StoDigWithTone:
{
boolean repaintNow = false;
if ( !dd.attrFound[0] && !dd.attrFound[1])
return;
if ( dd.attrFound[0]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && value) || (dd.inverted[0] && !value)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
if ( dd.lowText != null && !dd.lowText.equals(new String("")))
setAnnot1( dd.highText);
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
if ( dd.lowText != null && !dd.lowText.equals(new String("")))
setAnnot1( dd.lowText);
}
repaintNow = true;
dd.oldValueB[0] = value;
}
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigToneWithError:
case GeDyndata.eTrace_DigToneWithErrorAndCommand:
{
if ( !dd.attrFound[0])
return;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
boolean value1;
boolean value2;
if ( dd.attrFound[1] && !dd.attrFound[2]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_RED;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && !dd.attrFound[1]) {
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_YELLOW;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value1 != dd.oldValueB[1] || value2 != dd.oldValueB[2] ||
value0 != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_RED;
}
else if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_YELLOW;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else {
if ( dd.oldValueB[0] != value0 || dd.firstScan) {
if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[0] = value0;
}
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigToneTwo:
case GeDyndata.eTrace_DigToneTwoWithCommand:
{
if ( !dd.attrFound[0])
return;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
boolean value1;
boolean value2;
if ( dd.attrFound[1] && !dd.attrFound[2]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_RED;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && !dd.attrFound[1]) {
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color2;
else
colorTone = dd.color2;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value1 != dd.oldValueB[1] || value2 != dd.oldValueB[2] ||
value0 != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_RED;
}
else if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color2;
else
colorTone = dd.color2;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else {
if ( dd.oldValueB[0] != value0 || dd.firstScan) {
if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[0] = value0;
}
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_AnnotWithTone:
case GeDyndata.eTrace_AnnotInputWithTone:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
if ( dd.typeId[0] == Pwr.eType_Float32) {
float value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_Int32 ||
dd.typeId[0] == Pwr.eType_UInt32 ||
dd.typeId[0] == Pwr.eType_Int16 ||
dd.typeId[0] == Pwr.eType_UInt16 ||
dd.typeId[0] == Pwr.eType_Int8 ||
dd.typeId[0] == Pwr.eType_UInt8) {
int value0 = en.gdh.getObjectRefInfoInt( dd.p[0]);
if ( value0 != dd.oldValueI || dd.firstScan) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueI = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_String ||
dd.typeId[0] == Pwr.eType_Objid) {
String value0 = en.gdh.getObjectRefInfoString( dd.p[0], dd.typeId[0]);
if ( dd.firstScan || value0.compareTo( dd.oldValueS) != 0) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueS = value0;
}
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Annot:
case GeDyndata.eTrace_AnnotInput:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
if ( dd.typeId[0] == Pwr.eType_Float32) {
float value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_Int32 ||
dd.typeId[0] == Pwr.eType_UInt32 ||
dd.typeId[0] == Pwr.eType_Int16 ||
dd.typeId[0] == Pwr.eType_UInt16 ||
dd.typeId[0] == Pwr.eType_Int8 ||
dd.typeId[0] == Pwr.eType_UInt8) {
int value0 = en.gdh.getObjectRefInfoInt( dd.p[0]);
if ( value0 != dd.oldValueI || dd.firstScan) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueI = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_String ||
dd.typeId[0] == Pwr.eType_Objid ||
dd.typeId[0] == Pwr.eType_DeltaTime ||
dd.typeId[0] == Pwr.eType_Time) {
String value0 = en.gdh.getObjectRefInfoString( dd.p[0], dd.typeId[0]);
if ( dd.firstScan || value0.compareTo( dd.oldValueS) != 0) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueS = value0;
}
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Move:
{
boolean repaintNow = false;
if ( dd.firstScan) {
Point loc = getLocation();
dd.xOrig = (double) loc.x;
dd.yOrig = (double) loc.y;
}
if ( dd.attrFound[0] || dd.attrFound[1]) {
// Move
Point loc = getLocation();
float value0 = 0;
float value1 = 0;
if ( dd.attrFound[0]) {
value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
if ( dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoFloat( dd.p[1]);
if ( value1 != dd.oldValueF[1] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[1] = value1;
}
}
if ( repaintNow) {
if ( dd.attrFound[0])
loc.x = (int) (dd.xOrig + (value0 - dd.x0) * dd.factor);
if ( dd.attrFound[1])
loc.y = (int) (dd.yOrig + (value1 - dd.y0) * dd.factor);
setLocation( loc);
}
}
if ( dd.attrFound[4] || dd.attrFound[5]) {
// Scale
if ( dd.firstScan) {
dd.xScale = getWidth();
dd.yScale = getHeight();
}
float value4 = 0;
float value5 = 0;
if ( dd.attrFound[4]) {
value4 = en.gdh.getObjectRefInfoFloat( dd.p[4]);
if ( value4 != dd.oldValueF[2] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[2] = value4;
}
}
if ( dd.attrFound[5]) {
value5 = en.gdh.getObjectRefInfoFloat( dd.p[5]);
if ( value5 != dd.oldValueF[3] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[3] = value5;
}
}
if ( repaintNow) {
Rectangle rect = getBounds();
if ( dd.attrFound[4]) {
rect.width = (int) (dd.xScale * value4);
if ( rect.width < 1)
rect.width = 1;
}
if ( dd.attrFound[5]) {
rect.height = (int) (dd.yScale * value5);
if ( rect.height < 1)
rect.height = 1;
}
setBounds( rect);
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( dd.attrFound[3]) {
boolean value3 = en.gdh.getObjectRefInfoBoolean( dd.p[3]);
if ( value3 != dd.oldValueB[3] || dd.firstScan) {
if ( (!dd.inverted[3] && value3) || (dd.inverted[3] && !value3)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[3] = value3;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Rotate:
{
boolean repaintNow = false;
if ( dd.attrFound[0]) {
// Rotate
float value0 = 0;
if ( dd.attrFound[0]) {
value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
if ( repaintNow) {
dd.setRotate( value0 * dd.factor);
}
}
if ( dd.attrFound[3]) {
boolean value3 = en.gdh.getObjectRefInfoBoolean( dd.p[3]);
if ( value3 != dd.oldValueB[3] || dd.firstScan) {
if ( (!dd.inverted[3] && value3) || (dd.inverted[3] && !value3)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[3] = value3;
}
}
if ( dd.attrFound[4]) {
boolean value4 = en.gdh.getObjectRefInfoBoolean( dd.p[4]);
if ( value4 != dd.oldValueB[4] || dd.firstScan) {
if ( (!dd.inverted[4] && value4) || (dd.inverted[4] && !value4)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[4] = value4;
}
}
if ( repaintNow) {
// repaintForeground();
repaint();
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_AnalogShift:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
float value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
setPage( (int)value0 + 1);
repaintNow = true;
dd.oldValueF[0] = value0;
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Animation:
case GeDyndata.eTrace_AnimationForwBack:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
int sts;
int maxCount;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( dd.firstScan) {
dd.animationCount = 0;
dd.animationDirection = 1;
}
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0)) {
if ( dd.animationDirection == 0) {
dd.animationCount = 0;
dd.animationDirection = 1;
}
maxCount = animationCount;
dd.animationCount++;
if ( dd.animationCount >= maxCount) {
// Shift nodeclass
if ( dd.animationDirection == 1) {
// Shift forward
sts = setNextPage();
if ( sts == 0) {
if ( dd.type == GeDyndata.eTrace_Animation)
// Start from beginning the again
setPage( 2);
else {
// Change direction
dd.animationDirection = 2;
setPreviousPage();
}
}
dd.animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = setPreviousPage();
if ( sts == 0) {
// Change direction
dd.animationDirection = 1;
setNextPage();
}
dd.animationCount = 0;
repaintNow = true;
}
}
}
else {
if ( dd.animationDirection != 0) {
dd.animationDirection = 0;
setFirstPage();
repaintNow = true;
}
}
dd.oldValueB[0] = value0;
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaint();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigAnimation:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
int sts;
int maxCount;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( dd.firstScan) {
dd.animationCount = 0;
dd.animationDirection = 0;
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0)) {
setLastPage();
repaintNow = true;
}
dd.oldValueB[0] = value0;
}
if ( dd.oldValueB[0] != value0) {
// Start animation
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0)) {
dd.animationCount = 0;
dd.animationDirection = 1;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
dd.animationCount = 0;
dd.animationDirection = 2;
}
}
if ( dd.animationDirection != 0) {
maxCount = animationCount;
dd.animationCount++;
if ( dd.animationCount >= maxCount) {
// Shift nodeclass
if ( dd.animationDirection == 1) {
// Shift forward
sts = setNextPage();
if ( sts == 0) {
// End of animation
dd.animationCount = 0;
dd.animationDirection = 0;
}
dd.animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = setPreviousPage();
if ( sts == 0) {
// End of animation
dd.animationCount = 0;
dd.animationDirection = 0;
}
dd.animationCount = 0;
repaintNow = true;
}
}
}
if ( repaintNow) {
repaintNow = false;
repaint();
}
dd.oldValueB[0] = value0;
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigShift:
case GeDyndata.eTrace_DigShiftWithToggleDig:
case GeDyndata.eTrace_RadioButton:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
int sts;
int maxCount;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( dd.firstScan) {
dd.animationDirection = 0;
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0)) {
setLastPage();
repaintNow = true;
}
dd.oldValueB[0] = value0;
}
if ( dd.oldValueB[0] != value0) {
// Shift to first or last page
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
setLastPage();
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0))
setFirstPage();
repaintNow = true;
}
if ( repaintNow) {
repaintNow = false;
repaint();
}
dd.oldValueB[0] = value0;
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
}
dd.scan();
}
private void repaintForeground() {
public void repaintForeground() {
Graphics g = getGraphics();
if ( g == null) {
System.out.println("repaintForeground: can't get Graphic object");
......
package jpwr.jop;
import jpwr.rt.*;
public interface GeComponentIfc {
public void tsetFillColor( int fillColor);
public void tsetColorTone( int colorTone);
public void tsetBorderColor( int borderColor);
public void tsetTextColor( int textColor);
public void setColorInverse( int inverse);
public void resetFillColor();
public void resetColorTone();
public void resetBorderColor();
public void resetTextColor();
public void setFillLevel( float fillLevel);
public void setLevelDirection( int levelDirection);
public void setLevelColorTone( int levelColorTone);
public void setLevelFillColor( int levelFillColor);
public String getAnnot1();
public void setAnnot1( String annot1);
public void setLastPage();
public void setFirstPage();
public void setPage( int page);
public int setNextPage();
public int setPreviousPage();
public Object getDd();
public void repaintForeground();
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDyn {
public static final int mDynType_No = 0;
public static final int mDynType_Inherit = 1 << 0;
public static final int mDynType_Tone = 1 << 1;
public static final int mDynType_DigLowColor = 1 << 2;
public static final int mDynType_DigColor = 1 << 3;
public static final int mDynType_DigError = 1 << 4;
public static final int mDynType_DigWarning = 1 << 5;
public static final int mDynType_DigFlash = 1 << 6;
public static final int mDynType_Invisible = 1 << 7;
public static final int mDynType_DigBorder = 1 << 8;
public static final int mDynType_DigText = 1 << 9;
public static final int mDynType_Value = 1 << 10;
public static final int mDynType_AnalogColor = 1 << 11;
public static final int mDynType_Rotate = 1 << 12;
public static final int mDynType_Move = 1 << 13;
public static final int mDynType_AnalogShift = 1 << 14;
public static final int mDynType_DigShift = 1 << 15;
public static final int mDynType_Animation = 1 << 16;
public static final int mDynType_Bar = 1 << 17;
public static final int mDynType_Trend = 1 << 18;
public static final int mDynType_SliderBackground = 1 << 19;
public static final int mDynType_Video = 1 << 20;
public static final int mDynType_FillLevel = 1 << 21;
public static final int mDynType_FastCurve = 1 << 22;
public static final int mDynType_AnalogText = 1 << 23;
public static final int mActionType_No = 0;
public static final int mActionType_Inherit = 1 << 0;
public static final int mActionType_PopupMenu = 1 << 1;
public static final int mActionType_SetDig = 1 << 2;
public static final int mActionType_ResetDig = 1 << 3;
public static final int mActionType_ToggleDig = 1 << 4;
public static final int mActionType_StoDig = 1 << 5;
public static final int mActionType_Command = 1 << 6;
public static final int mActionType_CommandDoubleClick = 1 << 7;
public static final int mActionType_Confirm = 1 << 8;
public static final int mActionType_IncrAnalog = 1 << 9;
public static final int mActionType_RadioButton = 1 << 10;
public static final int mActionType_Slider = 1 << 11;
public static final int mActionType_ValueInput = 1 << 12;
public static final int mActionType_TipText = 1 << 13;
public static final int mActionType_CloseGraph = 1 << 18;
public static final int mActionType_PulldownMenu = 1 << 19;
public static final int mActionType_OptionMenu = 1 << 20;
public static final int eAnimSequence_Cycle = 0;
public static final int eAnimSequence_Dig = 1;
public static final int eAnimSequence_ForwBack = 2;
public static final int eLimitType_Gt = 0;
public static final int eLimitType_Lt = 1;
public static final int eEvent_MB1Up = 0;
public static final int eEvent_MB1Down = 1;
public static final int eEvent_MB1Click = 2;
public static final int eEvent_MB3Press = 3;
public static final int eEvent_SliderMoved = 4;
public static final int eEvent_ValueChanged = 5;
public static final int eEvent_FocusLost = 6;
public int dynType;
public int actionType;
public int access;
public GeDynElemIfc[] elements;
public GeComponentIfc comp;
public String instance;
public boolean ignoreColor;
public boolean resetColor;
public boolean repaintNow;
public JopSession session;
public JopEngine en;
public boolean invisible;
public boolean invisibleOld;
public double rotate;
public double x0;
public double y0;
public GeDyn( Object comp) {
this.comp = (GeComponentIfc) comp;
}
public GeDyn( Object comp, int dynType, int actionType, int access, GeDynElemIfc[] elements) {
this.comp = (GeComponentIfc) comp;
this.dynType = dynType;
this.actionType = actionType;
this.access = access;
this.elements = elements;
}
public void setSession( JopSession session) {
this.session = session;
en = session.getEngine();
}
public void setDynType( int dynType) {
this.dynType = dynType;
}
public void setActionType( int actionType) {
this.actionType = actionType;
}
public void setAccess( int access) {
this.access = access;
}
public void setInstance( String instance) {
this.instance = instance;
}
public void setElements( GeDynElemIfc[] elements) {
this.elements = elements;
}
public void connect() {
if ( elements == null)
return;
for ( int i = 0; i < elements.length; i++)
elements[i].connect();
}
public void disconnect() {
if ( elements == null)
return;
for ( int i = 0; i < elements.length; i++)
elements[i].disconnect();
}
public void scan() {
if ( elements == null)
return;
resetColor = false;
ignoreColor = false;
repaintNow = false;
for ( int i = 0; i < elements.length; i++)
elements[i].scan();
if ( repaintNow)
comp.repaintForeground();
}
public void action( int eventType, MouseEvent e) {
if ( elements == null)
return;
repaintNow = false;
for ( int i = 0; i < elements.length; i++)
elements[i].action( eventType, e);
if ( repaintNow)
comp.repaintForeground();
}
public void confirmedAction( int eventType, MouseEvent e) {
if ( elements == null)
return;
actionType = actionType & ~mActionType_Confirm;
for ( int i = 0; i < elements.length; i++)
elements[i].action( eventType, e);
actionType = actionType | mActionType_Confirm;
}
public String getAttrName( String str) {
if ( instance == null) {
if ( str.startsWith("!"))
return str.substring(1);
else
return str;
}
else {
String s = RtUtilities.strReplace( str, "$object", instance);
if ( s.startsWith("!"))
return s.substring(1);
else
return s;
}
}
public String getAttrNameNoSuffix( String str) {
int startIdx;
String s;
if ( instance == null)
s = str;
else
s = RtUtilities.strReplace( str, "$object", instance);
if ( s.startsWith("!"))
startIdx = 1;
else
startIdx = 0;
int idx1 = s.indexOf('#');
if ( idx1 != -1) {
int idx2 = s.indexOf('[');
if ( idx2 != -1)
return s.substring( startIdx, idx1) + s.substring(idx2);
else
return s.substring( startIdx, idx1);
}
else
return s.substring(startIdx);
}
static public boolean getAttrInverted( String str) {
return str.startsWith("!");
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynAnalogColor extends GeDynElem {
String attribute;
double limit;
int limitType;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
boolean oldState;
boolean isMainInstance = false;
public GeDynAnalogColor( GeDyn dyn, String attribute,
double limit, int limitType, int color) {
super( dyn, GeDyn.mDynType_AnalogColor, GeDyn.mActionType_No);
this.attribute = attribute;
this.limit = limit;
this.limitType = limitType;
this.color = color;
}
public void connect() {
// Find the main instance
GeDynAnalogColor mainInstance = null;
for ( int i = dyn.elements.length - 1; i >= 0; i--) {
if ( dyn.elements[i].getDynType() == GeDyn.mDynType_AnalogColor) {
mainInstance = (GeDynAnalogColor)dyn.elements[i];
break;
}
}
if ( mainInstance != null) {
if ( !mainInstance.attrFound) {
String attrName = dyn.getAttrName( mainInstance.attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "AnalogColor: " + attrName);
else
mainInstance.attrFound = true;
mainInstance.p = ret.id;
mainInstance.subid = ret.refid;
mainInstance.isMainInstance = true;
}
}
p = mainInstance.p;
attrFound = mainInstance.attrFound;
}
}
public void disconnect() {
if ( isMainInstance && attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
float value = dyn.en.gdh.getObjectRefInfoFloat( p);
int i;
if ( !firstScan) {
if ( !dyn.resetColor && value == oldValue) {
if ( oldState)
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
boolean state;
boolean set_color = false;
boolean reset_color = false;
if ( limitType == GeDyn.eLimitType_Gt)
state = value > limit;
else
state = value < limit;
if ( state != oldState || dyn.resetColor || firstScan) {
if ( state) {
set_color = true;
dyn.ignoreColor = true;
}
else {
reset_color = true;
dyn.resetColor = true;
}
oldState = state;
}
else if ( state)
dyn.ignoreColor = true;
oldValue = value;
if ( !set_color && !reset_color)
return;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( set_color) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( set_color) {
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynAnalogShift extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
public GeDynAnalogShift( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_AnalogShift, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "AnalogShift: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
float value0 = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( value0 != oldValue || firstScan) {
dyn.comp.setPage( (int)(value0 + 1.5));
dyn.repaintNow = true;
oldValue = value0;
}
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class GeDynAnalogText extends GeDynOptionMenu {
public GeDynAnalogText( GeDyn dyn, String attribute, String[] itemsText, int[] itemsEnum) {
super( dyn, attribute, itemsText, itemsEnum);
this.dynType = GeDyn.mDynType_AnalogText;
this.actionType = GeDyn.mActionType_No;
}
public void action( int eventType, MouseEvent e) {
}
}
package jpwr.jop;
import javax.swing.*;
import jpwr.rt.*;
public class GeDynAnimation extends GeDynElem {
String attribute;
int sequence;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
int animationCount;
int animationDirection;
public GeDynAnimation( GeDyn dyn, String attribute, int sequence) {
super( dyn, GeDyn.mDynType_Animation, GeDyn.mActionType_No);
this.attribute = attribute;
this.sequence = sequence;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigShift: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean repaintNow = false;
boolean value0 = dyn.en.gdh.getObjectRefInfoBoolean( p);
int sts;
int maxCount;
switch ( sequence) {
case GeDyn.eAnimSequence_Cycle:
case GeDyn.eAnimSequence_ForwBack: {
if ( firstScan) {
animationCount = 0;
animationDirection = 1;
}
if ( (!inverted && value0) || (inverted && !value0)) {
if ( animationDirection == 0) {
animationCount = 0;
animationDirection = 1;
}
maxCount = animationCount;
animationCount++;
if ( animationCount >= maxCount) {
// Shift nodeclass
if ( animationDirection == 1) {
// Shift forward
sts = dyn.comp.setNextPage();
if ( sts == 0) {
if ( sequence == GeDyn.eAnimSequence_Cycle)
// Start from beginning the again
dyn.comp.setPage( 2);
else {
// Change direction
animationDirection = 2;
dyn.comp.setPreviousPage();
}
}
animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = dyn.comp.setPreviousPage();
if ( sts == 0) {
// Change direction
animationDirection = 1;
dyn.comp.setNextPage();
}
animationCount = 0;
repaintNow = true;
}
}
}
else {
if ( animationDirection != 0) {
animationDirection = 0;
dyn.comp.setFirstPage();
repaintNow = true;
}
}
break;
}
case GeDyn.eAnimSequence_Dig: {
if ( firstScan) {
animationCount = 0;
animationDirection = 0;
if ( (!inverted && value0) || (inverted && !value0)) {
dyn.comp.setLastPage();
repaintNow = true;
}
oldValue = value0;
}
if ( oldValue != value0) {
// Start animation
if ( (!inverted && value0) || (inverted && !value0)) {
animationCount = 0;
animationDirection = 1;
}
else if ( (!inverted && !value0) || (inverted && value0)) {
animationCount = 0;
animationDirection = 2;
}
}
if ( animationDirection != 0) {
maxCount = animationCount;
animationCount++;
if ( animationCount >= maxCount) {
// Shift nodeclass
if ( animationDirection == 1) {
// Shift forward
sts = dyn.comp.setNextPage();
if ( sts == 0) {
// End of animation
animationCount = 0;
animationDirection = 0;
}
animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = dyn.comp.setPreviousPage();
if ( sts == 0) {
// End of animation
animationCount = 0;
animationDirection = 0;
}
animationCount = 0;
repaintNow = true;
}
}
}
break;
}
}
oldValue = value0;
if ( repaintNow)
((JComponent)dyn.comp).repaint();
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class GeDynCloseGraph extends GeDynElem {
String command;
public GeDynCloseGraph( GeDyn dyn) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_CloseGraph);
this.command = command;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
((GeComponent)dyn.comp).colorInverse = 1;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
((GeComponent)dyn.comp).colorInverse = 0;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
JopDynamic comp = (JopDynamic)dyn.comp;
if ( comp.dynamicGetRoot() instanceof JFrame)
((JFrame)comp.dynamicGetRoot()).dispose();
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynCommand extends GeDynElem {
String command;
public GeDynCommand( GeDyn dyn, String command) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_Command);
this.command = command;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
((GeComponent)dyn.comp).colorInverse = 1;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
((GeComponent)dyn.comp).colorInverse = 0;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
Jop.executeCommand( dyn.session, command);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
public class GeDynConfirm extends GeDynElem {
String text;
public GeDynConfirm( GeDyn dyn, String text) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_Confirm);
this.text = text;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
break;
case GeDyn.eEvent_MB1Click:
case GeDyn.eEvent_ValueChanged:
JopConfirmDialog.open( (Component)dyn.comp, text);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigBorder extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigBorder( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigBorder, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue) {
// No change since last time
return;
}
}
else
firstScan = false;
if ( (!inverted && !value) || (inverted && value)) {
dyn.comp.tsetBorderColor( color);
}
else {
dyn.comp.resetBorderColor();
}
dyn.repaintNow = true;
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigColor extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigColor( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigColor, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( (!inverted && value) || (inverted && !value))
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigError extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigError( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_DigError, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigError: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( (!inverted && value) || (inverted && !value))
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetColorTone( GeColor.COLOR_TONE_RED);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetFillColor( GeColor.COLOR_RED);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigFlash extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
boolean on;
public GeDynDigFlash( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigFlash, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( !((!inverted && value) || (inverted && !value)))
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
if ( on) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
on = !on;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
if ( on) {
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
on = !on;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigLowColor extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigLowColor( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigLowColor, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigLowColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
System.out.println("Disconnecting: " + attribute);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( oldValue == value && !dyn.resetColor)
return;
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && !value) || (inverted && value)) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && !value) || (inverted && value))
dyn.comp.tsetFillColor( color);
else
dyn.comp.resetFillColor();
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigShift extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigShift( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_DigShift, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigShift: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value0 = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( firstScan) {
if ( (!inverted && value0) || (inverted && !value0)) {
((GeComponent)dyn.comp).setLastPage();
dyn.repaintNow = true;
}
oldValue = value0;
firstScan = false;
}
if ( oldValue != value0) {
// Shift to first or last page
if ( (!inverted && value0) || (inverted && !value0))
dyn.comp.setLastPage();
else if ( (!inverted && !value0) || (inverted && value0))
dyn.comp.setFirstPage();
dyn.repaintNow = true;
}
oldValue = value0;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigText extends GeDynElem {
String attribute;
String lowText;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
String highText;
public GeDynDigText( GeDyn dyn, String attribute, String lowText) {
super( dyn, GeDyn.mDynType_Invisible, GeDyn.mActionType_No);
this.attribute = attribute;
this.lowText = lowText;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigText: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
highText = dyn.comp.getAnnot1();
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue) {
// No change since last time
return;
}
}
else
firstScan = false;
if ( (!inverted && value) || (inverted && !value))
dyn.comp.setAnnot1( highText);
else
dyn.comp.setAnnot1( lowText);
dyn.repaintNow = true;
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigWarning extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigWarning( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_DigWarning, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigWarning: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( (!inverted && value) || (inverted && !value))
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetColorTone( GeColor.COLOR_TONE_YELLOW);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetFillColor( GeColor.COLOR_6);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynElem implements GeDynElemIfc {
public GeDyn dyn;
public int dynType;
public int actionType;
public GeDynElem( GeDyn dyn, int dynType, int actionType) {
this.dyn = dyn;
this.dynType = dynType;
this.actionType = actionType;
}
public int getDynType() {
return dynType;
}
public int getActionType() {
return actionType;
}
public void connect() {
}
public void disconnect() {
}
public void scan() {
}
public void action( int eventType, MouseEvent e) {
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public interface GeDynElemIfc {
public int getDynType();
public int getActionType();
public void connect();
public void disconnect();
public void scan();
public void action( int eventType, MouseEvent e);
}
package jpwr.jop;
import jpwr.rt.*;
import javax.swing.*;
public class GeDynFillLevel extends GeDynElem {
String attribute;
int color;
int direction;
double minValue;
double maxValue;
double minPos;
double maxPos;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
public GeDynFillLevel( GeDyn dyn, String attribute, int color, int direction,
double minValue, double maxValue, double minPos, double maxPos) {
super( dyn, GeDyn.mDynType_FillLevel, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
this.direction = direction;
this.minValue = minValue;
this.maxValue = maxValue;
this.minPos = minPos;
this.maxPos = maxPos;
}
public void connect() {
if ( minValue == maxValue)
return;
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "FillLevel: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
if ( maxPos == 0 && minPos == 0)
dyn.comp.setLevelDirection( direction);
else
dyn.comp.setLevelDirection( Ge.DIRECTION_DOWN);
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.setLevelColorTone( color);
else
dyn.comp.setLevelFillColor( color);
}
else
dyn.comp.setLevelFillColor( color);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
float value = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( !firstScan) {
if ( value == oldValue)
// No change since last time
return;
}
else
firstScan = false;
float level = 1;
if ( maxPos == 0 && minPos == 0) {
level = (float)((value - minValue) / (maxValue - minValue));
}
else {
switch( direction) {
case Ge.DIRECTION_LEFT:
case Ge.DIRECTION_RIGHT:
float width = ((JComponent)dyn.comp).getWidth();
level = (float)(((value - minValue) / (maxValue - minValue) * ( maxPos - minPos)
+ width - maxPos) / width);
break;
case Ge.DIRECTION_DOWN:
case Ge.DIRECTION_UP:
float height = ((JComponent)dyn.comp).getHeight();
level = (float)(((value - minValue) / (maxValue - minValue) * ( maxPos - minPos)
+ height - maxPos) / height);
break;
}
}
dyn.comp.setFillLevel( level);
dyn.repaintNow = true;
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynIncrAnalog extends GeDynElem {
String attribute;
double increment;
double min_value;
double max_value;
public GeDynIncrAnalog( GeDyn dyn, String attribute, double increment, double min_value,
double max_value) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_IncrAnalog);
this.attribute = attribute;
this.increment = increment;
this.min_value = min_value;
this.max_value = max_value;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String attrName = dyn.getAttrName( attribute);
CdhrFloat ret = dyn.en.gdh.getObjectInfoFloat( attrName);
if ( ret.evenSts()) {
System.out.println( "IncrAnalog " + attrName);
break;
}
ret.value += increment;
if ( !( min_value == 0 && max_value == 0)) {
if ( ret.value < min_value)
ret.value = (float) min_value;
if ( ret.value > max_value)
ret.value = (float) max_value;
}
PwrtStatus sts = dyn.en.gdh.setObjectInfo( attrName, ret.value);
if ( sts.evenSts())
System.out.println( "IncrAnalog " + attrName);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynInvisible extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynInvisible( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_Invisible, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigInvisible: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue) {
// No change since last time
return;
}
}
else
firstScan = false;
if ( (!inverted && value) || (inverted && !value)) {
dyn.invisible = true;
}
else {
dyn.invisible = false;
}
dyn.repaintNow = true;
oldValue = value;
}
}
package jpwr.jop;
import java.awt.*;
import javax.swing.*;
import jpwr.rt.*;
public class GeDynMove extends GeDynElem {
String moveXAttribute;
String moveYAttribute;
String scaleXAttribute;
String scaleYAttribute;
double xOffset;
double yOffset;
double factor;
double scaleFactor;
boolean attrMoveXFound;
boolean attrMoveYFound;
boolean attrScaleXFound;
boolean attrScaleYFound;
PwrtRefId moveXSubid;
PwrtRefId moveYSubid;
PwrtRefId scaleXSubid;
PwrtRefId scaleYSubid;
int moveXp;
int moveYp;
int scaleXp;
int scaleYp;
float moveXOldValue;
float moveYOldValue;
float scaleXOldValue;
float scaleYOldValue;
public double xOrig;
public double yOrig;
public double xScale = 1;
public double yScale = 1;
boolean firstScan = true;
public GeDynMove( GeDyn dyn, String moveXAttribute, String moveYAttribute,
String scaleXAttribute, String scaleYAttribute, double
xOffset, double yOffset, double factor, double scaleFactor) {
super( dyn, GeDyn.mDynType_Move, GeDyn.mActionType_No);
this.moveXAttribute = moveXAttribute;
this.moveYAttribute = moveYAttribute;
this.scaleXAttribute = scaleXAttribute;
this.scaleYAttribute = scaleYAttribute;
this.xOffset = xOffset;
this.yOffset = yOffset;
this.factor = factor;
this.scaleFactor = factor;
}
public void connect() {
String attrName = dyn.getAttrName( moveXAttribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Move: " + attrName);
else {
attrMoveXFound = true;
moveXp = ret.id;
moveXSubid = ret.refid;
}
}
attrName = dyn.getAttrName( moveYAttribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Move: " + attrName);
else {
attrMoveYFound = true;
moveYp = ret.id;
moveYSubid = ret.refid;
}
}
attrName = dyn.getAttrName( scaleXAttribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Move: " + attrName);
else {
attrScaleXFound = true;
scaleXp = ret.id;
scaleXSubid = ret.refid;
}
}
attrName = dyn.getAttrName( scaleYAttribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Move: " + attrName);
else {
attrScaleYFound = true;
scaleYp = ret.id;
scaleYSubid = ret.refid;
}
}
}
public void disconnect() {
if ( attrMoveXFound)
dyn.en.gdh.unrefObjectInfo( moveXSubid);
if ( attrMoveYFound)
dyn.en.gdh.unrefObjectInfo( moveYSubid);
if ( attrScaleXFound)
dyn.en.gdh.unrefObjectInfo( scaleXSubid);
if ( attrScaleXFound)
dyn.en.gdh.unrefObjectInfo( scaleXSubid);
}
public void scan() {
boolean repaintNow = false;
if ( firstScan) {
Point loc = ((JComponent)dyn.comp).getLocation();
xOrig = (double) loc.x;
yOrig = (double) loc.y;
}
if ( attrMoveXFound || attrMoveYFound) {
// Move
Point loc = ((JComponent)dyn.comp).getLocation();
float valueMoveX = 0;
float valueMoveY = 0;
if ( attrMoveXFound) {
valueMoveX = dyn.en.gdh.getObjectRefInfoFloat( moveXp);
if ( valueMoveX != moveXOldValue || firstScan) {
repaintNow = true;
moveXOldValue = valueMoveX;
}
}
if ( attrMoveYFound) {
valueMoveY = dyn.en.gdh.getObjectRefInfoFloat( moveYp);
if ( valueMoveY != moveYOldValue || firstScan) {
repaintNow = true;
moveYOldValue = valueMoveY;
}
}
if ( repaintNow) {
if ( attrMoveXFound)
loc.x = (int) (xOrig + (valueMoveX - xOffset) * factor);
if ( attrMoveYFound)
loc.y = (int) (yOrig + (valueMoveY - yOffset) * factor);
((JComponent)dyn.comp).setLocation( loc);
}
}
if ( attrScaleXFound || attrScaleYFound) {
// Scale
if ( firstScan) {
xScale = ((JComponent)dyn.comp).getWidth();
yScale = ((JComponent)dyn.comp).getHeight();
}
float valueScaleX = 0;
float valueScaleY = 0;
if ( attrScaleXFound) {
valueScaleX = (float) (dyn.en.gdh.getObjectRefInfoFloat( scaleXp) * scaleFactor);
if ( valueScaleX != scaleXOldValue || firstScan) {
repaintNow = true;
scaleXOldValue = valueScaleX;
}
}
if ( attrScaleYFound) {
valueScaleY = (float) (dyn.en.gdh.getObjectRefInfoFloat( scaleYp) * scaleFactor);
if ( valueScaleY != scaleYOldValue || firstScan) {
repaintNow = true;
scaleYOldValue = valueScaleY;
}
}
if ( repaintNow) {
Rectangle rect = ((JComponent)dyn.comp).getBounds();
if ( attrScaleXFound) {
rect.width = (int) (xScale * valueScaleX);
if ( rect.width < 1)
rect.width = 1;
}
if ( attrScaleYFound) {
rect.height = (int) (yScale * valueScaleY);
if ( rect.height < 1)
rect.height = 1;
}
((JComponent)dyn.comp).setBounds( rect);
}
}
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class GeDynOptionMenu extends GeDynElem {
String attribute;
String[] itemsText;
int[] itemsEnum;
public boolean attrFound;
PwrtRefId subid;
int p;
public int typeId;
public boolean oldValueB;
public float oldValueF;
public int oldValueI;
boolean firstScan = true;
int color = GeColor.COLOR_32;
public GeDynOptionMenu( GeDyn dyn, String attribute, String[] itemsText, int[] itemsEnum) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_OptionMenu);
this.attribute = attribute;
this.itemsText = itemsText;
this.itemsEnum = itemsEnum;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "OptionMenu: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
typeId = ret.typeId;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
int value = 0;
boolean update = false;
if ( typeId == Pwr.eType_Float32) {
float value0 = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( value0 != oldValueF || firstScan) {
value = (int) value0;
update = true;
oldValueF = value0;
}
}
else if ( typeId == Pwr.eType_Int32 ||
typeId == Pwr.eType_UInt32 ||
typeId == Pwr.eType_Int16 ||
typeId == Pwr.eType_UInt16 ||
typeId == Pwr.eType_Int8 ||
typeId == Pwr.eType_UInt8) {
int value0 = dyn.en.gdh.getObjectRefInfoInt( p);
if ( value0 != oldValueI || firstScan) {
value = value0;
update = true;
oldValueI = value0;
}
}
else
return;
if ( update) {
boolean found = false;
for ( int i = 0; i < 32; i++) {
if ( itemsEnum[i] == value) {
dyn.comp.setAnnot1( itemsText[i]);
dyn.repaintNow = true;
found = true;
break;
}
}
if ( !found)
dyn.comp.setAnnot1( "");
}
if ( firstScan)
firstScan = false;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
break;
case GeDyn.eEvent_MB1Up:
break;
case GeDyn.eEvent_MB1Click:
new OptionMenu((Component)dyn.comp,
2, ((Component)dyn.comp).getHeight() - 2,
GeColor.getColor( color,
((GeComponent)dyn.comp).colorTone,
((GeComponent)dyn.comp).colorShift,
((GeComponent)dyn.comp).colorIntensity,
((GeComponent)dyn.comp).colorBrightness,
((GeComponent)dyn.comp).colorInverse,
((GeComponent)dyn.comp).fillColor),
((Component)dyn.comp).getWidth() - 4);
break;
}
}
class OptionMenu implements ActionListener, PopupMenuListener {
Component invoker;
OptionMenu( Component invoker, int x, int y, Color color, int width) {
this.invoker = invoker;
JMenuItem item;
JPopupMenu popup = new JPopupMenu();
popup.setPopupSize( width, popup.getHeight());
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null) {
popup.add( item = new JMenuItem( itemsText[i]));
item.addActionListener( this);
item.setBackground(color);
}
}
popup.setBackground(color);
popup.addPopupMenuListener( this);
popup.show( invoker, x, y);
}
public void popupMenuWillBecomeVisible( PopupMenuEvent e) {}
public void popupMenuWillBecomeInvisible( PopupMenuEvent e) {}
public void popupMenuCanceled( PopupMenuEvent e) {}
public void actionPerformed( ActionEvent event) {
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null && itemsText[i].equals( event.getActionCommand())) {
PwrtStatus sts;
if ( typeId == Pwr.eType_Float32) {
float value = (float) itemsEnum[i];
String attrName = dyn.getAttrNameNoSuffix( attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, value);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + attrName + " " + sts);
}
else if ( typeId == Pwr.eType_Int32 ||
typeId == Pwr.eType_UInt32 ||
typeId == Pwr.eType_Int16 ||
typeId == Pwr.eType_UInt16 ||
typeId == Pwr.eType_Int8 ||
typeId == Pwr.eType_UInt8) {
String attrName = dyn.getAttrNameNoSuffix( attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, itemsEnum[i]);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else
return;
System.out.println("Action " + event.getActionCommand());
break;
}
}
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
public class GeDynPopupMenu extends GeDynElem {
String refObject;
public GeDynPopupMenu( GeDyn dyn, String refObject) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_PopupMenu);
this.refObject = refObject;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB3Press:
if ( refObject.startsWith("!")) {
// Name of an attribute that contains the objid of the reference object
CdhrObjid reto = dyn.en.gdh.getObjectInfoObjid( refObject.substring(1));
if ( reto.oddSts() && !reto.objid.isNull()) {
CdhrString rets = dyn.en.gdh.objidToName( reto.objid, Cdh.mName_volumeStrict);
System.out.println( "str: " + rets.str + " " + rets.getSts());
if ( rets.oddSts() && ! rets.str.equals(""))
new JopMethodsMenu( dyn.session, rets.str, JopUtility.GRAPH,
(Component)dyn.comp, e.getX(), e.getY());
}
}
else {
new JopMethodsMenu( dyn.session, refObject, JopUtility.GRAPH,
(Component)dyn.comp, e.getX(), e.getY());
}
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class GeDynPulldownMenu extends GeDynElem {
String[] itemsText;
GeDyn[] itemsDyn;
public GeDynPulldownMenu( GeDyn dyn, String itemsText[], GeDyn[] itemsDyn) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_PulldownMenu);
this.itemsText = itemsText;
this.itemsDyn = itemsDyn;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
break;
case GeDyn.eEvent_MB1Up:
break;
case GeDyn.eEvent_MB1Click:
new PulldownMenu((Component)dyn.comp,
// ((Component)dyn.comp).getX() - ((Component)dyn.comp).getWidth()/2,
// ((Component)dyn.comp).getY() + ((Component)dyn.comp).getHeight() - 2
0, ((Component)dyn.comp).getHeight() - 2
);
break;
}
}
class PulldownMenu implements ActionListener, PopupMenuListener {
Component invoker;
PulldownMenu( Component invoker, int x, int y) {
this.invoker = invoker;
JMenuItem item;
JPopupMenu popup = new JPopupMenu();
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null && itemsDyn[i] != null) {
if ( (itemsDyn[i].actionType & GeDyn.mActionType_PulldownMenu) != 0) {
System.out.println( itemsText[i] + " " + i + " " + itemsDyn[i].actionType + " " +
GeDyn.mActionType_PulldownMenu);
if ( itemsDyn[i].elements.length == 1 &&
itemsDyn[i].elements[0] instanceof GeDynPulldownMenu)
popup.add( subMenu( itemsText[i], (GeDynPulldownMenu) itemsDyn[i].elements[0])); // Check which element...
}
else {
popup.add( item = new JMenuItem( itemsText[i]));
item.addActionListener( this);
}
}
}
popup.addPopupMenuListener( this);
popup.show( invoker, x, y);
}
JMenu subMenu( String text, GeDynPulldownMenu pulldown) {
JMenu menu = new JMenu( text);
JMenuItem item;
for ( int i = 0; i < 32; i++) {
if ( pulldown.itemsText[i] != null && pulldown.itemsDyn[i] != null) {
if ( (pulldown.itemsDyn[i].actionType & GeDyn.mActionType_PulldownMenu) != 0) {
if ( pulldown.itemsDyn[i].elements.length == 1 &&
pulldown.itemsDyn[i].elements[0] instanceof GeDynPulldownMenu)
menu.add( subMenu( pulldown.itemsText[i], (GeDynPulldownMenu) pulldown.itemsDyn[i].elements[0]));
}
else {
menu.add( item = new JMenuItem( pulldown.itemsText[i]));
item.addActionListener( this);
}
}
}
return menu;
}
public void popupMenuWillBecomeVisible( PopupMenuEvent e) {}
public void popupMenuWillBecomeInvisible( PopupMenuEvent e) {}
public void popupMenuCanceled( PopupMenuEvent e) {}
public void actionPerformed( ActionEvent event) {
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null && itemsText[i].equals( event.getActionCommand())) {
if ( itemsDyn[i] != null) {
MouseEvent e = new MouseEvent( invoker, 0, 0, 0, invoker.getX(), invoker.getY(), 1, false);
System.out.println("Action " + event.getActionCommand());
itemsDyn[i].action( GeDyn.eEvent_MB1Click, e);
}
break;
}
else if ( itemsDyn[i] != null &&
(itemsDyn[i].actionType & GeDyn.mActionType_PulldownMenu) != 0) {
if ( itemsDyn[i].elements.length == 1 &&
itemsDyn[i].elements[0] instanceof GeDynPulldownMenu)
subMenuAction( event, (GeDynPulldownMenu) itemsDyn[i].elements[0]);
}
}
}
public void subMenuAction( ActionEvent event, GeDynPulldownMenu pulldown) {
for ( int i = 0; i < 32; i++) {
if ( pulldown.itemsText[i] != null && pulldown.itemsText[i].equals( event.getActionCommand())) {
if ( pulldown.itemsDyn[i] != null) {
MouseEvent e = new MouseEvent( invoker, 0, 0, 0, invoker.getX(), invoker.getY(), 1, false);
System.out.println("Action " + event.getActionCommand());
pulldown.itemsDyn[i].action( GeDyn.eEvent_MB1Click, e);
}
break;
}
else if ( pulldown.itemsDyn[i] != null &&
(pulldown.itemsDyn[i].actionType & GeDyn.mActionType_PulldownMenu) != 0) {
if ( pulldown.itemsDyn[i].elements.length == 1)
subMenuAction( event, (GeDynPulldownMenu) pulldown.itemsDyn[i].elements[0]);
}
}
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class GeDynRadioButton extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynRadioButton( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_RadioButton);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "RadioButton: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value0 = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( firstScan) {
if ( (!inverted && value0) || (inverted && !value0)) {
dyn.comp.setLastPage();
dyn.repaintNow = true;
}
oldValue = value0;
firstScan = false;
}
if ( oldValue != value0) {
// Shift to first or last page
if ( (!inverted && value0) || (inverted && !value0))
dyn.comp.setLastPage();
else if ( (!inverted && !value0) || (inverted && value0))
dyn.comp.setFirstPage();
dyn.repaintNow = true;
}
oldValue = value0;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
// Get all radiobutton in the same group
Container parent = ((JComponent)dyn.comp).getParent();
if ( parent == null) break;
PwrtStatus sts;
String attrName;
for ( int i = 0; i < parent.getComponentCount(); i++) {
GeComponentIfc c = (GeComponentIfc) parent.getComponent(i);
if ( (((GeDyn)c.getDd()).actionType & GeDyn.mActionType_RadioButton) != 0) {
// Get the attribute
for ( int j = 0; j < ((GeDyn)c.getDd()).elements.length; j++) {
if ( ((GeDyn)c.getDd()).elements[j].getActionType() ==
GeDyn.mActionType_RadioButton) {
String name = ((GeDynRadioButton)((GeDyn)c.getDd()).elements[j]).attribute;
if ( name.equals( attribute))
break;
attrName = dyn.getAttrName( name);
sts = dyn.en.gdh.setObjectInfo( attrName, false);
break;
}
}
}
}
attrName = dyn.getAttrName( attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "RadioButton: " + attribute);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynResetDig extends GeDynElem {
String attribute;
public GeDynResetDig( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_ResetDig);
this.attribute = attribute;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String attrName = dyn.getAttrName( attribute);
PwrtStatus sts = dyn.en.gdh.setObjectInfo( attrName, false);
if ( sts.evenSts())
System.out.println( "SetDig: " + attrName);
break;
}
}
}
package jpwr.jop;
import javax.swing.*;
import jpwr.rt.*;
public class GeDynRotate extends GeDynElem {
String attribute;
double x0;
double y0;
double factor;
boolean attrFound;
PwrtRefId subid;
int p;
int typeId;
float oldValue;
boolean firstScan = true;
public GeDynRotate( GeDyn dyn, String attribute, double x0, double y0, double factor) {
super( dyn, GeDyn.mDynType_Rotate, GeDyn.mActionType_No);
this.attribute = attribute;
this.x0 = x0;
this.y0 = y0;
this.factor = factor;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Rotate: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
typeId = ret.typeId;
dyn.x0 = x0;
dyn.y0 = y0;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
float value0 = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( value0 != oldValue || firstScan) {
dyn.rotate = value0 * factor;
oldValue = value0;
// dyn.repaintNow = true;
((JComponent)dyn.comp).repaint();
}
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynSetDig extends GeDynElem {
String attribute;
public GeDynSetDig( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_SetDig);
this.attribute = attribute;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String attrName = dyn.getAttrName( attribute);
PwrtStatus sts = dyn.en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "SetDig: " + attrName);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class GeDynSlider extends GeDynElem {
String attribute;
int direction;
double minValue;
double maxValue;
double minPos;
double maxPos;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
boolean moveActive = false;
Point offset = new Point();
public GeDynSlider( GeDyn dyn, String attribute, double minValue, double maxValue,
int direction, double minPos, double maxPos) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_Slider);
this.attribute = attribute;
this.minValue = minValue;
this.maxValue = maxValue;
this.direction = direction;
this.minPos = minPos;
this.maxPos = maxPos;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Slider: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || moveActive)
return;
float value = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( oldValue != value || firstScan) {
Point loc = ((JComponent)dyn.comp).getLocation();
int pos;
switch ( direction) {
case Ge.DIRECTION_RIGHT:
pos = (int)((maxValue - value)/(maxValue - minValue) *
(maxPos - minPos) + minPos);
loc.x = pos;
break;
case Ge.DIRECTION_LEFT:
pos = (int)(value /(maxValue - minValue) *
(maxPos - minPos) + minPos);
loc.x = pos;
break;
case Ge.DIRECTION_UP:
pos = (int)((value - minValue)/(maxValue - minValue) *
(maxPos - minPos) + minPos);
loc.y = pos;
break;
default:
pos = (int)((maxValue - value)/(maxValue - minValue) *
(maxPos - minPos) + minPos);
loc.y = pos;
}
((JComponent)dyn.comp).setLocation( loc);
((JComponent)dyn.comp).repaint();
}
oldValue = value;
if ( firstScan)
firstScan = false;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
moveActive = true;
offset = e.getPoint();
// ((GeComponent)dyn.comp).colorInverse = 1;
// dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
moveActive = false;
// ((GeComponent)dyn.comp).colorInverse = 0;
// dyn.repaintNow = true;
break;
case GeDyn.eEvent_SliderMoved:
float value;
PwrtStatus sts;
Point new_loc = new Point();
Point ePoint = e.getPoint();
// System.out.println("Mouse dragged: " + thisPoint.x + ", " +
// thisPoint.y);
Point loc = ((GeComponent)dyn.comp).getLocation();
switch ( direction) {
case Ge.DIRECTION_RIGHT:
new_loc.x = loc.x + ePoint.x - offset.x;
new_loc.y = loc.y;
if ( new_loc.x > maxPos)
new_loc.x = (int) maxPos;
if ( new_loc.x < minPos)
new_loc.x = (int) minPos;
value = (float)((maxPos - new_loc.x) / (maxPos - minPos) *
(maxValue - minValue) + minValue);
break;
case Ge.DIRECTION_LEFT:
new_loc.x = loc.x + ePoint.x - offset.x;
new_loc.y = loc.y;
if ( new_loc.x > maxPos)
new_loc.x = (int) maxPos;
if ( new_loc.x < minPos)
new_loc.x = (int) minPos;
value = (float)((new_loc.x - minPos) / (maxPos - minPos) *
(maxValue - minValue) + minValue);
break;
case Ge.DIRECTION_UP:
new_loc.y = loc.y + ePoint.y - offset.y;
new_loc.x = loc.x;
if ( new_loc.y > maxPos)
new_loc.y = (int) maxPos;
if ( new_loc.y < minPos)
new_loc.y = (int) minPos;
value = (float)((new_loc.y - minPos) / (maxPos - minPos) *
(maxValue - minValue) + minValue);
// System.out.println("old_y: " + ePoint.y + " new_y: " + new_loc.y + "v: " + value);
break;
default:
new_loc.y = loc.y + ePoint.y - offset.y;
// System.out.println( "loc.y " + loc.y + " eP.y " + ePoint.y + " offset.y " + offset.y + " new_loc.y " + new_loc.y + " maxPos " + maxPos + " minPos " + minPos);
new_loc.x = loc.x;
if ( new_loc.y > maxPos)
new_loc.y = (int) maxPos;
if ( new_loc.y < minPos)
new_loc.y = (int) minPos;
value = (float)((maxPos - new_loc.y) / (maxPos - minPos) *
(maxValue - minValue) + minValue);
// System.out.println("old_y: " + ePoint.y + " new_y: " + new_loc.y + "v: " + value);
}
((JComponent)dyn.comp).setLocation(new_loc);
sts = dyn.en.gdh.setObjectInfo( attribute, value);
if ( sts.evenSts())
System.out.println( "GeSlider: " + sts);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynStoDig extends GeDynElem {
String attribute;
public GeDynStoDig( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_StoDig);
this.attribute = attribute;
}
public void action( int eventType, MouseEvent e) {
String attrName;
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
attrName = dyn.getAttrName( attribute);
PwrtStatus sts = dyn.en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "StoDig: " + attrName);
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
attrName = dyn.getAttrName( attribute);
dyn.en.gdh.setObjectInfo( attrName, false);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import javax.swing.*;
public class GeDynTipText extends GeDynElem {
String text;
public GeDynTipText( GeDyn dyn, String text) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_TipText);
this.text = text;
}
public void connect() {
((JComponent)dyn.comp).setToolTipText( text);
}
public void disconnect() {
}
public void scan() {
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynToggleDig extends GeDynElem {
String attribute;
public GeDynToggleDig( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_ToggleDig);
this.attribute = attribute;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String attrName = dyn.getAttrName( attribute);
PwrtStatus sts = dyn.en.gdh.toggleObjectInfo( attrName);
if ( sts.evenSts())
System.out.println( "ToggleDig: " + attrName);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynValue extends GeDynElem {
public String attribute;
public boolean attrFound;
PwrtRefId subid;
int p;
public int typeId;
public boolean oldValueB;
public float oldValueF;
public int oldValueI;
public String oldValueS;
boolean firstScan = true;
GeCFormat cFormat;
StringBuffer sb = new StringBuffer();
public GeDynValue( GeDyn dyn, String attribute, String format) {
super( dyn, GeDyn.mDynType_Value, GeDyn.mActionType_No);
this.attribute = attribute;
this.cFormat = new GeCFormat(format);
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Value: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
typeId = ret.typeId;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
if ( typeId == Pwr.eType_Float32) {
float value0 = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( value0 != oldValueF || firstScan) {
sb = cFormat.format( value0, sb);
dyn.comp.setAnnot1(new String(sb));
dyn.repaintNow = true;
oldValueF = value0;
}
}
else if ( typeId == Pwr.eType_Int32 ||
typeId == Pwr.eType_UInt32 ||
typeId == Pwr.eType_Int16 ||
typeId == Pwr.eType_UInt16 ||
typeId == Pwr.eType_Int8 ||
typeId == Pwr.eType_UInt8) {
int value0 = dyn.en.gdh.getObjectRefInfoInt( p);
if ( value0 != oldValueI || firstScan) {
sb = cFormat.format( value0, sb);
dyn.comp.setAnnot1(new String(sb));
dyn.repaintNow = true;
oldValueI = value0;
}
}
else if ( typeId == Pwr.eType_String ||
typeId == Pwr.eType_Objid) {
String value0 = dyn.en.gdh.getObjectRefInfoString( p, typeId);
if ( firstScan || value0.compareTo( oldValueS) != 0) {
sb = cFormat.format( value0, sb);
dyn.comp.setAnnot1(new String(sb));
dyn.repaintNow = true;
oldValueS = value0;
}
}
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
import javax.swing.*;
public class GeDynValueInput extends GeDynElem {
double minValue;
double maxValue;
boolean attrFound = false;
int typeId;
GeDynValue valueElement;
public GeDynValueInput( GeDyn dyn, double minValue, double maxValue) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_ValueInput);
this.minValue = minValue;
this.maxValue = maxValue;
}
public void connect() {
// Find the value element
if ( dyn.elements == null)
return;
for ( int i = 0; i < dyn.elements.length; i++) {
if ( dyn.elements[i].getDynType() == GeDyn.mDynType_Value) {
valueElement = (GeDynValue)dyn.elements[i];
typeId = valueElement.typeId;
attrFound = valueElement.attrFound;
break;
}
}
}
public void disconnect() {
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_FocusLost: {
if (!attrFound)
break;
valueElement.firstScan = true;
}
case GeDyn.eEvent_ValueChanged: {
if (!attrFound)
break;
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String text = ((JTextField)dyn.comp).getText();
PwrtStatus sts;
try {
if ( typeId == Pwr.eType_Float32) {
float inputValue = Float.parseFloat( text);
valueElement.oldValueF = inputValue;
if ( minValue == 0 && maxValue == 0) {
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else {
if ( inputValue >= minValue && inputValue <= maxValue ) {
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + attrName + " " + sts);
}
else
valueElement.oldValueF = -10000;
}
}
else if ( typeId == Pwr.eType_Int32 ||
typeId == Pwr.eType_UInt32 ||
typeId == Pwr.eType_Int16 ||
typeId == Pwr.eType_UInt16 ||
typeId == Pwr.eType_Int8 ||
typeId == Pwr.eType_UInt8) {
int inputValue = Integer.parseInt( text, 10);
valueElement.oldValueI = inputValue;
if ( minValue == 0 && maxValue == 0) {
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else {
if ( inputValue >= minValue && inputValue <= maxValue ) {
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else
valueElement.oldValueI = -10000;
}
}
else if ( typeId == Pwr.eType_String) {
valueElement.oldValueS = text;
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, text);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
}
catch(NumberFormatException ex) {
System.out.println( ex.toString() );
}
break;
}
}
}
}
......@@ -7,17 +7,9 @@ import java.awt.font.*;
import javax.swing.*;
public class GeFrameThin extends GeComponent {
Dimension size;
public GeFrameThin()
public GeFrameThin( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
super( session);
size = new Dimension( 144, 84);
}
Shape[] shapes = new Shape[] { null, null, null, null};
......@@ -69,19 +61,19 @@ public class GeFrameThin extends GeComponent {
}
g.setStroke( new BasicStroke(1F));
g.setColor(GeColor.getColor(24, colorTone,
g.setColor(GeColor.getColor(78, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, borderColor));
g.draw( shapes[0]);
g.setStroke( new BasicStroke(1F));
g.setColor(GeColor.getColor(24, colorTone,
g.setColor(GeColor.getColor(78, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, borderColor));
g.draw( shapes[1]);
g.setStroke( new BasicStroke(1F));
g.setColor(GeColor.getColor(10, colorTone,
g.setColor(GeColor.getColor(40, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, borderColor));
g.draw( shapes[2]);
g.setStroke( new BasicStroke(1F));
g.setColor(GeColor.getColor(10, colorTone,
g.setColor(GeColor.getColor(40, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, borderColor));
g.draw( shapes[3]);
g.setTransform(save);
......
......@@ -13,17 +13,9 @@ public class GeImage extends JComponent implements ActionListener {
Object root;
JopSession session;
Timer timer = new Timer(500, this);
public GeImage()
public GeImage( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.session = session;
size = new Dimension( 60, 30);
timer.start();
}
......@@ -369,12 +361,12 @@ public class GeImage extends JComponent implements ActionListener {
p[1] = m;
p[2] = m;
break;
case GeColor.COLOR_TONE_YELLOW:
case GeColor.COLOR_TONE_YELLOWGREEN:
p[0] = a1;
p[1] = a1;
p[2] = b2;
break;
case GeColor.COLOR_TONE_GOLD:
case GeColor.COLOR_TONE_YELLOW:
tmp = (int)( 1.2 * a1);
if (tmp <= 255)
p[0] = tmp;
......
......@@ -7,37 +7,25 @@ import java.awt.*;
import javax.swing.*;
import javax.swing.Timer;
public class GeTextField extends JTextField implements JopDynamic,
ActionListener
public class GeTextField extends JTextField implements GeComponentIfc,
JopDynamic, JopConfirm, ActionListener
{
Dimension size;
Object root;
Timer timer = new Timer(500, this);
JopSession session;
public JopEngine en;
public GeDyndata dd = new GeDyndata();
public GeDyn dd = new GeDyn( this);
String undoKey = new String( "Ej i bruk." );
public float minValue = 0;
public float maxValue = 0;
float alarmLimitLow = 0;
float alarmLimitHigh = 100000;
public boolean focus = false;
public boolean confirmActive = false;
public Color normalColor = null;
public Color alarmColor = new Color( 255, 0, 0 );
public GeTextField component = this;
public GeTextField()
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception
public GeTextField( JopSession session)
{
this.session = session;
dd.setSession( session);
size = new Dimension( 102, 36);
timer.start();
}
......@@ -73,7 +61,12 @@ public class GeTextField extends JTextField implements JopDynamic,
});
this.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
newValueEvent(e);
dd.action( GeDyn.eEvent_ValueChanged, null);
if ( (dd.actionType & GeDyn.mActionType_Confirm) != 0)
confirmActive = true;
// newValueEvent(e);
component.getParent().requestFocus();
}
});
}
......@@ -87,14 +80,99 @@ public class GeTextField extends JTextField implements JopDynamic,
component.getParent().requestFocus();
}
public void focusLost(FocusEvent e) {
focus = false;
dd.oldValueF[0] = -10000;
dd.oldValueI = -10000;
dd.oldValueS = null;
if ( !confirmActive) {
focus = false;
dd.action( GeDyn.eEvent_FocusLost, null);
}
}
});
if ( dd.actionType != 0 && en.gdh.isAuthorized( dd.access)) {
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Up, e);
}
public void mousePressed(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Down, e);
}
});
}
}
}
public void confirmYes() {
PwrtStatus sts;
String attrName;
dd.confirmedAction( GeDyn.eEvent_ValueChanged, null);
confirmActive = false;
focus = false;
dd.action( GeDyn.eEvent_FocusLost, null);
component.getParent().requestFocus();
}
public void confirmNo() {
focus = false;
confirmActive = false;
dd.action( GeDyn.eEvent_FocusLost, null);
component.getParent().requestFocus();
}
// GeComponents Ifc
public void tsetFillColor( int fillColor) {
this.fillColor = fillColor;
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, fillColor);
setBackground( normalColor);
}
public void tsetColorTone( int colorTone) {
this.colorTone = colorTone;
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, GeColor.NO_COLOR);
setBackground( normalColor);
}
public void tsetBorderColor( int borderColor) {}
public void tsetTextColor( int borderColor) {}
public void setColorInverse( int colorInverse) {}
public void resetFillColor() {
fillColor = originalFillColor;
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, fillColor);
setBackground( normalColor);
}
public void resetColorTone() {
colorTone = originalColorTone;
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, fillColor);
setBackground( normalColor);
}
public void resetBorderColor() {}
public void resetTextColor() {}
public String getAnnot1() {
return getText();
}
public void setAnnot1( String s) {
setText( s);
}
public void setLastPage() {}
public void setFirstPage() {}
public void setPage( int page) {}
public int setNextPage() { return 1;}
public int setPreviousPage() { return 1;}
public Object getDd() { return dd;}
public void setFillLevel( float fillLevel) {}
public void setLevelDirection( int levelDirection) {}
public void setLevelColorTone( int levelColorTone) {}
public void setLevelFillColor( int levelFillColor) {}
Font annot1Font = new Font("Helvetica", Font.BOLD, 14);
public void setAnnot1Font( Font font) { annot1Font = font; setFont(font);}
......@@ -115,6 +193,10 @@ public class GeTextField extends JTextField implements JopDynamic,
public int originalColorInverse = 0;
public GdhrRefObjectInfo ret = null;
public StringBuffer sb = new StringBuffer();
float oldValueF;
int oldValueI;
String oldValueS;
int typeId;
public void setColorTone( int colorTone) {
this.colorTone = colorTone;
originalColorTone = colorTone;
......@@ -142,14 +224,11 @@ public class GeTextField extends JTextField implements JopDynamic,
}
public int getColorIntensity() {
return colorIntensity;
}
}
public void setFillColor( int fillColor) {
this.fillColor = fillColor;
this.originalFillColor = fillColor;
}
public void resetFillColor() {
fillColor = originalFillColor;
}
public int getFillColor() {
return fillColor;
}
......@@ -176,199 +255,21 @@ public class GeTextField extends JTextField implements JopDynamic,
if ( en.isInstance())
dd.setInstance( en.getInstance());
dd.connect();
String attrName;
if (dd.data[0] != null) {
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.setFormat( dd.data[1]);
}
}
}
if (dd.data[3] != null && dd.data[4] != null) {
try {
minValue = Float.parseFloat( dd.data[3]);
maxValue = Float.parseFloat( dd.data[4]);
}
catch(NumberFormatException ex) {
minValue = 0;
maxValue = 0;
}
}
else {
minValue = 0;
maxValue = 0;
}
if ( dd.data[2] != null) {
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[2]);
}
}
}
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, fillColor);
setBackground( normalColor);
}
public void dynamicClose() {
if ( dd.attrFound[0])
en.gdh.unrefObjectInfo( dd.subid[0]);
if ( dd.attrFound[1])
en.gdh.unrefObjectInfo( dd.subid[1]);
dd.disconnect();
}
public void dynamicUpdate( boolean animationOnly) {
if ( animationOnly)
return;
if ( !dd.attrFound[0] || focus)
if ( animationOnly || focus)
return;
boolean repaintNow = false;
if ( dd.typeId[0] == Pwr.eType_Float32) {
float value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0]) {
sb = dd.format( value0, sb);
setText(new String(sb));
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_Int32 ||
dd.typeId[0] == Pwr.eType_UInt32 ||
dd.typeId[0] == Pwr.eType_Int16 ||
dd.typeId[0] == Pwr.eType_UInt16 ||
dd.typeId[0] == Pwr.eType_Int8 ||
dd.typeId[0] == Pwr.eType_UInt8) {
int value0 = en.gdh.getObjectRefInfoInt( dd.p[0]);
if ( value0 != dd.oldValueI) {
sb = dd.format( value0, sb);
setText(new String(sb));
repaintNow = true;
dd.oldValueI = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_String) {
String value0 = en.gdh.getObjectRefInfoString( dd.p[0], dd.typeId[0]);
if ( dd.oldValueS == null || value0.compareTo( dd.oldValueS) != 0) {
sb = dd.format( value0, sb);
setText(new String(sb));
repaintNow = true;
dd.oldValueS = value0;
}
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
normalColor = GeColor.getColor( fillColor, colorTone, colorShift,
colorIntensity, colorBrightness, colorInverse, GeColor.NO_COLOR);
setBackground( normalColor);
dd.scan();
}
}
if ( repaintNow)
// repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
// if ( valueAttr < alarmLimitLow || valueAttr > alarmLimitHigh)
// setBackground( alarmColor);
// else
// setBackground( normalColor);
}
void newValueEvent(ActionEvent e) {
String text = this.getText();
PwrtStatus sts;
try {
if ( dd.typeId[0] == Pwr.eType_Float32) {
float inputValue = Float.parseFloat( text );
dd.oldValueF[0] = inputValue;
if ( minValue == 0 && maxValue == 0) {
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else {
if ( inputValue >= minValue && inputValue <= maxValue ) {
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + attrName + " " + sts);
}
else
dd.oldValueF[0] = -10000;
}
}
else if ( dd.typeId[0] == Pwr.eType_Int32 ||
dd.typeId[0] == Pwr.eType_UInt32 ||
dd.typeId[0] == Pwr.eType_Int16 ||
dd.typeId[0] == Pwr.eType_UInt16 ||
dd.typeId[0] == Pwr.eType_Int8 ||
dd.typeId[0] == Pwr.eType_UInt8) {
int inputValue = Integer.parseInt( text, 10);
dd.oldValueI = inputValue;
if ( minValue == 0 && maxValue == 0) {
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else {
if ( inputValue >= minValue && inputValue <= maxValue ) {
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else
dd.oldValueI = -10000;
}
}
else if ( dd.typeId[0] == Pwr.eType_String) {
dd.oldValueS = text;
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, text);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
}
catch(NumberFormatException ex) {
System.out.println( ex.toString() );
}
this.getParent().requestFocus();
}
void keyPressedEvent(KeyEvent e) {
......@@ -386,44 +287,37 @@ public class GeTextField extends JTextField implements JopDynamic,
undoKey = text;
}
public float getMaxValue() {
return maxValue;
}
public void repaintForeground() {
Graphics g = getGraphics();
if ( g == null) {
System.out.println("repaintForeground: can't get Graphic object");
return;
}
public void setMaxValue(float maxValue) {
this.maxValue = maxValue;
// if ( dd.invisible && !dd.invisibleOld) {
// setVisible( false);
// dd.invisibleOld = dd.invisible;
// }
// else if ( !dd.invisible && dd.invisibleOld) {
// setVisible( true);
// dd.invisibleOld = dd.invisible;
// }
paintComponent(g);
paintChildren(g);
}
}
public float getMinValue() {
return minValue;
}
public void setMinValue(float minValue) {
this.minValue = minValue;
}
public float getAlarmLimitHigh() {
return alarmLimitHigh;
}
public void setAlarmLimitHigh(float alarmLimitHigh) {
this.alarmLimitHigh = alarmLimitHigh;
}
public float getAlarmLimitLow() {
return alarmLimitLow;
}
public void setAlarmLimitLow(float alarmLimitLow) {
this.alarmLimitLow = alarmLimitLow;
}
public Color getAlarmColor() {
return alarmColor;
}
public void setAlarmColor(Color alarmColor) {
this.alarmColor = alarmColor;
}
}
......@@ -8,23 +8,18 @@ import javax.swing.Timer;
import java.awt.event.*;
import jpwr.rt.*;
public class JopBar extends JComponent implements JopDynamic, ActionListener{
public class JopBar extends JComponent implements GeComponentIfc,
JopDynamic, JopConfirm, ActionListener{
Dimension size;
Timer timer = new Timer(500, this);
Object root;
JopSession session;
JopEngine en;
public JopBar()
public GeDyn dd = new GeDyn( this);
public JopBar( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.session = session;
dd.setSession( session);
size = new Dimension( 102, 36);
timer.start();
......@@ -49,8 +44,63 @@ public class JopBar extends JComponent implements JopDynamic, ActionListener{
if ( engine_found) {
timer.stop();
timer = null;
if ( dd.actionType != 0 && en.gdh.isAuthorized( dd.access)) {
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Up, e);
}
public void mousePressed(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Down, e);
}
public void mouseClicked(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Click, e);
}
});
}
}
}
public void confirmNo() {}
public void confirmYes() {
PwrtStatus sts;
String attrName;
dd.confirmedAction( GeDyn.eEvent_MB1Click, null);
}
// GeComponents Ifc
public void tsetFillColor( int fillColor) {}
public void tsetColorTone( int colorTone) {}
public void tsetBorderColor( int borderColor) {}
public void tsetTextColor( int borderColor) {}
public void setColorInverse( int colorInverse) {}
public void resetFillColor() {}
public void resetColorTone() {}
public void resetBorderColor() {}
public void resetTextColor() {}
public String getAnnot1() { return new String();}
public void setAnnot1( String s) {}
public void setLastPage() {}
public void setFirstPage() {}
public void setPage( int page) {}
public int setNextPage() { return 1;}
public int setPreviousPage() { return 1;}
public Object getDd() { return dd;}
public void setFillLevel( float fillLevel) {}
public void setLevelDirection( int levelDirection) {}
public void setLevelColorTone( int levelColorTone) {}
public void setLevelFillColor( int levelFillColor) {}
int fillColor = 9999;
int borderColor = 9999;
int fillColorBar = 9999;
......@@ -244,11 +294,21 @@ public class JopBar extends JComponent implements JopDynamic, ActionListener{
((Line2D.Float )shapes[2]).setLine( x, y + height - bar_height, x + width,
y + height - bar_height);
}
repaint();
// repaint();
repaintForeground();
valueColorOld = valueColor;
}
}
if ( firstScan)
firstScan = false;
}
public void repaintForeground() {
Graphics g = getGraphics();
if ( g == null) {
System.out.println("repaintForeground: can't get Graphic object");
return;
}
paintComponent(g);
paintChildren(g);
}
}
......@@ -2,4 +2,5 @@ package jpwr.jop;
public interface JopConfirm {
public void confirmYes();
public void confirmNo();
}
......@@ -34,6 +34,7 @@ public class JopConfirmDialog {
public void actionPerformed( ActionEvent ev) {
// dia.hide();
// dia.setVisible( false);
((JopConfirm) par).confirmNo();
dia.dispose();
// dia = null;
}
......@@ -43,6 +44,7 @@ public class JopConfirmDialog {
public void actionPerformed( ActionEvent ev) {
// dia.hide();
// dia.setVisible( false);
((JopConfirm) par).confirmNo();
dia.dispose();
// dia = null;
}
......@@ -64,3 +66,4 @@ public class JopConfirmDialog {
}
}
}
......@@ -8,25 +8,20 @@ import javax.swing.Timer;
import java.awt.event.*;
import jpwr.rt.*;
public class JopTrend extends JComponent implements JopDynamic, ActionListener{
public class JopTrend extends JComponent implements GeComponentIfc,
JopDynamic, JopConfirm, ActionListener{
Dimension size;
Timer timer = new Timer(500, this);
Object root;
JopSession session;
JopEngine en;
public JopTrend()
public GeDyn dd = new GeDyn( this);
public JopTrend( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.session = session;
size = new Dimension( 102, 36);
timer.start();
dd.setSession( session);
}
public void actionPerformed(ActionEvent e) {
......@@ -48,8 +43,63 @@ public class JopTrend extends JComponent implements JopDynamic, ActionListener{
if ( engine_found) {
timer.stop();
timer = null;
if ( dd.actionType != 0 && en.gdh.isAuthorized( dd.access)) {
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Up, e);
}
public void mousePressed(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Down, e);
}
public void mouseClicked(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Click, e);
}
});
}
}
}
public void confirmNo() {}
public void confirmYes() {
PwrtStatus sts;
String attrName;
dd.confirmedAction( GeDyn.eEvent_MB1Click, null);
}
// GeComponents Ifc
public void tsetFillColor( int fillColor) {}
public void tsetColorTone( int colorTone) {}
public void tsetBorderColor( int borderColor) {}
public void tsetTextColor( int textColor) {}
public void setColorInverse( int colorInverse) {}
public void resetFillColor() {}
public void resetColorTone() {}
public void resetBorderColor() {}
public void resetTextColor() {}
public String getAnnot1() { return new String();}
public void setAnnot1( String s) {}
public void setLastPage() {}
public void setFirstPage() {}
public void setPage( int page) {}
public int setNextPage() { return 1;}
public int setPreviousPage() { return 1;}
public Object getDd() { return dd;}
public void setFillLevel( float fillLevel) {}
public void setLevelDirection( int levelDirection) {}
public void setLevelColorTone( int levelColorTone) {}
public void setLevelFillColor( int levelFillColor) {}
int fillColor = 9999;
int borderColor = 9999;
int[] fillColorTrend = {9999, 9999};
......@@ -361,8 +411,17 @@ public class JopTrend extends JComponent implements JopDynamic, ActionListener{
}
}
repaint();
// paintForeground();
if ( firstScan)
firstScan = false;
}
public void repaintForeground() {
Graphics g = getGraphics();
if ( g == null) {
System.out.println("repaintForeground: can't get Graphic object");
return;
}
paintComponent(g);
paintChildren(g);
}
}
......@@ -8,4 +8,5 @@ public class Ge {
public static final int DIRECTION_LEFT = 2;
public static final int DIRECTION_UP = 3;
public static final int DIRECTION_DOWN = 4;
public static final float cJBean_Offset = 2;
}
......@@ -4,18 +4,89 @@ import java.awt.*;
public class GeColor {
// Color tones
public static final int COLOR_TONE_NO = 0;
public static final int COLOR_TONE_GRAY = 1;
public static final int COLOR_TONE_YELLOW = 2;
public static final int COLOR_TONE_GOLD = 3;
public static final int COLOR_TONE_ORANGE = 4;
public static final int COLOR_TONE_RED = 5;
public static final int COLOR_TONE_MAGENTA = 6;
public static final int COLOR_TONE_BLUE = 7;
public static final int COLOR_TONE_SEABLUE = 8;
public static final int COLOR_TONE_GREEN = 9;
public static final int COLOR_TONE_DARKGRAY = 10;
public static final int COLOR_TONE_MAX = 10;
public static final int COLOR_TONE_NO = 0;
public static final int COLOR_TONE_GRAY = 1;
public static final int COLOR_TONE_YELLOWGREEN = 2;
public static final int COLOR_TONE_YELLOW = 3;
public static final int COLOR_TONE_ORANGE = 4;
public static final int COLOR_TONE_RED = 5;
public static final int COLOR_TONE_MAGENTA = 6;
public static final int COLOR_TONE_BLUE = 7;
public static final int COLOR_TONE_SEABLUE = 8;
public static final int COLOR_TONE_GREEN = 9;
public static final int COLOR_TONE_DARKGRAY = 10;
public static final int COLOR_TONE_DARKYELLOWGREEN = 11;
public static final int COLOR_TONE_DARKYELLOW = 12;
public static final int COLOR_TONE_DARKORANGE = 13;
public static final int COLOR_TONE_DARKRED = 14;
public static final int COLOR_TONE_DARKMAGENTA = 15;
public static final int COLOR_TONE_DARKBLUE = 16;
public static final int COLOR_TONE_DARKSEABLUE = 17;
public static final int COLOR_TONE_DARKGREEN = 18;
public static final int COLOR_TONE_LIGHTGRAY = 19;
public static final int COLOR_TONE_LIGHTYELLOWGREEN = 20;
public static final int COLOR_TONE_LIGHTYELLOW = 21;
public static final int COLOR_TONE_LIGHTORANGE = 22;
public static final int COLOR_TONE_LIGHTRED = 23;
public static final int COLOR_TONE_LIGHTMAGENTA = 24;
public static final int COLOR_TONE_LIGHTBLUE = 25;
public static final int COLOR_TONE_LIGHTSEABLUE = 26;
public static final int COLOR_TONE_LIGHTGREEN = 27;
public static final int COLOR_TONE_GRAYHIGHSATURATION = 28;
public static final int COLOR_TONE_YELLOWGREENHIGHSATURATION = 29;
public static final int COLOR_TONE_YELLOWHIGHSATURATION = 30;
public static final int COLOR_TONE_ORANGEHIGHSATURATION = 31;
public static final int COLOR_TONE_REDHIGHSATURATION = 32;
public static final int COLOR_TONE_MAGENTAHIGHSATURATION = 33;
public static final int COLOR_TONE_BLUEHIGHSATURATION = 34;
public static final int COLOR_TONE_SEABLUEHIGHSATURATION = 35;
public static final int COLOR_TONE_GREENHIGHSATURATION = 36;
public static final int COLOR_TONE_DARKGRAYHIGHSATURATION = 37;
public static final int COLOR_TONE_DARKYELLOWGREENHIGHSATURATION = 38;
public static final int COLOR_TONE_DARKYELLOWHIGHSATURATION = 39;
public static final int COLOR_TONE_DARKORANGEHIGHSATURATION = 40;
public static final int COLOR_TONE_DARKREDHIGHSATURATION = 41;
public static final int COLOR_TONE_DARKMAGENTAHIGHSATURATION = 42;
public static final int COLOR_TONE_DARKBLUEHIGHSATURATION = 43;
public static final int COLOR_TONE_DARKSEABLUEHIGHSATURATION = 44;
public static final int COLOR_TONE_DARKGREENHIGHSATURATION = 45;
public static final int COLOR_TONE_LIGHTGRAYHIGHSATURATION = 46;
public static final int COLOR_TONE_LIGHTYELLOWGREENHIGHSATURATION = 47;
public static final int COLOR_TONE_LIGHTYELLOWHIGHSATURATION = 48;
public static final int COLOR_TONE_LIGHTORANGEHIGHSATURATION = 49;
public static final int COLOR_TONE_LIGHTREDHIGHSATURATION = 50;
public static final int COLOR_TONE_LIGHTMAGENTAHIGHSATURATION = 51;
public static final int COLOR_TONE_LIGHTBLUEHIGHSATURATION = 52;
public static final int COLOR_TONE_LIGHTSEABLUEHIGHSATURATION = 53;
public static final int COLOR_TONE_LIGHTGREENHIGHSATURATION = 54;
public static final int COLOR_TONE_GRAYLOWSATURATION = 55;
public static final int COLOR_TONE_YELLOWGREENLOWSATURATION = 56;
public static final int COLOR_TONE_YELLOWLOWSATURATION = 57;
public static final int COLOR_TONE_ORANGELOWSATURATION = 58;
public static final int COLOR_TONE_REDLOWSATURATION = 59;
public static final int COLOR_TONE_MAGENTALOWSATURATION = 60;
public static final int COLOR_TONE_BLUELOWSATURATION = 61;
public static final int COLOR_TONE_SEABLUELOWSATURATION = 62;
public static final int COLOR_TONE_GREENLOWSATURATION = 63;
public static final int COLOR_TONE_DARKGRAYLOWSATURATION = 64;
public static final int COLOR_TONE_DARKYELLOWGREENLOWSATURATION = 65;
public static final int COLOR_TONE_DARKYELLOWLOWSATURATION = 66;
public static final int COLOR_TONE_DARKORANGELOWSATURATION = 67;
public static final int COLOR_TONE_DARKREDLOWSATURATION = 68;
public static final int COLOR_TONE_DARKMAGENTALOWSATURATION = 69;
public static final int COLOR_TONE_DARKBLUELOWSATURATION = 70;
public static final int COLOR_TONE_DARKSEABLUELOWSATURATION = 71;
public static final int COLOR_TONE_DARKGREENLOWSATURATION = 72;
public static final int COLOR_TONE_LIGHTGRAYLOWSATURATION = 73;
public static final int COLOR_TONE_LIGHTYELLOWGREENLOWSATURATION = 74;
public static final int COLOR_TONE_LIGHTYELLOWLOWSATURATION = 75;
public static final int COLOR_TONE_LIGHTORANGELOWSATURATION = 76;
public static final int COLOR_TONE_LIGHTREDLOWSATURATION = 77;
public static final int COLOR_TONE_LIGHTMAGENTALOWSATURATION = 78;
public static final int COLOR_TONE_LIGHTBLUELOWSATURATION = 79;
public static final int COLOR_TONE_LIGHTSEABLUELOWSATURATION = 80;
public static final int COLOR_TONE_LIGHTGREENLOWSATURATION = 81;
public static final int COLOR_TONE_MAX = 81;
public static final int COLOR_BLACK = 0;
public static final int COLOR_RED = 1;
......@@ -121,151 +192,430 @@ public class GeColor {
public static final int COLOR_98 = 97;
public static final int COLOR_99 = 98;
public static final int COLOR_100 = 99;
public static final int COLOR_101 = 100;
public static final int COLOR_102 = 101;
public static final int COLOR_103 = 102;
public static final int COLOR_104 = 103;
public static final int COLOR_105 = 104;
public static final int COLOR_106 = 105;
public static final int COLOR_107 = 106;
public static final int COLOR_108 = 107;
public static final int COLOR_109 = 108;
public static final int COLOR_110 = 109;
public static final int COLOR_111 = 110;
public static final int COLOR_112 = 111;
public static final int COLOR_113 = 112;
public static final int COLOR_114 = 113;
public static final int COLOR_115 = 114;
public static final int COLOR_116 = 115;
public static final int COLOR_117 = 116;
public static final int COLOR_118 = 117;
public static final int COLOR_119 = 118;
public static final int COLOR_120 = 119;
public static final int COLOR_121 = 120;
public static final int COLOR_122 = 121;
public static final int COLOR_123 = 122;
public static final int COLOR_124 = 123;
public static final int COLOR_125 = 124;
public static final int COLOR_126 = 125;
public static final int COLOR_127 = 126;
public static final int COLOR_128 = 127;
public static final int COLOR_129 = 128;
public static final int COLOR_130 = 129;
public static final int COLOR_131 = 130;
public static final int COLOR_132 = 131;
public static final int COLOR_133 = 132;
public static final int COLOR_134 = 133;
public static final int COLOR_135 = 134;
public static final int COLOR_136 = 135;
public static final int COLOR_137 = 136;
public static final int COLOR_138 = 137;
public static final int COLOR_139 = 138;
public static final int COLOR_140 = 139;
public static final int COLOR_141 = 140;
public static final int COLOR_142 = 141;
public static final int COLOR_143 = 142;
public static final int COLOR_144 = 143;
public static final int COLOR_145 = 144;
public static final int COLOR_146 = 145;
public static final int COLOR_147 = 146;
public static final int COLOR_148 = 147;
public static final int COLOR_149 = 148;
public static final int COLOR_150 = 149;
public static final int COLOR_151 = 150;
public static final int COLOR_152 = 151;
public static final int COLOR_153 = 152;
public static final int COLOR_154 = 153;
public static final int COLOR_155 = 154;
public static final int COLOR_156 = 155;
public static final int COLOR_157 = 156;
public static final int COLOR_158 = 157;
public static final int COLOR_159 = 158;
public static final int COLOR_160 = 159;
public static final int COLOR_161 = 160;
public static final int COLOR_162 = 161;
public static final int COLOR_163 = 162;
public static final int COLOR_164 = 163;
public static final int COLOR_165 = 164;
public static final int COLOR_166 = 165;
public static final int COLOR_167 = 166;
public static final int COLOR_168 = 167;
public static final int COLOR_169 = 168;
public static final int COLOR_170 = 169;
public static final int COLOR_171 = 170;
public static final int COLOR_172 = 171;
public static final int COLOR_173 = 172;
public static final int COLOR_174 = 173;
public static final int COLOR_175 = 174;
public static final int COLOR_176 = 175;
public static final int COLOR_177 = 176;
public static final int COLOR_178 = 177;
public static final int COLOR_179 = 178;
public static final int COLOR_180 = 179;
public static final int COLOR_181 = 180;
public static final int COLOR_182 = 181;
public static final int COLOR_183 = 182;
public static final int COLOR_184 = 183;
public static final int COLOR_185 = 184;
public static final int COLOR_186 = 185;
public static final int COLOR_187 = 186;
public static final int COLOR_188 = 187;
public static final int COLOR_189 = 188;
public static final int COLOR_190 = 189;
public static final int COLOR_191 = 190;
public static final int COLOR_192 = 191;
public static final int COLOR_193 = 192;
public static final int COLOR_194 = 193;
public static final int COLOR_195 = 194;
public static final int COLOR_196 = 195;
public static final int COLOR_197 = 196;
public static final int COLOR_198 = 197;
public static final int COLOR_199 = 198;
public static final int COLOR_200 = 199;
public static final int COLOR_201 = 200;
public static final int COLOR_202 = 201;
public static final int COLOR_203 = 202;
public static final int COLOR_204 = 203;
public static final int COLOR_205 = 204;
public static final int COLOR_206 = 205;
public static final int COLOR_207 = 206;
public static final int COLOR_208 = 207;
public static final int COLOR_209 = 208;
public static final int COLOR_210 = 209;
public static final int COLOR_211 = 210;
public static final int COLOR_212 = 211;
public static final int COLOR_213 = 212;
public static final int COLOR_214 = 213;
public static final int COLOR_215 = 214;
public static final int COLOR_216 = 215;
public static final int COLOR_217 = 216;
public static final int COLOR_218 = 217;
public static final int COLOR_219 = 218;
public static final int COLOR_220 = 219;
public static final int COLOR_221 = 220;
public static final int COLOR_222 = 221;
public static final int COLOR_223 = 222;
public static final int COLOR_224 = 223;
public static final int COLOR_225 = 224;
public static final int COLOR_226 = 225;
public static final int COLOR_227 = 226;
public static final int COLOR_228 = 227;
public static final int COLOR_229 = 228;
public static final int COLOR_230 = 229;
public static final int COLOR_231 = 230;
public static final int COLOR_232 = 231;
public static final int COLOR_233 = 232;
public static final int COLOR_234 = 233;
public static final int COLOR_235 = 234;
public static final int COLOR_236 = 235;
public static final int COLOR_237 = 236;
public static final int COLOR_238 = 237;
public static final int COLOR_239 = 238;
public static final int COLOR_240 = 239;
public static final int COLOR_241 = 240;
public static final int COLOR_242 = 241;
public static final int COLOR_243 = 242;
public static final int COLOR_244 = 243;
public static final int COLOR_245 = 244;
public static final int COLOR_246 = 245;
public static final int COLOR_247 = 246;
public static final int COLOR_248 = 247;
public static final int COLOR_249 = 248;
public static final int COLOR_250 = 249;
public static final int COLOR_251 = 250;
public static final int COLOR_252 = 251;
public static final int COLOR_253 = 252;
public static final int COLOR_254 = 253;
public static final int COLOR_255 = 254;
public static final int COLOR_256 = 255;
public static final int COLOR_257 = 256;
public static final int COLOR_258 = 257;
public static final int COLOR_259 = 258;
public static final int COLOR_260 = 259;
public static final int COLOR_261 = 260;
public static final int COLOR_262 = 261;
public static final int COLOR_263 = 262;
public static final int COLOR_264 = 263;
public static final int COLOR_265 = 264;
public static final int COLOR_266 = 265;
public static final int COLOR_267 = 266;
public static final int COLOR_268 = 267;
public static final int COLOR_269 = 268;
public static final int COLOR_270 = 269;
public static final int COLOR_271 = 270;
public static final int COLOR_272 = 271;
public static final int COLOR_273 = 272;
public static final int COLOR_274 = 273;
public static final int COLOR_275 = 274;
public static final int COLOR_276 = 275;
public static final int COLOR_277 = 276;
public static final int COLOR_278 = 277;
public static final int COLOR_279 = 278;
public static final int COLOR_280 = 279;
public static final int COLOR_281 = 280;
public static final int COLOR_282 = 281;
public static final int COLOR_283 = 282;
public static final int COLOR_284 = 283;
public static final int COLOR_285 = 284;
public static final int COLOR_286 = 285;
public static final int COLOR_287 = 286;
public static final int COLOR_288 = 287;
public static final int COLOR_289 = 288;
public static final int COLOR_290 = 289;
public static final int COLOR_291 = 290;
public static final int COLOR_292 = 291;
public static final int COLOR_293 = 292;
public static final int COLOR_294 = 293;
public static final int COLOR_295 = 294;
public static final int COLOR_296 = 295;
public static final int COLOR_297 = 296;
public static final int COLOR_298 = 297;
public static final int COLOR_299 = 298;
public static final int COLOR_300 = 299;
public static final int COLOR_INHERIT = 9999;
public static final int COLOR_NO = 10000;
static final double colorValues[] = {
0, 0, 0, // 4 Black
1, 0.2, 0.2, // 4 Red
0.7, 0.7, 0.7, // 4 Gray
1, 1, 1, // 4 White
0, 0.8714, 0.2857, // 5 SpringGreen3
1, 1, 0, // 6 Yellow
0.2879, 0.4945, 0.9067, // 7 SteelBlue3
0.593, 0, 0.6421, // 8 Magenta3
0.270, 0.270, 0.270, // 9 Grey
0.160, 0.160, 0.160, // 10 Grey
// Grey
0.950, 0.950, 0.950, // 1 Grey
0.900, 0.900, 0.900, // 2 Grey
0.850, 0.850, 0.850, // 3 Grey
0.700, 0.700, 0.700, // 4 Grey93
0.500, 0.500, 0.500, // 5 Grey80
0.935, 0.935, 0.935, // 6 Grey68
0.880, 0.880, 0.880, // 7 Grey48
0.750, 0.750, 0.750, // 8 Grey35
0.550, 0.550, 0.550, // 9 Grey
0.350, 0.350, 0.350, // 10 Grey
1, 1, 0.878, // 1 LightYellow0
1, 1, 0.640, // 2 LightYellow1
0.900, 0.900, 0.500, // 3 LightYellow2
0.804, 0.804, 0.400, // 4 LightYellow3
0.545, 0.545, 0.300, // 5 LightYellow4
1, 1, 0.300, // 6 yellow0
1, 1, 0, // 7 yellow1
0.933, 0.933, 0, // 8 yellow2
0.804, 0.804, 0, // 9 yellow3
0.545, 0.545, 0, // 10 yellow4
1, 0.970, 0.800, // 1 Lightgoldenrod0
1, 0.925, 0.545, // 2 Lightgoldenrod1
0.933, 0.862, 0.510, // 3 Lightgoldenrod2
0.804, 0.745, 0.439, // 4 Lightgoldenrod3
0.545, 0.506, 0.298, // 5 Lightgoldenrod4
1, 0.930, 0.500, // 6 gold00
1, 0.843, 0, // 7 gold1
0.933, 0.788, 0, // 8 gold2
0.804, 0.678, 0, // 9 gold3
0.545, 0.459, 0, // 10 gold4
1, 0.941, 0.800, // 1 LightOrange (Modified)
0.950, 0.870, 0.678, // 2 NavajoWhite
0.900, 0.628, 0.478, // 3 LightSalmon1
0.804, 0.506, 0.384, // 4 LightSalmon3
0.545, 0.341, 0.259, // 5 LightSalmon4
1, 0.850, 0.550, // 6 DarkOrange (Modified)
1, 0.650, 0.300, // 7 DarkOrange (Modified)
1, 0.498, 0, // 8 DarkOrange1
0.804, 0.400, 0, // 9 DarkOrange3
0.545, 0.153, 0, // 10 DarkOrange4
1, 0.894, 0.867, // 1 MistyRose1
0.933, 0.835, 0.823, // 2 MistyRose2
0.933, 0.682, 0.725, // 3 LightPink (Modified)
0.804, 0.547, 0.584, // 4 LightPink3
0.545, 0.357, 0.396, // 5 LightPink4
1, 0.733, 0.733, // 6 IndianRed0 (Modified)
1, 0.415, 0.415, // 7 IndianRed1
1, 0.188, 0.188, // 8 firebrick1
0.804, 0.149, 0.149, // 9 firebrick3
0.545, 0.102, 0.102, // 10 firebrick4
1, 0.890, 1, // 1 Plum1 (Modified)
1, 0.733, 1, // 2 Plum1
0.933, 0.682, 0.933, // 3 Plum2
0.804, 0.588, 0.804, // 4 Plum3
0.545, 0.400, 0.545, // 5 Plum4
1, 0.800, 1, // 6 Magenta00 (Mofified)
1, 0.500, 1, // 7 Magenta0 (Modified)
1, 0, 1, // 8 Magenta1
0.804, 0, 0.804, // 9 Magenta3
0.545, 0, 0.545, // 10 Magenta4
0.829, 0.919, 1, // 1 LightSteelBlue1 (Modified)
0.792, 0.882, 1, // 2 LightSteelBlue1
0.737, 0.823, 0.933, // 3 LightSteelBlue2
0.635, 0.710, 0.804, // 4 LightSteelBlue3
0.431, 0.482, 0.545, // 5 LightSteelBlue4
0.829, 0.919, 1, // 6 LightCyan
0.690, 0.878, 0.902, // 7 Powder blue
0.388, 0.722, 1, // 8 SteelBlue1
0.275, 0.510, 0.706, // 9 SteelBlue
0, 0, 0.545, // 10 blue4
// Bluegreen
0.700, 0.960, 0.900, // 1 aquamarine4 (Modified)
0.600, 0.930, 0.850, // 2 aquamarine4
0.463, 0.900, 0.700, // 3 aquamarine4
0.400, 0.804, 0.667, // 4 aquamarine4
0.271, 0.545, 0.455, // 5 aquamarine4
0.600, 1, 0.950, // 6 turqoise
0, 0.930, 0.930, // 7 turqoise
0, 0.870, 0.720, // 8 turqoise
0, 0.700, 0.500, // 9 turqoise
0, 0.500, 0.300, // 10 turqoise
0.829, 1, 0.7, // 1 DarkOliveGreen1 (Modified)
0.737, 0.933, 0.408, // 2 DarkOliveGreen2
0.635, 0.804, 0.353, // 3 DarkOliveGreen3
0.520, 0.700, 0.275, // 4 DarkOliveGreen4
0.333, 0.420, 0.184, // 5 DarkOliveGreen
0.698, 1, 0.400, // 6 chartreuse
0.463, 0.933, 0, // 7 chartreuse2
0.4, 0.804, 0, // 8 chartreuse3
0.27, 0.545, 0, // 9 chartreuse4
0, 0.392, 0}; // 10 DarkGreen
static Color[] colors = new Color[100];
1, 1, 1}; // 4 White
static Color[] colors = new Color[300];
public static final int NO_COLOR = 9999;
public static final int NO_TONE = 0;
public static Color getColor( int idx, int default_color) {
if ( default_color < 100)
{
if ( default_color < 300) {
// System.out.println("Using default color");
idx = default_color;
}
// System.out.println("Using ge color");
if ( idx < 0 || idx > 99)
if ( idx < 0 || idx > 299)
idx = 1;
if ( colors[idx] == null)
colors[idx] = new Color( (int)(colorValues[3*idx] * 255),
colors[idx] = rgbColor( idx);
return colors[idx];
}
static public class Rgb {
public Rgb() {}
double r;
double g;
double b;
}
static Rgb hisToRgb( double h, double i, double s) {
double m1, m2, i1;
m1 = s * Math.sin( h * Math.PI/180);
m2 = s * Math.cos( h * Math.PI/180);
i1 = i / Math.sqrt(3);
Rgb rgb = new Rgb();
rgb.r = m1 * 2 / Math.sqrt(6) + i1 / Math.sqrt(3);
rgb.g = - m1 / Math.sqrt(6) + m2 / Math.sqrt(2) + i1 / Math.sqrt(3);
rgb.b = - m1 / Math.sqrt(6) - m2 / Math.sqrt(2) + i1 / Math.sqrt(3);
rgb.r = rgb.r / 2 + 0.5;
rgb.g = rgb.g / 2 + 0.5;
rgb.b = rgb.b / 2 + 0.5;
if ( rgb.r > 1) rgb.r = 1;
if ( rgb.r < 0) rgb.r = 0;
if ( rgb.g > 1) rgb.g = 1;
if ( rgb.g < 0) rgb.g = 0;
if ( rgb.b > 1) rgb.b = 1;
if ( rgb.b < 0) rgb.b = 0;
return rgb;
}
static final double rgbTab[] = {
0.254, 0.329, 0, // YellowGreen
0.357, 0.459, 0,
0.498, 0.639, 0,
0.624, 0.800, 0,
0.764, 0.976, 0,
0.808, 1.000, 0.129,
0.847, 1.000, 0.310,
0.898, 1.000, 0.537,
0.933, 1.000, 0.710,
0.949, 1.000, 0.776,
0., 0., 0, // Yellow
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0, // Orange
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
0., 0., 0,
1.000, 0.725, 0.420,
1.000, 0.796, 0.569,
1.000, 0.886, 0.667,
1.000, 0.937, 0.820};
static final double ctab[] = {
18, -20.0, 0.2, -1.4, 2.8, .9, 0.5, -1.4, 3, .9, 1.5, -3.5, 5.0, 1.0, // YellowGreen
28, 10.0, 0.2, -1.4, 2.8, .9, 0.5, -1.4, 3, .9, 1.5, -3.5, 5.0, 1.0, // Yellow
45, 20.0, 0.2, -1.3, 2.8, .9, 0.5, -1.3, 3, .9, 1.5, -3.5, 4.5, 1.0, // Orange
90, 0.0, 0.2, -1.1, 2.8, .9, 0.5, -1.1, 3, .9, 1.5, -4.5, 4.5, 1.0, // Red
150, 0.0, 0.2, -1., 2.8, .9, 0.5, -1., 3, .9, 1.5, -3.5, 5.9, 1.0, // Violet
240, 0.0, 0.2, -1., 2.8, .9, 0.4, -1., 3, .9, 1.5, -3.5, 5.5, 1.0, // Blue
280, 0.0, 0.2, -1., 2.8, .9, 0.4, -1., 3, .9, 1.5, -3.5, 5.5, 1.0, // Seablue
355, -20.0, 0.2, -1., 2.8, .9, 0.4, -1., 3, .9, 1.5, -4.5, 3.5, 1.0}; // Green
public static Color rgbColor( int idx) {
double gray_i0 = 0.32;
double gray_i1 = 0.95;
double h1, i1, s1;
double r, g, b;
int i, j, k;
Rgb rgb;
Color color = null;
if ( idx < 4)
color = new Color( (int)(colorValues[3*idx] * 255),
(int)(colorValues[3*idx + 1] * 255),
(int)(colorValues[3*idx + 2] * 255));
return colors[idx];
else if ( idx < 20) {
h1 = 360. * (idx - 4) / 16;
s1 = 1.5;
i1 = 1;
rgb = hisToRgb( h1, i1, s1);
color = new Color( (int)(rgb.r * 255), (int)(rgb.g * 255),(int)(rgb.b * 255));
}
else if ( idx < 60) {
int val;
if ( idx < 30 || (50 <= idx && idx < 60))
gray_i0 = 0.25F;
val = (int)( (gray_i0 + (gray_i1 - gray_i0) * Math.pow( (double)(9 - idx % 10) / 9, 0.9)) * 255);
color = new Color( val, val, val);
}
else if ( idx < 300) {
double i_min, i_max, s, a, h, hk;
i = (idx - 60) / 30;
j = (idx - 60 - i * 30) / 10;
k = 9 - (idx - 60 - i * 30 - j * 10 );
h = ctab[i * 14];
hk = ctab[i * 14 + 1];
s = ctab[i*14 + 2 + j*4];
i_min = ctab[i*14 + 2 + j*4 + 1];
i_max = ctab[i*14 + 2 + j*4 + 2];
a = ctab[i*14 + 2 + j*4 + 3];
s1 = s;
i1 = i_min + (i_max - i_min) *
Math.pow((double)k/9, a);
h1 = h + hk * k / 9;
if ( (i == 0 && j == 2) ||
(i == 2 && j == 2 && k > 5)) {
// Formula doesn't work for yellow...
rgb = new Rgb();
rgb.r = rgbTab[ (i * 10 + k) * 3];
rgb.g = rgbTab[ (i * 10 + k) * 3 + 1];
rgb.b = rgbTab[ (i * 10 + k) * 3 + 2];
}
else
rgb = hisToRgb( h1, i1, s1);
color = new Color( (int)(rgb.r * 255), (int)(rgb.g * 255),(int)(rgb.b * 255));
}
return color;
}
public static Color getColor( int local_drawtype, int color_tone, int color_shift,
public static Color shiftColor( int dt, int shift, int color_inverse) {
int incr;
int baseDrawtype;
int drawtype;
if ( color_inverse != 0)
shift = -shift;
if ( dt >= 20) {
baseDrawtype = dt / 10 * 10;
incr = shift + dt - baseDrawtype;
if ( incr < 0)
drawtype = COLOR_4; // White
else if ( incr >= 10)
drawtype = COLOR_30; // DarkGrey
else
drawtype = baseDrawtype + incr;
}
else
drawtype = dt;
if ( colors[drawtype] == null)
colors[drawtype] = rgbColor( drawtype);
return colors[drawtype];
}
public static int getDrawtype( int local_drawtype, int color_tone, int color_shift,
int color_intensity,
int color_brightness, int color_inverse, int default_color) {
int drawtype;
int base_drawtype;
int incr;
int intensity = color_intensity;
int brightness = color_brightness;
if ( default_color == NO_COLOR && color_tone != NO_TONE) {
if ( local_drawtype > 10) {
if ( color_tone == COLOR_TONE_DARKGRAY) {
switch( local_drawtype % 5) {
case 0: drawtype = COLOR_14; break;
case 1: drawtype = COLOR_19; break;
case 2: drawtype = COLOR_15; break;
case 3: drawtype = COLOR_20; break;
default: drawtype = COLOR_9;
}
}
else
drawtype = (local_drawtype - local_drawtype / 10 * 10 +
10 * color_tone);
int tone = color_tone;
if ( local_drawtype > 30) {
if ( tone >= COLOR_TONE_GRAYHIGHSATURATION &&
tone < COLOR_TONE_GRAYLOWSATURATION) {
tone -= 27;
intensity += 2;
}
else if ( color_tone >= COLOR_TONE_GRAYLOWSATURATION) {
tone -= 2 * 27;
intensity -= 1;
}
if ( tone >= COLOR_TONE_DARKGRAY &&
tone < COLOR_TONE_LIGHTGRAY) {
tone -= 9;
brightness -= 2;
}
else if ( color_tone >= COLOR_TONE_LIGHTGRAY) {
tone -= 18;
brightness += 2;
}
drawtype = (local_drawtype - local_drawtype / 30 * 30 +
30 * tone);
}
else
drawtype = local_drawtype;
......@@ -276,63 +626,74 @@ public class GeColor {
else
drawtype = local_drawtype;
if ( color_brightness != 0) {
if ( local_drawtype >= 10) {
base_drawtype = drawtype / 5 * 5;
incr = -color_brightness + drawtype - base_drawtype;
if ( brightness != 0) {
if ( local_drawtype >= 30) {
base_drawtype = drawtype / 10 * 10;
incr = -brightness + drawtype - base_drawtype;
if ( incr < 0)
drawtype = 3; // White
else if ( incr >= 5)
drawtype = 9; // DarkGrey
else if ( incr >= 10)
drawtype = 29; // DarkGrey
else
drawtype = (base_drawtype + incr);
}
}
if ( color_intensity != 0 ) {
if ( drawtype >= 20) {
base_drawtype = drawtype / 10 * 10;
if ( intensity != 0 ) {
if ( drawtype >= 60) {
base_drawtype = drawtype / 30 * 30;
incr = drawtype - base_drawtype;
if ( 0 <= incr && incr < 5) {
if ( color_intensity > 0)
drawtype = ( drawtype + 5);
else
drawtype = ( 15 + incr);
}
else {
if ( color_intensity == -1)
drawtype = ( drawtype - 5);
else if ( color_intensity < 0)
drawtype = ( 15 + incr - 5);
}
drawtype += Math.min( 2 - incr / 10, intensity) * 10;
if ( drawtype < base_drawtype)
drawtype = 40 + incr;
}
}
if ( color_shift != 0) {
if ( drawtype >= 20) {
if ( drawtype >= 60) {
incr = color_shift -
color_shift / 8 * 8;
if ( incr < 0)
incr += 8;
incr = drawtype + incr * 10;
if ( incr >= 100)
incr -= 80;
incr = drawtype + incr * 30;
if ( incr >= 300)
incr -= 240;
drawtype = incr;
}
}
if ( color_inverse == 1)
{
if ( drawtype >= 10)
drawtype = drawtype + 5 - 2 * (drawtype % 5) - 1;
drawtype = drawtype + 10 - 2 * (drawtype % 10) - 1;
}
if ( drawtype < 0 || drawtype >= 100) {
if ( drawtype < 0 || drawtype >= 300) {
System.out.println("** Invalid drawtype");
drawtype = 0;
}
return drawtype;
}
public static Color getColor( int drawtype) {
if ( colors[drawtype] == null)
colors[drawtype] = new Color( (int)(colorValues[3*drawtype] * 255),
(int)(colorValues[3*drawtype + 1] * 255),
(int)(colorValues[3*drawtype + 2] * 255));
colors[drawtype] = rgbColor( drawtype);
return colors[drawtype];
}
public static Color getColor( int local_drawtype, int color_tone, int color_shift,
int color_intensity,
int color_brightness, int color_inverse, int default_color) {
int drawtype = getDrawtype( local_drawtype, color_tone, color_shift, color_intensity,
color_brightness, color_inverse, default_color);
if ( colors[drawtype] == null)
colors[drawtype] = rgbColor( drawtype);
return colors[drawtype];
}
}
......@@ -16,106 +16,306 @@ public class GeColorEditor extends PropertyEditorSupport {
public GeColorEditor() {
}
private static String[] tagStrings = {
"Black",
"Red",
"Gray",
"White",
"SpringGreen",
"Yellow",
"SteelBlue",
"Magenta",
"Grey73",
"Grey84",
"Grey5",
"Grey10",
"Grey15",
"Grey30",
"Grey50",
"Grey7",
"Grey12",
"Grey25",
"Grey45",
"Grey65",
"LightYellow0",
"LightYellow1",
"LightYellow2",
"LightYellow3",
"LightYellow4",
"yellow0",
"yellow1",
"yellow2",
"yellow3",
"yellow4",
"Lightgoldenrod0",
"Lightgoldenrod1",
"Lightgoldenrod2",
"Lightgoldenrod3",
"Lightgoldenrod4",
"gold00",
"gold1",
"gold2",
"gold3",
"gold4",
"LightOrange",
"NavajoWhite",
"LightSalmon1",
"LightSalmon3",
"LightSalmon4",
"DarkOrange",
"DarkOrange0",
"DarkOrange1",
"DarkOrange3",
"DarkOrange4",
"MistyRose1",
"MistyRose2",
"LightPink",
"LightPink3",
"LightPink4",
"IndianRed0",
"IndianRed1",
"firebrick1",
"firebrick3",
"firebrick4",
"Plum1 ",
"Plum1",
"Plum2",
"Plum3",
"Plum4",
"Magenta00",
"Magenta0",
"Magenta1",
"Magenta3",
"Magenta4",
"LightSteelBlue1",
"LightSteelBlue1",
"LightSteelBlue2",
"LightSteelBlue3",
"LightSteelBlue4",
"LightCyan",
"PowderBlue",
"SteelBlue1",
"SteelBlue",
"blue4",
"aquamarine0",
"aquamarine1",
"aquamarine2",
"aquamarine3",
"aquamarine4",
"turqoise0",
"turqoise1",
"turqoise2",
"turqoise3",
"turqoise4",
"DarkOliveGreen1",
"DarkOliveGreen2",
"DarkOliveGreen3",
"DarkOliveGreen4",
"DarkOliveGreen5",
"chartreuse",
"chartreuse2",
"chartreuse3",
"chartreuse4",
"DarkGreen",
/* glow_eDrawType_Line */ "Black",
/* glow_eDrawType_LineRed */ "Red",
/* glow_eDrawType_LineGray */ "Grey",
/* glow_eDrawType_Color4 */ "White",
/* glow_eDrawType_Color5 */ "YellowGreen",
/* glow_eDrawType_Color6 */ "Yellow",
/* glow_eDrawType_Color7 */ "Gold",
/* glow_eDrawType_Color8 */ "Orange",
/* glow_eDrawType_Color9 */ "OrangeRed",
/* glow_eDrawType_Color10 */ "Red",
/* glow_eDrawType_Color11 */ "RedViolet",
/* glow_eDrawType_Color12 */ "Violet",
/* glow_eDrawType_Color13 */ "BlueViolet",
/* glow_eDrawType_Color14 */ "BlueBlueViolet",
/* glow_eDrawType_Color15 */ "Blue",
/* glow_eDrawType_Color16 */ "BlueBlueGreen",
/* glow_eDrawType_Color17 */ "BlueGreen",
/* glow_eDrawType_Color18 */ "GreenGreenBlue",
/* glow_eDrawType_Color19 */ "Green",
/* glow_eDrawType_Color20 */ "GreenGreenYellow",
/* glow_eDrawType_Color21 */ "GrayFix1",
/* glow_eDrawType_Color22 */ "GrayFix2",
/* glow_eDrawType_Color23 */ "GrayFix3",
/* glow_eDrawType_Color24 */ "GrayFix4",
/* glow_eDrawType_Color25 */ "GrayFix5",
/* glow_eDrawType_Color26 */ "GrayFix6",
/* glow_eDrawType_Color27 */ "GrayFix7",
/* glow_eDrawType_Color28 */ "GrayFix8",
/* glow_eDrawType_Color29 */ "GrayFix9",
/* glow_eDrawType_Color30 */ "GrayFix10",
/* glow_eDrawType_Color31 */ "GrayLow1",
/* glow_eDrawType_Color32 */ "GrayLow2",
/* glow_eDrawType_Color33 */ "GrayLow3",
/* glow_eDrawType_Color34 */ "GrayLow4",
/* glow_eDrawType_Color35 */ "GrayLow5",
/* glow_eDrawType_Color36 */ "GrayLow6",
/* glow_eDrawType_Color37 */ "GrayLow7",
/* glow_eDrawType_Color38 */ "GrayLow8",
/* glow_eDrawType_Color39 */ "GrayLow9",
/* glow_eDrawType_Color40 */ "GrayLow10",
/* glow_eDrawType_Color41 */ "GrayMedium1",
/* glow_eDrawType_Color42 */ "GrayMedium2",
/* glow_eDrawType_Color43 */ "GrayMedium3",
/* glow_eDrawType_Color44 */ "GrayMedium4",
/* glow_eDrawType_Color45 */ "GrayMedium5",
/* glow_eDrawType_Color46 */ "GrayMedium6",
/* glow_eDrawType_Color47 */ "GrayMedium7",
/* glow_eDrawType_Color48 */ "GrayMedium8",
/* glow_eDrawType_Color49 */ "GrayMedium9",
/* glow_eDrawType_Color50 */ "GrayMedium10",
/* glow_eDrawType_Color51 */ "GrayHigh1",
/* glow_eDrawType_Color52 */ "GrayHigh2",
/* glow_eDrawType_Color53 */ "GrayHigh3",
/* glow_eDrawType_Color54 */ "GrayHigh4",
/* glow_eDrawType_Color55 */ "GrayHigh5",
/* glow_eDrawType_Color56 */ "GrayHigh6",
/* glow_eDrawType_Color57 */ "GrayHigh7",
/* glow_eDrawType_Color58 */ "GrayHigh8",
/* glow_eDrawType_Color59 */ "GrayHigh9",
/* glow_eDrawType_Color60 */ "GrayHigh10",
/* glow_eDrawType_Color61 */ "YellowGreenLow1",
/* glow_eDrawType_Color62 */ "YellowGreenLow2",
/* glow_eDrawType_Color63 */ "YellowGreenLow3",
/* glow_eDrawType_Color64 */ "YellowGreenLow4",
/* glow_eDrawType_Color65 */ "YellowGreenLow5",
/* glow_eDrawType_Color66 */ "YellowGreenLow6",
/* glow_eDrawType_Color67 */ "YellowGreenLow7",
/* glow_eDrawType_Color68 */ "YellowGreenLow8",
/* glow_eDrawType_Color69 */ "YellowGreenLow9",
/* glow_eDrawType_Color70 */ "YellowGreenLow10",
/* glow_eDrawType_Color71 */ "YellowGreenMedium1",
/* glow_eDrawType_Color72 */ "YellowGreenMedium2",
/* glow_eDrawType_Color73 */ "YellowGreenMedium3",
/* glow_eDrawType_Color74 */ "YellowGreenMedium4",
/* glow_eDrawType_Color75 */ "YellowGreenMedium5",
/* glow_eDrawType_Color76 */ "YellowGreenMedium6",
/* glow_eDrawType_Color77 */ "YellowGreenMedium7",
/* glow_eDrawType_Color78 */ "YellowGreenMedium8",
/* glow_eDrawType_Color79 */ "YellowGreenMedium9",
/* glow_eDrawType_Color80 */ "YellowGreenMedium10",
/* glow_eDrawType_Color81 */ "YellowGreenHigh1",
/* glow_eDrawType_Color82 */ "YellowGreenHigh2",
/* glow_eDrawType_Color83 */ "YellowGreenHigh3",
/* glow_eDrawType_Color84 */ "YellowGreenHigh4",
/* glow_eDrawType_Color85 */ "YellowGreenHigh5",
/* glow_eDrawType_Color86 */ "YellowGreenHigh6",
/* glow_eDrawType_Color87 */ "YellowGreenHigh7",
/* glow_eDrawType_Color88 */ "YellowGreenHigh8",
/* glow_eDrawType_Color89 */ "YellowGreenHigh9",
/* glow_eDrawType_Color90 */ "YellowGreenHigh10",
/* glow_eDrawType_Color91 */ "YellowLow1",
/* glow_eDrawType_Color92 */ "YellowLow2",
/* glow_eDrawType_Color93 */ "YellowLow3",
/* glow_eDrawType_Color94 */ "YellowLow4",
/* glow_eDrawType_Color95 */ "YellowLow5",
/* glow_eDrawType_Color96 */ "YellowLow6",
/* glow_eDrawType_Color97 */ "YellowLow7",
/* glow_eDrawType_Color98 */ "YellowLow8",
/* glow_eDrawType_Color99 */ "YellowLow9",
/* glow_eDrawType_Color100 */ "YellowLow10",
/* glow_eDrawType_Color101 */ "YellowMedium1",
/* glow_eDrawType_Color102 */ "YellowMedium2",
/* glow_eDrawType_Color103 */ "YellowMedium3",
/* glow_eDrawType_Color104 */ "YellowMedium4",
/* glow_eDrawType_Color105 */ "YellowMedium5",
/* glow_eDrawType_Color106 */ "YellowMedium6",
/* glow_eDrawType_Color107 */ "YellowMedium7",
/* glow_eDrawType_Color108 */ "YellowMedium8",
/* glow_eDrawType_Color109 */ "YellowMedium9",
/* glow_eDrawType_Color110 */ "YellowMedium10",
/* glow_eDrawType_Color111 */ "YellowHigh1",
/* glow_eDrawType_Color112 */ "YellowHigh2",
/* glow_eDrawType_Color113 */ "YellowHigh3",
/* glow_eDrawType_Color114 */ "YellowHigh4",
/* glow_eDrawType_Color115 */ "YellowHigh5",
/* glow_eDrawType_Color116 */ "YellowHigh6",
/* glow_eDrawType_Color117 */ "YellowHigh7",
/* glow_eDrawType_Color118 */ "YellowHigh8",
/* glow_eDrawType_Color119 */ "YellowHigh9",
/* glow_eDrawType_Color120 */ "YellowHigh10",
/* glow_eDrawType_Color121 */ "OrangeLow1",
/* glow_eDrawType_Color122 */ "OrangeLow2",
/* glow_eDrawType_Color123 */ "OrangeLow3",
/* glow_eDrawType_Color124 */ "OrangeLow4",
/* glow_eDrawType_Color125 */ "OrangeLow5",
/* glow_eDrawType_Color126 */ "OrangeLow6",
/* glow_eDrawType_Color127 */ "OrangeLow7",
/* glow_eDrawType_Color128 */ "OrangeLow8",
/* glow_eDrawType_Color129 */ "OrangeLow9",
/* glow_eDrawType_Color130 */ "OrangeLow10",
/* glow_eDrawType_Color131 */ "OrangeMedium1",
/* glow_eDrawType_Color132 */ "OrangeMedium2",
/* glow_eDrawType_Color133 */ "OrangeMedium3",
/* glow_eDrawType_Color134 */ "OrangeMedium4",
/* glow_eDrawType_Color135 */ "OrangeMedium5",
/* glow_eDrawType_Color136 */ "OrangeMedium6",
/* glow_eDrawType_Color137 */ "OrangeMedium7",
/* glow_eDrawType_Color138 */ "OrangeMedium8",
/* glow_eDrawType_Color139 */ "OrangeMedium9",
/* glow_eDrawType_Color140 */ "OrangeMedium10",
/* glow_eDrawType_Color141 */ "OrangeHigh1",
/* glow_eDrawType_Color142 */ "OrangeHigh2",
/* glow_eDrawType_Color143 */ "OrangeHigh3",
/* glow_eDrawType_Color144 */ "OrangeHigh4",
/* glow_eDrawType_Color145 */ "OrangeHigh5",
/* glow_eDrawType_Color146 */ "OrangeHigh6",
/* glow_eDrawType_Color147 */ "OrangeHigh7",
/* glow_eDrawType_Color148 */ "OrangeHigh8",
/* glow_eDrawType_Color149 */ "OrangeHigh9",
/* glow_eDrawType_Color150 */ "OrangeHigh10",
/* glow_eDrawType_Color151 */ "RedLow1",
/* glow_eDrawType_Color152 */ "RedLow2",
/* glow_eDrawType_Color153 */ "RedLow3",
/* glow_eDrawType_Color154 */ "RedLow4",
/* glow_eDrawType_Color155 */ "RedLow5",
/* glow_eDrawType_Color156 */ "RedLow6",
/* glow_eDrawType_Color157 */ "RedLow7",
/* glow_eDrawType_Color158 */ "RedLow8",
/* glow_eDrawType_Color159 */ "RedLow9",
/* glow_eDrawType_Color160 */ "RedLow10",
/* glow_eDrawType_Color161 */ "RedMedium1",
/* glow_eDrawType_Color162 */ "RedMedium2",
/* glow_eDrawType_Color163 */ "RedMedium3",
/* glow_eDrawType_Color164 */ "RedMedium4",
/* glow_eDrawType_Color165 */ "RedMedium5",
/* glow_eDrawType_Color166 */ "RedMedium6",
/* glow_eDrawType_Color167 */ "RedMedium7",
/* glow_eDrawType_Color168 */ "RedMedium8",
/* glow_eDrawType_Color169 */ "RedMedium9",
/* glow_eDrawType_Color170 */ "RedMedium10",
/* glow_eDrawType_Color171 */ "RedHigh1",
/* glow_eDrawType_Color172 */ "RedHigh2",
/* glow_eDrawType_Color173 */ "RedHigh3",
/* glow_eDrawType_Color174 */ "RedHigh4",
/* glow_eDrawType_Color175 */ "RedHigh5",
/* glow_eDrawType_Color176 */ "RedHigh6",
/* glow_eDrawType_Color177 */ "RedHigh7",
/* glow_eDrawType_Color178 */ "RedHigh8",
/* glow_eDrawType_Color179 */ "RedHigh9",
/* glow_eDrawType_Color180 */ "RedHigh10",
/* glow_eDrawType_Color181 */ "MagentaLow1",
/* glow_eDrawType_Color182 */ "MagentaLow2",
/* glow_eDrawType_Color183 */ "MagentaLow3",
/* glow_eDrawType_Color184 */ "MagentaLow4",
/* glow_eDrawType_Color185 */ "MagentaLow5",
/* glow_eDrawType_Color186 */ "MagentaLow6",
/* glow_eDrawType_Color187 */ "MagentaLow7",
/* glow_eDrawType_Color188 */ "MagentaLow8",
/* glow_eDrawType_Color189 */ "MagentaLow9",
/* glow_eDrawType_Color190 */ "MagentaLow10",
/* glow_eDrawType_Color191 */ "MagentaMedium1",
/* glow_eDrawType_Color192 */ "MagentaMedium2",
/* glow_eDrawType_Color193 */ "MagentaMedium3",
/* glow_eDrawType_Color194 */ "MagentaMedium4",
/* glow_eDrawType_Color195 */ "MagentaMedium5",
/* glow_eDrawType_Color196 */ "MagentaMedium6",
/* glow_eDrawType_Color197 */ "MagentaMedium7",
/* glow_eDrawType_Color198 */ "MagentaMedium8",
/* glow_eDrawType_Color199 */ "MagentaMedium9",
/* glow_eDrawType_Color200 */ "MagentaMedium10",
/* glow_eDrawType_Color201 */ "MagentaHigh1",
/* glow_eDrawType_Color202 */ "MagentaHigh2",
/* glow_eDrawType_Color203 */ "MagentaHigh3",
/* glow_eDrawType_Color204 */ "MagentaHigh4",
/* glow_eDrawType_Color205 */ "MagentaHigh5",
/* glow_eDrawType_Color206 */ "MagentaHigh6",
/* glow_eDrawType_Color207 */ "MagentaHigh7",
/* glow_eDrawType_Color208 */ "MagentaHigh8",
/* glow_eDrawType_Color209 */ "MagentaHigh9",
/* glow_eDrawType_Color210 */ "MagentaHigh10",
/* glow_eDrawType_Color211 */ "BlueLow1",
/* glow_eDrawType_Color212 */ "BlueLow2",
/* glow_eDrawType_Color213 */ "BlueLow3",
/* glow_eDrawType_Color214 */ "BlueLow4",
/* glow_eDrawType_Color215 */ "BlueLow5",
/* glow_eDrawType_Color216 */ "BlueLow6",
/* glow_eDrawType_Color217 */ "BlueLow7",
/* glow_eDrawType_Color218 */ "BlueLow8",
/* glow_eDrawType_Color219 */ "BlueLow9",
/* glow_eDrawType_Color220 */ "BlueLow10",
/* glow_eDrawType_Color221 */ "BlueMedium1",
/* glow_eDrawType_Color222 */ "BlueMedium2",
/* glow_eDrawType_Color223 */ "BlueMedium3",
/* glow_eDrawType_Color224 */ "BlueMedium4",
/* glow_eDrawType_Color225 */ "BlueMedium5",
/* glow_eDrawType_Color226 */ "BlueMedium6",
/* glow_eDrawType_Color227 */ "BlueMedium7",
/* glow_eDrawType_Color228 */ "BlueMedium8",
/* glow_eDrawType_Color229 */ "BlueMedium9",
/* glow_eDrawType_Color230 */ "BlueMedium10",
/* glow_eDrawType_Color231 */ "BlueHigh1",
/* glow_eDrawType_Color232 */ "BlueHigh2",
/* glow_eDrawType_Color233 */ "BlueHigh3",
/* glow_eDrawType_Color234 */ "BlueHigh4",
/* glow_eDrawType_Color235 */ "BlueHigh5",
/* glow_eDrawType_Color236 */ "BlueHigh6",
/* glow_eDrawType_Color237 */ "BlueHigh7",
/* glow_eDrawType_Color238 */ "BlueHigh8",
/* glow_eDrawType_Color239 */ "BlueHigh9",
/* glow_eDrawType_Color240 */ "BlueHigh10",
/* glow_eDrawType_Color241 */ "SeaBlueLow1",
/* glow_eDrawType_Color242 */ "SeaBlueLow2",
/* glow_eDrawType_Color243 */ "SeaBlueLow3",
/* glow_eDrawType_Color244 */ "SeaBlueLow4",
/* glow_eDrawType_Color245 */ "SeaBlueLow5",
/* glow_eDrawType_Color246 */ "SeaBlueLow6",
/* glow_eDrawType_Color247 */ "SeaBlueLow7",
/* glow_eDrawType_Color248 */ "SeaBlueLow8",
/* glow_eDrawType_Color249 */ "SeaBlueLow9",
/* glow_eDrawType_Color250 */ "SeaBlueLow10",
/* glow_eDrawType_Color251 */ "SeaBlueMedium1",
/* glow_eDrawType_Color252 */ "SeaBlueMedium2",
/* glow_eDrawType_Color253 */ "SeaBlueMedium3",
/* glow_eDrawType_Color224 */ "SeaBlueMedium4",
/* glow_eDrawType_Color255 */ "SeaBlueMedium5",
/* glow_eDrawType_Color256 */ "SeaBlueMedium6",
/* glow_eDrawType_Color257 */ "SeaBlueMedium7",
/* glow_eDrawType_Color258 */ "SeaBlueMedium8",
/* glow_eDrawType_Color259 */ "SeaBlueMedium9",
/* glow_eDrawType_Color260 */ "SeaBlueMedium10",
/* glow_eDrawType_Color261 */ "SeaBlueHigh1",
/* glow_eDrawType_Color262 */ "SeaBlueHigh2",
/* glow_eDrawType_Color263 */ "SeaBlueHigh3",
/* glow_eDrawType_Color264 */ "SeaBlueHigh4",
/* glow_eDrawType_Color265 */ "SeaBlueHigh5",
/* glow_eDrawType_Color266 */ "SeaBlueHigh6",
/* glow_eDrawType_Color267 */ "SeaBlueHigh7",
/* glow_eDrawType_Color268 */ "SeaBlueHigh8",
/* glow_eDrawType_Color269 */ "SeaBlueHigh9",
/* glow_eDrawType_Color270 */ "SeaBlueHigh10",
/* glow_eDrawType_Color271 */ "GreenLow1",
/* glow_eDrawType_Color272 */ "GreenLow2",
/* glow_eDrawType_Color273 */ "GreenLow3",
/* glow_eDrawType_Color274 */ "GreenLow4",
/* glow_eDrawType_Color275 */ "GreenLow5",
/* glow_eDrawType_Color276 */ "GreenLow6",
/* glow_eDrawType_Color277 */ "GreenLow7",
/* glow_eDrawType_Color278 */ "GreenLow8",
/* glow_eDrawType_Color279 */ "GreenLow9",
/* glow_eDrawType_Color280 */ "GreenLow10",
/* glow_eDrawType_Color281 */ "GreenMedium1",
/* glow_eDrawType_Color282 */ "GreenMedium2",
/* glow_eDrawType_Color283 */ "GreenMedium3",
/* glow_eDrawType_Color284 */ "GreenMedium4",
/* glow_eDrawType_Color285 */ "GreenMedium5",
/* glow_eDrawType_Color286 */ "GreenMedium6",
/* glow_eDrawType_Color287 */ "GreenMedium7",
/* glow_eDrawType_Color288 */ "GreenMedium8",
/* glow_eDrawType_Color289 */ "GreenMedium9",
/* glow_eDrawType_Color290 */ "GreenMedium10",
/* glow_eDrawType_Color291 */ "GreenHigh1",
/* glow_eDrawType_Color292 */ "GreenHigh2",
/* glow_eDrawType_Color293 */ "GreenHigh3",
/* glow_eDrawType_Color294 */ "GreenHigh4",
/* glow_eDrawType_Color295 */ "GreenHigh5",
/* glow_eDrawType_Color296 */ "GreenHigh6",
/* glow_eDrawType_Color297 */ "GreenHigh7",
/* glow_eDrawType_Color298 */ "GreenHigh8",
/* glow_eDrawType_Color299 */ "GreenHigh9",
/* glow_eDrawType_Color300 */ "GreenHigh10",
"Inherit",
};
public String[] getTags() {
......@@ -126,106 +326,318 @@ public class GeColorEditor extends PropertyEditorSupport {
}
public void setAsText(String s) throws IllegalArgumentException {
if (s.equals("Inherit")) setValue( new Integer(GeColor.COLOR_INHERIT));
else if (s.equals("Black")) setValue( new Integer(GeColor.COLOR_1));
else if (s.equals("Red")) setValue( new Integer(GeColor.COLOR_2));
else if (s.equals("Gray")) setValue( new Integer(GeColor.COLOR_3));
else if (s.equals("White")) setValue( new Integer(GeColor.COLOR_4));
else if (s.equals("SpringGreen")) setValue( new Integer(GeColor.COLOR_5));
else if (s.equals("Yellow")) setValue( new Integer(GeColor.COLOR_6));
else if (s.equals("SteelBlue")) setValue( new Integer(GeColor.COLOR_7));
else if (s.equals("Magenta")) setValue( new Integer(GeColor.COLOR_8));
else if (s.equals("Grey73")) setValue( new Integer(GeColor.COLOR_9));
else if (s.equals("Grey84")) setValue( new Integer(GeColor.COLOR_10));
else if (s.equals("Grey5")) setValue( new Integer(GeColor.COLOR_11));
else if (s.equals("Grey10")) setValue( new Integer(GeColor.COLOR_12));
else if (s.equals("Grey15")) setValue( new Integer(GeColor.COLOR_13));
else if (s.equals("Grey30")) setValue( new Integer(GeColor.COLOR_14));
else if (s.equals("Grey50")) setValue( new Integer(GeColor.COLOR_15));
else if (s.equals("Grey7")) setValue( new Integer(GeColor.COLOR_16));
else if (s.equals("Grey12")) setValue( new Integer(GeColor.COLOR_17));
else if (s.equals("Grey25")) setValue( new Integer(GeColor.COLOR_18));
else if (s.equals("Grey45")) setValue( new Integer(GeColor.COLOR_19));
else if (s.equals("Grey65")) setValue( new Integer(GeColor.COLOR_20));
else if (s.equals("LightYellow0")) setValue( new Integer(GeColor.COLOR_21));
else if (s.equals("LightYellow1")) setValue( new Integer(GeColor.COLOR_22));
else if (s.equals("LightYellow2")) setValue( new Integer(GeColor.COLOR_23));
else if (s.equals("LightYellow3")) setValue( new Integer(GeColor.COLOR_24));
else if (s.equals("LightYellow4")) setValue( new Integer(GeColor.COLOR_25));
else if (s.equals("yellow0")) setValue( new Integer(GeColor.COLOR_26));
else if (s.equals("yellow1")) setValue( new Integer(GeColor.COLOR_27));
else if (s.equals("yellow2")) setValue( new Integer(GeColor.COLOR_28));
else if (s.equals("yellow3")) setValue( new Integer(GeColor.COLOR_29));
else if (s.equals("yellow4")) setValue( new Integer(GeColor.COLOR_30));
else if (s.equals("Lightgoldenrod0")) setValue( new Integer(GeColor.COLOR_31));
else if (s.equals("Lightgoldenrod1")) setValue( new Integer(GeColor.COLOR_32));
else if (s.equals("Lightgoldenrod2")) setValue( new Integer(GeColor.COLOR_33));
else if (s.equals("Lightgoldenrod3")) setValue( new Integer(GeColor.COLOR_34));
else if (s.equals("Lightgoldenrod4")) setValue( new Integer(GeColor.COLOR_35));
else if (s.equals("gold00")) setValue( new Integer(GeColor.COLOR_36));
else if (s.equals("gold1")) setValue( new Integer(GeColor.COLOR_37));
else if (s.equals("gold2")) setValue( new Integer(GeColor.COLOR_38));
else if (s.equals("gold3")) setValue( new Integer(GeColor.COLOR_39));
else if (s.equals("gold4")) setValue( new Integer(GeColor.COLOR_40));
else if (s.equals("LightOrange")) setValue( new Integer(GeColor.COLOR_41));
else if (s.equals("NavajoWhite")) setValue( new Integer(GeColor.COLOR_42));
else if (s.equals("LightSalmon1")) setValue( new Integer(GeColor.COLOR_43));
else if (s.equals("LightSalmon3")) setValue( new Integer(GeColor.COLOR_44));
else if (s.equals("LightSalmon4")) setValue( new Integer(GeColor.COLOR_45));
else if (s.equals("DarkOrange")) setValue( new Integer(GeColor.COLOR_46));
else if (s.equals("DarkOrange0")) setValue( new Integer(GeColor.COLOR_47));
else if (s.equals("DarkOrange1")) setValue( new Integer(GeColor.COLOR_48));
else if (s.equals("DarkOrange3")) setValue( new Integer(GeColor.COLOR_49));
else if (s.equals("DarkOrange4")) setValue( new Integer(GeColor.COLOR_50));
else if (s.equals("MistyRose1")) setValue( new Integer(GeColor.COLOR_51));
else if (s.equals("MistyRose2")) setValue( new Integer(GeColor.COLOR_52));
else if (s.equals("LightPink")) setValue( new Integer(GeColor.COLOR_53));
else if (s.equals("LightPink3")) setValue( new Integer(GeColor.COLOR_54));
else if (s.equals("LightPink4")) setValue( new Integer(GeColor.COLOR_55));
else if (s.equals("IndianRed0")) setValue( new Integer(GeColor.COLOR_56));
else if (s.equals("IndianRed1")) setValue( new Integer(GeColor.COLOR_57));
else if (s.equals("firebrick1")) setValue( new Integer(GeColor.COLOR_58));
else if (s.equals("firebrick3")) setValue( new Integer(GeColor.COLOR_59));
else if (s.equals("firebrick4")) setValue( new Integer(GeColor.COLOR_60));
else if (s.equals("Plum1")) setValue( new Integer(GeColor.COLOR_61));
else if (s.equals("Plum1")) setValue( new Integer(GeColor.COLOR_62));
else if (s.equals("Plum2")) setValue( new Integer(GeColor.COLOR_63));
else if (s.equals("Plum3")) setValue( new Integer(GeColor.COLOR_64));
else if (s.equals("Plum4")) setValue( new Integer(GeColor.COLOR_65));
else if (s.equals("Magenta00")) setValue( new Integer(GeColor.COLOR_66));
else if (s.equals("Magenta0")) setValue( new Integer(GeColor.COLOR_67));
else if (s.equals("Magenta1")) setValue( new Integer(GeColor.COLOR_68));
else if (s.equals("Magenta3")) setValue( new Integer(GeColor.COLOR_69));
else if (s.equals("Magenta4")) setValue( new Integer(GeColor.COLOR_70));
else if (s.equals("LightSteelBlue1")) setValue( new Integer(GeColor.COLOR_71));
else if (s.equals("LightSteelBlue1")) setValue( new Integer(GeColor.COLOR_72));
else if (s.equals("LightSteelBlue2")) setValue( new Integer(GeColor.COLOR_73));
else if (s.equals("LightSteelBlue3")) setValue( new Integer(GeColor.COLOR_74));
else if (s.equals("LightSteelBlue4")) setValue( new Integer(GeColor.COLOR_75));
else if (s.equals("LightCyan")) setValue( new Integer(GeColor.COLOR_76));
else if (s.equals("PowderBlue")) setValue( new Integer(GeColor.COLOR_77));
else if (s.equals("SteelBlue1")) setValue( new Integer(GeColor.COLOR_78));
else if (s.equals("SteelBlue")) setValue( new Integer(GeColor.COLOR_79));
else if (s.equals("blue4")) setValue( new Integer(GeColor.COLOR_80));
else if (s.equals("aquamarine0")) setValue( new Integer(GeColor.COLOR_81));
else if (s.equals("aquamarine1")) setValue( new Integer(GeColor.COLOR_82));
else if (s.equals("aquamarine2")) setValue( new Integer(GeColor.COLOR_83));
else if (s.equals("aquamarine3")) setValue( new Integer(GeColor.COLOR_84));
else if (s.equals("aquamarine4")) setValue( new Integer(GeColor.COLOR_85));
else if (s.equals("turqoise0")) setValue( new Integer(GeColor.COLOR_86));
else if (s.equals("turqoise1")) setValue( new Integer(GeColor.COLOR_87));
else if (s.equals("turqoise2")) setValue( new Integer(GeColor.COLOR_88));
else if (s.equals("turqoise3")) setValue( new Integer(GeColor.COLOR_89));
else if (s.equals("turqoise4")) setValue( new Integer(GeColor.COLOR_90));
else if (s.equals("DarkOliveGreen1")) setValue( new Integer(GeColor.COLOR_91));
else if (s.equals("DarkOliveGreen2")) setValue( new Integer(GeColor.COLOR_92));
else if (s.equals("DarkOliveGreen3")) setValue( new Integer(GeColor.COLOR_93));
else if (s.equals("DarkOliveGreen4")) setValue( new Integer(GeColor.COLOR_94));
else if (s.equals("DarkOliveGreen5")) setValue( new Integer(GeColor.COLOR_95));
else if (s.equals("chartreuse")) setValue( new Integer(GeColor.COLOR_96));
else if (s.equals("chartreuse2")) setValue( new Integer(GeColor.COLOR_97));
else if (s.equals("chartreuse3")) setValue( new Integer(GeColor.COLOR_98));
else if (s.equals("chartreuse4")) setValue( new Integer(GeColor.COLOR_99));
else if (s.equals("DarkGreen")) setValue( new Integer(GeColor.COLOR_100));
/* glow_eDrawType_Line */ else if (s.equals("Black")) setValue( new Integer(GeColor.COLOR_1));
/* glow_eDrawType_LineRed */ else if (s.equals("Red")) setValue( new Integer(GeColor.COLOR_2));
/* glow_eDrawType_LineGray */ else if (s.equals("Grey")) setValue( new Integer(GeColor.COLOR_3));
/* glow_eDrawType_Color4 */ else if (s.equals("White")) setValue( new Integer(GeColor.COLOR_4));
/* glow_eDrawType_Color5 */ else if (s.equals("YellowGreen")) setValue( new Integer(GeColor.COLOR_5));
/* glow_eDrawType_Color6 */ else if (s.equals("Yellow")) setValue( new Integer(GeColor.COLOR_6));
/* glow_eDrawType_Color7 */ else if (s.equals("Gold")) setValue( new Integer(GeColor.COLOR_7));
/* glow_eDrawType_Color8 */ else if (s.equals("Orange")) setValue( new Integer(GeColor.COLOR_8));
/* glow_eDrawType_Color9 */ else if (s.equals("OrangeRed")) setValue( new Integer(GeColor.COLOR_9));
/* glow_eDrawType_Color10 */ else if (s.equals("Red")) setValue( new Integer(GeColor.COLOR_10));
/* glow_eDrawType_Color11 */ else if (s.equals("RedViolet")) setValue( new Integer(GeColor.COLOR_11));
/* glow_eDrawType_Color12 */ else if (s.equals("Violet")) setValue( new Integer(GeColor.COLOR_12));
/* glow_eDrawType_Color13 */ else if (s.equals("BlueViolet")) setValue( new Integer(GeColor.COLOR_13));
/* glow_eDrawType_Color14 */ else if (s.equals("BlueBlueViolet")) setValue( new Integer(GeColor.COLOR_14));
/* glow_eDrawType_Color15 */ else if (s.equals("Blue")) setValue( new Integer(GeColor.COLOR_15));
/* glow_eDrawType_Color16 */ else if (s.equals("BlueBlueGreen")) setValue( new Integer(GeColor.COLOR_16));
/* glow_eDrawType_Color17 */ else if (s.equals("BlueGreen")) setValue( new Integer(GeColor.COLOR_17));
/* glow_eDrawType_Color18 */ else if (s.equals("GreenGreenBlue")) setValue( new Integer(GeColor.COLOR_18));
/* glow_eDrawType_Color19 */ else if (s.equals("Green")) setValue( new Integer(GeColor.COLOR_19));
/* glow_eDrawType_Color20 */ else if (s.equals("GreenGreenYellow")) setValue( new Integer(GeColor.COLOR_20));
/* glow_eDrawType_Color21 */ else if (s.equals("GrayFix1")) setValue( new Integer(GeColor.COLOR_21));
/* glow_eDrawType_Color22 */ else if (s.equals("GrayFix2")) setValue( new Integer(GeColor.COLOR_22));
/* glow_eDrawType_Color23 */ else if (s.equals("GrayFix3")) setValue( new Integer(GeColor.COLOR_23));
/* glow_eDrawType_Color24 */ else if (s.equals("GrayFix4")) setValue( new Integer(GeColor.COLOR_24));
/* glow_eDrawType_Color25 */ else if (s.equals("GrayFix5")) setValue( new Integer(GeColor.COLOR_25));
/* glow_eDrawType_Color26 */ else if (s.equals("GrayFix6")) setValue( new Integer(GeColor.COLOR_26));
/* glow_eDrawType_Color27 */ else if (s.equals("GrayFix7")) setValue( new Integer(GeColor.COLOR_27));
/* glow_eDrawType_Color28 */ else if (s.equals("GrayFix8")) setValue( new Integer(GeColor.COLOR_28));
/* glow_eDrawType_Color29 */ else if (s.equals("GrayFix9")) setValue( new Integer(GeColor.COLOR_29));
/* glow_eDrawType_Color30 */ else if (s.equals("GrayFix10")) setValue( new Integer(GeColor.COLOR_30));
/* glow_eDrawType_Color31 */ else if (s.equals("GrayLow1")) setValue( new Integer(GeColor.COLOR_31));
/* glow_eDrawType_Color32 */ else if (s.equals("GrayLow2")) setValue( new Integer(GeColor.COLOR_32));
/* glow_eDrawType_Color33 */ else if (s.equals("GrayLow3")) setValue( new Integer(GeColor.COLOR_33));
/* glow_eDrawType_Color34 */ else if (s.equals("GrayLow4")) setValue( new Integer(GeColor.COLOR_34));
/* glow_eDrawType_Color35 */ else if (s.equals("GrayLow5")) setValue( new Integer(GeColor.COLOR_35));
/* glow_eDrawType_Color36 */ else if (s.equals("GrayLow6")) setValue( new Integer(GeColor.COLOR_36));
/* glow_eDrawType_Color37 */ else if (s.equals("GrayLow7")) setValue( new Integer(GeColor.COLOR_37));
/* glow_eDrawType_Color38 */ else if (s.equals("GrayLow8")) setValue( new Integer(GeColor.COLOR_38));
/* glow_eDrawType_Color39 */ else if (s.equals("GrayLow9")) setValue( new Integer(GeColor.COLOR_39));
/* glow_eDrawType_Color40 */ else if (s.equals("GrayLow10")) setValue( new Integer(GeColor.COLOR_40));
/* glow_eDrawType_Color41 */ else if (s.equals("GrayMedium1")) setValue( new Integer(GeColor.COLOR_41));
/* glow_eDrawType_Color42 */ else if (s.equals("GrayMedium2")) setValue( new Integer(GeColor.COLOR_42));
/* glow_eDrawType_Color43 */ else if (s.equals("GrayMedium3")) setValue( new Integer(GeColor.COLOR_43));
/* glow_eDrawType_Color44 */ else if (s.equals("GrayMedium4")) setValue( new Integer(GeColor.COLOR_44));
/* glow_eDrawType_Color45 */ else if (s.equals("GrayMedium5")) setValue( new Integer(GeColor.COLOR_45));
/* glow_eDrawType_Color46 */ else if (s.equals("GrayMedium6")) setValue( new Integer(GeColor.COLOR_46));
/* glow_eDrawType_Color47 */ else if (s.equals("GrayMedium7")) setValue( new Integer(GeColor.COLOR_47));
/* glow_eDrawType_Color48 */ else if (s.equals("GrayMedium8")) setValue( new Integer(GeColor.COLOR_48));
/* glow_eDrawType_Color49 */ else if (s.equals("GrayMedium9")) setValue( new Integer(GeColor.COLOR_49));
/* glow_eDrawType_Color50 */ else if (s.equals("GrayMedium10")) setValue( new Integer(GeColor.COLOR_50));
/* glow_eDrawType_Color51 */ else if (s.equals("GrayHigh1")) setValue( new Integer(GeColor.COLOR_51));
/* glow_eDrawType_Color52 */ else if (s.equals("GrayHigh2")) setValue( new Integer(GeColor.COLOR_52));
/* glow_eDrawType_Color53 */ else if (s.equals("GrayHigh3")) setValue( new Integer(GeColor.COLOR_53));
/* glow_eDrawType_Color54 */ else if (s.equals("GrayHigh4")) setValue( new Integer(GeColor.COLOR_54));
/* glow_eDrawType_Color55 */ else if (s.equals("GrayHigh5")) setValue( new Integer(GeColor.COLOR_55));
/* glow_eDrawType_Color56 */ else if (s.equals("GrayHigh6")) setValue( new Integer(GeColor.COLOR_56));
/* glow_eDrawType_Color57 */ else if (s.equals("GrayHigh7")) setValue( new Integer(GeColor.COLOR_57));
/* glow_eDrawType_Color58 */ else if (s.equals("GrayHigh8")) setValue( new Integer(GeColor.COLOR_58));
/* glow_eDrawType_Color59 */ else if (s.equals("GrayHigh9")) setValue( new Integer(GeColor.COLOR_59));
/* glow_eDrawType_Color60 */ else if (s.equals("GrayHigh10")) setValue( new Integer(GeColor.COLOR_60));
/* glow_eDrawType_Color61 */ else if (s.equals("YellowGreenLow1")) setValue( new Integer(GeColor.COLOR_61));
/* glow_eDrawType_Color62 */ else if (s.equals("YellowGreenLow2")) setValue( new Integer(GeColor.COLOR_62));
/* glow_eDrawType_Color63 */ else if (s.equals("YellowGreenLow3")) setValue( new Integer(GeColor.COLOR_63));
/* glow_eDrawType_Color64 */ else if (s.equals("YellowGreenLow4")) setValue( new Integer(GeColor.COLOR_64));
/* glow_eDrawType_Color65 */ else if (s.equals("YellowGreenLow5")) setValue( new Integer(GeColor.COLOR_65));
/* glow_eDrawType_Color66 */ else if (s.equals("YellowGreenLow6")) setValue( new Integer(GeColor.COLOR_66));
/* glow_eDrawType_Color67 */ else if (s.equals("YellowGreenLow7")) setValue( new Integer(GeColor.COLOR_67));
/* glow_eDrawType_Color68 */ else if (s.equals("YellowGreenLow8")) setValue( new Integer(GeColor.COLOR_68));
/* glow_eDrawType_Color69 */ else if (s.equals("YellowGreenLow9")) setValue( new Integer(GeColor.COLOR_69));
/* glow_eDrawType_Color70 */ else if (s.equals("YellowGreenLow10")) setValue( new Integer(GeColor.COLOR_70));
/* glow_eDrawType_Color71 */ else if (s.equals("YellowGreenMedium1")) setValue( new Integer(GeColor.COLOR_71));
/* glow_eDrawType_Color72 */ else if (s.equals("YellowGreenMedium2")) setValue( new Integer(GeColor.COLOR_72));
/* glow_eDrawType_Color73 */ else if (s.equals("YellowGreenMedium3")) setValue( new Integer(GeColor.COLOR_73));
/* glow_eDrawType_Color74 */ else if (s.equals("YellowGreenMedium4")) setValue( new Integer(GeColor.COLOR_74));
/* glow_eDrawType_Color75 */ else if (s.equals("YellowGreenMedium5")) setValue( new Integer(GeColor.COLOR_75));
/* glow_eDrawType_Color76 */ else if (s.equals("YellowGreenMedium6")) setValue( new Integer(GeColor.COLOR_76));
/* glow_eDrawType_Color77 */ else if (s.equals("YellowGreenMedium7")) setValue( new Integer(GeColor.COLOR_77));
/* glow_eDrawType_Color78 */ else if (s.equals("YellowGreenMedium8")) setValue( new Integer(GeColor.COLOR_78));
/* glow_eDrawType_Color79 */ else if (s.equals("YellowGreenMedium9")) setValue( new Integer(GeColor.COLOR_79));
/* glow_eDrawType_Color80 */ else if (s.equals("YellowGreenMedium10")) setValue( new Integer(GeColor.COLOR_80));
/* glow_eDrawType_Color81 */ else if (s.equals("YellowGreenHigh1")) setValue( new Integer(GeColor.COLOR_81));
/* glow_eDrawType_Color82 */ else if (s.equals("YellowGreenHigh2")) setValue( new Integer(GeColor.COLOR_82));
/* glow_eDrawType_Color83 */ else if (s.equals("YellowGreenHigh3")) setValue( new Integer(GeColor.COLOR_83));
/* glow_eDrawType_Color84 */ else if (s.equals("YellowGreenHigh4")) setValue( new Integer(GeColor.COLOR_84));
/* glow_eDrawType_Color85 */ else if (s.equals("YellowGreenHigh5")) setValue( new Integer(GeColor.COLOR_85));
/* glow_eDrawType_Color86 */ else if (s.equals("YellowGreenHigh6")) setValue( new Integer(GeColor.COLOR_86));
/* glow_eDrawType_Color87 */ else if (s.equals("YellowGreenHigh7")) setValue( new Integer(GeColor.COLOR_87));
/* glow_eDrawType_Color88 */ else if (s.equals("YellowGreenHigh8")) setValue( new Integer(GeColor.COLOR_88));
/* glow_eDrawType_Color89 */ else if (s.equals("YellowGreenHigh9")) setValue( new Integer(GeColor.COLOR_89));
/* glow_eDrawType_Color90 */ else if (s.equals("YellowGreenHigh10")) setValue( new Integer(GeColor.COLOR_90));
/* glow_eDrawType_Color91 */ else if (s.equals("YellowLow1")) setValue( new Integer(GeColor.COLOR_91));
/* glow_eDrawType_Color92 */ else if (s.equals("YellowLow2")) setValue( new Integer(GeColor.COLOR_92));
/* glow_eDrawType_Color93 */ else if (s.equals("YellowLow3")) setValue( new Integer(GeColor.COLOR_93));
/* glow_eDrawType_Color94 */ else if (s.equals("YellowLow4")) setValue( new Integer(GeColor.COLOR_94));
/* glow_eDrawType_Color95 */ else if (s.equals("YellowLow5")) setValue( new Integer(GeColor.COLOR_95));
/* glow_eDrawType_Color96 */ else if (s.equals("YellowLow6")) setValue( new Integer(GeColor.COLOR_96));
/* glow_eDrawType_Color97 */ else if (s.equals("YellowLow7")) setValue( new Integer(GeColor.COLOR_97));
/* glow_eDrawType_Color98 */ else if (s.equals("YellowLow8")) setValue( new Integer(GeColor.COLOR_98));
/* glow_eDrawType_Color99 */ else if (s.equals("YellowLow9")) setValue( new Integer(GeColor.COLOR_99));
/* glow_eDrawType_Color100 */ else if (s.equals("YellowLow10")) setValue( new Integer(GeColor.COLOR_100));
/* glow_eDrawType_Color101 */ else if (s.equals("YellowMedium1")) setValue( new Integer(GeColor.COLOR_101));
/* glow_eDrawType_Color102 */ else if (s.equals("YellowMedium2")) setValue( new Integer(GeColor.COLOR_102));
/* glow_eDrawType_Color103 */ else if (s.equals("YellowMedium3")) setValue( new Integer(GeColor.COLOR_103));
/* glow_eDrawType_Color104 */ else if (s.equals("YellowMedium4")) setValue( new Integer(GeColor.COLOR_104));
/* glow_eDrawType_Color105 */ else if (s.equals("YellowMedium5")) setValue( new Integer(GeColor.COLOR_105));
/* glow_eDrawType_Color106 */ else if (s.equals("YellowMedium6")) setValue( new Integer(GeColor.COLOR_106));
/* glow_eDrawType_Color107 */ else if (s.equals("YellowMedium7")) setValue( new Integer(GeColor.COLOR_107));
/* glow_eDrawType_Color108 */ else if (s.equals("YellowMedium8")) setValue( new Integer(GeColor.COLOR_108));
/* glow_eDrawType_Color109 */ else if (s.equals("YellowMedium9")) setValue( new Integer(GeColor.COLOR_109));
/* glow_eDrawType_Color110 */ else if (s.equals("YellowMedium10")) setValue( new Integer(GeColor.COLOR_110));
/* glow_eDrawType_Color111 */ else if (s.equals("YellowHigh1")) setValue( new Integer(GeColor.COLOR_111));
/* glow_eDrawType_Color112 */ else if (s.equals("YellowHigh2")) setValue( new Integer(GeColor.COLOR_112));
/* glow_eDrawType_Color113 */ else if (s.equals("YellowHigh3")) setValue( new Integer(GeColor.COLOR_113));
/* glow_eDrawType_Color114 */ else if (s.equals("YellowHigh4")) setValue( new Integer(GeColor.COLOR_114));
/* glow_eDrawType_Color115 */ else if (s.equals("YellowHigh5")) setValue( new Integer(GeColor.COLOR_115));
/* glow_eDrawType_Color116 */ else if (s.equals("YellowHigh6")) setValue( new Integer(GeColor.COLOR_116));
/* glow_eDrawType_Color117 */ else if (s.equals("YellowHigh7")) setValue( new Integer(GeColor.COLOR_117));
/* glow_eDrawType_Color118 */ else if (s.equals("YellowHigh8")) setValue( new Integer(GeColor.COLOR_118));
/* glow_eDrawType_Color119 */ else if (s.equals("YellowHigh9")) setValue( new Integer(GeColor.COLOR_119));
/* glow_eDrawType_Color120 */ else if (s.equals("YellowHigh10")) setValue( new Integer(GeColor.COLOR_120));
/* glow_eDrawType_Color121 */ else if (s.equals("OrangeLow1")) setValue( new Integer(GeColor.COLOR_121));
/* glow_eDrawType_Color122 */ else if (s.equals("OrangeLow2")) setValue( new Integer(GeColor.COLOR_122));
/* glow_eDrawType_Color123 */ else if (s.equals("OrangeLow3")) setValue( new Integer(GeColor.COLOR_123));
/* glow_eDrawType_Color124 */ else if (s.equals("OrangeLow4")) setValue( new Integer(GeColor.COLOR_124));
/* glow_eDrawType_Color125 */ else if (s.equals("OrangeLow5")) setValue( new Integer(GeColor.COLOR_125));
/* glow_eDrawType_Color126 */ else if (s.equals("OrangeLow6")) setValue( new Integer(GeColor.COLOR_126));
/* glow_eDrawType_Color127 */ else if (s.equals("OrangeLow7")) setValue( new Integer(GeColor.COLOR_127));
/* glow_eDrawType_Color128 */ else if (s.equals("OrangeLow8")) setValue( new Integer(GeColor.COLOR_128));
/* glow_eDrawType_Color129 */ else if (s.equals("OrangeLow9")) setValue( new Integer(GeColor.COLOR_129));
/* glow_eDrawType_Color130 */ else if (s.equals("OrangeLow10")) setValue( new Integer(GeColor.COLOR_130));
/* glow_eDrawType_Color131 */ else if (s.equals("OrangeMedium1")) setValue( new Integer(GeColor.COLOR_131));
/* glow_eDrawType_Color132 */ else if (s.equals("OrangeMedium2")) setValue( new Integer(GeColor.COLOR_132));
/* glow_eDrawType_Color133 */ else if (s.equals("OrangeMedium3")) setValue( new Integer(GeColor.COLOR_133));
/* glow_eDrawType_Color134 */ else if (s.equals("OrangeMedium4")) setValue( new Integer(GeColor.COLOR_134));
/* glow_eDrawType_Color135 */ else if (s.equals("OrangeMedium5")) setValue( new Integer(GeColor.COLOR_135));
/* glow_eDrawType_Color136 */ else if (s.equals("OrangeMedium6")) setValue( new Integer(GeColor.COLOR_136));
/* glow_eDrawType_Color137 */ else if (s.equals("OrangeMedium7")) setValue( new Integer(GeColor.COLOR_137));
/* glow_eDrawType_Color138 */ else if (s.equals("OrangeMedium8")) setValue( new Integer(GeColor.COLOR_138));
/* glow_eDrawType_Color139 */ else if (s.equals("OrangeMedium9")) setValue( new Integer(GeColor.COLOR_139));
/* glow_eDrawType_Color140 */ else if (s.equals("OrangeMedium10")) setValue( new Integer(GeColor.COLOR_140));
/* glow_eDrawType_Color141 */ else if (s.equals("OrangeHigh1")) setValue( new Integer(GeColor.COLOR_141));
/* glow_eDrawType_Color142 */ else if (s.equals("OrangeHigh2")) setValue( new Integer(GeColor.COLOR_142));
/* glow_eDrawType_Color143 */ else if (s.equals("OrangeHigh3")) setValue( new Integer(GeColor.COLOR_143));
/* glow_eDrawType_Color144 */ else if (s.equals("OrangeHigh4")) setValue( new Integer(GeColor.COLOR_144));
/* glow_eDrawType_Color145 */ else if (s.equals("OrangeHigh5")) setValue( new Integer(GeColor.COLOR_145));
/* glow_eDrawType_Color146 */ else if (s.equals("OrangeHigh6")) setValue( new Integer(GeColor.COLOR_146));
/* glow_eDrawType_Color147 */ else if (s.equals("OrangeHigh7")) setValue( new Integer(GeColor.COLOR_147));
/* glow_eDrawType_Color148 */ else if (s.equals("OrangeHigh8")) setValue( new Integer(GeColor.COLOR_148));
/* glow_eDrawType_Color149 */ else if (s.equals("OrangeHigh9")) setValue( new Integer(GeColor.COLOR_149));
/* glow_eDrawType_Color150 */ else if (s.equals("OrangeHigh10")) setValue( new Integer(GeColor.COLOR_150));
/* glow_eDrawType_Color151 */ else if (s.equals("RedLow1")) setValue( new Integer(GeColor.COLOR_151));
/* glow_eDrawType_Color152 */ else if (s.equals("RedLow2")) setValue( new Integer(GeColor.COLOR_152));
/* glow_eDrawType_Color153 */ else if (s.equals("RedLow3")) setValue( new Integer(GeColor.COLOR_153));
/* glow_eDrawType_Color154 */ else if (s.equals("RedLow4")) setValue( new Integer(GeColor.COLOR_154));
/* glow_eDrawType_Color155 */ else if (s.equals("RedLow5")) setValue( new Integer(GeColor.COLOR_155));
/* glow_eDrawType_Color156 */ else if (s.equals("RedLow6")) setValue( new Integer(GeColor.COLOR_156));
/* glow_eDrawType_Color157 */ else if (s.equals("RedLow7")) setValue( new Integer(GeColor.COLOR_157));
/* glow_eDrawType_Color158 */ else if (s.equals("RedLow8")) setValue( new Integer(GeColor.COLOR_158));
/* glow_eDrawType_Color159 */ else if (s.equals("RedLow9")) setValue( new Integer(GeColor.COLOR_159));
/* glow_eDrawType_Color160 */ else if (s.equals("RedLow10")) setValue( new Integer(GeColor.COLOR_160));
/* glow_eDrawType_Color161 */ else if (s.equals("RedMedium1")) setValue( new Integer(GeColor.COLOR_161));
/* glow_eDrawType_Color162 */ else if (s.equals("RedMedium2")) setValue( new Integer(GeColor.COLOR_162));
/* glow_eDrawType_Color163 */ else if (s.equals("RedMedium3")) setValue( new Integer(GeColor.COLOR_163));
/* glow_eDrawType_Color164 */ else if (s.equals("RedMedium4")) setValue( new Integer(GeColor.COLOR_164));
/* glow_eDrawType_Color165 */ else if (s.equals("RedMedium5")) setValue( new Integer(GeColor.COLOR_165));
/* glow_eDrawType_Color166 */ else if (s.equals("RedMedium6")) setValue( new Integer(GeColor.COLOR_166));
/* glow_eDrawType_Color167 */ else if (s.equals("RedMedium7")) setValue( new Integer(GeColor.COLOR_167));
/* glow_eDrawType_Color168 */ else if (s.equals("RedMedium8")) setValue( new Integer(GeColor.COLOR_168));
/* glow_eDrawType_Color169 */ else if (s.equals("RedMedium9")) setValue( new Integer(GeColor.COLOR_169));
/* glow_eDrawType_Color170 */ else if (s.equals("RedMedium10")) setValue( new Integer(GeColor.COLOR_170));
/* glow_eDrawType_Color171 */ else if (s.equals("RedHigh1")) setValue( new Integer(GeColor.COLOR_171));
/* glow_eDrawType_Color172 */ else if (s.equals("RedHigh2")) setValue( new Integer(GeColor.COLOR_172));
/* glow_eDrawType_Color173 */ else if (s.equals("RedHigh3")) setValue( new Integer(GeColor.COLOR_173));
/* glow_eDrawType_Color174 */ else if (s.equals("RedHigh4")) setValue( new Integer(GeColor.COLOR_174));
/* glow_eDrawType_Color175 */ else if (s.equals("RedHigh5")) setValue( new Integer(GeColor.COLOR_175));
/* glow_eDrawType_Color176 */ else if (s.equals("RedHigh6")) setValue( new Integer(GeColor.COLOR_176));
/* glow_eDrawType_Color177 */ else if (s.equals("RedHigh7")) setValue( new Integer(GeColor.COLOR_177));
/* glow_eDrawType_Color178 */ else if (s.equals("RedHigh8")) setValue( new Integer(GeColor.COLOR_178));
/* glow_eDrawType_Color179 */ else if (s.equals("RedHigh9")) setValue( new Integer(GeColor.COLOR_179));
/* glow_eDrawType_Color180 */ else if (s.equals("RedHigh10")) setValue( new Integer(GeColor.COLOR_180));
/* glow_eDrawType_Color181 */ else if (s.equals("MagentaLow1")) setValue( new Integer(GeColor.COLOR_181));
/* glow_eDrawType_Color182 */ else if (s.equals("MagentaLow2")) setValue( new Integer(GeColor.COLOR_182));
/* glow_eDrawType_Color183 */ else if (s.equals("MagentaLow3")) setValue( new Integer(GeColor.COLOR_183));
/* glow_eDrawType_Color184 */ else if (s.equals("MagentaLow4")) setValue( new Integer(GeColor.COLOR_184));
/* glow_eDrawType_Color185 */ else if (s.equals("MagentaLow5")) setValue( new Integer(GeColor.COLOR_185));
/* glow_eDrawType_Color186 */ else if (s.equals("MagentaLow6")) setValue( new Integer(GeColor.COLOR_186));
/* glow_eDrawType_Color187 */ else if (s.equals("MagentaLow7")) setValue( new Integer(GeColor.COLOR_187));
/* glow_eDrawType_Color188 */ else if (s.equals("MagentaLow8")) setValue( new Integer(GeColor.COLOR_188));
/* glow_eDrawType_Color189 */ else if (s.equals("MagentaLow9")) setValue( new Integer(GeColor.COLOR_189));
/* glow_eDrawType_Color190 */ else if (s.equals("MagentaLow10")) setValue( new Integer(GeColor.COLOR_190));
/* glow_eDrawType_Color191 */ else if (s.equals("MagentaMedium1")) setValue( new Integer(GeColor.COLOR_191));
/* glow_eDrawType_Color192 */ else if (s.equals("MagentaMedium2")) setValue( new Integer(GeColor.COLOR_192));
/* glow_eDrawType_Color193 */ else if (s.equals("MagentaMedium3")) setValue( new Integer(GeColor.COLOR_193));
/* glow_eDrawType_Color194 */ else if (s.equals("MagentaMedium4")) setValue( new Integer(GeColor.COLOR_194));
/* glow_eDrawType_Color195 */ else if (s.equals("MagentaMedium5")) setValue( new Integer(GeColor.COLOR_195));
/* glow_eDrawType_Color196 */ else if (s.equals("MagentaMedium6")) setValue( new Integer(GeColor.COLOR_196));
/* glow_eDrawType_Color197 */ else if (s.equals("MagentaMedium7")) setValue( new Integer(GeColor.COLOR_197));
/* glow_eDrawType_Color198 */ else if (s.equals("MagentaMedium8")) setValue( new Integer(GeColor.COLOR_198));
/* glow_eDrawType_Color199 */ else if (s.equals("MagentaMedium9")) setValue( new Integer(GeColor.COLOR_199));
/* glow_eDrawType_Color200 */ else if (s.equals("MagentaMedium10")) setValue( new Integer(GeColor.COLOR_200));
/* glow_eDrawType_Color201 */ else if (s.equals("MagentaHigh1")) setValue( new Integer(GeColor.COLOR_201));
/* glow_eDrawType_Color202 */ else if (s.equals("MagentaHigh2")) setValue( new Integer(GeColor.COLOR_202));
/* glow_eDrawType_Color203 */ else if (s.equals("MagentaHigh3")) setValue( new Integer(GeColor.COLOR_203));
/* glow_eDrawType_Color204 */ else if (s.equals("MagentaHigh4")) setValue( new Integer(GeColor.COLOR_204));
/* glow_eDrawType_Color205 */ else if (s.equals("MagentaHigh5")) setValue( new Integer(GeColor.COLOR_205));
/* glow_eDrawType_Color206 */ else if (s.equals("MagentaHigh6")) setValue( new Integer(GeColor.COLOR_206));
/* glow_eDrawType_Color207 */ else if (s.equals("MagentaHigh7")) setValue( new Integer(GeColor.COLOR_207));
/* glow_eDrawType_Color208 */ else if (s.equals("MagentaHigh8")) setValue( new Integer(GeColor.COLOR_208));
/* glow_eDrawType_Color209 */ else if (s.equals("MagentaHigh9")) setValue( new Integer(GeColor.COLOR_209));
/* glow_eDrawType_Color210 */ else if (s.equals("MagentaHigh10")) setValue( new Integer(GeColor.COLOR_210));
/* glow_eDrawType_Color211 */ else if (s.equals("BlueLow1")) setValue( new Integer(GeColor.COLOR_211));
/* glow_eDrawType_Color212 */ else if (s.equals("BlueLow2")) setValue( new Integer(GeColor.COLOR_212));
/* glow_eDrawType_Color213 */ else if (s.equals("BlueLow3")) setValue( new Integer(GeColor.COLOR_213));
/* glow_eDrawType_Color214 */ else if (s.equals("BlueLow4")) setValue( new Integer(GeColor.COLOR_214));
/* glow_eDrawType_Color215 */ else if (s.equals("BlueLow5")) setValue( new Integer(GeColor.COLOR_215));
/* glow_eDrawType_Color216 */ else if (s.equals("BlueLow6")) setValue( new Integer(GeColor.COLOR_216));
/* glow_eDrawType_Color217 */ else if (s.equals("BlueLow7")) setValue( new Integer(GeColor.COLOR_217));
/* glow_eDrawType_Color218 */ else if (s.equals("BlueLow8")) setValue( new Integer(GeColor.COLOR_218));
/* glow_eDrawType_Color219 */ else if (s.equals("BlueLow9")) setValue( new Integer(GeColor.COLOR_219));
/* glow_eDrawType_Color220 */ else if (s.equals("BlueLow10")) setValue( new Integer(GeColor.COLOR_220));
/* glow_eDrawType_Color221 */ else if (s.equals("BlueMedium1")) setValue( new Integer(GeColor.COLOR_221));
/* glow_eDrawType_Color222 */ else if (s.equals("BlueMedium2")) setValue( new Integer(GeColor.COLOR_222));
/* glow_eDrawType_Color223 */ else if (s.equals("BlueMedium3")) setValue( new Integer(GeColor.COLOR_223));
/* glow_eDrawType_Color224 */ else if (s.equals("BlueMedium4")) setValue( new Integer(GeColor.COLOR_224));
/* glow_eDrawType_Color225 */ else if (s.equals("BlueMedium5")) setValue( new Integer(GeColor.COLOR_225));
/* glow_eDrawType_Color226 */ else if (s.equals("BlueMedium6")) setValue( new Integer(GeColor.COLOR_226));
/* glow_eDrawType_Color227 */ else if (s.equals("BlueMedium7")) setValue( new Integer(GeColor.COLOR_227));
/* glow_eDrawType_Color228 */ else if (s.equals("BlueMedium8")) setValue( new Integer(GeColor.COLOR_228));
/* glow_eDrawType_Color229 */ else if (s.equals("BlueMedium9")) setValue( new Integer(GeColor.COLOR_229));
/* glow_eDrawType_Color230 */ else if (s.equals("BlueMedium10")) setValue( new Integer(GeColor.COLOR_230));
/* glow_eDrawType_Color231 */ else if (s.equals("BlueHigh1")) setValue( new Integer(GeColor.COLOR_231));
/* glow_eDrawType_Color232 */ else if (s.equals("BlueHigh2")) setValue( new Integer(GeColor.COLOR_232));
/* glow_eDrawType_Color233 */ else if (s.equals("BlueHigh3")) setValue( new Integer(GeColor.COLOR_233));
/* glow_eDrawType_Color234 */ else if (s.equals("BlueHigh4")) setValue( new Integer(GeColor.COLOR_234));
/* glow_eDrawType_Color235 */ else if (s.equals("BlueHigh5")) setValue( new Integer(GeColor.COLOR_235));
/* glow_eDrawType_Color236 */ else if (s.equals("BlueHigh6")) setValue( new Integer(GeColor.COLOR_236));
/* glow_eDrawType_Color237 */ else if (s.equals("BlueHigh7")) setValue( new Integer(GeColor.COLOR_237));
/* glow_eDrawType_Color238 */ else if (s.equals("BlueHigh8")) setValue( new Integer(GeColor.COLOR_238));
/* glow_eDrawType_Color239 */ else if (s.equals("BlueHigh9")) setValue( new Integer(GeColor.COLOR_239));
/* glow_eDrawType_Color240 */ else if (s.equals("BlueHigh10")) setValue( new Integer(GeColor.COLOR_240));
/* glow_eDrawType_Color241 */ else if (s.equals("SeaBlueLow1")) setValue( new Integer(GeColor.COLOR_241));
/* glow_eDrawType_Color242 */ else if (s.equals("SeaBlueLow2")) setValue( new Integer(GeColor.COLOR_242));
/* glow_eDrawType_Color243 */ else if (s.equals("SeaBlueLow3")) setValue( new Integer(GeColor.COLOR_243));
/* glow_eDrawType_Color244 */ else if (s.equals("SeaBlueLow4")) setValue( new Integer(GeColor.COLOR_244));
/* glow_eDrawType_Color245 */ else if (s.equals("SeaBlueLow5")) setValue( new Integer(GeColor.COLOR_245));
/* glow_eDrawType_Color246 */ else if (s.equals("SeaBlueLow6")) setValue( new Integer(GeColor.COLOR_246));
/* glow_eDrawType_Color247 */ else if (s.equals("SeaBlueLow7")) setValue( new Integer(GeColor.COLOR_247));
/* glow_eDrawType_Color248 */ else if (s.equals("SeaBlueLow8")) setValue( new Integer(GeColor.COLOR_248));
/* glow_eDrawType_Color249 */ else if (s.equals("SeaBlueLow9")) setValue( new Integer(GeColor.COLOR_249));
/* glow_eDrawType_Color250 */ else if (s.equals("SeaBlueLow10")) setValue( new Integer(GeColor.COLOR_250));
/* glow_eDrawType_Color251 */ else if (s.equals("SeaBlueMedium1")) setValue( new Integer(GeColor.COLOR_251));
/* glow_eDrawType_Color252 */ else if (s.equals("SeaBlueMedium2")) setValue( new Integer(GeColor.COLOR_252));
/* glow_eDrawType_Color253 */ else if (s.equals("SeaBlueMedium3")) setValue( new Integer(GeColor.COLOR_253));
/* glow_eDrawType_Color224 */ else if (s.equals("SeaBlueMedium4")) setValue( new Integer(GeColor.COLOR_254));
/* glow_eDrawType_Color255 */ else if (s.equals("SeaBlueMedium5")) setValue( new Integer(GeColor.COLOR_255));
/* glow_eDrawType_Color256 */ else if (s.equals("SeaBlueMedium6")) setValue( new Integer(GeColor.COLOR_256));
/* glow_eDrawType_Color257 */ else if (s.equals("SeaBlueMedium7")) setValue( new Integer(GeColor.COLOR_257));
/* glow_eDrawType_Color258 */ else if (s.equals("SeaBlueMedium8")) setValue( new Integer(GeColor.COLOR_258));
/* glow_eDrawType_Color259 */ else if (s.equals("SeaBlueMedium9")) setValue( new Integer(GeColor.COLOR_259));
/* glow_eDrawType_Color260 */ else if (s.equals("SeaBlueMedium10")) setValue( new Integer(GeColor.COLOR_260));
/* glow_eDrawType_Color261 */ else if (s.equals("SeaBlueHigh1")) setValue( new Integer(GeColor.COLOR_261));
/* glow_eDrawType_Color262 */ else if (s.equals("SeaBlueHigh2")) setValue( new Integer(GeColor.COLOR_262));
/* glow_eDrawType_Color263 */ else if (s.equals("SeaBlueHigh3")) setValue( new Integer(GeColor.COLOR_263));
/* glow_eDrawType_Color264 */ else if (s.equals("SeaBlueHigh4")) setValue( new Integer(GeColor.COLOR_264));
/* glow_eDrawType_Color265 */ else if (s.equals("SeaBlueHigh5")) setValue( new Integer(GeColor.COLOR_265));
/* glow_eDrawType_Color266 */ else if (s.equals("SeaBlueHigh6")) setValue( new Integer(GeColor.COLOR_266));
/* glow_eDrawType_Color267 */ else if (s.equals("SeaBlueHigh7")) setValue( new Integer(GeColor.COLOR_267));
/* glow_eDrawType_Color268 */ else if (s.equals("SeaBlueHigh8")) setValue( new Integer(GeColor.COLOR_268));
/* glow_eDrawType_Color269 */ else if (s.equals("SeaBlueHigh9")) setValue( new Integer(GeColor.COLOR_269));
/* glow_eDrawType_Color270 */ else if (s.equals("SeaBlueHigh10")) setValue( new Integer(GeColor.COLOR_270));
/* glow_eDrawType_Color271 */ else if (s.equals("GreenLow1")) setValue( new Integer(GeColor.COLOR_271));
/* glow_eDrawType_Color272 */ else if (s.equals("GreenLow2")) setValue( new Integer(GeColor.COLOR_272));
/* glow_eDrawType_Color273 */ else if (s.equals("GreenLow3")) setValue( new Integer(GeColor.COLOR_273));
/* glow_eDrawType_Color274 */ else if (s.equals("GreenLow4")) setValue( new Integer(GeColor.COLOR_274));
/* glow_eDrawType_Color275 */ else if (s.equals("GreenLow5")) setValue( new Integer(GeColor.COLOR_275));
/* glow_eDrawType_Color276 */ else if (s.equals("GreenLow6")) setValue( new Integer(GeColor.COLOR_276));
/* glow_eDrawType_Color277 */ else if (s.equals("GreenLow7")) setValue( new Integer(GeColor.COLOR_277));
/* glow_eDrawType_Color278 */ else if (s.equals("GreenLow8")) setValue( new Integer(GeColor.COLOR_278));
/* glow_eDrawType_Color279 */ else if (s.equals("GreenLow9")) setValue( new Integer(GeColor.COLOR_279));
/* glow_eDrawType_Color280 */ else if (s.equals("GreenLow10")) setValue( new Integer(GeColor.COLOR_280));
/* glow_eDrawType_Color281 */ else if (s.equals("GreenMedium1")) setValue( new Integer(GeColor.COLOR_281));
/* glow_eDrawType_Color282 */ else if (s.equals("GreenMedium2")) setValue( new Integer(GeColor.COLOR_282));
/* glow_eDrawType_Color283 */ else if (s.equals("GreenMedium3")) setValue( new Integer(GeColor.COLOR_283));
/* glow_eDrawType_Color284 */ else if (s.equals("GreenMedium4")) setValue( new Integer(GeColor.COLOR_284));
/* glow_eDrawType_Color285 */ else if (s.equals("GreenMedium5")) setValue( new Integer(GeColor.COLOR_285));
/* glow_eDrawType_Color286 */ else if (s.equals("GreenMedium6")) setValue( new Integer(GeColor.COLOR_286));
/* glow_eDrawType_Color287 */ else if (s.equals("GreenMedium7")) setValue( new Integer(GeColor.COLOR_287));
/* glow_eDrawType_Color288 */ else if (s.equals("GreenMedium8")) setValue( new Integer(GeColor.COLOR_288));
/* glow_eDrawType_Color289 */ else if (s.equals("GreenMedium9")) setValue( new Integer(GeColor.COLOR_289));
/* glow_eDrawType_Color290 */ else if (s.equals("GreenMedium10")) setValue( new Integer(GeColor.COLOR_290));
/* glow_eDrawType_Color291 */ else if (s.equals("GreenHigh1")) setValue( new Integer(GeColor.COLOR_291));
/* glow_eDrawType_Color292 */ else if (s.equals("GreenHigh2")) setValue( new Integer(GeColor.COLOR_292));
/* glow_eDrawType_Color293 */ else if (s.equals("GreenHigh3")) setValue( new Integer(GeColor.COLOR_293));
/* glow_eDrawType_Color294 */ else if (s.equals("GreenHigh4")) setValue( new Integer(GeColor.COLOR_294));
/* glow_eDrawType_Color295 */ else if (s.equals("GreenHigh5")) setValue( new Integer(GeColor.COLOR_295));
/* glow_eDrawType_Color296 */ else if (s.equals("GreenHigh6")) setValue( new Integer(GeColor.COLOR_296));
/* glow_eDrawType_Color297 */ else if (s.equals("GreenHigh7")) setValue( new Integer(GeColor.COLOR_297));
/* glow_eDrawType_Color298 */ else if (s.equals("GreenHigh8")) setValue( new Integer(GeColor.COLOR_298));
/* glow_eDrawType_Color299 */ else if (s.equals("GreenHigh9")) setValue( new Integer(GeColor.COLOR_299));
/* glow_eDrawType_Color300 */ else if (s.equals("GreenHigh10")) setValue( new Integer(GeColor.COLOR_300));
else throw new IllegalArgumentException(s);
}
}
......@@ -16,106 +16,82 @@ public class GeColorToneEditor extends PropertyEditorSupport {
public GeColorToneEditor() {
}
private static String[] tagStrings = {
"NoTone",
"ToneGray",
"ToneYellow",
"ToneGold",
"ToneOrange",
"ToneRed",
"ToneMagenta",
"ToneBlue",
"ToneSeablue",
"ToneGreen",
"Grey5",
"Grey10",
"Grey15",
"Grey30",
"Grey50",
"Grey7",
"Grey12",
"Grey25",
"Grey45",
"Grey65",
"LightYellow0",
"LightYellow1",
"LightYellow2",
"LightYellow3",
"LightYellow4",
"yellow0",
"yellow1",
"yellow2",
"yellow3",
"yellow4",
"Lightgoldenrod0",
"Lightgoldenrod1",
"Lightgoldenrod2",
"Lightgoldenrod3",
"Lightgoldenrod4",
"gold00",
"gold1",
"gold2",
"gold3",
"gold4",
"LightOrange",
"NavajoWhite",
"LightSalmon1",
"LightSalmon3",
"LightSalmon4",
"DarkOrange",
"DarkOrange0",
"DarkOrange1",
"DarkOrange3",
"DarkOrange4",
"MistyRose1",
"MistyRose2",
"LightPink",
"LightPink3",
"LightPink4",
"IndianRed0",
"IndianRed1",
"firebrick1",
"firebrick3",
"firebrick4",
"Plum1 ",
"Plum1",
"Plum2",
"Plum3",
"Plum4",
"Magenta00",
"Magenta0",
"Magenta1",
"Magenta3",
"Magenta4",
"LightSteelBlue1",
"LightSteelBlue1",
"LightSteelBlue2",
"LightSteelBlue3",
"LightSteelBlue4",
"LightCyan",
"PowderBlue",
"SteelBlue1",
"SteelBlue",
"blue4",
"aquamarine0",
"aquamarine1",
"aquamarine2",
"aquamarine3",
"aquamarine4",
"turqoise0",
"turqoise1",
"turqoise2",
"turqoise3",
"turqoise4",
"DarkOliveGreen1",
"DarkOliveGreen2",
"DarkOliveGreen3",
"DarkOliveGreen4",
"DarkOliveGreen5",
"chartreuse",
"chartreuse2",
"chartreuse3",
"chartreuse4",
"DarkGreen",
/* glow_eDrawTone_No */ "NoTone",
/* glow_eDrawTone_Gray */ "ToneGray",
/* glow_eDrawTone_YellowGreen */ "ToneYellowGreen",
/* glow_eDrawTone_Yellow */ "ToneYellow",
/* glow_eDrawTone_Orange */ "ToneOrange",
/* glow_eDrawTone_Red */ "ToneRed",
/* glow_eDrawTone_Magenta */ "ToneMagenta",
/* glow_eDrawTone_Blue */ "ToneBlue",
/* glow_eDrawTone_Seablue */ "ToneSeablue",
/* glow_eDrawTone_Green */ "ToneGreen",
/* glow_eDrawTone_DarkGray */ "ToneDarkGray",
/* glow_eDrawTone_LightGray */ "ToneLightGray",
/* glow_eDrawTone_DarkYellowGreen */ "ToneDarkYellowGreen",
/* glow_eDrawTone_LightYellowGreen */ "ToneLightYellowGreen",
/* glow_eDrawTone_YellowGreenHighSaturation */ "ToneYellowGreenHighSaturation",
/* glow_eDrawTone_YellowGreenLowSaturation */ "ToneYellowGreenLowSaturation",
/* glow_eDrawTone_DarkYellowGreenHighSaturation */ "ToneDarkYellowGreenHighSaturation",
/* glow_eDrawTone_DarkYellowGreenLowSaturation */ "ToneDarkYellowGreenLowSaturation",
/* glow_eDrawTone_LightYellowGreenHighSaturation */ "ToneLightYellowGreenHighSaturation",
/* glow_eDrawTone_LightYellowGreenLowSaturation */ "ToneLightYellowGreenLowSaturation",
/* glow_eDrawTone_DarkYellow */ "ToneDarkYellow",
/* glow_eDrawTone_LightYellow */ "ToneLightYellow",
/* glow_eDrawTone_YellowHighSaturation */ "ToneYellowHighSaturation",
/* glow_eDrawTone_YellowLowSaturation */ "ToneYellowLowSaturation",
/* glow_eDrawTone_DarkYellowHighSaturation */ "ToneDarkYellowHighSaturation",
/* glow_eDrawTone_DarkYellowLowSaturation */ "ToneDarkYellowLowSaturation",
/* glow_eDrawTone_LightYellowHighSaturation */ "ToneLightYellowHighSaturation",
/* glow_eDrawTone_LightYellowLowSaturation */ "ToneLightYellowLowSaturation",
/* glow_eDrawTone_DarkOrange */ "ToneDarkOrange",
/* glow_eDrawTone_LightOrange */ "ToneLightOrange",
/* glow_eDrawTone_OrangeHighSaturation */ "ToneOrangeHighSaturation",
/* glow_eDrawTone_OrangeLowSaturation */ "ToneOrangeLowSaturation",
/* glow_eDrawTone_DarkOrangeHighSaturation */ "ToneDarkOrangeHighSaturation",
/* glow_eDrawTone_DarkOrangeLowSaturation */ "ToneDarkOrangeLowSaturation",
/* glow_eDrawTone_LightOrangeHighSaturation */ "ToneLightOrangeHighSaturation",
/* glow_eDrawTone_LightOrangeLowSaturation */ "ToneLightOrangeLowSaturation",
/* glow_eDrawTone_DarkRed */ "ToneDarkRed",
/* glow_eDrawTone_LightRed */ "ToneLightRed",
/* glow_eDrawTone_RedHighSaturation */ "ToneRedHighSaturation",
/* glow_eDrawTone_RedLowSaturation */ "ToneRedLowSaturation",
/* glow_eDrawTone_DarkRedHighSaturation */ "ToneDarkRedHighSaturation",
/* glow_eDrawTone_DarkRedLowSaturation */ "ToneDarkRedLowSaturation",
/* glow_eDrawTone_LightRedHighSaturation */ "ToneLightRedHighSaturation",
/* glow_eDrawTone_LightRedLowSaturation */ "ToneLightRedLowSaturation",
/* glow_eDrawTone_DarkMagenta */ "ToneDarkMagenta",
/* glow_eDrawTone_LightMagenta */ "ToneLightMagenta",
/* glow_eDrawTone_MagentaHighSaturation */ "ToneMagentaHighSaturation",
/* glow_eDrawTone_MagentaLowSaturation */ "ToneMagentaLowSaturation",
/* glow_eDrawTone_DarkMagentaHighSaturation */ "ToneDarkMagentaHighSaturation",
/* glow_eDrawTone_DarkMagentaLowSaturation */ "ToneDarkMagentaLowSaturation",
/* glow_eDrawTone_LightMagentaHighSaturation */ "ToneLightMagentaHighSaturation",
/* glow_eDrawTone_LightMagentaLowSaturation */ "ToneLightMagentaLowSaturation",
/* glow_eDrawTone_DarkBlue */ "ToneDarkBlue",
/* glow_eDrawTone_LightBlue */ "ToneLightBlue",
/* glow_eDrawTone_BlueHighSaturation */ "ToneBlueHighSaturation",
/* glow_eDrawTone_BlueLowSaturation */ "ToneBlueLowSaturation",
/* glow_eDrawTone_DarkBlueHighSaturation */ "ToneDarkBlueHighSaturation",
/* glow_eDrawTone_DarkBlueLowSaturation */ "ToneDarkBlueLowSaturation",
/* glow_eDrawTone_LightBlueHighSaturation */ "ToneLightBlueHighSaturation",
/* glow_eDrawTone_LightBlueLowSaturation */ "ToneLightBlueLowSaturation",
/* glow_eDrawTone_DarkSeablue */ "ToneDarkSeablue",
/* glow_eDrawTone_LightSeablue */ "ToneLightSeablue",
/* glow_eDrawTone_SeablueHighSaturation */ "ToneSeablueHighSaturation",
/* glow_eDrawTone_SeablueLowSaturation */ "ToneSeablueLowSaturation",
/* glow_eDrawTone_DarkSeablueHighSaturation */ "ToneDarkSeablueHighSaturation",
/* glow_eDrawTone_DarkSeablueLowSaturation */ "ToneDarkSeablueLowSaturation",
/* glow_eDrawTone_LightSeablueHighSaturation */ "ToneLightSeablueHighSaturation",
/* glow_eDrawTone_LightSeablueLowSaturation */ "ToneLightSeablueLowSaturation",
/* glow_eDrawTone_DarkGreen */ "ToneDarkGreen",
/* glow_eDrawTone_LightGreen */ "ToneLightGreen",
/* glow_eDrawTone_GreenHighSaturation */ "ToneGreenHighSaturation",
/* glow_eDrawTone_GreenLowSaturation */ "ToneGreenLowSaturation",
/* glow_eDrawTone_DarkGreenHighSaturation */ "ToneDarkGreenHighSaturation",
/* glow_eDrawTone_DarkGreenLowSaturation */ "ToneDarkGreenLowSaturation",
/* glow_eDrawTone_LightGreenHighSaturation */ "ToneLightGreenHighSaturation",
/* glow_eDrawTone_LightGreenLowSaturation */ "ToneLightGreenLowSaturation",
};
public String[] getTags() {
return tagStrings;
......@@ -125,105 +101,83 @@ public class GeColorToneEditor extends PropertyEditorSupport {
}
public void setAsText(String s) throws IllegalArgumentException {
if (s.equals("NoTone")) setValue( new Integer(GeColor.COLOR_TONE_NO));
else if (s.equals("ToneGray")) setValue( new Integer(GeColor.COLOR_TONE_GRAY));
else if (s.equals("ToneYellow")) setValue( new Integer(GeColor.COLOR_TONE_YELLOW));
else if (s.equals("ToneGold")) setValue( new Integer(GeColor.COLOR_TONE_GOLD));
else if (s.equals("ToneOrange")) setValue( new Integer(GeColor.COLOR_TONE_ORANGE));
else if (s.equals("ToneRed")) setValue( new Integer(GeColor.COLOR_TONE_RED));
else if (s.equals("ToneMagenta")) setValue( new Integer(GeColor.COLOR_TONE_MAGENTA));
else if (s.equals("ToneBlue")) setValue( new Integer(GeColor.COLOR_TONE_BLUE));
else if (s.equals("ToneSeablue")) setValue( new Integer(GeColor.COLOR_TONE_SEABLUE));
else if (s.equals("ToneGreen")) setValue( new Integer(GeColor.COLOR_TONE_GREEN));
else if (s.equals("Grey5")) setValue( new Integer(GeColor.COLOR_11));
else if (s.equals("Grey10")) setValue( new Integer(GeColor.COLOR_12));
else if (s.equals("Grey15")) setValue( new Integer(GeColor.COLOR_13));
else if (s.equals("Grey30")) setValue( new Integer(GeColor.COLOR_14));
else if (s.equals("Grey50")) setValue( new Integer(GeColor.COLOR_15));
else if (s.equals("Grey7")) setValue( new Integer(GeColor.COLOR_16));
else if (s.equals("Grey12")) setValue( new Integer(GeColor.COLOR_17));
else if (s.equals("Grey25")) setValue( new Integer(GeColor.COLOR_18));
else if (s.equals("Grey45")) setValue( new Integer(GeColor.COLOR_19));
else if (s.equals("Grey65")) setValue( new Integer(GeColor.COLOR_20));
else if (s.equals("LightYellow0")) setValue( new Integer(GeColor.COLOR_21));
else if (s.equals("LightYellow1")) setValue( new Integer(GeColor.COLOR_22));
else if (s.equals("LightYellow2")) setValue( new Integer(GeColor.COLOR_23));
else if (s.equals("LightYellow3")) setValue( new Integer(GeColor.COLOR_24));
else if (s.equals("LightYellow4")) setValue( new Integer(GeColor.COLOR_25));
else if (s.equals("yellow0")) setValue( new Integer(GeColor.COLOR_26));
else if (s.equals("yellow1")) setValue( new Integer(GeColor.COLOR_27));
else if (s.equals("yellow2")) setValue( new Integer(GeColor.COLOR_28));
else if (s.equals("yellow3")) setValue( new Integer(GeColor.COLOR_29));
else if (s.equals("yellow4")) setValue( new Integer(GeColor.COLOR_30));
else if (s.equals("Lightgoldenrod0")) setValue( new Integer(GeColor.COLOR_31));
else if (s.equals("Lightgoldenrod1")) setValue( new Integer(GeColor.COLOR_32));
else if (s.equals("Lightgoldenrod2")) setValue( new Integer(GeColor.COLOR_33));
else if (s.equals("Lightgoldenrod3")) setValue( new Integer(GeColor.COLOR_34));
else if (s.equals("Lightgoldenrod4")) setValue( new Integer(GeColor.COLOR_35));
else if (s.equals("gold00")) setValue( new Integer(GeColor.COLOR_36));
else if (s.equals("gold1")) setValue( new Integer(GeColor.COLOR_37));
else if (s.equals("gold2")) setValue( new Integer(GeColor.COLOR_38));
else if (s.equals("gold3")) setValue( new Integer(GeColor.COLOR_39));
else if (s.equals("gold4")) setValue( new Integer(GeColor.COLOR_40));
else if (s.equals("LightOrange")) setValue( new Integer(GeColor.COLOR_41));
else if (s.equals("NavajoWhite")) setValue( new Integer(GeColor.COLOR_42));
else if (s.equals("LightSalmon1")) setValue( new Integer(GeColor.COLOR_43));
else if (s.equals("LightSalmon3")) setValue( new Integer(GeColor.COLOR_44));
else if (s.equals("LightSalmon4")) setValue( new Integer(GeColor.COLOR_45));
else if (s.equals("DarkOrange")) setValue( new Integer(GeColor.COLOR_46));
else if (s.equals("DarkOrange0")) setValue( new Integer(GeColor.COLOR_47));
else if (s.equals("DarkOrange1")) setValue( new Integer(GeColor.COLOR_48));
else if (s.equals("DarkOrange3")) setValue( new Integer(GeColor.COLOR_49));
else if (s.equals("DarkOrange4")) setValue( new Integer(GeColor.COLOR_50));
else if (s.equals("MistyRose1")) setValue( new Integer(GeColor.COLOR_51));
else if (s.equals("MistyRose2")) setValue( new Integer(GeColor.COLOR_52));
else if (s.equals("LightPink")) setValue( new Integer(GeColor.COLOR_53));
else if (s.equals("LightPink3")) setValue( new Integer(GeColor.COLOR_54));
else if (s.equals("LightPink4")) setValue( new Integer(GeColor.COLOR_55));
else if (s.equals("IndianRed0")) setValue( new Integer(GeColor.COLOR_56));
else if (s.equals("IndianRed1")) setValue( new Integer(GeColor.COLOR_57));
else if (s.equals("firebrick1")) setValue( new Integer(GeColor.COLOR_58));
else if (s.equals("firebrick3")) setValue( new Integer(GeColor.COLOR_59));
else if (s.equals("firebrick4")) setValue( new Integer(GeColor.COLOR_60));
else if (s.equals("Plum1")) setValue( new Integer(GeColor.COLOR_61));
else if (s.equals("Plum1")) setValue( new Integer(GeColor.COLOR_62));
else if (s.equals("Plum2")) setValue( new Integer(GeColor.COLOR_63));
else if (s.equals("Plum3")) setValue( new Integer(GeColor.COLOR_64));
else if (s.equals("Plum4")) setValue( new Integer(GeColor.COLOR_65));
else if (s.equals("Magenta00")) setValue( new Integer(GeColor.COLOR_66));
else if (s.equals("Magenta0")) setValue( new Integer(GeColor.COLOR_67));
else if (s.equals("Magenta1")) setValue( new Integer(GeColor.COLOR_68));
else if (s.equals("Magenta3")) setValue( new Integer(GeColor.COLOR_69));
else if (s.equals("Magenta4")) setValue( new Integer(GeColor.COLOR_70));
else if (s.equals("LightSteelBlue1")) setValue( new Integer(GeColor.COLOR_71));
else if (s.equals("LightSteelBlue1")) setValue( new Integer(GeColor.COLOR_72));
else if (s.equals("LightSteelBlue2")) setValue( new Integer(GeColor.COLOR_73));
else if (s.equals("LightSteelBlue3")) setValue( new Integer(GeColor.COLOR_74));
else if (s.equals("LightSteelBlue4")) setValue( new Integer(GeColor.COLOR_75));
else if (s.equals("LightCyan")) setValue( new Integer(GeColor.COLOR_76));
else if (s.equals("PowderBlue")) setValue( new Integer(GeColor.COLOR_77));
else if (s.equals("SteelBlue1")) setValue( new Integer(GeColor.COLOR_78));
else if (s.equals("SteelBlue")) setValue( new Integer(GeColor.COLOR_79));
else if (s.equals("blue4")) setValue( new Integer(GeColor.COLOR_80));
else if (s.equals("aquamarine0")) setValue( new Integer(GeColor.COLOR_81));
else if (s.equals("aquamarine1")) setValue( new Integer(GeColor.COLOR_82));
else if (s.equals("aquamarine2")) setValue( new Integer(GeColor.COLOR_83));
else if (s.equals("aquamarine3")) setValue( new Integer(GeColor.COLOR_84));
else if (s.equals("aquamarine4")) setValue( new Integer(GeColor.COLOR_85));
else if (s.equals("turqoise0")) setValue( new Integer(GeColor.COLOR_86));
else if (s.equals("turqoise1")) setValue( new Integer(GeColor.COLOR_87));
else if (s.equals("turqoise2")) setValue( new Integer(GeColor.COLOR_88));
else if (s.equals("turqoise3")) setValue( new Integer(GeColor.COLOR_89));
else if (s.equals("turqoise4")) setValue( new Integer(GeColor.COLOR_90));
else if (s.equals("DarkOliveGreen1")) setValue( new Integer(GeColor.COLOR_91));
else if (s.equals("DarkOliveGreen2")) setValue( new Integer(GeColor.COLOR_92));
else if (s.equals("DarkOliveGreen3")) setValue( new Integer(GeColor.COLOR_93));
else if (s.equals("DarkOliveGreen4")) setValue( new Integer(GeColor.COLOR_94));
else if (s.equals("DarkOliveGreen5")) setValue( new Integer(GeColor.COLOR_95));
else if (s.equals("chartreuse")) setValue( new Integer(GeColor.COLOR_96));
else if (s.equals("chartreuse2")) setValue( new Integer(GeColor.COLOR_97));
else if (s.equals("chartreuse3")) setValue( new Integer(GeColor.COLOR_98));
else if (s.equals("chartreuse4")) setValue( new Integer(GeColor.COLOR_99));
else if (s.equals("DarkGreen")) setValue( new Integer(GeColor.COLOR_100));
/* glow_eDrawTone_Gray */ else if (s.equals("ToneGray")) setValue( new Integer(GeColor.COLOR_TONE_GRAY));
/* glow_eDrawTone_YellowGreen */ else if (s.equals("ToneYellowGreen")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWGREEN));
/* glow_eDrawTone_Yellow */ else if (s.equals("ToneYellow")) setValue( new Integer(GeColor.COLOR_TONE_YELLOW));
/* glow_eDrawTone_Orange */ else if (s.equals("ToneOrange")) setValue( new Integer(GeColor.COLOR_TONE_ORANGE));
/* glow_eDrawTone_Red */ else if (s.equals("ToneRed")) setValue( new Integer(GeColor.COLOR_TONE_RED));
/* glow_eDrawTone_Magenta */ else if (s.equals("ToneMagenta")) setValue( new Integer(GeColor.COLOR_TONE_MAGENTA));
/* glow_eDrawTone_Blue */ else if (s.equals("ToneBlue")) setValue( new Integer(GeColor.COLOR_TONE_BLUE));
/* glow_eDrawTone_Seablue */ else if (s.equals("ToneSeablue")) setValue( new Integer(GeColor.COLOR_TONE_SEABLUE));
/* glow_eDrawTone_Green */ else if (s.equals("ToneGreen")) setValue( new Integer(GeColor.COLOR_TONE_GREEN));
/* glow_eDrawTone_DarkGray */ else if (s.equals("ToneDarkGray")) setValue( new Integer(GeColor.COLOR_TONE_DARKGRAY));
/* glow_eDrawTone_LightGray */ else if (s.equals("ToneLightGray")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTGRAY));
/* glow_eDrawTone_DarkYellowGreen */ else if (s.equals("ToneDarkYellowGreen")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWGREEN));
/* glow_eDrawTone_LightYellowGreen */ else if (s.equals("ToneLightYellowGreen")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWGREEN));
/* glow_eDrawTone_YellowGreenHighSaturation */ else if (s.equals("ToneYellowGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWGREEN));
/* glow_eDrawTone_YellowGreenLowSaturation */ else if (s.equals("ToneYellowGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWGREENLOWSATURATION));
/* glow_eDrawTone_DarkYellowGreenHighSaturation */ else if (s.equals("ToneDarkYellowGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWGREENHIGHSATURATION));
/* glow_eDrawTone_DarkYellowGreenLowSaturation */ else if (s.equals("ToneDarkYellowGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWGREENLOWSATURATION));
/* glow_eDrawTone_LightYellowGreenHighSaturation */ else if (s.equals("ToneLightYellowGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWGREENHIGHSATURATION));
/* glow_eDrawTone_LightYellowGreenLowSaturation */ else if (s.equals("ToneLightYellowGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWGREENLOWSATURATION));
/* glow_eDrawTone_DarkYellow */ else if (s.equals("ToneDarkYellow")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOW));
/* glow_eDrawTone_LightYellow */ else if (s.equals("ToneLightYellow")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOW));
/* glow_eDrawTone_YellowHighSaturation */ else if (s.equals("ToneYellowHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWHIGHSATURATION));
/* glow_eDrawTone_YellowLowSaturation */ else if (s.equals("ToneYellowLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_YELLOWLOWSATURATION));
/* glow_eDrawTone_DarkYellowHighSaturation */ else if (s.equals("ToneDarkYellowHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWHIGHSATURATION));
/* glow_eDrawTone_DarkYellowLowSaturation */ else if (s.equals("ToneDarkYellowLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKYELLOWLOWSATURATION));
/* glow_eDrawTone_LightYellowHighSaturation */ else if (s.equals("ToneLightYellowHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWHIGHSATURATION));
/* glow_eDrawTone_LightYellowLowSaturation */ else if (s.equals("ToneLightYellowLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTYELLOWLOWSATURATION));
/* glow_eDrawTone_DarkOrange */ else if (s.equals("ToneDarkOrange")) setValue( new Integer(GeColor.COLOR_TONE_DARKORANGE));
/* glow_eDrawTone_LightOrange */ else if (s.equals("ToneLightOrange")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTORANGE));
/* glow_eDrawTone_OrangeHighSaturation */ else if (s.equals("ToneOrangeHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_ORANGEHIGHSATURATION));
/* glow_eDrawTone_OrangeLowSaturation */ else if (s.equals("ToneOrangeLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_ORANGELOWSATURATION));
/* glow_eDrawTone_DarkOrangeHighSaturation */ else if (s.equals("ToneDarkOrangeHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKORANGEHIGHSATURATION));
/* glow_eDrawTone_DarkOrangeLowSaturation */ else if (s.equals("ToneDarkOrangeLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKORANGELOWSATURATION));
/* glow_eDrawTone_LightOrangeHighSaturation */ else if (s.equals("ToneLightOrangeHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTORANGEHIGHSATURATION));
/* glow_eDrawTone_LightOrangeLowSaturation */ else if (s.equals("ToneLightOrangeLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTORANGELOWSATURATION));
/* glow_eDrawTone_DarkRed */ else if (s.equals("ToneDarkRed")) setValue( new Integer(GeColor.COLOR_TONE_DARKRED));
/* glow_eDrawTone_LightRed */ else if (s.equals("ToneLightRed")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTRED));
/* glow_eDrawTone_RedHighSaturation */ else if (s.equals("ToneRedHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_REDHIGHSATURATION));
/* glow_eDrawTone_RedLowSaturation */ else if (s.equals("ToneRedLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_REDLOWSATURATION));
/* glow_eDrawTone_DarkRedHighSaturation */ else if (s.equals("ToneDarkRedHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKREDHIGHSATURATION));
/* glow_eDrawTone_DarkRedLowSaturation */ else if (s.equals("ToneDarkRedLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKREDLOWSATURATION));
/* glow_eDrawTone_LightRedHighSaturation */ else if (s.equals("ToneLightRedHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTREDHIGHSATURATION));
/* glow_eDrawTone_LightRedLowSaturation */ else if (s.equals("ToneLightRedLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTREDLOWSATURATION));
/* glow_eDrawTone_DarkMagenta */ else if (s.equals("ToneDarkMagenta")) setValue( new Integer(GeColor.COLOR_TONE_DARKMAGENTA));
/* glow_eDrawTone_LightMagenta */ else if (s.equals("ToneLightMagenta")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTMAGENTA));
/* glow_eDrawTone_MagentaHighSaturation */ else if (s.equals("ToneMagentaHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_MAGENTAHIGHSATURATION));
/* glow_eDrawTone_MagentaLowSaturation */ else if (s.equals("ToneMagentaLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_MAGENTALOWSATURATION));
/* glow_eDrawTone_DarkMagentaHighSaturation */ else if (s.equals("ToneDarkMagentaHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKMAGENTAHIGHSATURATION));
/* glow_eDrawTone_DarkMagentaLowSaturation */ else if (s.equals("ToneDarkMagentaLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKMAGENTALOWSATURATION));
/* glow_eDrawTone_LightMagentaHighSaturation */ else if (s.equals("ToneLightMagentaHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTMAGENTAHIGHSATURATION));
/* glow_eDrawTone_LightMagentaLowSaturation */ else if (s.equals("ToneLightMagentaLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTMAGENTALOWSATURATION));
/* glow_eDrawTone_DarkBlue */ else if (s.equals("ToneDarkBlue")) setValue( new Integer(GeColor.COLOR_TONE_DARKBLUE));
/* glow_eDrawTone_LightBlue */ else if (s.equals("ToneLightBlue")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTBLUE));
/* glow_eDrawTone_BlueHighSaturation */ else if (s.equals("ToneBlueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_BLUEHIGHSATURATION));
/* glow_eDrawTone_BlueLowSaturation */ else if (s.equals("ToneBlueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_BLUELOWSATURATION));
/* glow_eDrawTone_DarkBlueHighSaturation */ else if (s.equals("ToneDarkBlueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKBLUEHIGHSATURATION));
/* glow_eDrawTone_DarkBlueLowSaturation */ else if (s.equals("ToneDarkBlueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKBLUELOWSATURATION));
/* glow_eDrawTone_LightBlueHighSaturation */ else if (s.equals("ToneLightBlueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTBLUEHIGHSATURATION));
/* glow_eDrawTone_LightBlueLowSaturation */ else if (s.equals("ToneLightBlueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTBLUELOWSATURATION));
/* glow_eDrawTone_DarkSeablue */ else if (s.equals("ToneDarkSeablue")) setValue( new Integer(GeColor.COLOR_TONE_DARKSEABLUE));
/* glow_eDrawTone_LightSeablue */ else if (s.equals("ToneLightSeablue")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTSEABLUE));
/* glow_eDrawTone_SeablueHighSaturation */ else if (s.equals("ToneSeablueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_SEABLUEHIGHSATURATION));
/* glow_eDrawTone_SeablueLowSaturation */ else if (s.equals("ToneSeablueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_SEABLUELOWSATURATION));
/* glow_eDrawTone_DarkSeablueHighSaturation */ else if (s.equals("ToneDarkSeablueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKSEABLUEHIGHSATURATION));
/* glow_eDrawTone_DarkSeablueLowSaturation */ else if (s.equals("ToneDarkSeablueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKSEABLUELOWSATURATION));
/* glow_eDrawTone_LightSeablueHighSaturation */ else if (s.equals("ToneLightSeablueHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTSEABLUEHIGHSATURATION));
/* glow_eDrawTone_LightSeablueLowSaturation */ else if (s.equals("ToneLightSeablueLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTSEABLUELOWSATURATION));
/* glow_eDrawTone_DarkGreen */ else if (s.equals("ToneDarkGreen")) setValue( new Integer(GeColor.COLOR_TONE_DARKGREEN));
/* glow_eDrawTone_LightGreen */ else if (s.equals("ToneLightGreen")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTGREEN));
/* glow_eDrawTone_GreenHighSaturation */ else if (s.equals("ToneGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_GREENHIGHSATURATION));
/* glow_eDrawTone_GreenLowSaturation */ else if (s.equals("ToneGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_GREENLOWSATURATION));
/* glow_eDrawTone_DarkGreenHighSaturation */ else if (s.equals("ToneDarkGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKGREENHIGHSATURATION));
/* glow_eDrawTone_DarkGreenLowSaturation */ else if (s.equals("ToneDarkGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_DARKGREENLOWSATURATION));
/* glow_eDrawTone_LightGreenHighSaturation */ else if (s.equals("ToneLightGreenHighSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTGREENHIGHSATURATION));
/* glow_eDrawTone_LightGreenLowSaturation */ else if (s.equals("ToneLightGreenLowSaturation")) setValue( new Integer(GeColor.COLOR_TONE_LIGHTGREENLOWSATURATION));
else throw new IllegalArgumentException(s);
}
}
......@@ -9,40 +9,29 @@ import javax.swing.Timer;
import java.awt.event.*;
import jpwr.rt.*;
public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
ActionListener {
public class GeComponent extends JComponent implements GeComponentIfc,
JopDynamic, JopConfirm, ActionListener {
public Dimension size;
public Object root;
public JopEngine en;
public GeDyndata dd = new GeDyndata();
public GeDyn dd = new GeDyn( this);
public int level;
Timer timer = new Timer(100, this);
StringBuffer sb = new StringBuffer();
public JopSession session;
public GeComponent component = this;
public GeComponent()
public GeComponent( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.session = session;
timer.start();
dd.setSession( session);
en = session.getEngine();
}
public void actionPerformed(ActionEvent e) {
boolean engine_found = false;
root = getTopLevelAncestor();
if ( root != null) {
if ( root instanceof JopApplet)
session = ((JopApplet)root).session;
else if ( root instanceof JopFrame)
session = ((JopFrame) root).session;
en = session.getEngine();
// Get level
Container parent = getParent();
......@@ -59,242 +48,77 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
if ( engine_found) {
timer.stop();
timer = null;
if ( (dd.type >= 1000 && en.gdh.isAuthorized( dd.access)) ||
dd.refObject != null) {
if ( dd.actionType != 0 && en.gdh.isAuthorized( dd.access)) {
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if ( e.isPopupTrigger()) {
if ( dd.refObject != null) {
if ( dd.refObject.startsWith("!")) {
// Name of an attribute that contains the objid of the reference object
CdhrObjid reto = en.gdh.getObjectInfoObjid( dd.refObject.substring(1));
if ( reto.oddSts() && !reto.objid.isNull()) {
CdhrString rets = en.gdh.objidToName( reto.objid, Cdh.mName_volumeStrict);
System.out.println( "str: " + rets.str + " " + rets.getSts());
if ( rets.oddSts() && ! rets.str.equals(""))
new JopMethodsMenu( session, rets.str, JopUtility.GRAPH,
component, e.getX(), e.getY());
}
}
else {
new JopMethodsMenu( session, dd.refObject, JopUtility.GRAPH,
component, e.getX(), e.getY());
}
}
return;
}
if ( !en.gdh.isAuthorized( dd.access) || (e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0)
return;
colorInverse = 0;
repaintForeground();
// public void mouseClicked(MouseEvent e) {
PwrtStatus sts;
String attrName;
switch ( dd.type) {
case GeDyndata.eTrace_SetDig:
case GeDyndata.eTrace_SetDigWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_ResetDig:
case GeDyndata.eTrace_ResetDigWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, false);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_ToggleDig:
case GeDyndata.eTrace_ToggleDigWithTone:
case GeDyndata.eTrace_DigShiftWithToggleDig:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.toggleObjectInfo( attrName);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_StoDigWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, false);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_IncrAnalog:
attrName = dd.getAttrName( dd.data[0]);
CdhrFloat ret = en.gdh.getObjectInfoFloat( attrName);
float incr, minvalue, maxvalue;
if ( ret.evenSts())
System.out.println( "getObjectInfoError " + ret.getSts());
// Increment value
try {
incr = Float.valueOf( dd.data[1]).floatValue();
}
catch ( NumberFormatException e_format) {
incr = 1;
}
// Minimum value
try {
minvalue = Float.valueOf( dd.data[2]).floatValue();
}
catch ( NumberFormatException e_format) {
minvalue = 0;
}
// Maximum value
try {
maxvalue = Float.valueOf( dd.data[3]).floatValue();
}
catch ( NumberFormatException e_format) {
maxvalue = 0;
}
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Up, e);
}
ret.value += incr;
if ( !( minvalue == 0 && maxvalue == 0)) {
if ( ret.value < minvalue)
ret.value = minvalue;
if ( ret.value > maxvalue)
ret.value = maxvalue;
}
sts = en.gdh.setObjectInfo( attrName, ret.value);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_Command:
if ( dd.data[0].compareTo("") != 0)
Jop.executeCommand( session, dd.data[0]);
break;
case GeDyndata.eTrace_DigWithCommand:
case GeDyndata.eTrace_DigWithErrorAndCommand:
case GeDyndata.eTrace_DigToneWithCommand:
case GeDyndata.eTrace_DigToneWithErrorAndCommand:
case GeDyndata.eTrace_DigTwoWithCommand:
case GeDyndata.eTrace_DigToneTwoWithCommand:
if ( dd.data[3].compareTo("") != 0)
Jop.executeCommand( session, dd.data[3]);
break;
case GeDyndata.eTrace_SetDigConfirm:
case GeDyndata.eTrace_ResetDigConfirm:
case GeDyndata.eTrace_ToggleDigConfirm:
case GeDyndata.eTrace_CommandConfirm:
case GeDyndata.eTrace_SetDigConfirmWithTone:
case GeDyndata.eTrace_ResetDigConfirmWithTone:
case GeDyndata.eTrace_ToggleDigConfirmWithTone:
// TODO...
JopConfirmDialog.open( component, dd.data[1]);
// JOptionPane.showMessageDialog( (Component) root, dd.data[1],
// "Click OK", JOptionPane.INFORMATION_MESSAGE);
break;
case GeDyndata.eTrace_AnnotInput:
case GeDyndata.eTrace_AnnotInputWithTone:
// TODO...
break;
case GeDyndata.eTrace_RadioButton:
// Get all radiobutton in the same group
Container parent = getParent();
if ( parent == null) break;
for ( int i = 0; i < parent.getComponentCount(); i++) {
GeComponent c = (GeComponent) parent.getComponent(i);
if ( c.dd.type == GeDyndata.eTrace_RadioButton &&
c.dd.data[0] != dd.data[0]) {
attrName = dd.getAttrName( c.dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, false);
}
}
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
}
}
public void mousePressed(MouseEvent e) {
if ( e.isPopupTrigger()) {
if ( dd.refObject != null) {
if ( dd.refObject.startsWith("!")) {
// Name of an attribute that contains the objid of the reference object
CdhrObjid reto = en.gdh.getObjectInfoObjid( dd.refObject.substring(1));
System.out.println( "Ref: " + dd.refObject.substring(1) + " " + reto.getSts());
if ( reto.oddSts() && !reto.objid.isNull()) {
CdhrString rets = en.gdh.objidToName( reto.objid, Cdh.mName_volumeStrict);
if ( rets.oddSts() && ! rets.str.equals(""))
new JopMethodsMenu( session, rets.str, JopUtility.GRAPH,
component, e.getX(), e.getY());
}
}
else {
new JopMethodsMenu( session, dd.refObject, JopUtility.GRAPH,
component, e.getX(), e.getY());
}
}
return;
}
if ( !en.gdh.isAuthorized( dd.access) || (e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0)
return;
colorInverse = 1;
repaintForeground();
PwrtStatus sts;
String attrName;
switch ( dd.type) {
case GeDyndata.eTrace_StoDigWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
}
}
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Down, e);
}
public void mouseClicked(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Click, e);
}
});
if ( (dd.actionType & GeDyn.mActionType_Slider) != 0) {
this.addMouseMotionListener( new MouseMotionAdapter() {
public void mouseDragged(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_SliderMoved, e);
}
});
}
}
}
}
public void confirmNo() {}
public void confirmYes() {
PwrtStatus sts;
String attrName;
switch ( dd.type) {
case GeDyndata.eTrace_SetDigConfirm:
case GeDyndata.eTrace_SetDigConfirmWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_ResetDigConfirm:
case GeDyndata.eTrace_ResetDigConfirmWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, false);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_ToggleDigConfirm:
case GeDyndata.eTrace_ToggleDigConfirmWithTone:
attrName = dd.getAttrName( dd.data[0]);
sts = en.gdh.toggleObjectInfo( attrName);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
break;
case GeDyndata.eTrace_CommandConfirm:
if ( dd.data[0].compareTo("") != 0)
Jop.executeCommand( session, dd.data[0]);
break;
}
dd.confirmedAction( GeDyn.eEvent_MB1Click, null);
}
public String annot1 = new String();
// GeComponents Ifc
public void tsetFillColor( int fillColor) { this.fillColor = fillColor;}
public void tsetColorTone( int colorTone) { this.colorTone = colorTone;}
public void tsetBorderColor( int borderColor) { this.borderColor = borderColor;}
public void tsetTextColor( int textColor) { this.textColor = textColor;}
public void setColorInverse( int colorInverse) { this.colorInverse = colorInverse;}
public void resetFillColor() { fillColor = originalFillColor;}
public void resetColorTone() { colorTone = originalColorTone; }
public void resetBorderColor() { borderColor = originalBorderColor;}
public void resetTextColor() { textColor = originalTextColor;}
public String getAnnot1() { return annot1;}
public void setAnnot1( String s) { annot1 = s;}
public Object getDd() { return dd;}
public void setFillLevel( float fillLevel) { this.fillLevel = fillLevel;}
public void setLevelDirection( int levelDirection) { this.levelDirection = levelDirection;}
public void setLevelColorTone( int levelColorTone) { this.levelColorTone = levelColorTone;}
public void setLevelFillColor( int levelFillColor) { this.levelFillColor = levelFillColor;}
public String annot1 = new String();
public Font annot1Font = new Font("Helvetica", Font.BOLD, 14);
public void setAnnot1Font( Font font) { annot1Font = font;}
public Font getAnnot1Font() { return annot1Font;}
public int fillColor = 9999;
public int originalFillColor = 9999;
public int borderColor = 9999;
public int originalTextColor = 9999;
public int textColor = 9999;
public int originalBorderColor = 9999;
public int colorTone = 0;
public int originalColorTone = 0;
......@@ -306,6 +130,11 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
public int originalColorIntensity = 0;
public int colorInverse = 0;
public int originalColorInverse = 0;
public float fillLevel = 1F;
public int levelDirection = 0;
public int levelColorTone = 0;
public int levelFillColor = 0;
public int shadow = 0;
public void setColorTone( int colorTone) {
this.colorTone = colorTone;
originalColorTone = colorTone;
......@@ -338,9 +167,6 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
this.fillColor = fillColor;
this.originalFillColor = fillColor;
}
public void resetFillColor() {
fillColor = originalFillColor;
}
public int getFillColor() {
return fillColor;
}
......@@ -351,6 +177,16 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
public int getBorderColor() {
return borderColor;
}
public void setTextColor( int textColor) {
this.textColor = textColor;
this.originalTextColor = textColor;
}
public int getTextColor() {
return textColor;
}
public void setShadow( int shadow) {
this.shadow = shadow;
}
public int animationCount = 1;
public int page = 1;
public int pages = 1;
......@@ -389,1593 +225,21 @@ public class GeComponent extends JComponent implements JopDynamic, JopConfirm,
return root;
}
public void dynamicOpen() {
String attrName;
if ( en.isInstance())
dd.setInstance( en.getInstance());
switch ( dd.type) {
case GeDyndata.eTrace_Dig:
case GeDyndata.eTrace_DigWithCommand:
case GeDyndata.eTrace_DigBorder:
case GeDyndata.eTrace_DigTone:
case GeDyndata.eTrace_DigToneWithCommand:
attrName = dd.getAttrName( dd.data[0]);
// System.out.println("Attribute: " + attrName + " inv " +
// GeDyndata.getAttrInverted( dd.data[0]));
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
}
}
if ( dd.data[1] != null) {
attrName = dd.getAttrName( dd.data[1]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[1]);
}
}
}
break;
case GeDyndata.eTrace_Invisible:
case GeDyndata.eTrace_RadioButton:
attrName = dd.getAttrName( dd.data[0]);
// System.out.println("Attribute: " + attrName + " inv " +
// GeDyndata.getAttrInverted( dd.data[0]));
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
}
}
break;
case GeDyndata.eTrace_DigShiftWithToggleDig:
attrName = dd.getAttrName( dd.data[1]);
// System.out.println("Attribute: " + attrName + " inv " +
// GeDyndata.getAttrInverted( dd.data[1]));
if ( attrName.compareTo("") == 0)
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
}
}
break;
case GeDyndata.eTrace_DigWithText:
attrName = dd.getAttrName( dd.data[0]);
// System.out.println("Attribute: " + attrName + " inv " +
// GeDyndata.getAttrInverted( dd.data[0]));
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
dd.lowText = dd.data[1];
dd.highText = getAnnot1();
}
}
break;
case GeDyndata.eTrace_DigWithError:
case GeDyndata.eTrace_DigWithErrorAndCommand:
case GeDyndata.eTrace_DigToneWithError:
case GeDyndata.eTrace_DigToneWithErrorAndCommand:
case GeDyndata.eTrace_DigTwo:
case GeDyndata.eTrace_DigTwoWithCommand:
case GeDyndata.eTrace_DigToneTwo:
case GeDyndata.eTrace_DigToneTwoWithCommand:
case GeDyndata.eTrace_AnalogShift:
case GeDyndata.eTrace_Animation:
case GeDyndata.eTrace_AnimationForwBack:
case GeDyndata.eTrace_DigAnimation:
case GeDyndata.eTrace_DigShift:
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[0]);
}
}
attrName = dd.getAttrName( dd.data[1]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[1]);
}
}
if (dd.data[2] != null) {
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[2] = true;
dd.p[2] = ret.id;
dd.subid[2] = ret.refid;
dd.typeId[2] = ret.typeId;
dd.inverted[2] = GeDyndata.getAttrInverted( dd.data[2]);
}
}
}
break;
case GeDyndata.eTrace_Annot:
case GeDyndata.eTrace_AnnotInput:
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.setFormat( dd.data[1]);
}
}
break;
case GeDyndata.eTrace_AnnotWithTone:
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.setFormat( dd.data[1]);
}
}
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[2]);
}
}
attrName = dd.getAttrName( dd.data[3]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[2] = true;
dd.p[2] = ret.id;
dd.subid[2] = ret.refid;
dd.typeId[2] = ret.typeId;
dd.inverted[2] = GeDyndata.getAttrInverted( dd.data[3]);
}
}
break;
case GeDyndata.eTrace_AnnotInputWithTone:
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.setFormat( dd.data[1]);
}
}
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[2]);
}
}
break;
case GeDyndata.eTrace_Move:
// XAttr
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
}
}
// YAttr
attrName = dd.getAttrName( dd.data[1]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
}
}
// ToneAttr
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[2] = true;
dd.p[2] = ret.id;
dd.subid[2] = ret.refid;
dd.typeId[2] = ret.typeId;
}
}
// InvisAttr
attrName = dd.getAttrName( dd.data[3]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[3] = true;
dd.p[3] = ret.id;
dd.subid[3] = ret.refid;
dd.typeId[3] = ret.typeId;
}
}
// ScaleXAttr
attrName = dd.getAttrName( dd.data[4]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[4] = true;
dd.p[4] = ret.id;
dd.subid[4] = ret.refid;
dd.typeId[4] = ret.typeId;
}
}
// ScaleYAttr
attrName = dd.getAttrName( dd.data[5]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[5] = true;
dd.p[5] = ret.id;
dd.subid[5] = ret.refid;
dd.typeId[5] = ret.typeId;
}
}
break;
case GeDyndata.eTrace_Rotate:
// Attr
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
}
}
// ToneAttr
attrName = dd.getAttrName( dd.data[3]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[3] = true;
dd.p[3] = ret.id;
dd.subid[3] = ret.refid;
dd.typeId[3] = ret.typeId;
}
}
// InvisAttr
attrName = dd.getAttrName( dd.data[4]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[4] = true;
dd.p[4] = ret.id;
dd.subid[4] = ret.refid;
dd.typeId[4] = ret.typeId;
}
}
break;
case GeDyndata.eTrace_SetDigConfirmWithTone:
case GeDyndata.eTrace_ResetDigConfirmWithTone:
case GeDyndata.eTrace_ToggleDigConfirmWithTone:
case GeDyndata.eTrace_SetDigWithTone:
case GeDyndata.eTrace_ResetDigWithTone:
case GeDyndata.eTrace_ToggleDigWithTone:
case GeDyndata.eTrace_StoDigWithTone:
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.inverted[0] = GeDyndata.getAttrInverted( dd.data[2]);
dd.lowText = dd.data[4];
dd.highText = getAnnot1();
}
}
attrName = dd.getAttrName( dd.data[3]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[3]);
}
}
break;
}
dd.connect();
}
public void dynamicClose() {
for ( int i = 0; i < 6; i++) {
if ( dd.attrFound[i])
en.gdh.unrefObjectInfo( dd.subid[i]);
}
dd.disconnect();
}
public void dynamicUpdate( boolean animationOnly) {
// System.out.println( "Dynamic update: " + this);
if ( animationOnly &&
!( dd.type == GeDyndata.eTrace_Animation ||
dd.type == GeDyndata.eTrace_AnimationForwBack ||
dd.type == GeDyndata.eTrace_DigAnimation))
(dd.dynType & GeDyndata.eTrace_Animation) == 0)
return;
switch ( dd.type) {
case GeDyndata.eTrace_Dig:
case GeDyndata.eTrace_DigWithCommand:
{
boolean repaintNow = false;
if ( !dd.attrFound[0] && !dd.attrFound[1])
return;
if ( dd.attrFound[0]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && !value) || (dd.inverted[0] && value))
fillColor = dd.color;
else
fillColor = originalFillColor;
repaintNow = true;
dd.oldValueB[0] = value;
}
}
if ( dd.attrFound[1]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value) || (dd.inverted[1] && !value))
dd.invisible = true;
else
dd.invisible = false;
repaintNow = true;
dd.oldValueB[1] = value;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigWithText:
{
if ( !dd.attrFound[0])
return;
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && value) || (dd.inverted[0] && !value)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
if ( dd.lowText != null && !dd.lowText.equals(new String("")))
setAnnot1( dd.highText);
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
if ( dd.lowText != null && !dd.lowText.equals(new String("")))
setAnnot1( dd.lowText);
}
repaintForeground();
dd.oldValueB[0] = value;
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigBorder:
{
boolean repaintNow = false;
if ( !dd.attrFound[0] && !dd.attrFound[1])
return;
if ( dd.attrFound[0]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && !value) || (dd.inverted[0] && value))
borderColor = dd.color;
else
borderColor = originalBorderColor;
repaintNow = true;
dd.oldValueB[0] = value;
}
}
if ( dd.attrFound[1]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value) || (dd.inverted[1] && !value))
dd.invisible = true;
else
dd.invisible = false;
repaintNow = true;
dd.oldValueB[1] = value;
}
}
if ( repaintNow)
repaintForeground();
if ( !dd.attrFound[0])
return;
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && !value) || (dd.inverted[0] && value))
borderColor = dd.color;
else
borderColor = originalBorderColor;
repaintForeground();
dd.oldValueB[0] = value;
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Invisible:
{
boolean repaintNow = false;
if ( !dd.attrFound[0])
return;
if ( dd.attrFound[0]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && value) || (dd.inverted[0] && !value))
dd.invisible = true;
else
dd.invisible = false;
repaintNow = true;
dd.oldValueB[0] = value;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigWithError:
case GeDyndata.eTrace_DigWithErrorAndCommand:
{
if ( !dd.attrFound[0])
return;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
boolean value1;
boolean value2;
if ( dd.attrFound[1] && !dd.attrFound[2]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = GeColor.COLOR_RED;
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && !dd.attrFound[1]) {
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2))
fillColor = GeColor.COLOR_6; // Yellow
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value1 != dd.oldValueB[1] ||
value0 != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = GeColor.COLOR_RED;
else if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2))
fillColor = GeColor.COLOR_6; // Yellow
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else {
if ( dd.oldValueB[0] != value0 || dd.firstScan) {
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[0] = value0;
}
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigTwo:
case GeDyndata.eTrace_DigTwoWithCommand:
{
if ( !dd.attrFound[0])
return;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
boolean value1;
boolean value2;
if ( dd.attrFound[1] && !dd.attrFound[2]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = GeColor.COLOR_RED;
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && !dd.attrFound[1]) {
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2))
fillColor = dd.color2;
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value1 != dd.oldValueB[1] ||
value0 != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = GeColor.COLOR_RED;
else if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2))
fillColor = dd.color2;
else if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else {
if ( dd.oldValueB[0] != value0 || dd.firstScan) {
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintForeground();
dd.oldValueB[0] = value0;
}
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigTone:
case GeDyndata.eTrace_DigToneWithCommand:
case GeDyndata.eTrace_SetDigConfirmWithTone:
case GeDyndata.eTrace_ResetDigConfirmWithTone:
case GeDyndata.eTrace_ToggleDigConfirmWithTone:
case GeDyndata.eTrace_SetDigWithTone:
case GeDyndata.eTrace_ResetDigWithTone:
case GeDyndata.eTrace_ToggleDigWithTone:
case GeDyndata.eTrace_StoDigWithTone:
{
boolean repaintNow = false;
if ( !dd.attrFound[0] && !dd.attrFound[1])
return;
if ( dd.attrFound[0]) {
boolean value = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( value != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[0] && value) || (dd.inverted[0] && !value)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
if ( dd.lowText != null && !dd.lowText.equals(new String("")))
setAnnot1( dd.highText);
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
if ( dd.lowText != null && !dd.lowText.equals(new String("")))
setAnnot1( dd.lowText);
}
repaintNow = true;
dd.oldValueB[0] = value;
}
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigToneWithError:
case GeDyndata.eTrace_DigToneWithErrorAndCommand:
{
if ( !dd.attrFound[0])
return;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
boolean value1;
boolean value2;
if ( dd.attrFound[1] && !dd.attrFound[2]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_RED;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && !dd.attrFound[1]) {
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_YELLOW;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value1 != dd.oldValueB[1] || value2 != dd.oldValueB[2] ||
value0 != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_RED;
}
else if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_YELLOW;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else {
if ( dd.oldValueB[0] != value0 || dd.firstScan) {
if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[0] = value0;
}
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigToneTwo:
case GeDyndata.eTrace_DigToneTwoWithCommand:
{
if ( !dd.attrFound[0])
return;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
boolean value1;
boolean value2;
if ( dd.attrFound[1] && !dd.attrFound[2]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_RED;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && !dd.attrFound[1]) {
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || value0 != dd.oldValueB[0] ||
dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color2;
else
colorTone = dd.color2;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[0] = value0;
}
}
else if ( dd.attrFound[2] && dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value1 != dd.oldValueB[1] || value2 != dd.oldValueB[2] ||
value0 != dd.oldValueB[0] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = GeColor.COLOR_TONE_RED;
}
else if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color2;
else
colorTone = dd.color2;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[2] = value2;
dd.oldValueB[1] = value1;
dd.oldValueB[0] = value0;
}
}
else {
if ( dd.oldValueB[0] != value0 || dd.firstScan) {
if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = dd.color;
else
colorTone = dd.color;
}
else {
if ( dd.color > GeColor.COLOR_TONE_MAX)
fillColor = originalFillColor;
colorTone = originalColorTone;
}
repaintForeground();
dd.oldValueB[0] = value0;
}
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_AnnotWithTone:
case GeDyndata.eTrace_AnnotInputWithTone:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
if ( dd.typeId[0] == Pwr.eType_Float32) {
float value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_Int32 ||
dd.typeId[0] == Pwr.eType_UInt32 ||
dd.typeId[0] == Pwr.eType_Int16 ||
dd.typeId[0] == Pwr.eType_UInt16 ||
dd.typeId[0] == Pwr.eType_Int8 ||
dd.typeId[0] == Pwr.eType_UInt8) {
int value0 = en.gdh.getObjectRefInfoInt( dd.p[0]);
if ( value0 != dd.oldValueI || dd.firstScan) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueI = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_String ||
dd.typeId[0] == Pwr.eType_Objid) {
String value0 = en.gdh.getObjectRefInfoString( dd.p[0], dd.typeId[0]);
if ( dd.firstScan || value0.compareTo( dd.oldValueS) != 0) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueS = value0;
}
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Annot:
case GeDyndata.eTrace_AnnotInput:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
if ( dd.typeId[0] == Pwr.eType_Float32) {
float value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_Int32 ||
dd.typeId[0] == Pwr.eType_UInt32 ||
dd.typeId[0] == Pwr.eType_Int16 ||
dd.typeId[0] == Pwr.eType_UInt16 ||
dd.typeId[0] == Pwr.eType_Int8 ||
dd.typeId[0] == Pwr.eType_UInt8) {
int value0 = en.gdh.getObjectRefInfoInt( dd.p[0]);
if ( value0 != dd.oldValueI || dd.firstScan) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueI = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_String ||
dd.typeId[0] == Pwr.eType_Objid ||
dd.typeId[0] == Pwr.eType_DeltaTime ||
dd.typeId[0] == Pwr.eType_Time) {
String value0 = en.gdh.getObjectRefInfoString( dd.p[0], dd.typeId[0]);
if ( dd.firstScan || value0.compareTo( dd.oldValueS) != 0) {
sb = dd.format( value0, sb);
setAnnot1(new String(sb));
repaintNow = true;
dd.oldValueS = value0;
}
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1))
fillColor = originalFillColor;
else
fillColor = dd.color;
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Move:
{
boolean repaintNow = false;
if ( dd.firstScan) {
Point loc = getLocation();
dd.xOrig = (double) loc.x;
dd.yOrig = (double) loc.y;
}
if ( dd.attrFound[0] || dd.attrFound[1]) {
// Move
Point loc = getLocation();
float value0 = 0;
float value1 = 0;
if ( dd.attrFound[0]) {
value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
if ( dd.attrFound[1]) {
value1 = en.gdh.getObjectRefInfoFloat( dd.p[1]);
if ( value1 != dd.oldValueF[1] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[1] = value1;
}
}
if ( repaintNow) {
if ( dd.attrFound[0])
loc.x = (int) (dd.xOrig + (value0 - dd.x0) * dd.factor);
if ( dd.attrFound[1])
loc.y = (int) (dd.yOrig + (value1 - dd.y0) * dd.factor);
setLocation( loc);
}
}
if ( dd.attrFound[4] || dd.attrFound[5]) {
// Scale
if ( dd.firstScan) {
dd.xScale = getWidth();
dd.yScale = getHeight();
}
float value4 = 0;
float value5 = 0;
if ( dd.attrFound[4]) {
value4 = en.gdh.getObjectRefInfoFloat( dd.p[4]);
if ( value4 != dd.oldValueF[2] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[2] = value4;
}
}
if ( dd.attrFound[5]) {
value5 = en.gdh.getObjectRefInfoFloat( dd.p[5]);
if ( value5 != dd.oldValueF[3] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[3] = value5;
}
}
if ( repaintNow) {
Rectangle rect = getBounds();
if ( dd.attrFound[4]) {
rect.width = (int) (dd.xScale * value4);
if ( rect.width < 1)
rect.width = 1;
}
if ( dd.attrFound[5]) {
rect.height = (int) (dd.yScale * value5);
if ( rect.height < 1)
rect.height = 1;
}
setBounds( rect);
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( dd.attrFound[3]) {
boolean value3 = en.gdh.getObjectRefInfoBoolean( dd.p[3]);
if ( value3 != dd.oldValueB[3] || dd.firstScan) {
if ( (!dd.inverted[3] && value3) || (dd.inverted[3] && !value3)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[3] = value3;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Rotate:
{
boolean repaintNow = false;
if ( dd.attrFound[0]) {
// Rotate
float value0 = 0;
if ( dd.attrFound[0]) {
value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
if ( repaintNow) {
dd.setRotate( value0 * dd.factor);
}
}
if ( dd.attrFound[3]) {
boolean value3 = en.gdh.getObjectRefInfoBoolean( dd.p[3]);
if ( value3 != dd.oldValueB[3] || dd.firstScan) {
if ( (!dd.inverted[3] && value3) || (dd.inverted[3] && !value3)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[3] = value3;
}
}
if ( dd.attrFound[4]) {
boolean value4 = en.gdh.getObjectRefInfoBoolean( dd.p[4]);
if ( value4 != dd.oldValueB[4] || dd.firstScan) {
if ( (!dd.inverted[4] && value4) || (dd.inverted[4] && !value4)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[4] = value4;
}
}
if ( repaintNow) {
// repaintForeground();
repaint();
}
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_AnalogShift:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
float value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0] || dd.firstScan) {
setPage( (int)value0 + 1);
repaintNow = true;
dd.oldValueF[0] = value0;
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_Animation:
case GeDyndata.eTrace_AnimationForwBack:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
int sts;
int maxCount;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( dd.firstScan) {
dd.animationCount = 0;
dd.animationDirection = 1;
}
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0)) {
if ( dd.animationDirection == 0) {
dd.animationCount = 0;
dd.animationDirection = 1;
}
maxCount = animationCount;
dd.animationCount++;
if ( dd.animationCount >= maxCount) {
// Shift nodeclass
if ( dd.animationDirection == 1) {
// Shift forward
sts = setNextPage();
if ( sts == 0) {
if ( dd.type == GeDyndata.eTrace_Animation)
// Start from beginning the again
setPage( 2);
else {
// Change direction
dd.animationDirection = 2;
setPreviousPage();
}
}
dd.animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = setPreviousPage();
if ( sts == 0) {
// Change direction
dd.animationDirection = 1;
setNextPage();
}
dd.animationCount = 0;
repaintNow = true;
}
}
}
else {
if ( dd.animationDirection != 0) {
dd.animationDirection = 0;
setFirstPage();
repaintNow = true;
}
}
dd.oldValueB[0] = value0;
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaint();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigAnimation:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
int sts;
int maxCount;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( dd.firstScan) {
dd.animationCount = 0;
dd.animationDirection = 0;
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0)) {
setLastPage();
repaintNow = true;
}
dd.oldValueB[0] = value0;
}
if ( dd.oldValueB[0] != value0) {
// Start animation
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0)) {
dd.animationCount = 0;
dd.animationDirection = 1;
}
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0)) {
dd.animationCount = 0;
dd.animationDirection = 2;
}
}
if ( dd.animationDirection != 0) {
maxCount = animationCount;
dd.animationCount++;
if ( dd.animationCount >= maxCount) {
// Shift nodeclass
if ( dd.animationDirection == 1) {
// Shift forward
sts = setNextPage();
if ( sts == 0) {
// End of animation
dd.animationCount = 0;
dd.animationDirection = 0;
}
dd.animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = setPreviousPage();
if ( sts == 0) {
// End of animation
dd.animationCount = 0;
dd.animationDirection = 0;
}
dd.animationCount = 0;
repaintNow = true;
}
}
}
if ( repaintNow) {
repaintNow = false;
repaint();
}
dd.oldValueB[0] = value0;
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
case GeDyndata.eTrace_DigShift:
case GeDyndata.eTrace_DigShiftWithToggleDig:
case GeDyndata.eTrace_RadioButton:
{
if ( !dd.attrFound[0])
return;
boolean repaintNow = false;
int sts;
int maxCount;
boolean value0 = en.gdh.getObjectRefInfoBoolean( dd.p[0]);
if ( dd.firstScan) {
dd.animationDirection = 0;
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0)) {
setLastPage();
repaintNow = true;
}
dd.oldValueB[0] = value0;
}
if ( dd.oldValueB[0] != value0) {
// Shift to first or last page
if ( (!dd.inverted[0] && value0) || (dd.inverted[0] && !value0))
setLastPage();
else if ( (!dd.inverted[0] && !value0) || (dd.inverted[0] && value0))
setFirstPage();
repaintNow = true;
}
if ( repaintNow) {
repaintNow = false;
repaint();
}
dd.oldValueB[0] = value0;
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
}
}
if ( dd.attrFound[2]) {
boolean value2 = en.gdh.getObjectRefInfoBoolean( dd.p[2]);
if ( value2 != dd.oldValueB[2] || dd.firstScan) {
if ( (!dd.inverted[2] && value2) || (dd.inverted[2] && !value2)) {
dd.invisible = true;
}
else {
dd.invisible = false;
}
repaintNow = true;
dd.oldValueB[2] = value2;
}
}
if ( repaintNow)
repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
break;
}
}
dd.scan();
}
private void repaintForeground() {
public void repaintForeground() {
Graphics g = getGraphics();
if ( g == null) {
System.out.println("repaintForeground: can't get Graphic object");
......
package jpwr.jop;
import jpwr.rt.*;
public interface GeComponentIfc {
public void tsetFillColor( int fillColor);
public void tsetColorTone( int colorTone);
public void tsetBorderColor( int borderColor);
public void tsetTextColor( int textColor);
public void setColorInverse( int inverse);
public void resetFillColor();
public void resetColorTone();
public void resetBorderColor();
public void resetTextColor();
public void setFillLevel( float fillLevel);
public void setLevelDirection( int levelDirection);
public void setLevelColorTone( int levelColorTone);
public void setLevelFillColor( int levelFillColor);
public String getAnnot1();
public void setAnnot1( String annot1);
public void setLastPage();
public void setFirstPage();
public void setPage( int page);
public int setNextPage();
public int setPreviousPage();
public Object getDd();
public void repaintForeground();
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDyn {
public static final int mDynType_No = 0;
public static final int mDynType_Inherit = 1 << 0;
public static final int mDynType_Tone = 1 << 1;
public static final int mDynType_DigLowColor = 1 << 2;
public static final int mDynType_DigColor = 1 << 3;
public static final int mDynType_DigError = 1 << 4;
public static final int mDynType_DigWarning = 1 << 5;
public static final int mDynType_DigFlash = 1 << 6;
public static final int mDynType_Invisible = 1 << 7;
public static final int mDynType_DigBorder = 1 << 8;
public static final int mDynType_DigText = 1 << 9;
public static final int mDynType_Value = 1 << 10;
public static final int mDynType_AnalogColor = 1 << 11;
public static final int mDynType_Rotate = 1 << 12;
public static final int mDynType_Move = 1 << 13;
public static final int mDynType_AnalogShift = 1 << 14;
public static final int mDynType_DigShift = 1 << 15;
public static final int mDynType_Animation = 1 << 16;
public static final int mDynType_Bar = 1 << 17;
public static final int mDynType_Trend = 1 << 18;
public static final int mDynType_SliderBackground = 1 << 19;
public static final int mDynType_Video = 1 << 20;
public static final int mDynType_FillLevel = 1 << 21;
public static final int mDynType_FastCurve = 1 << 22;
public static final int mDynType_AnalogText = 1 << 23;
public static final int mActionType_No = 0;
public static final int mActionType_Inherit = 1 << 0;
public static final int mActionType_PopupMenu = 1 << 1;
public static final int mActionType_SetDig = 1 << 2;
public static final int mActionType_ResetDig = 1 << 3;
public static final int mActionType_ToggleDig = 1 << 4;
public static final int mActionType_StoDig = 1 << 5;
public static final int mActionType_Command = 1 << 6;
public static final int mActionType_CommandDoubleClick = 1 << 7;
public static final int mActionType_Confirm = 1 << 8;
public static final int mActionType_IncrAnalog = 1 << 9;
public static final int mActionType_RadioButton = 1 << 10;
public static final int mActionType_Slider = 1 << 11;
public static final int mActionType_ValueInput = 1 << 12;
public static final int mActionType_TipText = 1 << 13;
public static final int mActionType_CloseGraph = 1 << 18;
public static final int mActionType_PulldownMenu = 1 << 19;
public static final int mActionType_OptionMenu = 1 << 20;
public static final int eAnimSequence_Cycle = 0;
public static final int eAnimSequence_Dig = 1;
public static final int eAnimSequence_ForwBack = 2;
public static final int eLimitType_Gt = 0;
public static final int eLimitType_Lt = 1;
public static final int eEvent_MB1Up = 0;
public static final int eEvent_MB1Down = 1;
public static final int eEvent_MB1Click = 2;
public static final int eEvent_MB3Press = 3;
public static final int eEvent_SliderMoved = 4;
public static final int eEvent_ValueChanged = 5;
public static final int eEvent_FocusLost = 6;
public int dynType;
public int actionType;
public int access;
public GeDynElemIfc[] elements;
public GeComponentIfc comp;
public String instance;
public boolean ignoreColor;
public boolean resetColor;
public boolean repaintNow;
public JopSession session;
public JopEngine en;
public boolean invisible;
public boolean invisibleOld;
public double rotate;
public double x0;
public double y0;
public GeDyn( Object comp) {
this.comp = (GeComponentIfc) comp;
}
public GeDyn( Object comp, int dynType, int actionType, int access, GeDynElemIfc[] elements) {
this.comp = (GeComponentIfc) comp;
this.dynType = dynType;
this.actionType = actionType;
this.access = access;
this.elements = elements;
}
public void setSession( JopSession session) {
this.session = session;
en = session.getEngine();
}
public void setDynType( int dynType) {
this.dynType = dynType;
}
public void setActionType( int actionType) {
this.actionType = actionType;
}
public void setAccess( int access) {
this.access = access;
}
public void setInstance( String instance) {
this.instance = instance;
}
public void setElements( GeDynElemIfc[] elements) {
this.elements = elements;
}
public void connect() {
if ( elements == null)
return;
for ( int i = 0; i < elements.length; i++)
elements[i].connect();
}
public void disconnect() {
if ( elements == null)
return;
for ( int i = 0; i < elements.length; i++)
elements[i].disconnect();
}
public void scan() {
if ( elements == null)
return;
resetColor = false;
ignoreColor = false;
repaintNow = false;
for ( int i = 0; i < elements.length; i++)
elements[i].scan();
if ( repaintNow)
comp.repaintForeground();
}
public void action( int eventType, MouseEvent e) {
if ( elements == null)
return;
repaintNow = false;
for ( int i = 0; i < elements.length; i++)
elements[i].action( eventType, e);
if ( repaintNow)
comp.repaintForeground();
}
public void confirmedAction( int eventType, MouseEvent e) {
if ( elements == null)
return;
actionType = actionType & ~mActionType_Confirm;
for ( int i = 0; i < elements.length; i++)
elements[i].action( eventType, e);
actionType = actionType | mActionType_Confirm;
}
public String getAttrName( String str) {
if ( instance == null) {
if ( str.startsWith("!"))
return str.substring(1);
else
return str;
}
else {
String s = RtUtilities.strReplace( str, "$object", instance);
if ( s.startsWith("!"))
return s.substring(1);
else
return s;
}
}
public String getAttrNameNoSuffix( String str) {
int startIdx;
String s;
if ( instance == null)
s = str;
else
s = RtUtilities.strReplace( str, "$object", instance);
if ( s.startsWith("!"))
startIdx = 1;
else
startIdx = 0;
int idx1 = s.indexOf('#');
if ( idx1 != -1) {
int idx2 = s.indexOf('[');
if ( idx2 != -1)
return s.substring( startIdx, idx1) + s.substring(idx2);
else
return s.substring( startIdx, idx1);
}
else
return s.substring(startIdx);
}
static public boolean getAttrInverted( String str) {
return str.startsWith("!");
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynAnalogColor extends GeDynElem {
String attribute;
double limit;
int limitType;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
boolean oldState;
boolean isMainInstance = false;
public GeDynAnalogColor( GeDyn dyn, String attribute,
double limit, int limitType, int color) {
super( dyn, GeDyn.mDynType_AnalogColor, GeDyn.mActionType_No);
this.attribute = attribute;
this.limit = limit;
this.limitType = limitType;
this.color = color;
}
public void connect() {
// Find the main instance
GeDynAnalogColor mainInstance = null;
for ( int i = dyn.elements.length - 1; i >= 0; i--) {
if ( dyn.elements[i].getDynType() == GeDyn.mDynType_AnalogColor) {
mainInstance = (GeDynAnalogColor)dyn.elements[i];
break;
}
}
if ( mainInstance != null) {
if ( !mainInstance.attrFound) {
String attrName = dyn.getAttrName( mainInstance.attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "AnalogColor: " + attrName);
else
mainInstance.attrFound = true;
mainInstance.p = ret.id;
mainInstance.subid = ret.refid;
mainInstance.isMainInstance = true;
}
}
p = mainInstance.p;
attrFound = mainInstance.attrFound;
}
}
public void disconnect() {
if ( isMainInstance && attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
float value = dyn.en.gdh.getObjectRefInfoFloat( p);
int i;
if ( !firstScan) {
if ( !dyn.resetColor && value == oldValue) {
if ( oldState)
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
boolean state;
boolean set_color = false;
boolean reset_color = false;
if ( limitType == GeDyn.eLimitType_Gt)
state = value > limit;
else
state = value < limit;
if ( state != oldState || dyn.resetColor || firstScan) {
if ( state) {
set_color = true;
dyn.ignoreColor = true;
}
else {
reset_color = true;
dyn.resetColor = true;
}
oldState = state;
}
else if ( state)
dyn.ignoreColor = true;
oldValue = value;
if ( !set_color && !reset_color)
return;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( set_color) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( set_color) {
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynAnalogShift extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
public GeDynAnalogShift( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_AnalogShift, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "AnalogShift: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
float value0 = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( value0 != oldValue || firstScan) {
dyn.comp.setPage( (int)(value0 + 1.5));
dyn.repaintNow = true;
oldValue = value0;
}
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class GeDynAnalogText extends GeDynOptionMenu {
public GeDynAnalogText( GeDyn dyn, String attribute, String[] itemsText, int[] itemsEnum) {
super( dyn, attribute, itemsText, itemsEnum);
this.dynType = GeDyn.mDynType_AnalogText;
this.actionType = GeDyn.mActionType_No;
}
public void action( int eventType, MouseEvent e) {
}
}
package jpwr.jop;
import javax.swing.*;
import jpwr.rt.*;
public class GeDynAnimation extends GeDynElem {
String attribute;
int sequence;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
int animationCount;
int animationDirection;
public GeDynAnimation( GeDyn dyn, String attribute, int sequence) {
super( dyn, GeDyn.mDynType_Animation, GeDyn.mActionType_No);
this.attribute = attribute;
this.sequence = sequence;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigShift: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean repaintNow = false;
boolean value0 = dyn.en.gdh.getObjectRefInfoBoolean( p);
int sts;
int maxCount;
switch ( sequence) {
case GeDyn.eAnimSequence_Cycle:
case GeDyn.eAnimSequence_ForwBack: {
if ( firstScan) {
animationCount = 0;
animationDirection = 1;
}
if ( (!inverted && value0) || (inverted && !value0)) {
if ( animationDirection == 0) {
animationCount = 0;
animationDirection = 1;
}
maxCount = animationCount;
animationCount++;
if ( animationCount >= maxCount) {
// Shift nodeclass
if ( animationDirection == 1) {
// Shift forward
sts = dyn.comp.setNextPage();
if ( sts == 0) {
if ( sequence == GeDyn.eAnimSequence_Cycle)
// Start from beginning the again
dyn.comp.setPage( 2);
else {
// Change direction
animationDirection = 2;
dyn.comp.setPreviousPage();
}
}
animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = dyn.comp.setPreviousPage();
if ( sts == 0) {
// Change direction
animationDirection = 1;
dyn.comp.setNextPage();
}
animationCount = 0;
repaintNow = true;
}
}
}
else {
if ( animationDirection != 0) {
animationDirection = 0;
dyn.comp.setFirstPage();
repaintNow = true;
}
}
break;
}
case GeDyn.eAnimSequence_Dig: {
if ( firstScan) {
animationCount = 0;
animationDirection = 0;
if ( (!inverted && value0) || (inverted && !value0)) {
dyn.comp.setLastPage();
repaintNow = true;
}
oldValue = value0;
}
if ( oldValue != value0) {
// Start animation
if ( (!inverted && value0) || (inverted && !value0)) {
animationCount = 0;
animationDirection = 1;
}
else if ( (!inverted && !value0) || (inverted && value0)) {
animationCount = 0;
animationDirection = 2;
}
}
if ( animationDirection != 0) {
maxCount = animationCount;
animationCount++;
if ( animationCount >= maxCount) {
// Shift nodeclass
if ( animationDirection == 1) {
// Shift forward
sts = dyn.comp.setNextPage();
if ( sts == 0) {
// End of animation
animationCount = 0;
animationDirection = 0;
}
animationCount = 0;
repaintNow = true;
}
else {
// Shift backwards
sts = dyn.comp.setPreviousPage();
if ( sts == 0) {
// End of animation
animationCount = 0;
animationDirection = 0;
}
animationCount = 0;
repaintNow = true;
}
}
}
break;
}
}
oldValue = value0;
if ( repaintNow)
((JComponent)dyn.comp).repaint();
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class GeDynCloseGraph extends GeDynElem {
String command;
public GeDynCloseGraph( GeDyn dyn) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_CloseGraph);
this.command = command;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
((GeComponent)dyn.comp).colorInverse = 1;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
((GeComponent)dyn.comp).colorInverse = 0;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
JopDynamic comp = (JopDynamic)dyn.comp;
if ( comp.dynamicGetRoot() instanceof JFrame)
((JFrame)comp.dynamicGetRoot()).dispose();
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynCommand extends GeDynElem {
String command;
public GeDynCommand( GeDyn dyn, String command) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_Command);
this.command = command;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
((GeComponent)dyn.comp).colorInverse = 1;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
((GeComponent)dyn.comp).colorInverse = 0;
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
Jop.executeCommand( dyn.session, command);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
public class GeDynConfirm extends GeDynElem {
String text;
public GeDynConfirm( GeDyn dyn, String text) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_Confirm);
this.text = text;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
break;
case GeDyn.eEvent_MB1Click:
case GeDyn.eEvent_ValueChanged:
JopConfirmDialog.open( (Component)dyn.comp, text);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigBorder extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigBorder( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigBorder, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue) {
// No change since last time
return;
}
}
else
firstScan = false;
if ( (!inverted && !value) || (inverted && value)) {
dyn.comp.tsetBorderColor( color);
}
else {
dyn.comp.resetBorderColor();
}
dyn.repaintNow = true;
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigColor extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigColor( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigColor, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( (!inverted && value) || (inverted && !value))
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigError extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigError( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_DigError, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigError: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( (!inverted && value) || (inverted && !value))
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetColorTone( GeColor.COLOR_TONE_RED);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetFillColor( GeColor.COLOR_RED);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigFlash extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
boolean on;
public GeDynDigFlash( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigFlash, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( !((!inverted && value) || (inverted && !value)))
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
if ( on) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
on = !on;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
if ( on) {
dyn.comp.tsetFillColor( color);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
on = !on;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigLowColor extends GeDynElem {
String attribute;
int color;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigLowColor( GeDyn dyn, String attribute, int color) {
super( dyn, GeDyn.mDynType_DigLowColor, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigLowColor: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
System.out.println("Disconnecting: " + attribute);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( oldValue == value && !dyn.resetColor)
return;
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && !value) || (inverted && value)) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.tsetColorTone( color);
else
dyn.comp.tsetFillColor( color);
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && !value) || (inverted && value))
dyn.comp.tsetFillColor( color);
else
dyn.comp.resetFillColor();
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigShift extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigShift( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_DigShift, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigShift: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value0 = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( firstScan) {
if ( (!inverted && value0) || (inverted && !value0)) {
((GeComponent)dyn.comp).setLastPage();
dyn.repaintNow = true;
}
oldValue = value0;
firstScan = false;
}
if ( oldValue != value0) {
// Shift to first or last page
if ( (!inverted && value0) || (inverted && !value0))
dyn.comp.setLastPage();
else if ( (!inverted && !value0) || (inverted && value0))
dyn.comp.setFirstPage();
dyn.repaintNow = true;
}
oldValue = value0;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigText extends GeDynElem {
String attribute;
String lowText;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
String highText;
public GeDynDigText( GeDyn dyn, String attribute, String lowText) {
super( dyn, GeDyn.mDynType_Invisible, GeDyn.mActionType_No);
this.attribute = attribute;
this.lowText = lowText;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigText: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
highText = dyn.comp.getAnnot1();
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue) {
// No change since last time
return;
}
}
else
firstScan = false;
if ( (!inverted && value) || (inverted && !value))
dyn.comp.setAnnot1( highText);
else
dyn.comp.setAnnot1( lowText);
dyn.repaintNow = true;
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynDigWarning extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynDigWarning( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_DigWarning, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigWarning: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || dyn.ignoreColor)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue && !dyn.resetColor) {
// No change since last time
if ( (!inverted && value) || (inverted && !value))
dyn.ignoreColor = true;
return;
}
}
else
firstScan = false;
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetColorTone( GeColor.COLOR_TONE_YELLOW);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.comp.resetColorTone();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
else {
if ( (!inverted && value) || (inverted && !value)) {
dyn.comp.tsetFillColor( GeColor.COLOR_6);
dyn.ignoreColor = true;
}
else {
dyn.comp.resetFillColor();
dyn.resetColor = true;
}
dyn.repaintNow = true;
}
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynElem implements GeDynElemIfc {
public GeDyn dyn;
public int dynType;
public int actionType;
public GeDynElem( GeDyn dyn, int dynType, int actionType) {
this.dyn = dyn;
this.dynType = dynType;
this.actionType = actionType;
}
public int getDynType() {
return dynType;
}
public int getActionType() {
return actionType;
}
public void connect() {
}
public void disconnect() {
}
public void scan() {
}
public void action( int eventType, MouseEvent e) {
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public interface GeDynElemIfc {
public int getDynType();
public int getActionType();
public void connect();
public void disconnect();
public void scan();
public void action( int eventType, MouseEvent e);
}
package jpwr.jop;
import jpwr.rt.*;
import javax.swing.*;
public class GeDynFillLevel extends GeDynElem {
String attribute;
int color;
int direction;
double minValue;
double maxValue;
double minPos;
double maxPos;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
public GeDynFillLevel( GeDyn dyn, String attribute, int color, int direction,
double minValue, double maxValue, double minPos, double maxPos) {
super( dyn, GeDyn.mDynType_FillLevel, GeDyn.mActionType_No);
this.attribute = attribute;
this.color = color;
this.direction = direction;
this.minValue = minValue;
this.maxValue = maxValue;
this.minPos = minPos;
this.maxPos = maxPos;
}
public void connect() {
if ( minValue == maxValue)
return;
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "FillLevel: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
if ( maxPos == 0 && minPos == 0)
dyn.comp.setLevelDirection( direction);
else
dyn.comp.setLevelDirection( Ge.DIRECTION_DOWN);
if ( (dyn.dynType & GeDyn.mDynType_Tone) != 0) {
if ( color <= GeColor.COLOR_TONE_MAX)
dyn.comp.setLevelColorTone( color);
else
dyn.comp.setLevelFillColor( color);
}
else
dyn.comp.setLevelFillColor( color);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
float value = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( !firstScan) {
if ( value == oldValue)
// No change since last time
return;
}
else
firstScan = false;
float level = 1;
if ( maxPos == 0 && minPos == 0) {
level = (float)((value - minValue) / (maxValue - minValue));
}
else {
switch( direction) {
case Ge.DIRECTION_LEFT:
case Ge.DIRECTION_RIGHT:
float width = ((JComponent)dyn.comp).getWidth();
level = (float)(((value - minValue) / (maxValue - minValue) * ( maxPos - minPos)
+ width - maxPos) / width);
break;
case Ge.DIRECTION_DOWN:
case Ge.DIRECTION_UP:
float height = ((JComponent)dyn.comp).getHeight();
level = (float)(((value - minValue) / (maxValue - minValue) * ( maxPos - minPos)
+ height - maxPos) / height);
break;
}
}
dyn.comp.setFillLevel( level);
dyn.repaintNow = true;
oldValue = value;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynIncrAnalog extends GeDynElem {
String attribute;
double increment;
double min_value;
double max_value;
public GeDynIncrAnalog( GeDyn dyn, String attribute, double increment, double min_value,
double max_value) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_IncrAnalog);
this.attribute = attribute;
this.increment = increment;
this.min_value = min_value;
this.max_value = max_value;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String attrName = dyn.getAttrName( attribute);
CdhrFloat ret = dyn.en.gdh.getObjectInfoFloat( attrName);
if ( ret.evenSts()) {
System.out.println( "IncrAnalog " + attrName);
break;
}
ret.value += increment;
if ( !( min_value == 0 && max_value == 0)) {
if ( ret.value < min_value)
ret.value = (float) min_value;
if ( ret.value > max_value)
ret.value = (float) max_value;
}
PwrtStatus sts = dyn.en.gdh.setObjectInfo( attrName, ret.value);
if ( sts.evenSts())
System.out.println( "IncrAnalog " + attrName);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynInvisible extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynInvisible( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_Invisible, GeDyn.mActionType_No);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "DigInvisible: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( !firstScan) {
if ( value == oldValue) {
// No change since last time
return;
}
}
else
firstScan = false;
if ( (!inverted && value) || (inverted && !value)) {
dyn.invisible = true;
}
else {
dyn.invisible = false;
}
dyn.repaintNow = true;
oldValue = value;
}
}
package jpwr.jop;
import java.awt.*;
import javax.swing.*;
import jpwr.rt.*;
public class GeDynMove extends GeDynElem {
String moveXAttribute;
String moveYAttribute;
String scaleXAttribute;
String scaleYAttribute;
double xOffset;
double yOffset;
double factor;
double scaleFactor;
boolean attrMoveXFound;
boolean attrMoveYFound;
boolean attrScaleXFound;
boolean attrScaleYFound;
PwrtRefId moveXSubid;
PwrtRefId moveYSubid;
PwrtRefId scaleXSubid;
PwrtRefId scaleYSubid;
int moveXp;
int moveYp;
int scaleXp;
int scaleYp;
float moveXOldValue;
float moveYOldValue;
float scaleXOldValue;
float scaleYOldValue;
public double xOrig;
public double yOrig;
public double xScale = 1;
public double yScale = 1;
boolean firstScan = true;
public GeDynMove( GeDyn dyn, String moveXAttribute, String moveYAttribute,
String scaleXAttribute, String scaleYAttribute, double
xOffset, double yOffset, double factor, double scaleFactor) {
super( dyn, GeDyn.mDynType_Move, GeDyn.mActionType_No);
this.moveXAttribute = moveXAttribute;
this.moveYAttribute = moveYAttribute;
this.scaleXAttribute = scaleXAttribute;
this.scaleYAttribute = scaleYAttribute;
this.xOffset = xOffset;
this.yOffset = yOffset;
this.factor = factor;
this.scaleFactor = factor;
}
public void connect() {
String attrName = dyn.getAttrName( moveXAttribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Move: " + attrName);
else {
attrMoveXFound = true;
moveXp = ret.id;
moveXSubid = ret.refid;
}
}
attrName = dyn.getAttrName( moveYAttribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Move: " + attrName);
else {
attrMoveYFound = true;
moveYp = ret.id;
moveYSubid = ret.refid;
}
}
attrName = dyn.getAttrName( scaleXAttribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Move: " + attrName);
else {
attrScaleXFound = true;
scaleXp = ret.id;
scaleXSubid = ret.refid;
}
}
attrName = dyn.getAttrName( scaleYAttribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Move: " + attrName);
else {
attrScaleYFound = true;
scaleYp = ret.id;
scaleYSubid = ret.refid;
}
}
}
public void disconnect() {
if ( attrMoveXFound)
dyn.en.gdh.unrefObjectInfo( moveXSubid);
if ( attrMoveYFound)
dyn.en.gdh.unrefObjectInfo( moveYSubid);
if ( attrScaleXFound)
dyn.en.gdh.unrefObjectInfo( scaleXSubid);
if ( attrScaleXFound)
dyn.en.gdh.unrefObjectInfo( scaleXSubid);
}
public void scan() {
boolean repaintNow = false;
if ( firstScan) {
Point loc = ((JComponent)dyn.comp).getLocation();
xOrig = (double) loc.x;
yOrig = (double) loc.y;
}
if ( attrMoveXFound || attrMoveYFound) {
// Move
Point loc = ((JComponent)dyn.comp).getLocation();
float valueMoveX = 0;
float valueMoveY = 0;
if ( attrMoveXFound) {
valueMoveX = dyn.en.gdh.getObjectRefInfoFloat( moveXp);
if ( valueMoveX != moveXOldValue || firstScan) {
repaintNow = true;
moveXOldValue = valueMoveX;
}
}
if ( attrMoveYFound) {
valueMoveY = dyn.en.gdh.getObjectRefInfoFloat( moveYp);
if ( valueMoveY != moveYOldValue || firstScan) {
repaintNow = true;
moveYOldValue = valueMoveY;
}
}
if ( repaintNow) {
if ( attrMoveXFound)
loc.x = (int) (xOrig + (valueMoveX - xOffset) * factor);
if ( attrMoveYFound)
loc.y = (int) (yOrig + (valueMoveY - yOffset) * factor);
((JComponent)dyn.comp).setLocation( loc);
}
}
if ( attrScaleXFound || attrScaleYFound) {
// Scale
if ( firstScan) {
xScale = ((JComponent)dyn.comp).getWidth();
yScale = ((JComponent)dyn.comp).getHeight();
}
float valueScaleX = 0;
float valueScaleY = 0;
if ( attrScaleXFound) {
valueScaleX = (float) (dyn.en.gdh.getObjectRefInfoFloat( scaleXp) * scaleFactor);
if ( valueScaleX != scaleXOldValue || firstScan) {
repaintNow = true;
scaleXOldValue = valueScaleX;
}
}
if ( attrScaleYFound) {
valueScaleY = (float) (dyn.en.gdh.getObjectRefInfoFloat( scaleYp) * scaleFactor);
if ( valueScaleY != scaleYOldValue || firstScan) {
repaintNow = true;
scaleYOldValue = valueScaleY;
}
}
if ( repaintNow) {
Rectangle rect = ((JComponent)dyn.comp).getBounds();
if ( attrScaleXFound) {
rect.width = (int) (xScale * valueScaleX);
if ( rect.width < 1)
rect.width = 1;
}
if ( attrScaleYFound) {
rect.height = (int) (yScale * valueScaleY);
if ( rect.height < 1)
rect.height = 1;
}
((JComponent)dyn.comp).setBounds( rect);
}
}
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class GeDynOptionMenu extends GeDynElem {
String attribute;
String[] itemsText;
int[] itemsEnum;
public boolean attrFound;
PwrtRefId subid;
int p;
public int typeId;
public boolean oldValueB;
public float oldValueF;
public int oldValueI;
boolean firstScan = true;
int color = GeColor.COLOR_32;
public GeDynOptionMenu( GeDyn dyn, String attribute, String[] itemsText, int[] itemsEnum) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_OptionMenu);
this.attribute = attribute;
this.itemsText = itemsText;
this.itemsEnum = itemsEnum;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "OptionMenu: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
typeId = ret.typeId;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
int value = 0;
boolean update = false;
if ( typeId == Pwr.eType_Float32) {
float value0 = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( value0 != oldValueF || firstScan) {
value = (int) value0;
update = true;
oldValueF = value0;
}
}
else if ( typeId == Pwr.eType_Int32 ||
typeId == Pwr.eType_UInt32 ||
typeId == Pwr.eType_Int16 ||
typeId == Pwr.eType_UInt16 ||
typeId == Pwr.eType_Int8 ||
typeId == Pwr.eType_UInt8) {
int value0 = dyn.en.gdh.getObjectRefInfoInt( p);
if ( value0 != oldValueI || firstScan) {
value = value0;
update = true;
oldValueI = value0;
}
}
else
return;
if ( update) {
boolean found = false;
for ( int i = 0; i < 32; i++) {
if ( itemsEnum[i] == value) {
dyn.comp.setAnnot1( itemsText[i]);
dyn.repaintNow = true;
found = true;
break;
}
}
if ( !found)
dyn.comp.setAnnot1( "");
}
if ( firstScan)
firstScan = false;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
break;
case GeDyn.eEvent_MB1Up:
break;
case GeDyn.eEvent_MB1Click:
new OptionMenu((Component)dyn.comp,
2, ((Component)dyn.comp).getHeight() - 2,
GeColor.getColor( color,
((GeComponent)dyn.comp).colorTone,
((GeComponent)dyn.comp).colorShift,
((GeComponent)dyn.comp).colorIntensity,
((GeComponent)dyn.comp).colorBrightness,
((GeComponent)dyn.comp).colorInverse,
((GeComponent)dyn.comp).fillColor),
((Component)dyn.comp).getWidth() - 4);
break;
}
}
class OptionMenu implements ActionListener, PopupMenuListener {
Component invoker;
OptionMenu( Component invoker, int x, int y, Color color, int width) {
this.invoker = invoker;
JMenuItem item;
JPopupMenu popup = new JPopupMenu();
popup.setPopupSize( width, popup.getHeight());
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null) {
popup.add( item = new JMenuItem( itemsText[i]));
item.addActionListener( this);
item.setBackground(color);
}
}
popup.setBackground(color);
popup.addPopupMenuListener( this);
popup.show( invoker, x, y);
}
public void popupMenuWillBecomeVisible( PopupMenuEvent e) {}
public void popupMenuWillBecomeInvisible( PopupMenuEvent e) {}
public void popupMenuCanceled( PopupMenuEvent e) {}
public void actionPerformed( ActionEvent event) {
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null && itemsText[i].equals( event.getActionCommand())) {
PwrtStatus sts;
if ( typeId == Pwr.eType_Float32) {
float value = (float) itemsEnum[i];
String attrName = dyn.getAttrNameNoSuffix( attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, value);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + attrName + " " + sts);
}
else if ( typeId == Pwr.eType_Int32 ||
typeId == Pwr.eType_UInt32 ||
typeId == Pwr.eType_Int16 ||
typeId == Pwr.eType_UInt16 ||
typeId == Pwr.eType_Int8 ||
typeId == Pwr.eType_UInt8) {
String attrName = dyn.getAttrNameNoSuffix( attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, itemsEnum[i]);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else
return;
System.out.println("Action " + event.getActionCommand());
break;
}
}
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
public class GeDynPopupMenu extends GeDynElem {
String refObject;
public GeDynPopupMenu( GeDyn dyn, String refObject) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_PopupMenu);
this.refObject = refObject;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB3Press:
if ( refObject.startsWith("!")) {
// Name of an attribute that contains the objid of the reference object
CdhrObjid reto = dyn.en.gdh.getObjectInfoObjid( refObject.substring(1));
if ( reto.oddSts() && !reto.objid.isNull()) {
CdhrString rets = dyn.en.gdh.objidToName( reto.objid, Cdh.mName_volumeStrict);
System.out.println( "str: " + rets.str + " " + rets.getSts());
if ( rets.oddSts() && ! rets.str.equals(""))
new JopMethodsMenu( dyn.session, rets.str, JopUtility.GRAPH,
(Component)dyn.comp, e.getX(), e.getY());
}
}
else {
new JopMethodsMenu( dyn.session, refObject, JopUtility.GRAPH,
(Component)dyn.comp, e.getX(), e.getY());
}
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class GeDynPulldownMenu extends GeDynElem {
String[] itemsText;
GeDyn[] itemsDyn;
public GeDynPulldownMenu( GeDyn dyn, String itemsText[], GeDyn[] itemsDyn) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_PulldownMenu);
this.itemsText = itemsText;
this.itemsDyn = itemsDyn;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
break;
case GeDyn.eEvent_MB1Up:
break;
case GeDyn.eEvent_MB1Click:
new PulldownMenu((Component)dyn.comp,
// ((Component)dyn.comp).getX() - ((Component)dyn.comp).getWidth()/2,
// ((Component)dyn.comp).getY() + ((Component)dyn.comp).getHeight() - 2
0, ((Component)dyn.comp).getHeight() - 2
);
break;
}
}
class PulldownMenu implements ActionListener, PopupMenuListener {
Component invoker;
PulldownMenu( Component invoker, int x, int y) {
this.invoker = invoker;
JMenuItem item;
JPopupMenu popup = new JPopupMenu();
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null && itemsDyn[i] != null) {
if ( (itemsDyn[i].actionType & GeDyn.mActionType_PulldownMenu) != 0) {
System.out.println( itemsText[i] + " " + i + " " + itemsDyn[i].actionType + " " +
GeDyn.mActionType_PulldownMenu);
if ( itemsDyn[i].elements.length == 1 &&
itemsDyn[i].elements[0] instanceof GeDynPulldownMenu)
popup.add( subMenu( itemsText[i], (GeDynPulldownMenu) itemsDyn[i].elements[0])); // Check which element...
}
else {
popup.add( item = new JMenuItem( itemsText[i]));
item.addActionListener( this);
}
}
}
popup.addPopupMenuListener( this);
popup.show( invoker, x, y);
}
JMenu subMenu( String text, GeDynPulldownMenu pulldown) {
JMenu menu = new JMenu( text);
JMenuItem item;
for ( int i = 0; i < 32; i++) {
if ( pulldown.itemsText[i] != null && pulldown.itemsDyn[i] != null) {
if ( (pulldown.itemsDyn[i].actionType & GeDyn.mActionType_PulldownMenu) != 0) {
if ( pulldown.itemsDyn[i].elements.length == 1 &&
pulldown.itemsDyn[i].elements[0] instanceof GeDynPulldownMenu)
menu.add( subMenu( pulldown.itemsText[i], (GeDynPulldownMenu) pulldown.itemsDyn[i].elements[0]));
}
else {
menu.add( item = new JMenuItem( pulldown.itemsText[i]));
item.addActionListener( this);
}
}
}
return menu;
}
public void popupMenuWillBecomeVisible( PopupMenuEvent e) {}
public void popupMenuWillBecomeInvisible( PopupMenuEvent e) {}
public void popupMenuCanceled( PopupMenuEvent e) {}
public void actionPerformed( ActionEvent event) {
for ( int i = 0; i < 32; i++) {
if ( itemsText[i] != null && itemsText[i].equals( event.getActionCommand())) {
if ( itemsDyn[i] != null) {
MouseEvent e = new MouseEvent( invoker, 0, 0, 0, invoker.getX(), invoker.getY(), 1, false);
System.out.println("Action " + event.getActionCommand());
itemsDyn[i].action( GeDyn.eEvent_MB1Click, e);
}
break;
}
else if ( itemsDyn[i] != null &&
(itemsDyn[i].actionType & GeDyn.mActionType_PulldownMenu) != 0) {
if ( itemsDyn[i].elements.length == 1 &&
itemsDyn[i].elements[0] instanceof GeDynPulldownMenu)
subMenuAction( event, (GeDynPulldownMenu) itemsDyn[i].elements[0]);
}
}
}
public void subMenuAction( ActionEvent event, GeDynPulldownMenu pulldown) {
for ( int i = 0; i < 32; i++) {
if ( pulldown.itemsText[i] != null && pulldown.itemsText[i].equals( event.getActionCommand())) {
if ( pulldown.itemsDyn[i] != null) {
MouseEvent e = new MouseEvent( invoker, 0, 0, 0, invoker.getX(), invoker.getY(), 1, false);
System.out.println("Action " + event.getActionCommand());
pulldown.itemsDyn[i].action( GeDyn.eEvent_MB1Click, e);
}
break;
}
else if ( pulldown.itemsDyn[i] != null &&
(pulldown.itemsDyn[i].actionType & GeDyn.mActionType_PulldownMenu) != 0) {
if ( pulldown.itemsDyn[i].elements.length == 1)
subMenuAction( event, (GeDynPulldownMenu) pulldown.itemsDyn[i].elements[0]);
}
}
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class GeDynRadioButton extends GeDynElem {
String attribute;
boolean attrFound;
PwrtRefId subid;
int p;
boolean inverted;
boolean oldValue;
boolean firstScan = true;
public GeDynRadioButton( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_RadioButton);
this.attribute = attribute;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "RadioButton: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
inverted = GeDyndata.getAttrInverted( attribute);
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
boolean value0 = dyn.en.gdh.getObjectRefInfoBoolean( p);
if ( firstScan) {
if ( (!inverted && value0) || (inverted && !value0)) {
dyn.comp.setLastPage();
dyn.repaintNow = true;
}
oldValue = value0;
firstScan = false;
}
if ( oldValue != value0) {
// Shift to first or last page
if ( (!inverted && value0) || (inverted && !value0))
dyn.comp.setLastPage();
else if ( (!inverted && !value0) || (inverted && value0))
dyn.comp.setFirstPage();
dyn.repaintNow = true;
}
oldValue = value0;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
// Get all radiobutton in the same group
Container parent = ((JComponent)dyn.comp).getParent();
if ( parent == null) break;
PwrtStatus sts;
String attrName;
for ( int i = 0; i < parent.getComponentCount(); i++) {
GeComponentIfc c = (GeComponentIfc) parent.getComponent(i);
if ( (((GeDyn)c.getDd()).actionType & GeDyn.mActionType_RadioButton) != 0) {
// Get the attribute
for ( int j = 0; j < ((GeDyn)c.getDd()).elements.length; j++) {
if ( ((GeDyn)c.getDd()).elements[j].getActionType() ==
GeDyn.mActionType_RadioButton) {
String name = ((GeDynRadioButton)((GeDyn)c.getDd()).elements[j]).attribute;
if ( name.equals( attribute))
break;
attrName = dyn.getAttrName( name);
sts = dyn.en.gdh.setObjectInfo( attrName, false);
break;
}
}
}
}
attrName = dyn.getAttrName( attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "RadioButton: " + attribute);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynResetDig extends GeDynElem {
String attribute;
public GeDynResetDig( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_ResetDig);
this.attribute = attribute;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String attrName = dyn.getAttrName( attribute);
PwrtStatus sts = dyn.en.gdh.setObjectInfo( attrName, false);
if ( sts.evenSts())
System.out.println( "SetDig: " + attrName);
break;
}
}
}
package jpwr.jop;
import javax.swing.*;
import jpwr.rt.*;
public class GeDynRotate extends GeDynElem {
String attribute;
double x0;
double y0;
double factor;
boolean attrFound;
PwrtRefId subid;
int p;
int typeId;
float oldValue;
boolean firstScan = true;
public GeDynRotate( GeDyn dyn, String attribute, double x0, double y0, double factor) {
super( dyn, GeDyn.mDynType_Rotate, GeDyn.mActionType_No);
this.attribute = attribute;
this.x0 = x0;
this.y0 = y0;
this.factor = factor;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Rotate: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
typeId = ret.typeId;
dyn.x0 = x0;
dyn.y0 = y0;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
float value0 = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( value0 != oldValue || firstScan) {
dyn.rotate = value0 * factor;
oldValue = value0;
// dyn.repaintNow = true;
((JComponent)dyn.comp).repaint();
}
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynSetDig extends GeDynElem {
String attribute;
public GeDynSetDig( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_SetDig);
this.attribute = attribute;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String attrName = dyn.getAttrName( attribute);
PwrtStatus sts = dyn.en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "SetDig: " + attrName);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class GeDynSlider extends GeDynElem {
String attribute;
int direction;
double minValue;
double maxValue;
double minPos;
double maxPos;
boolean attrFound;
PwrtRefId subid;
int p;
float oldValue;
boolean firstScan = true;
boolean moveActive = false;
Point offset = new Point();
public GeDynSlider( GeDyn dyn, String attribute, double minValue, double maxValue,
int direction, double minPos, double maxPos) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_Slider);
this.attribute = attribute;
this.minValue = minValue;
this.maxValue = maxValue;
this.direction = direction;
this.minPos = minPos;
this.maxPos = maxPos;
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Slider: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound || moveActive)
return;
float value = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( oldValue != value || firstScan) {
Point loc = ((JComponent)dyn.comp).getLocation();
int pos;
switch ( direction) {
case Ge.DIRECTION_RIGHT:
pos = (int)((maxValue - value)/(maxValue - minValue) *
(maxPos - minPos) + minPos);
loc.x = pos;
break;
case Ge.DIRECTION_LEFT:
pos = (int)(value /(maxValue - minValue) *
(maxPos - minPos) + minPos);
loc.x = pos;
break;
case Ge.DIRECTION_UP:
pos = (int)((value - minValue)/(maxValue - minValue) *
(maxPos - minPos) + minPos);
loc.y = pos;
break;
default:
pos = (int)((maxValue - value)/(maxValue - minValue) *
(maxPos - minPos) + minPos);
loc.y = pos;
}
((JComponent)dyn.comp).setLocation( loc);
((JComponent)dyn.comp).repaint();
}
oldValue = value;
if ( firstScan)
firstScan = false;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
moveActive = true;
offset = e.getPoint();
// ((GeComponent)dyn.comp).colorInverse = 1;
// dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
moveActive = false;
// ((GeComponent)dyn.comp).colorInverse = 0;
// dyn.repaintNow = true;
break;
case GeDyn.eEvent_SliderMoved:
float value;
PwrtStatus sts;
Point new_loc = new Point();
Point ePoint = e.getPoint();
// System.out.println("Mouse dragged: " + thisPoint.x + ", " +
// thisPoint.y);
Point loc = ((GeComponent)dyn.comp).getLocation();
switch ( direction) {
case Ge.DIRECTION_RIGHT:
new_loc.x = loc.x + ePoint.x - offset.x;
new_loc.y = loc.y;
if ( new_loc.x > maxPos)
new_loc.x = (int) maxPos;
if ( new_loc.x < minPos)
new_loc.x = (int) minPos;
value = (float)((maxPos - new_loc.x) / (maxPos - minPos) *
(maxValue - minValue) + minValue);
break;
case Ge.DIRECTION_LEFT:
new_loc.x = loc.x + ePoint.x - offset.x;
new_loc.y = loc.y;
if ( new_loc.x > maxPos)
new_loc.x = (int) maxPos;
if ( new_loc.x < minPos)
new_loc.x = (int) minPos;
value = (float)((new_loc.x - minPos) / (maxPos - minPos) *
(maxValue - minValue) + minValue);
break;
case Ge.DIRECTION_UP:
new_loc.y = loc.y + ePoint.y - offset.y;
new_loc.x = loc.x;
if ( new_loc.y > maxPos)
new_loc.y = (int) maxPos;
if ( new_loc.y < minPos)
new_loc.y = (int) minPos;
value = (float)((new_loc.y - minPos) / (maxPos - minPos) *
(maxValue - minValue) + minValue);
// System.out.println("old_y: " + ePoint.y + " new_y: " + new_loc.y + "v: " + value);
break;
default:
new_loc.y = loc.y + ePoint.y - offset.y;
// System.out.println( "loc.y " + loc.y + " eP.y " + ePoint.y + " offset.y " + offset.y + " new_loc.y " + new_loc.y + " maxPos " + maxPos + " minPos " + minPos);
new_loc.x = loc.x;
if ( new_loc.y > maxPos)
new_loc.y = (int) maxPos;
if ( new_loc.y < minPos)
new_loc.y = (int) minPos;
value = (float)((maxPos - new_loc.y) / (maxPos - minPos) *
(maxValue - minValue) + minValue);
// System.out.println("old_y: " + ePoint.y + " new_y: " + new_loc.y + "v: " + value);
}
((JComponent)dyn.comp).setLocation(new_loc);
sts = dyn.en.gdh.setObjectInfo( attribute, value);
if ( sts.evenSts())
System.out.println( "GeSlider: " + sts);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynStoDig extends GeDynElem {
String attribute;
public GeDynStoDig( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_StoDig);
this.attribute = attribute;
}
public void action( int eventType, MouseEvent e) {
String attrName;
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
attrName = dyn.getAttrName( attribute);
PwrtStatus sts = dyn.en.gdh.setObjectInfo( attrName, true);
if ( sts.evenSts())
System.out.println( "StoDig: " + attrName);
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
attrName = dyn.getAttrName( attribute);
dyn.en.gdh.setObjectInfo( attrName, false);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.*;
import javax.swing.*;
public class GeDynTipText extends GeDynElem {
String text;
public GeDynTipText( GeDyn dyn, String text) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_TipText);
this.text = text;
}
public void connect() {
((JComponent)dyn.comp).setToolTipText( text);
}
public void disconnect() {
}
public void scan() {
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
public class GeDynToggleDig extends GeDynElem {
String attribute;
public GeDynToggleDig( GeDyn dyn, String attribute) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_ToggleDig);
this.attribute = attribute;
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_MB1Down:
dyn.comp.setColorInverse( 1);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Up:
dyn.comp.setColorInverse( 0);
dyn.repaintNow = true;
break;
case GeDyn.eEvent_MB1Click:
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String attrName = dyn.getAttrName( attribute);
PwrtStatus sts = dyn.en.gdh.toggleObjectInfo( attrName);
if ( sts.evenSts())
System.out.println( "ToggleDig: " + attrName);
break;
}
}
}
package jpwr.jop;
import jpwr.rt.*;
public class GeDynValue extends GeDynElem {
public String attribute;
public boolean attrFound;
PwrtRefId subid;
int p;
public int typeId;
public boolean oldValueB;
public float oldValueF;
public int oldValueI;
public String oldValueS;
boolean firstScan = true;
GeCFormat cFormat;
StringBuffer sb = new StringBuffer();
public GeDynValue( GeDyn dyn, String attribute, String format) {
super( dyn, GeDyn.mDynType_Value, GeDyn.mActionType_No);
this.attribute = attribute;
this.cFormat = new GeCFormat(format);
}
public void connect() {
String attrName = dyn.getAttrName( attribute);
if ( attrName.compareTo("") != 0) {
GdhrRefObjectInfo ret = dyn.en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "Value: " + attrName);
else {
attrFound = true;
p = ret.id;
subid = ret.refid;
typeId = ret.typeId;
}
}
}
public void disconnect() {
if ( attrFound)
dyn.en.gdh.unrefObjectInfo( subid);
}
public void scan() {
if ( !attrFound)
return;
if ( typeId == Pwr.eType_Float32) {
float value0 = dyn.en.gdh.getObjectRefInfoFloat( p);
if ( value0 != oldValueF || firstScan) {
sb = cFormat.format( value0, sb);
dyn.comp.setAnnot1(new String(sb));
dyn.repaintNow = true;
oldValueF = value0;
}
}
else if ( typeId == Pwr.eType_Int32 ||
typeId == Pwr.eType_UInt32 ||
typeId == Pwr.eType_Int16 ||
typeId == Pwr.eType_UInt16 ||
typeId == Pwr.eType_Int8 ||
typeId == Pwr.eType_UInt8) {
int value0 = dyn.en.gdh.getObjectRefInfoInt( p);
if ( value0 != oldValueI || firstScan) {
sb = cFormat.format( value0, sb);
dyn.comp.setAnnot1(new String(sb));
dyn.repaintNow = true;
oldValueI = value0;
}
}
else if ( typeId == Pwr.eType_String ||
typeId == Pwr.eType_Objid) {
String value0 = dyn.en.gdh.getObjectRefInfoString( p, typeId);
if ( firstScan || value0.compareTo( oldValueS) != 0) {
sb = cFormat.format( value0, sb);
dyn.comp.setAnnot1(new String(sb));
dyn.repaintNow = true;
oldValueS = value0;
}
}
if ( firstScan)
firstScan = false;
}
}
package jpwr.jop;
import jpwr.rt.*;
import java.awt.event.*;
import javax.swing.*;
public class GeDynValueInput extends GeDynElem {
double minValue;
double maxValue;
boolean attrFound = false;
int typeId;
GeDynValue valueElement;
public GeDynValueInput( GeDyn dyn, double minValue, double maxValue) {
super( dyn, GeDyn.mDynType_No, GeDyn.mActionType_ValueInput);
this.minValue = minValue;
this.maxValue = maxValue;
}
public void connect() {
// Find the value element
if ( dyn.elements == null)
return;
for ( int i = 0; i < dyn.elements.length; i++) {
if ( dyn.elements[i].getDynType() == GeDyn.mDynType_Value) {
valueElement = (GeDynValue)dyn.elements[i];
typeId = valueElement.typeId;
attrFound = valueElement.attrFound;
break;
}
}
}
public void disconnect() {
}
public void action( int eventType, MouseEvent e) {
switch ( eventType) {
case GeDyn.eEvent_FocusLost: {
if (!attrFound)
break;
valueElement.firstScan = true;
}
case GeDyn.eEvent_ValueChanged: {
if (!attrFound)
break;
if ( (dyn.actionType & GeDyn.mActionType_Confirm) != 0)
break;
String text = ((JTextField)dyn.comp).getText();
PwrtStatus sts;
try {
if ( typeId == Pwr.eType_Float32) {
float inputValue = Float.parseFloat( text);
valueElement.oldValueF = inputValue;
if ( minValue == 0 && maxValue == 0) {
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else {
if ( inputValue >= minValue && inputValue <= maxValue ) {
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + attrName + " " + sts);
}
else
valueElement.oldValueF = -10000;
}
}
else if ( typeId == Pwr.eType_Int32 ||
typeId == Pwr.eType_UInt32 ||
typeId == Pwr.eType_Int16 ||
typeId == Pwr.eType_UInt16 ||
typeId == Pwr.eType_Int8 ||
typeId == Pwr.eType_UInt8) {
int inputValue = Integer.parseInt( text, 10);
valueElement.oldValueI = inputValue;
if ( minValue == 0 && maxValue == 0) {
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else {
if ( inputValue >= minValue && inputValue <= maxValue ) {
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else
valueElement.oldValueI = -10000;
}
}
else if ( typeId == Pwr.eType_String) {
valueElement.oldValueS = text;
String attrName = dyn.getAttrNameNoSuffix( valueElement.attribute);
sts = dyn.en.gdh.setObjectInfo( attrName, text);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
}
catch(NumberFormatException ex) {
System.out.println( ex.toString() );
}
break;
}
}
}
}
......@@ -7,17 +7,9 @@ import java.awt.font.*;
import javax.swing.*;
public class GeFrameThin extends GeComponent {
Dimension size;
public GeFrameThin()
public GeFrameThin( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
super( session);
size = new Dimension( 144, 84);
}
Shape[] shapes = new Shape[] { null, null, null, null};
......@@ -69,19 +61,19 @@ public class GeFrameThin extends GeComponent {
}
g.setStroke( new BasicStroke(1F));
g.setColor(GeColor.getColor(24, colorTone,
g.setColor(GeColor.getColor(78, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, borderColor));
g.draw( shapes[0]);
g.setStroke( new BasicStroke(1F));
g.setColor(GeColor.getColor(24, colorTone,
g.setColor(GeColor.getColor(78, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, borderColor));
g.draw( shapes[1]);
g.setStroke( new BasicStroke(1F));
g.setColor(GeColor.getColor(10, colorTone,
g.setColor(GeColor.getColor(40, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, borderColor));
g.draw( shapes[2]);
g.setStroke( new BasicStroke(1F));
g.setColor(GeColor.getColor(10, colorTone,
g.setColor(GeColor.getColor(40, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, borderColor));
g.draw( shapes[3]);
g.setTransform(save);
......
......@@ -13,17 +13,9 @@ public class GeImage extends JComponent implements ActionListener {
Object root;
JopSession session;
Timer timer = new Timer(500, this);
public GeImage()
public GeImage( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.session = session;
size = new Dimension( 60, 30);
timer.start();
}
......@@ -369,12 +361,12 @@ public class GeImage extends JComponent implements ActionListener {
p[1] = m;
p[2] = m;
break;
case GeColor.COLOR_TONE_YELLOW:
case GeColor.COLOR_TONE_YELLOWGREEN:
p[0] = a1;
p[1] = a1;
p[2] = b2;
break;
case GeColor.COLOR_TONE_GOLD:
case GeColor.COLOR_TONE_YELLOW:
tmp = (int)( 1.2 * a1);
if (tmp <= 255)
p[0] = tmp;
......
......@@ -7,37 +7,25 @@ import java.awt.*;
import javax.swing.*;
import javax.swing.Timer;
public class GeTextField extends JTextField implements JopDynamic,
ActionListener
public class GeTextField extends JTextField implements GeComponentIfc,
JopDynamic, JopConfirm, ActionListener
{
Dimension size;
Object root;
Timer timer = new Timer(500, this);
JopSession session;
public JopEngine en;
public GeDyndata dd = new GeDyndata();
public GeDyn dd = new GeDyn( this);
String undoKey = new String( "Ej i bruk." );
public float minValue = 0;
public float maxValue = 0;
float alarmLimitLow = 0;
float alarmLimitHigh = 100000;
public boolean focus = false;
public boolean confirmActive = false;
public Color normalColor = null;
public Color alarmColor = new Color( 255, 0, 0 );
public GeTextField component = this;
public GeTextField()
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception
public GeTextField( JopSession session)
{
this.session = session;
dd.setSession( session);
size = new Dimension( 102, 36);
timer.start();
}
......@@ -73,7 +61,12 @@ public class GeTextField extends JTextField implements JopDynamic,
});
this.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(ActionEvent e) {
newValueEvent(e);
dd.action( GeDyn.eEvent_ValueChanged, null);
if ( (dd.actionType & GeDyn.mActionType_Confirm) != 0)
confirmActive = true;
// newValueEvent(e);
component.getParent().requestFocus();
}
});
}
......@@ -87,14 +80,99 @@ public class GeTextField extends JTextField implements JopDynamic,
component.getParent().requestFocus();
}
public void focusLost(FocusEvent e) {
focus = false;
dd.oldValueF[0] = -10000;
dd.oldValueI = -10000;
dd.oldValueS = null;
if ( !confirmActive) {
focus = false;
dd.action( GeDyn.eEvent_FocusLost, null);
}
}
});
if ( dd.actionType != 0 && en.gdh.isAuthorized( dd.access)) {
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Up, e);
}
public void mousePressed(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Down, e);
}
});
}
}
}
public void confirmYes() {
PwrtStatus sts;
String attrName;
dd.confirmedAction( GeDyn.eEvent_ValueChanged, null);
confirmActive = false;
focus = false;
dd.action( GeDyn.eEvent_FocusLost, null);
component.getParent().requestFocus();
}
public void confirmNo() {
focus = false;
confirmActive = false;
dd.action( GeDyn.eEvent_FocusLost, null);
component.getParent().requestFocus();
}
// GeComponents Ifc
public void tsetFillColor( int fillColor) {
this.fillColor = fillColor;
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, fillColor);
setBackground( normalColor);
}
public void tsetColorTone( int colorTone) {
this.colorTone = colorTone;
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, GeColor.NO_COLOR);
setBackground( normalColor);
}
public void tsetBorderColor( int borderColor) {}
public void tsetTextColor( int borderColor) {}
public void setColorInverse( int colorInverse) {}
public void resetFillColor() {
fillColor = originalFillColor;
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, fillColor);
setBackground( normalColor);
}
public void resetColorTone() {
colorTone = originalColorTone;
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, fillColor);
setBackground( normalColor);
}
public void resetBorderColor() {}
public void resetTextColor() {}
public String getAnnot1() {
return getText();
}
public void setAnnot1( String s) {
setText( s);
}
public void setLastPage() {}
public void setFirstPage() {}
public void setPage( int page) {}
public int setNextPage() { return 1;}
public int setPreviousPage() { return 1;}
public Object getDd() { return dd;}
public void setFillLevel( float fillLevel) {}
public void setLevelDirection( int levelDirection) {}
public void setLevelColorTone( int levelColorTone) {}
public void setLevelFillColor( int levelFillColor) {}
Font annot1Font = new Font("Helvetica", Font.BOLD, 14);
public void setAnnot1Font( Font font) { annot1Font = font; setFont(font);}
......@@ -115,6 +193,10 @@ public class GeTextField extends JTextField implements JopDynamic,
public int originalColorInverse = 0;
public GdhrRefObjectInfo ret = null;
public StringBuffer sb = new StringBuffer();
float oldValueF;
int oldValueI;
String oldValueS;
int typeId;
public void setColorTone( int colorTone) {
this.colorTone = colorTone;
originalColorTone = colorTone;
......@@ -142,14 +224,11 @@ public class GeTextField extends JTextField implements JopDynamic,
}
public int getColorIntensity() {
return colorIntensity;
}
}
public void setFillColor( int fillColor) {
this.fillColor = fillColor;
this.originalFillColor = fillColor;
}
public void resetFillColor() {
fillColor = originalFillColor;
}
public int getFillColor() {
return fillColor;
}
......@@ -176,199 +255,21 @@ public class GeTextField extends JTextField implements JopDynamic,
if ( en.isInstance())
dd.setInstance( en.getInstance());
dd.connect();
String attrName;
if (dd.data[0] != null) {
attrName = dd.getAttrName( dd.data[0]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[0] = true;
dd.p[0] = ret.id;
dd.subid[0] = ret.refid;
dd.typeId[0] = ret.typeId;
dd.setFormat( dd.data[1]);
}
}
}
if (dd.data[3] != null && dd.data[4] != null) {
try {
minValue = Float.parseFloat( dd.data[3]);
maxValue = Float.parseFloat( dd.data[4]);
}
catch(NumberFormatException ex) {
minValue = 0;
maxValue = 0;
}
}
else {
minValue = 0;
maxValue = 0;
}
if ( dd.data[2] != null) {
attrName = dd.getAttrName( dd.data[2]);
if ( attrName.compareTo("") != 0) {
ret = en.gdh.refObjectInfo( attrName);
if ( ret.evenSts())
System.out.println( "ObjectInfoError " + attrName);
else {
dd.attrFound[1] = true;
dd.p[1] = ret.id;
dd.subid[1] = ret.refid;
dd.typeId[1] = ret.typeId;
dd.inverted[1] = GeDyndata.getAttrInverted( dd.data[2]);
}
}
}
normalColor = GeColor.getColor( fillColor, colorTone,
colorShift, colorIntensity, colorBrightness, colorInverse, fillColor);
setBackground( normalColor);
}
public void dynamicClose() {
if ( dd.attrFound[0])
en.gdh.unrefObjectInfo( dd.subid[0]);
if ( dd.attrFound[1])
en.gdh.unrefObjectInfo( dd.subid[1]);
dd.disconnect();
}
public void dynamicUpdate( boolean animationOnly) {
if ( animationOnly)
return;
if ( !dd.attrFound[0] || focus)
if ( animationOnly || focus)
return;
boolean repaintNow = false;
if ( dd.typeId[0] == Pwr.eType_Float32) {
float value0 = en.gdh.getObjectRefInfoFloat( dd.p[0]);
if ( value0 != dd.oldValueF[0]) {
sb = dd.format( value0, sb);
setText(new String(sb));
repaintNow = true;
dd.oldValueF[0] = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_Int32 ||
dd.typeId[0] == Pwr.eType_UInt32 ||
dd.typeId[0] == Pwr.eType_Int16 ||
dd.typeId[0] == Pwr.eType_UInt16 ||
dd.typeId[0] == Pwr.eType_Int8 ||
dd.typeId[0] == Pwr.eType_UInt8) {
int value0 = en.gdh.getObjectRefInfoInt( dd.p[0]);
if ( value0 != dd.oldValueI) {
sb = dd.format( value0, sb);
setText(new String(sb));
repaintNow = true;
dd.oldValueI = value0;
}
}
else if ( dd.typeId[0] == Pwr.eType_String) {
String value0 = en.gdh.getObjectRefInfoString( dd.p[0], dd.typeId[0]);
if ( dd.oldValueS == null || value0.compareTo( dd.oldValueS) != 0) {
sb = dd.format( value0, sb);
setText(new String(sb));
repaintNow = true;
dd.oldValueS = value0;
}
}
if ( dd.attrFound[1]) {
boolean value1 = en.gdh.getObjectRefInfoBoolean( dd.p[1]);
if ( value1 != dd.oldValueB[1] || dd.firstScan) {
if ( (!dd.inverted[1] && value1) || (dd.inverted[1] && !value1)) {
colorTone = originalColorTone;
fillColor = originalFillColor;
}
else {
if ( dd.color <= GeColor.COLOR_TONE_MAX)
colorTone = dd.color;
else
fillColor = dd.color;
}
repaintNow = true;
dd.oldValueB[1] = value1;
normalColor = GeColor.getColor( fillColor, colorTone, colorShift,
colorIntensity, colorBrightness, colorInverse, GeColor.NO_COLOR);
setBackground( normalColor);
dd.scan();
}
}
if ( repaintNow)
// repaintForeground();
if ( dd.firstScan)
dd.firstScan = false;
// if ( valueAttr < alarmLimitLow || valueAttr > alarmLimitHigh)
// setBackground( alarmColor);
// else
// setBackground( normalColor);
}
void newValueEvent(ActionEvent e) {
String text = this.getText();
PwrtStatus sts;
try {
if ( dd.typeId[0] == Pwr.eType_Float32) {
float inputValue = Float.parseFloat( text );
dd.oldValueF[0] = inputValue;
if ( minValue == 0 && maxValue == 0) {
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else {
if ( inputValue >= minValue && inputValue <= maxValue ) {
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + attrName + " " + sts);
}
else
dd.oldValueF[0] = -10000;
}
}
else if ( dd.typeId[0] == Pwr.eType_Int32 ||
dd.typeId[0] == Pwr.eType_UInt32 ||
dd.typeId[0] == Pwr.eType_Int16 ||
dd.typeId[0] == Pwr.eType_UInt16 ||
dd.typeId[0] == Pwr.eType_Int8 ||
dd.typeId[0] == Pwr.eType_UInt8) {
int inputValue = Integer.parseInt( text, 10);
dd.oldValueI = inputValue;
if ( minValue == 0 && maxValue == 0) {
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else {
if ( inputValue >= minValue && inputValue <= maxValue ) {
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, inputValue);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
else
dd.oldValueI = -10000;
}
}
else if ( dd.typeId[0] == Pwr.eType_String) {
dd.oldValueS = text;
String attrName = dd.getAttrNameNoSuffix( dd.data[0]);
sts = en.gdh.setObjectInfo( attrName, text);
if ( sts.evenSts())
System.out.println( "setObjectInfoError " + sts);
}
}
catch(NumberFormatException ex) {
System.out.println( ex.toString() );
}
this.getParent().requestFocus();
}
void keyPressedEvent(KeyEvent e) {
......@@ -386,44 +287,37 @@ public class GeTextField extends JTextField implements JopDynamic,
undoKey = text;
}
public float getMaxValue() {
return maxValue;
}
public void repaintForeground() {
Graphics g = getGraphics();
if ( g == null) {
System.out.println("repaintForeground: can't get Graphic object");
return;
}
public void setMaxValue(float maxValue) {
this.maxValue = maxValue;
// if ( dd.invisible && !dd.invisibleOld) {
// setVisible( false);
// dd.invisibleOld = dd.invisible;
// }
// else if ( !dd.invisible && dd.invisibleOld) {
// setVisible( true);
// dd.invisibleOld = dd.invisible;
// }
paintComponent(g);
paintChildren(g);
}
}
public float getMinValue() {
return minValue;
}
public void setMinValue(float minValue) {
this.minValue = minValue;
}
public float getAlarmLimitHigh() {
return alarmLimitHigh;
}
public void setAlarmLimitHigh(float alarmLimitHigh) {
this.alarmLimitHigh = alarmLimitHigh;
}
public float getAlarmLimitLow() {
return alarmLimitLow;
}
public void setAlarmLimitLow(float alarmLimitLow) {
this.alarmLimitLow = alarmLimitLow;
}
public Color getAlarmColor() {
return alarmColor;
}
public void setAlarmColor(Color alarmColor) {
this.alarmColor = alarmColor;
}
}
......@@ -8,23 +8,18 @@ import javax.swing.Timer;
import java.awt.event.*;
import jpwr.rt.*;
public class JopBar extends JComponent implements JopDynamic, ActionListener{
public class JopBar extends JComponent implements GeComponentIfc,
JopDynamic, JopConfirm, ActionListener{
Dimension size;
Timer timer = new Timer(500, this);
Object root;
JopSession session;
JopEngine en;
public JopBar()
public GeDyn dd = new GeDyn( this);
public JopBar( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.session = session;
dd.setSession( session);
size = new Dimension( 102, 36);
timer.start();
......@@ -49,8 +44,63 @@ public class JopBar extends JComponent implements JopDynamic, ActionListener{
if ( engine_found) {
timer.stop();
timer = null;
if ( dd.actionType != 0 && en.gdh.isAuthorized( dd.access)) {
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Up, e);
}
public void mousePressed(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Down, e);
}
public void mouseClicked(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Click, e);
}
});
}
}
}
public void confirmNo() {}
public void confirmYes() {
PwrtStatus sts;
String attrName;
dd.confirmedAction( GeDyn.eEvent_MB1Click, null);
}
// GeComponents Ifc
public void tsetFillColor( int fillColor) {}
public void tsetColorTone( int colorTone) {}
public void tsetBorderColor( int borderColor) {}
public void tsetTextColor( int borderColor) {}
public void setColorInverse( int colorInverse) {}
public void resetFillColor() {}
public void resetColorTone() {}
public void resetBorderColor() {}
public void resetTextColor() {}
public String getAnnot1() { return new String();}
public void setAnnot1( String s) {}
public void setLastPage() {}
public void setFirstPage() {}
public void setPage( int page) {}
public int setNextPage() { return 1;}
public int setPreviousPage() { return 1;}
public Object getDd() { return dd;}
public void setFillLevel( float fillLevel) {}
public void setLevelDirection( int levelDirection) {}
public void setLevelColorTone( int levelColorTone) {}
public void setLevelFillColor( int levelFillColor) {}
int fillColor = 9999;
int borderColor = 9999;
int fillColorBar = 9999;
......@@ -244,11 +294,21 @@ public class JopBar extends JComponent implements JopDynamic, ActionListener{
((Line2D.Float )shapes[2]).setLine( x, y + height - bar_height, x + width,
y + height - bar_height);
}
repaint();
// repaint();
repaintForeground();
valueColorOld = valueColor;
}
}
if ( firstScan)
firstScan = false;
}
public void repaintForeground() {
Graphics g = getGraphics();
if ( g == null) {
System.out.println("repaintForeground: can't get Graphic object");
return;
}
paintComponent(g);
paintChildren(g);
}
}
......@@ -2,4 +2,5 @@ package jpwr.jop;
public interface JopConfirm {
public void confirmYes();
public void confirmNo();
}
......@@ -34,6 +34,7 @@ public class JopConfirmDialog {
public void actionPerformed( ActionEvent ev) {
// dia.hide();
// dia.setVisible( false);
((JopConfirm) par).confirmNo();
dia.dispose();
// dia = null;
}
......@@ -43,6 +44,7 @@ public class JopConfirmDialog {
public void actionPerformed( ActionEvent ev) {
// dia.hide();
// dia.setVisible( false);
((JopConfirm) par).confirmNo();
dia.dispose();
// dia = null;
}
......@@ -64,3 +66,4 @@ public class JopConfirmDialog {
}
}
}
......@@ -8,25 +8,20 @@ import javax.swing.Timer;
import java.awt.event.*;
import jpwr.rt.*;
public class JopTrend extends JComponent implements JopDynamic, ActionListener{
public class JopTrend extends JComponent implements GeComponentIfc,
JopDynamic, JopConfirm, ActionListener{
Dimension size;
Timer timer = new Timer(500, this);
Object root;
JopSession session;
JopEngine en;
public JopTrend()
public GeDyn dd = new GeDyn( this);
public JopTrend( JopSession session)
{
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
private void jbInit() throws Exception {
this.session = session;
size = new Dimension( 102, 36);
timer.start();
dd.setSession( session);
}
public void actionPerformed(ActionEvent e) {
......@@ -48,8 +43,63 @@ public class JopTrend extends JComponent implements JopDynamic, ActionListener{
if ( engine_found) {
timer.stop();
timer = null;
if ( dd.actionType != 0 && en.gdh.isAuthorized( dd.access)) {
this.addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Up, e);
}
public void mousePressed(MouseEvent e) {
if ( e.isPopupTrigger())
dd.action( GeDyn.eEvent_MB3Press, e);
else if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Down, e);
}
public void mouseClicked(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0 &&
en.gdh.isAuthorized( dd.access))
dd.action( GeDyn.eEvent_MB1Click, e);
}
});
}
}
}
public void confirmNo() {}
public void confirmYes() {
PwrtStatus sts;
String attrName;
dd.confirmedAction( GeDyn.eEvent_MB1Click, null);
}
// GeComponents Ifc
public void tsetFillColor( int fillColor) {}
public void tsetColorTone( int colorTone) {}
public void tsetBorderColor( int borderColor) {}
public void tsetTextColor( int textColor) {}
public void setColorInverse( int colorInverse) {}
public void resetFillColor() {}
public void resetColorTone() {}
public void resetBorderColor() {}
public void resetTextColor() {}
public String getAnnot1() { return new String();}
public void setAnnot1( String s) {}
public void setLastPage() {}
public void setFirstPage() {}
public void setPage( int page) {}
public int setNextPage() { return 1;}
public int setPreviousPage() { return 1;}
public Object getDd() { return dd;}
public void setFillLevel( float fillLevel) {}
public void setLevelDirection( int levelDirection) {}
public void setLevelColorTone( int levelColorTone) {}
public void setLevelFillColor( int levelFillColor) {}
int fillColor = 9999;
int borderColor = 9999;
int[] fillColorTrend = {9999, 9999};
......@@ -361,8 +411,17 @@ public class JopTrend extends JComponent implements JopDynamic, ActionListener{
}
}
repaint();
// paintForeground();
if ( firstScan)
firstScan = false;
}
public void repaintForeground() {
Graphics g = getGraphics();
if ( g == null) {
System.out.println("repaintForeground: can't get Graphic object");
return;
}
paintComponent(g);
paintChildren(g);
}
}
......@@ -18,12 +18,48 @@ local_java_sources := \
JopApplet.java \
JopSpider.java \
Jop.java \
GeComponentIfc.java \
GeDynElemIfc.java \
GeDyn.java \
GeComponent.java \
GeTextField.java \
GeSlider.java \
JopBar.java \
JopTrend.java \
JopAxis.java \
GeDynElem.java \
GeDynDigLowColor.java \
GeDynDigColor.java \
GeDynDigError.java \
GeDynDigWarning.java \
GeDynDigFlash.java \
GeDynInvisible.java \
GeDynDigBorder.java \
GeDynDigText.java \
GeDynValue.java \
GeDynRotate.java \
GeDynMove.java \
GeDynAnalogShift.java \
GeDynDigShift.java \
GeDynAnimation.java \
GeDynSetDig.java \
GeDynResetDig.java \
GeDynToggleDig.java \
GeDynStoDig.java \
GeDynCommand.java \
GeDynConfirm.java \
GeDynIncrAnalog.java \
GeDynRadioButton.java \
GeDynPopupMenu.java \
GeDynSlider.java \
GeDynValueInput.java \
GeDynAnalogColor.java \
GeDynTipText.java \
GeDynFillLevel.java \
GeDynCloseGraph.java \
GeDynPulldownMenu.java \
GeDynOptionMenu.java \
GeDynAnalogText.java \
JopSpiderFrame.java \
JopLoginFrame.java \
JopLoginApplet.java \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment