1 7 package com.sun.java.swing.plaf.nimbus; 8 9 import java.awt.*; 10 import java.awt.geom.*; 11 import java.awt.image.*; 12 import javax.swing.*; 13 import com.sun.java.swing.Painter; 14 15 17 public final class InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter extends AbstractRegionPainter { 18 static final int BACKGROUND_DISABLED_WINDOWMAXIMIZED = 1; 23 static final int BACKGROUND_ENABLED_WINDOWMAXIMIZED = 2; 24 static final int BACKGROUND_MOUSEOVER_WINDOWMAXIMIZED = 3; 25 static final int BACKGROUND_PRESSED_WINDOWMAXIMIZED = 4; 26 static final int BACKGROUND_ENABLED_WINDOWNOTFOCUSED_WINDOWMAXIMIZED = 5; 27 static final int BACKGROUND_MOUSEOVER_WINDOWNOTFOCUSED_WINDOWMAXIMIZED = 6; 28 static final int BACKGROUND_PRESSED_WINDOWNOTFOCUSED_WINDOWMAXIMIZED = 7; 29 static final int BACKGROUND_DISABLED = 8; 30 static final int BACKGROUND_ENABLED = 9; 31 static final int BACKGROUND_MOUSEOVER = 10; 32 static final int BACKGROUND_PRESSED = 11; 33 static final int BACKGROUND_ENABLED_WINDOWNOTFOCUSED = 12; 34 static final int BACKGROUND_MOUSEOVER_WINDOWNOTFOCUSED = 13; 35 static final int BACKGROUND_PRESSED_WINDOWNOTFOCUSED = 14; 36 37 38 private int state; private PaintContext ctx; 40 41 private Path2D path = new Path2D.Float(); 43 private Rectangle2D rect = new Rectangle2D.Float(0, 0, 0, 0); 44 private RoundRectangle2D roundRect = new RoundRectangle2D.Float(0, 0, 0, 0, 0, 0); 45 private Ellipse2D ellipse = new Ellipse2D.Float(0, 0, 0, 0); 46 47 private Color color1 = decodeColor("nimbusGreen", 0.43362403f, -0.6792196f, 0.054901958f, 0); 51 private Color color2 = decodeColor("nimbusGreen", 0.44056845f, -0.631913f, -0.039215684f, 0); 52 private Color color3 = decodeColor("nimbusGreen", 0.44056845f, -0.67475206f, 0.06666666f, 0); 53 private Color color4 = new Color(255, 200, 0, 255); 54 private Color color5 = decodeColor("nimbusGreen", 0.4355179f, -0.6581704f, -0.011764705f, 0); 55 private Color color6 = decodeColor("nimbusGreen", 0.44484192f, -0.644647f, -0.031372547f, 0); 56 private Color color7 = decodeColor("nimbusGreen", 0.44484192f, -0.6480447f, 0.0f, 0); 57 private Color color8 = decodeColor("nimbusGreen", 0.4366002f, -0.6368381f, -0.04705882f, 0); 58 private Color color9 = decodeColor("nimbusGreen", 0.44484192f, -0.6423572f, -0.05098039f, 0); 59 private Color color10 = decodeColor("nimbusBlueGrey", 0.0055555105f, -0.062449392f, 0.07058823f, 0); 60 private Color color11 = decodeColor("nimbusBlueGrey", -0.008547008f, -0.04174325f, -0.0039215684f, -13); 61 private Color color12 = decodeColor("nimbusBlueGrey", 0.0f, -0.049920253f, 0.031372547f, 0); 62 private Color color13 = decodeColor("nimbusBlueGrey", 0.0055555105f, -0.0029994324f, -0.38039216f, -185); 63 private Color color14 = decodeColor("nimbusGreen", 0.1627907f, 0.2793296f, -0.6431373f, 0); 64 private Color color15 = decodeColor("nimbusGreen", 0.025363803f, 0.2454313f, -0.2392157f, 0); 65 private Color color16 = decodeColor("nimbusGreen", 0.02642706f, -0.3456704f, -0.011764705f, 0); 66 private Color color17 = decodeColor("nimbusGreen", 0.025363803f, 0.2373128f, -0.23529413f, 0); 67 private Color color18 = decodeColor("nimbusGreen", 0.025363803f, 0.0655365f, -0.13333333f, 0); 68 private Color color19 = decodeColor("nimbusGreen", -0.0087068975f, -0.009330213f, -0.32156864f, 0); 69 private Color color20 = decodeColor("nimbusBlueGrey", 0.0f, -0.110526316f, 0.25490195f, -13); 70 private Color color21 = decodeColor("nimbusBlueGrey", 0.0f, -0.110526316f, 0.25490195f, -33); 71 private Color color22 = decodeColor("nimbusGreen", 0.1627907f, 0.2793296f, -0.627451f, 0); 72 private Color color23 = decodeColor("nimbusGreen", 0.04572721f, 0.2793296f, -0.37254903f, 0); 73 private Color color24 = decodeColor("nimbusGreen", 0.009822637f, -0.34243205f, 0.054901958f, 0); 74 private Color color25 = decodeColor("nimbusGreen", 0.010559708f, 0.13167858f, -0.11764705f, 0); 75 private Color color26 = decodeColor("nimbusGreen", 0.010559708f, 0.12599629f, -0.11372548f, 0); 76 private Color color27 = decodeColor("nimbusGreen", 0.010559708f, 9.2053413E-4f, -0.011764705f, 0); 77 private Color color28 = decodeColor("nimbusGreen", 0.015249729f, 0.2793296f, -0.22352943f, -49); 78 private Color color29 = decodeColor("nimbusGreen", 0.01279068f, 0.2793296f, -0.19215685f, 0); 79 private Color color30 = decodeColor("nimbusGreen", 0.013319805f, 0.2793296f, -0.20784315f, 0); 80 private Color color31 = decodeColor("nimbusGreen", 0.009604409f, 0.2793296f, -0.16862744f, 0); 81 private Color color32 = decodeColor("nimbusGreen", 0.011600211f, 0.2793296f, -0.15294117f, 0); 82 private Color color33 = decodeColor("nimbusGreen", 0.011939123f, 0.2793296f, -0.16470587f, 0); 83 private Color color34 = decodeColor("nimbusGreen", 0.009506017f, 0.257901f, -0.15294117f, 0); 84 private Color color35 = decodeColor("nimbusGreen", -0.17054264f, -0.7206704f, -0.7019608f, 0); 85 private Color color36 = decodeColor("nimbusGreen", 0.07804492f, 0.2793296f, -0.47058827f, 0); 86 private Color color37 = decodeColor("nimbusGreen", 0.03592503f, -0.23865601f, -0.15686274f, 0); 87 private Color color38 = decodeColor("nimbusGreen", 0.035979107f, 0.23766291f, -0.3254902f, 0); 88 private Color color39 = decodeColor("nimbusGreen", 0.03690417f, 0.2793296f, -0.33333334f, 0); 89 private Color color40 = decodeColor("nimbusGreen", 0.09681849f, 0.2793296f, -0.5137255f, 0); 90 private Color color41 = decodeColor("nimbusGreen", 0.06535478f, 0.2793296f, -0.44705883f, 0); 91 private Color color42 = decodeColor("nimbusGreen", 0.0675526f, 0.2793296f, -0.454902f, 0); 92 private Color color43 = decodeColor("nimbusGreen", 0.060800627f, 0.2793296f, -0.4392157f, 0); 93 private Color color44 = decodeColor("nimbusGreen", 0.06419912f, 0.2793296f, -0.42352942f, 0); 94 private Color color45 = decodeColor("nimbusGreen", 0.06375685f, 0.2793296f, -0.43137255f, 0); 95 private Color color46 = decodeColor("nimbusGreen", 0.048207358f, 0.2793296f, -0.3882353f, 0); 96 private Color color47 = decodeColor("nimbusGreen", 0.057156876f, 0.2793296f, -0.42352942f, 0); 97 private Color color48 = decodeColor("nimbusGreen", 0.44056845f, -0.62133265f, -0.109803915f, 0); 98 private Color color49 = decodeColor("nimbusGreen", 0.44056845f, -0.5843068f, -0.27058825f, 0); 99 private Color color50 = decodeColor("nimbusGreen", 0.4294573f, -0.698349f, 0.17647058f, 0); 100 private Color color51 = decodeColor("nimbusGreen", 0.45066953f, -0.665394f, 0.07843137f, 0); 101 private Color color52 = decodeColor("nimbusGreen", 0.44056845f, -0.65913194f, 0.062745094f, 0); 102 private Color color53 = decodeColor("nimbusGreen", 0.44056845f, -0.6609689f, 0.086274505f, 0); 103 private Color color54 = decodeColor("nimbusGreen", 0.44056845f, -0.6578432f, 0.04705882f, 0); 104 private Color color55 = decodeColor("nimbusGreen", 0.4355179f, -0.6633787f, 0.05098039f, 0); 105 private Color color56 = decodeColor("nimbusGreen", 0.4355179f, -0.664548f, 0.06666666f, 0); 106 private Color color57 = decodeColor("nimbusBlueGrey", 0.0f, -0.029445238f, -0.30980393f, -13); 107 private Color color58 = decodeColor("nimbusBlueGrey", 0.0f, -0.027957506f, -0.31764707f, -33); 108 private Color color59 = decodeColor("nimbusGreen", 0.43202144f, -0.64722407f, -0.007843137f, 0); 109 private Color color60 = decodeColor("nimbusGreen", 0.44056845f, -0.6339652f, -0.02352941f, 0); 110 private Color color61 = new Color(165, 169, 176, 255); 111 private Color color62 = decodeColor("nimbusBlueGrey", -0.00505054f, -0.057128258f, 0.062745094f, 0); 112 private Color color63 = decodeColor("nimbusBlueGrey", -0.003968239f, -0.035257496f, -0.015686274f, 0); 113 private Color color64 = new Color(64, 88, 0, 255); 114 private Color color65 = decodeColor("nimbusBlueGrey", 0.0f, -0.110526316f, 0.25490195f, 0); 115 private Color color66 = decodeColor("nimbusBlueGrey", 0.004830897f, -0.00920473f, 0.14509803f, -101); 116 private Color color67 = decodeColor("nimbusGreen", 0.009564877f, 0.100521624f, -0.109803915f, 0); 117 private Color color68 = new Color(113, 125, 0, 255); 118 private Color color69 = decodeColor("nimbusBlueGrey", 0.0025252104f, -0.0067527294f, 0.086274505f, -65); 119 private Color color70 = decodeColor("nimbusGreen", 0.03129223f, 0.2793296f, -0.27450982f, 0); 120 private Color color71 = new Color(19, 48, 0, 255); 121 private Color color72 = decodeColor("nimbusBlueGrey", 0.0f, -0.029445238f, -0.30980393f, 0); 122 123 124 private Object [] componentColors; 126 127 public InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonPainter(PaintContext ctx, int state) { 128 super(); 129 this.state = state; 130 this.ctx = ctx; 131 } 132 133 @Override 134 protected void doPaint(Graphics2D g, JComponent c, int width, int height, Object [] extendedCacheKeys) { 135 componentColors = extendedCacheKeys; 137 switch(state) { 140 case BACKGROUND_DISABLED_WINDOWMAXIMIZED: paintBackgroundDisabledAndWindowMaximized(g); break; 141 case BACKGROUND_ENABLED_WINDOWMAXIMIZED: paintBackgroundEnabledAndWindowMaximized(g); break; 142 case BACKGROUND_MOUSEOVER_WINDOWMAXIMIZED: paintBackgroundMouseOverAndWindowMaximized(g); break; 143 case BACKGROUND_PRESSED_WINDOWMAXIMIZED: paintBackgroundPressedAndWindowMaximized(g); break; 144 case BACKGROUND_ENABLED_WINDOWNOTFOCUSED_WINDOWMAXIMIZED: paintBackgroundEnabledAndWindowNotFocusedAndWindowMaximized(g); break; 145 case BACKGROUND_MOUSEOVER_WINDOWNOTFOCUSED_WINDOWMAXIMIZED: paintBackgroundMouseOverAndWindowNotFocusedAndWindowMaximized(g); break; 146 case BACKGROUND_PRESSED_WINDOWNOTFOCUSED_WINDOWMAXIMIZED: paintBackgroundPressedAndWindowNotFocusedAndWindowMaximized(g); break; 147 case BACKGROUND_DISABLED: paintBackgroundDisabled(g); break; 148 case BACKGROUND_ENABLED: paintBackgroundEnabled(g); break; 149 case BACKGROUND_MOUSEOVER: paintBackgroundMouseOver(g); break; 150 case BACKGROUND_PRESSED: paintBackgroundPressed(g); break; 151 case BACKGROUND_ENABLED_WINDOWNOTFOCUSED: paintBackgroundEnabledAndWindowNotFocused(g); break; 152 case BACKGROUND_MOUSEOVER_WINDOWNOTFOCUSED: paintBackgroundMouseOverAndWindowNotFocused(g); break; 153 case BACKGROUND_PRESSED_WINDOWNOTFOCUSED: paintBackgroundPressedAndWindowNotFocused(g); break; 154 155 } 156 } 157 158 159 160 @Override 161 protected final PaintContext getPaintContext() { 162 return ctx; 163 } 164 165 private void paintBackgroundDisabledAndWindowMaximized(Graphics2D g) { 166 roundRect = decodeRoundRect1(); 167 g.setPaint(decodeGradient1(roundRect)); 168 g.fill(roundRect); 169 roundRect = decodeRoundRect2(); 170 g.setPaint(decodeGradient2(roundRect)); 171 g.fill(roundRect); 172 rect = decodeRect1(); 173 g.setPaint(color4); 174 g.fill(rect); 175 rect = decodeRect2(); 176 g.setPaint(color5); 177 g.fill(rect); 178 rect = decodeRect3(); 179 g.setPaint(color6); 180 g.fill(rect); 181 rect = decodeRect4(); 182 g.setPaint(color6); 183 g.fill(rect); 184 rect = decodeRect5(); 185 g.setPaint(color7); 186 g.fill(rect); 187 rect = decodeRect6(); 188 g.setPaint(color8); 189 g.fill(rect); 190 rect = decodeRect7(); 191 g.setPaint(color9); 192 g.fill(rect); 193 rect = decodeRect8(); 194 g.setPaint(color7); 195 g.fill(rect); 196 path = decodePath1(); 197 g.setPaint(decodeGradient3(path)); 198 g.fill(path); 199 path = decodePath2(); 200 g.setPaint(color12); 201 g.fill(path); 202 203 } 204 205 private void paintBackgroundEnabledAndWindowMaximized(Graphics2D g) { 206 roundRect = decodeRoundRect3(); 207 g.setPaint(color13); 208 g.fill(roundRect); 209 roundRect = decodeRoundRect1(); 210 g.setPaint(decodeGradient4(roundRect)); 211 g.fill(roundRect); 212 roundRect = decodeRoundRect2(); 213 g.setPaint(decodeGradient5(roundRect)); 214 g.fill(roundRect); 215 rect = decodeRect1(); 216 g.setPaint(color4); 217 g.fill(rect); 218 rect = decodeRect2(); 219 g.setPaint(color19); 220 g.fill(rect); 221 rect = decodeRect3(); 222 g.setPaint(color19); 223 g.fill(rect); 224 rect = decodeRect4(); 225 g.setPaint(color19); 226 g.fill(rect); 227 rect = decodeRect5(); 228 g.setPaint(color19); 229 g.fill(rect); 230 rect = decodeRect9(); 231 g.setPaint(color19); 232 g.fill(rect); 233 rect = decodeRect7(); 234 g.setPaint(color19); 235 g.fill(rect); 236 rect = decodeRect10(); 237 g.setPaint(color19); 238 g.fill(rect); 239 rect = decodeRect8(); 240 g.setPaint(color19); 241 g.fill(rect); 242 path = decodePath1(); 243 g.setPaint(color20); 244 g.fill(path); 245 path = decodePath2(); 246 g.setPaint(color21); 247 g.fill(path); 248 249 } 250 251 private void paintBackgroundMouseOverAndWindowMaximized(Graphics2D g) { 252 roundRect = decodeRoundRect3(); 253 g.setPaint(color13); 254 g.fill(roundRect); 255 roundRect = decodeRoundRect1(); 256 g.setPaint(decodeGradient6(roundRect)); 257 g.fill(roundRect); 258 roundRect = decodeRoundRect2(); 259 g.setPaint(decodeGradient7(roundRect)); 260 g.fill(roundRect); 261 rect = decodeRect1(); 262 g.setPaint(color4); 263 g.fill(rect); 264 rect = decodeRect2(); 265 g.setPaint(color28); 266 g.fill(rect); 267 rect = decodeRect3(); 268 g.setPaint(color29); 269 g.fill(rect); 270 rect = decodeRect4(); 271 g.setPaint(color30); 272 g.fill(rect); 273 rect = decodeRect5(); 274 g.setPaint(color31); 275 g.fill(rect); 276 rect = decodeRect9(); 277 g.setPaint(color32); 278 g.fill(rect); 279 rect = decodeRect7(); 280 g.setPaint(color33); 281 g.fill(rect); 282 rect = decodeRect10(); 283 g.setPaint(color34); 284 g.fill(rect); 285 rect = decodeRect8(); 286 g.setPaint(color31); 287 g.fill(rect); 288 path = decodePath1(); 289 g.setPaint(color20); 290 g.fill(path); 291 path = decodePath2(); 292 g.setPaint(color21); 293 g.fill(path); 294 295 } 296 297 private void paintBackgroundPressedAndWindowMaximized(Graphics2D g) { 298 roundRect = decodeRoundRect3(); 299 g.setPaint(color13); 300 g.fill(roundRect); 301 roundRect = decodeRoundRect1(); 302 g.setPaint(decodeGradient8(roundRect)); 303 g.fill(roundRect); 304 roundRect = decodeRoundRect2(); 305 g.setPaint(decodeGradient9(roundRect)); 306 g.fill(roundRect); 307 rect = decodeRect1(); 308 g.setPaint(color4); 309 g.fill(rect); 310 rect = decodeRect2(); 311 g.setPaint(color40); 312 g.fill(rect); 313 rect = decodeRect3(); 314 g.setPaint(color41); 315 g.fill(rect); 316 rect = decodeRect4(); 317 g.setPaint(color42); 318 g.fill(rect); 319 rect = decodeRect5(); 320 g.setPaint(color43); 321 g.fill(rect); 322 rect = decodeRect6(); 323 g.setPaint(color44); 324 g.fill(rect); 325 rect = decodeRect7(); 326 g.setPaint(color45); 327 g.fill(rect); 328 rect = decodeRect10(); 329 g.setPaint(color46); 330 g.fill(rect); 331 rect = decodeRect8(); 332 g.setPaint(color47); 333 g.fill(rect); 334 path = decodePath1(); 335 g.setPaint(color20); 336 g.fill(path); 337 path = decodePath2(); 338 g.setPaint(color21); 339 g.fill(path); 340 341 } 342 343 private void paintBackgroundEnabledAndWindowNotFocusedAndWindowMaximized(Graphics2D g) { 344 roundRect = decodeRoundRect1(); 345 g.setPaint(decodeGradient10(roundRect)); 346 g.fill(roundRect); 347 roundRect = decodeRoundRect2(); 348 g.setPaint(decodeGradient11(roundRect)); 349 g.fill(roundRect); 350 rect = decodeRect1(); 351 g.setPaint(color4); 352 g.fill(rect); 353 rect = decodeRect4(); 354 g.setPaint(color54); 355 g.fill(rect); 356 rect = decodeRect5(); 357 g.setPaint(color55); 358 g.fill(rect); 359 rect = decodeRect8(); 360 g.setPaint(color56); 361 g.fill(rect); 362 path = decodePath1(); 363 g.setPaint(color57); 364 g.fill(path); 365 path = decodePath2(); 366 g.setPaint(color58); 367 g.fill(path); 368 369 } 370 371 private void paintBackgroundMouseOverAndWindowNotFocusedAndWindowMaximized(Graphics2D g) { 372 roundRect = decodeRoundRect3(); 373 g.setPaint(color13); 374 g.fill(roundRect); 375 roundRect = decodeRoundRect1(); 376 g.setPaint(decodeGradient6(roundRect)); 377 g.fill(roundRect); 378 roundRect = decodeRoundRect2(); 379 g.setPaint(decodeGradient7(roundRect)); 380 g.fill(roundRect); 381 rect = decodeRect1(); 382 g.setPaint(color4); 383 g.fill(rect); 384 rect = decodeRect2(); 385 g.setPaint(color28); 386 g.fill(rect); 387 rect = decodeRect3(); 388 g.setPaint(color29); 389 g.fill(rect); 390 rect = decodeRect4(); 391 g.setPaint(color30); 392 g.fill(rect); 393 rect = decodeRect5(); 394 g.setPaint(color31); 395 g.fill(rect); 396 rect = decodeRect9(); 397 g.setPaint(color32); 398 g.fill(rect); 399 rect = decodeRect7(); 400 g.setPaint(color33); 401 g.fill(rect); 402 rect = decodeRect10(); 403 g.setPaint(color34); 404 g.fill(rect); 405 rect = decodeRect8(); 406 g.setPaint(color31); 407 g.fill(rect); 408 path = decodePath1(); 409 g.setPaint(color20); 410 g.fill(path); 411 path = decodePath2(); 412 g.setPaint(color21); 413 g.fill(path); 414 415 } 416 417 private void paintBackgroundPressedAndWindowNotFocusedAndWindowMaximized(Graphics2D g) { 418 roundRect = decodeRoundRect3(); 419 g.setPaint(color13); 420 g.fill(roundRect); 421 roundRect = decodeRoundRect1(); 422 g.setPaint(decodeGradient8(roundRect)); 423 g.fill(roundRect); 424 roundRect = decodeRoundRect2(); 425 g.setPaint(decodeGradient9(roundRect)); 426 g.fill(roundRect); 427 rect = decodeRect1(); 428 g.setPaint(color4); 429 g.fill(rect); 430 rect = decodeRect2(); 431 g.setPaint(color40); 432 g.fill(rect); 433 rect = decodeRect3(); 434 g.setPaint(color41); 435 g.fill(rect); 436 rect = decodeRect4(); 437 g.setPaint(color42); 438 g.fill(rect); 439 rect = decodeRect5(); 440 g.setPaint(color43); 441 g.fill(rect); 442 rect = decodeRect6(); 443 g.setPaint(color44); 444 g.fill(rect); 445 rect = decodeRect7(); 446 g.setPaint(color45); 447 g.fill(rect); 448 rect = decodeRect10(); 449 g.setPaint(color46); 450 g.fill(rect); 451 rect = decodeRect8(); 452 g.setPaint(color47); 453 g.fill(rect); 454 path = decodePath1(); 455 g.setPaint(color20); 456 g.fill(path); 457 path = decodePath2(); 458 g.setPaint(color21); 459 g.fill(path); 460 461 } 462 463 private void paintBackgroundDisabled(Graphics2D g) { 464 roundRect = decodeRoundRect1(); 465 g.setPaint(decodeGradient1(roundRect)); 466 g.fill(roundRect); 467 roundRect = decodeRoundRect2(); 468 g.setPaint(decodeGradient12(roundRect)); 469 g.fill(roundRect); 470 rect = decodeRect1(); 471 g.setPaint(color4); 472 g.fill(rect); 473 path = decodePath3(); 474 g.setPaint(color61); 475 g.fill(path); 476 path = decodePath4(); 477 g.setPaint(decodeGradient13(path)); 478 g.fill(path); 479 480 } 481 482 private void paintBackgroundEnabled(Graphics2D g) { 483 roundRect = decodeRoundRect3(); 484 g.setPaint(color13); 485 g.fill(roundRect); 486 roundRect = decodeRoundRect1(); 487 g.setPaint(decodeGradient4(roundRect)); 488 g.fill(roundRect); 489 roundRect = decodeRoundRect2(); 490 g.setPaint(decodeGradient5(roundRect)); 491 g.fill(roundRect); 492 rect = decodeRect1(); 493 g.setPaint(color4); 494 g.fill(rect); 495 path = decodePath3(); 496 g.setPaint(color64); 497 g.fill(path); 498 path = decodePath4(); 499 g.setPaint(color65); 500 g.fill(path); 501 502 } 503 504 private void paintBackgroundMouseOver(Graphics2D g) { 505 roundRect = decodeRoundRect3(); 506 g.setPaint(color66); 507 g.fill(roundRect); 508 roundRect = decodeRoundRect1(); 509 g.setPaint(decodeGradient6(roundRect)); 510 g.fill(roundRect); 511 roundRect = decodeRoundRect2(); 512 g.setPaint(decodeGradient14(roundRect)); 513 g.fill(roundRect); 514 rect = decodeRect1(); 515 g.setPaint(color4); 516 g.fill(rect); 517 path = decodePath3(); 518 g.setPaint(color68); 519 g.fill(path); 520 path = decodePath4(); 521 g.setPaint(color65); 522 g.fill(path); 523 524 } 525 526 private void paintBackgroundPressed(Graphics2D g) { 527 roundRect = decodeRoundRect3(); 528 g.setPaint(color69); 529 g.fill(roundRect); 530 roundRect = decodeRoundRect1(); 531 g.setPaint(decodeGradient8(roundRect)); 532 g.fill(roundRect); 533 roundRect = decodeRoundRect2(); 534 g.setPaint(decodeGradient15(roundRect)); 535 g.fill(roundRect); 536 rect = decodeRect1(); 537 g.setPaint(color4); 538 g.fill(rect); 539 path = decodePath3(); 540 g.setPaint(color71); 541 g.fill(path); 542 path = decodePath4(); 543 g.setPaint(color65); 544 g.fill(path); 545 546 } 547 548 private void paintBackgroundEnabledAndWindowNotFocused(Graphics2D g) { 549 roundRect = decodeRoundRect1(); 550 g.setPaint(decodeGradient10(roundRect)); 551 g.fill(roundRect); 552 roundRect = decodeRoundRect2(); 553 g.setPaint(decodeGradient16(roundRect)); 554 g.fill(roundRect); 555 rect = decodeRect1(); 556 g.setPaint(color4); 557 g.fill(rect); 558 path = decodePath4(); 559 g.setPaint(color72); 560 g.fill(path); 561 562 } 563 564 private void paintBackgroundMouseOverAndWindowNotFocused(Graphics2D g) { 565 roundRect = decodeRoundRect3(); 566 g.setPaint(color66); 567 g.fill(roundRect); 568 roundRect = decodeRoundRect1(); 569 g.setPaint(decodeGradient6(roundRect)); 570 g.fill(roundRect); 571 roundRect = decodeRoundRect2(); 572 g.setPaint(decodeGradient14(roundRect)); 573 g.fill(roundRect); 574 rect = decodeRect1(); 575 g.setPaint(color4); 576 g.fill(rect); 577 path = decodePath3(); 578 g.setPaint(color68); 579 g.fill(path); 580 path = decodePath4(); 581 g.setPaint(color65); 582 g.fill(path); 583 584 } 585 586 private void paintBackgroundPressedAndWindowNotFocused(Graphics2D g) { 587 roundRect = decodeRoundRect3(); 588 g.setPaint(color69); 589 g.fill(roundRect); 590 roundRect = decodeRoundRect1(); 591 g.setPaint(decodeGradient8(roundRect)); 592 g.fill(roundRect); 593 roundRect = decodeRoundRect2(); 594 g.setPaint(decodeGradient15(roundRect)); 595 g.fill(roundRect); 596 rect = decodeRect1(); 597 g.setPaint(color4); 598 g.fill(rect); 599 path = decodePath3(); 600 g.setPaint(color71); 601 g.fill(path); 602 path = decodePath4(); 603 g.setPaint(color65); 604 g.fill(path); 605 606 } 607 608 609 610 private RoundRectangle2D decodeRoundRect1() { 611 roundRect.setRoundRect(decodeX(1.0f), decodeY(1.0f), decodeX(2.0f) - decodeX(1.0f), decodeY(1.9444444f) - decodeY(1.0f), 8.6f, 8.6f); return roundRect; 617 } 618 619 private RoundRectangle2D decodeRoundRect2() { 620 roundRect.setRoundRect(decodeX(1.0526316f), decodeY(1.0555556f), decodeX(1.9473684f) - decodeX(1.0526316f), decodeY(1.8888888f) - decodeY(1.0555556f), 6.75f, 6.75f); return roundRect; 626 } 627 628 private Rectangle2D decodeRect1() { 629 rect.setRect(decodeX(1.0f), decodeY(1.0f), decodeX(1.0f) - decodeX(1.0f), decodeY(1.0f) - decodeY(1.0f)); return rect; 634 } 635 636 private Rectangle2D decodeRect2() { 637 rect.setRect(decodeX(1.2165072f), decodeY(1.2790405f), decodeX(1.6746411f) - decodeX(1.2165072f), decodeY(1.3876263f) - decodeY(1.2790405f)); return rect; 642 } 643 644 private Rectangle2D decodeRect3() { 645 rect.setRect(decodeX(1.2212919f), decodeY(1.6047981f), decodeX(1.270335f) - decodeX(1.2212919f), decodeY(1.3876263f) - decodeY(1.6047981f)); return rect; 650 } 651 652 private Rectangle2D decodeRect4() { 653 rect.setRect(decodeX(1.2643541f), decodeY(1.5542929f), decodeX(1.6315789f) - decodeX(1.2643541f), decodeY(1.5997474f) - decodeY(1.5542929f)); return rect; 658 } 659 660 private Rectangle2D decodeRect5() { 661 rect.setRect(decodeX(1.6267943f), decodeY(1.3888888f), decodeX(1.673445f) - decodeX(1.6267943f), decodeY(1.6085858f) - decodeY(1.3888888f)); return rect; 666 } 667 668 private Rectangle2D decodeRect6() { 669 rect.setRect(decodeX(1.3684211f), decodeY(1.6111112f), decodeX(1.4210527f) - decodeX(1.3684211f), decodeY(1.7777778f) - decodeY(1.6111112f)); return rect; 674 } 675 676 private Rectangle2D decodeRect7() { 677 rect.setRect(decodeX(1.4389952f), decodeY(1.7209597f), decodeX(1.7882775f) - decodeX(1.4389952f), decodeY(1.7765152f) - decodeY(1.7209597f)); return rect; 682 } 683 684 private Rectangle2D decodeRect8() { 685 rect.setRect(decodeX(1.5645933f), decodeY(1.4078283f), decodeX(1.7870812f) - decodeX(1.5645933f), decodeY(1.5239899f) - decodeY(1.4078283f)); return rect; 690 } 691 692 private Path2D decodePath1() { 693 path.reset(); 694 path.moveTo(decodeX(1.2105263f), decodeY(1.2222222f)); 695 path.lineTo(decodeX(1.6315789f), decodeY(1.2222222f)); 696 path.lineTo(decodeX(1.6315789f), decodeY(1.5555556f)); 697 path.lineTo(decodeX(1.2105263f), decodeY(1.5555556f)); 698 path.lineTo(decodeX(1.2105263f), decodeY(1.3333334f)); 699 path.lineTo(decodeX(1.2631578f), decodeY(1.3333334f)); 700 path.lineTo(decodeX(1.2631578f), decodeY(1.5f)); 701 path.lineTo(decodeX(1.5789473f), decodeY(1.5f)); 702 path.lineTo(decodeX(1.5789473f), decodeY(1.3333334f)); 703 path.lineTo(decodeX(1.2105263f), decodeY(1.3333334f)); 704 path.lineTo(decodeX(1.2105263f), decodeY(1.2222222f)); 705 path.closePath(); 706 return path; 707 } 708 709 private Path2D decodePath2() { 710 path.reset(); 711 path.moveTo(decodeX(1.6842105f), decodeY(1.3888888f)); 712 path.lineTo(decodeX(1.6842105f), decodeY(1.5f)); 713 path.lineTo(decodeX(1.7368422f), decodeY(1.5f)); 714 path.lineTo(decodeX(1.7368422f), decodeY(1.6666667f)); 715 path.lineTo(decodeX(1.4210527f), decodeY(1.6666667f)); 716 path.lineTo(decodeX(1.4210527f), decodeY(1.6111112f)); 717 path.lineTo(decodeX(1.3684211f), decodeY(1.6111112f)); 718 path.lineTo(decodeX(1.3684211f), decodeY(1.7222222f)); 719 path.lineTo(decodeX(1.7894738f), decodeY(1.7222222f)); 720 path.lineTo(decodeX(1.7894738f), decodeY(1.3888888f)); 721 path.lineTo(decodeX(1.6842105f), decodeY(1.3888888f)); 722 path.closePath(); 723 return path; 724 } 725 726 private RoundRectangle2D decodeRoundRect3() { 727 roundRect.setRoundRect(decodeX(1.0f), decodeY(1.6111112f), decodeX(2.0f) - decodeX(1.0f), decodeY(2.0f) - decodeY(1.6111112f), 6.0f, 6.0f); return roundRect; 733 } 734 735 private Rectangle2D decodeRect9() { 736 rect.setRect(decodeX(1.3815789f), decodeY(1.6111112f), decodeX(1.4366028f) - decodeX(1.3815789f), decodeY(1.7739899f) - decodeY(1.6111112f)); return rect; 741 } 742 743 private Rectangle2D decodeRect10() { 744 rect.setRect(decodeX(1.7918661f), decodeY(1.7752526f), decodeX(1.8349283f) - decodeX(1.7918661f), decodeY(1.4217172f) - decodeY(1.7752526f)); return rect; 749 } 750 751 private Path2D decodePath3() { 752 path.reset(); 753 path.moveTo(decodeX(1.1913875f), decodeY(1.2916666f)); 754 path.lineTo(decodeX(1.1925838f), decodeY(1.7462121f)); 755 path.lineTo(decodeX(1.8157895f), decodeY(1.7449496f)); 756 path.lineTo(decodeX(1.819378f), decodeY(1.2916666f)); 757 path.lineTo(decodeX(1.722488f), decodeY(1.2916666f)); 758 path.lineTo(decodeX(1.7320573f), decodeY(1.669192f)); 759 path.lineTo(decodeX(1.2799044f), decodeY(1.6565657f)); 760 path.lineTo(decodeX(1.284689f), decodeY(1.3863636f)); 761 path.lineTo(decodeX(1.7260766f), decodeY(1.385101f)); 762 path.lineTo(decodeX(1.722488f), decodeY(1.2904041f)); 763 path.lineTo(decodeX(1.1913875f), decodeY(1.2916666f)); 764 path.closePath(); 765 return path; 766 } 767 768 private Path2D decodePath4() { 769 path.reset(); 770 path.moveTo(decodeX(1.2105263f), decodeY(1.2222222f)); 771 path.lineTo(decodeX(1.2105263f), decodeY(1.7222222f)); 772 path.lineTo(decodeX(1.7894738f), decodeY(1.7222222f)); 773 path.lineTo(decodeX(1.7894738f), decodeY(1.3333334f)); 774 path.lineTo(decodeX(1.7368422f), decodeY(1.3333334f)); 775 path.lineTo(decodeX(1.7368422f), decodeY(1.6666667f)); 776 path.lineTo(decodeX(1.2631578f), decodeY(1.6666667f)); 777 path.lineTo(decodeX(1.2631578f), decodeY(1.3333334f)); 778 path.lineTo(decodeX(1.7894738f), decodeY(1.3333334f)); 779 path.lineTo(decodeX(1.7894738f), decodeY(1.2222222f)); 780 path.lineTo(decodeX(1.2105263f), decodeY(1.2222222f)); 781 path.closePath(); 782 return path; 783 } 784 785 786 787 private Paint decodeGradient1(Shape s) { 788 Rectangle2D bounds = s.getBounds2D(); 789 float x = (float)bounds.getX(); 790 float y = (float)bounds.getY(); 791 float w = (float)bounds.getWidth(); 792 float h = (float)bounds.getHeight(); 793 return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y, 794 new float[] { 0.0f,0.5f,1.0f }, 795 new Color[] { color1, 796 decodeColor(color1,color2,0.5f), 797 color2}); 798 } 799 800 private Paint decodeGradient2(Shape s) { 801 Rectangle2D bounds = s.getBounds2D(); 802 float x = (float)bounds.getX(); 803 float y = (float)bounds.getY(); 804 float w = (float)bounds.getWidth(); 805 float h = (float)bounds.getHeight(); 806 return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y, 807 new float[] { 0.0f,0.5f,1.0f }, 808 new Color[] { color3, 809 decodeColor(color3,color2,0.5f), 810 color2}); 811 } 812 813 private Paint decodeGradient3(Shape s) { 814 Rectangle2D bounds = s.getBounds2D(); 815 float x = (float)bounds.getX(); 816 float y = (float)bounds.getY(); 817 float w = (float)bounds.getWidth(); 818 float h = (float)bounds.getHeight(); 819 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 820 new float[] { 0.0f,0.5f,1.0f }, 821 new Color[] { color10, 822 decodeColor(color10,color11,0.5f), 823 color11}); 824 } 825 826 private Paint decodeGradient4(Shape s) { 827 Rectangle2D bounds = s.getBounds2D(); 828 float x = (float)bounds.getX(); 829 float y = (float)bounds.getY(); 830 float w = (float)bounds.getWidth(); 831 float h = (float)bounds.getHeight(); 832 return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y, 833 new float[] { 0.0f,0.5f,1.0f }, 834 new Color[] { color14, 835 decodeColor(color14,color15,0.5f), 836 color15}); 837 } 838 839 private Paint decodeGradient5(Shape s) { 840 Rectangle2D bounds = s.getBounds2D(); 841 float x = (float)bounds.getX(); 842 float y = (float)bounds.getY(); 843 float w = (float)bounds.getWidth(); 844 float h = (float)bounds.getHeight(); 845 return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y, 846 new float[] { 0.0f,0.26988637f,0.53977275f,0.5951705f,0.6505682f,0.8252841f,1.0f }, 847 new Color[] { color16, 848 decodeColor(color16,color15,0.5f), 849 color15, 850 decodeColor(color15,color17,0.5f), 851 color17, 852 decodeColor(color17,color18,0.5f), 853 color18}); 854 } 855 856 private Paint decodeGradient6(Shape s) { 857 Rectangle2D bounds = s.getBounds2D(); 858 float x = (float)bounds.getX(); 859 float y = (float)bounds.getY(); 860 float w = (float)bounds.getWidth(); 861 float h = (float)bounds.getHeight(); 862 return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y, 863 new float[] { 0.0f,0.5f,1.0f }, 864 new Color[] { color22, 865 decodeColor(color22,color23,0.5f), 866 color23}); 867 } 868 869 private Paint decodeGradient7(Shape s) { 870 Rectangle2D bounds = s.getBounds2D(); 871 float x = (float)bounds.getX(); 872 float y = (float)bounds.getY(); 873 float w = (float)bounds.getWidth(); 874 float h = (float)bounds.getHeight(); 875 return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y, 876 new float[] { 0.0f,0.26988637f,0.53977275f,0.5951705f,0.6505682f,0.8252841f,1.0f }, 877 new Color[] { color24, 878 decodeColor(color24,color25,0.5f), 879 color25, 880 decodeColor(color25,color26,0.5f), 881 color26, 882 decodeColor(color26,color27,0.5f), 883 color27}); 884 } 885 886 private Paint decodeGradient8(Shape s) { 887 Rectangle2D bounds = s.getBounds2D(); 888 float x = (float)bounds.getX(); 889 float y = (float)bounds.getY(); 890 float w = (float)bounds.getWidth(); 891 float h = (float)bounds.getHeight(); 892 return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y, 893 new float[] { 0.0f,0.5f,1.0f }, 894 new Color[] { color35, 895 decodeColor(color35,color36,0.5f), 896 color36}); 897 } 898 899 private Paint decodeGradient9(Shape s) { 900 Rectangle2D bounds = s.getBounds2D(); 901 float x = (float)bounds.getX(); 902 float y = (float)bounds.getY(); 903 float w = (float)bounds.getWidth(); 904 float h = (float)bounds.getHeight(); 905 return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y, 906 new float[] { 0.0f,0.26988637f,0.53977275f,0.5951705f,0.6505682f,0.8252841f,1.0f }, 907 new Color[] { color37, 908 decodeColor(color37,color38,0.5f), 909 color38, 910 decodeColor(color38,color39,0.5f), 911 color39, 912 decodeColor(color39,color18,0.5f), 913 color18}); 914 } 915 916 private Paint decodeGradient10(Shape s) { 917 Rectangle2D bounds = s.getBounds2D(); 918 float x = (float)bounds.getX(); 919 float y = (float)bounds.getY(); 920 float w = (float)bounds.getWidth(); 921 float h = (float)bounds.getHeight(); 922 return decodeGradient((0.24868421f * w) + x, (0.0014705883f * h) + y, (0.24868421f * w) + x, (1.0f * h) + y, 923 new float[] { 0.0f,0.5f,1.0f }, 924 new Color[] { color48, 925 decodeColor(color48,color49,0.5f), 926 color49}); 927 } 928 929 private Paint decodeGradient11(Shape s) { 930 Rectangle2D bounds = s.getBounds2D(); 931 float x = (float)bounds.getX(); 932 float y = (float)bounds.getY(); 933 float w = (float)bounds.getWidth(); 934 float h = (float)bounds.getHeight(); 935 return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y, 936 new float[] { 0.0f,0.26988637f,0.53977275f,0.5951705f,0.6505682f,0.8252841f,1.0f }, 937 new Color[] { color50, 938 decodeColor(color50,color51,0.5f), 939 color51, 940 decodeColor(color51,color52,0.5f), 941 color52, 942 decodeColor(color52,color53,0.5f), 943 color53}); 944 } 945 946 private Paint decodeGradient12(Shape s) { 947 Rectangle2D bounds = s.getBounds2D(); 948 float x = (float)bounds.getX(); 949 float y = (float)bounds.getY(); 950 float w = (float)bounds.getWidth(); 951 float h = (float)bounds.getHeight(); 952 return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y, 953 new float[] { 0.0f,0.26988637f,0.53977275f,0.6082097f,0.6766467f,0.83832335f,1.0f }, 954 new Color[] { color3, 955 decodeColor(color3,color59,0.5f), 956 color59, 957 decodeColor(color59,color60,0.5f), 958 color60, 959 decodeColor(color60,color2,0.5f), 960 color2}); 961 } 962 963 private Paint decodeGradient13(Shape s) { 964 Rectangle2D bounds = s.getBounds2D(); 965 float x = (float)bounds.getX(); 966 float y = (float)bounds.getY(); 967 float w = (float)bounds.getWidth(); 968 float h = (float)bounds.getHeight(); 969 return decodeGradient((0.5f * w) + x, (0.0f * h) + y, (0.5f * w) + x, (1.0f * h) + y, 970 new float[] { 0.26047903f,0.6302395f,1.0f }, 971 new Color[] { color62, 972 decodeColor(color62,color63,0.5f), 973 color63}); 974 } 975 976 private Paint decodeGradient14(Shape s) { 977 Rectangle2D bounds = s.getBounds2D(); 978 float x = (float)bounds.getX(); 979 float y = (float)bounds.getY(); 980 float w = (float)bounds.getWidth(); 981 float h = (float)bounds.getHeight(); 982 return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y, 983 new float[] { 0.0f,0.26988637f,0.53977275f,0.5951705f,0.6505682f,0.8252841f,1.0f }, 984 new Color[] { color24, 985 decodeColor(color24,color67,0.5f), 986 color67, 987 decodeColor(color67,color25,0.5f), 988 color25, 989 decodeColor(color25,color27,0.5f), 990 color27}); 991 } 992 993 private Paint decodeGradient15(Shape s) { 994 Rectangle2D bounds = s.getBounds2D(); 995 float x = (float)bounds.getX(); 996 float y = (float)bounds.getY(); 997 float w = (float)bounds.getWidth(); 998 float h = (float)bounds.getHeight(); 999 return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y, 1000 new float[] { 0.0f,0.26988637f,0.53977275f,0.66659296f,0.79341316f,0.8967066f,1.0f }, 1001 new Color[] { color37, 1002 decodeColor(color37,color38,0.5f), 1003 color38, 1004 decodeColor(color38,color39,0.5f), 1005 color39, 1006 decodeColor(color39,color70,0.5f), 1007 color70}); 1008 } 1009 1010 private Paint decodeGradient16(Shape s) { 1011 Rectangle2D bounds = s.getBounds2D(); 1012 float x = (float)bounds.getX(); 1013 float y = (float)bounds.getY(); 1014 float w = (float)bounds.getWidth(); 1015 float h = (float)bounds.getHeight(); 1016 return decodeGradient((0.25f * w) + x, (0.0f * h) + y, (0.25441176f * w) + x, (1.0016667f * h) + y, 1017 new float[] { 0.0f,0.26988637f,0.53977275f,0.6291678f,0.7185629f,0.8592814f,1.0f }, 1018 new Color[] { color50, 1019 decodeColor(color50,color52,0.5f), 1020 color52, 1021 decodeColor(color52,color52,0.5f), 1022 color52, 1023 decodeColor(color52,color53,0.5f), 1024 color53}); 1025 } 1026 1027 1028} 1029 | Popular Tags |