home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.SyntheticImage;
- import java.awt.Adjustable;
- import java.awt.Color;
- import java.awt.Dimension;
-
- final class HueLightnessPatch$1 extends SyntheticImage {
- int color;
- int nextColor;
- Adjustable hue;
- boolean changed;
-
- public synchronized void nextFrame(int var1) {
- var1 |= -16777216;
- if (this.color != var1) {
- this.changed = true;
- this.notifyAll();
- }
-
- this.nextColor = var1;
- }
-
- private synchronized void waitNextColor() {
- try {
- while(!this.changed) {
- this.wait();
- }
- } catch (InterruptedException var1) {
- }
-
- this.changed = false;
- this.color = this.nextColor;
- }
-
- protected boolean isStatic() {
- return false;
- }
-
- protected void computeRow(int var1, int[] var2) {
- if (var1 == 0) {
- this.waitNextColor();
- }
-
- float var3 = (float)this.hue.getValue() / 360.0F;
- float var4 = (float)(super.height - var1 - 1) / (float)(super.height - 1);
- int var5 = super.width;
- int var6 = var5;
-
- while(true) {
- --var6;
- if (var6 < 0) {
- return;
- }
-
- float var7 = (float)(var5 - var6 - 1) / (float)(var5 - 1);
- var2[var6] = Color.HSBtoRGB(var3, var7, var4);
- }
- }
-
- // $FF: synthetic method
- HueLightnessPatch$1(int var1, Adjustable var2, Dimension var3) {
- this.hue = var2;
- super.width = var3.width;
- super.height = var3.height;
- this.nextFrame(var1);
- }
- }
-