|
|
@ -168,10 +168,12 @@ public class ColorTriangle extends JComponent { |
|
|
|
|
|
|
|
|
|
|
|
protected void setHSBHue(final double hue) { |
|
|
|
protected void setHSBHue(final double hue) { |
|
|
|
hueHSB = hue; |
|
|
|
hueHSB = hue; |
|
|
|
|
|
|
|
if (hueHSB < 0) hueHSB += 1.0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void setHSLHue(final double hue) { |
|
|
|
protected void setHSLHue(final double hue) { |
|
|
|
hueHSL = hue; |
|
|
|
hueHSL = hue; |
|
|
|
|
|
|
|
if (hueHSL < 0) hueHSL += 1.0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void setValue(final double value) { |
|
|
|
protected void setValue(final double value) { |
|
|
@ -232,7 +234,7 @@ public class ColorTriangle extends JComponent { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void setHSB(final double h, final double s, final double b) { |
|
|
|
protected void setHSB(final double h, final double s, final double b) { |
|
|
|
setHue(h); |
|
|
|
setHSBHue(h); |
|
|
|
setHSBSaturation(s); |
|
|
|
setHSBSaturation(s); |
|
|
|
setHSBValue(b); |
|
|
|
setHSBValue(b); |
|
|
|
} |
|
|
|
} |
|
|
@ -242,7 +244,7 @@ public class ColorTriangle extends JComponent { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected void setHSL(final double h, final double s, final double l) { |
|
|
|
protected void setHSL(final double h, final double s, final double l) { |
|
|
|
setHue(h); |
|
|
|
setHSLHue(h); |
|
|
|
setHSLSaturation(s); |
|
|
|
setHSLSaturation(s); |
|
|
|
setHSLValue(l); |
|
|
|
setHSLValue(l); |
|
|
|
} |
|
|
|
} |
|
|
@ -317,6 +319,7 @@ public class ColorTriangle extends JComponent { |
|
|
|
setHSL(h, s, l); |
|
|
|
setHSL(h, s, l); |
|
|
|
color = DarkColorModelHSL.getColorFromHSLValues(h, s, l); |
|
|
|
color = DarkColorModelHSL.getColorFromHSLValues(h, s, l); |
|
|
|
setHSB(DarkColorModelHSB.RGBtoHSBValues(color.getRed(), color.getGreen(), color.getBlue())); |
|
|
|
setHSB(DarkColorModelHSB.RGBtoHSBValues(color.getRed(), color.getGreen(), color.getBlue())); |
|
|
|
|
|
|
|
setHSBHue(h); |
|
|
|
rotation = -(getHue() * 2 * Math.PI) + Math.PI / 2; |
|
|
|
rotation = -(getHue() * 2 * Math.PI) + Math.PI / 2; |
|
|
|
invalidateWheel(); |
|
|
|
invalidateWheel(); |
|
|
|
fireColorChanged(source); |
|
|
|
fireColorChanged(source); |
|
|
@ -327,6 +330,7 @@ public class ColorTriangle extends JComponent { |
|
|
|
setHSB(h, s, b); |
|
|
|
setHSB(h, s, b); |
|
|
|
color = DarkColorModelHSB.getColorFromHSBValues(h, s, b); |
|
|
|
color = DarkColorModelHSB.getColorFromHSBValues(h, s, b); |
|
|
|
setHSL(DarkColorModelHSL.RGBtoHSLValues(color.getRed(), color.getGreen(), color.getBlue())); |
|
|
|
setHSL(DarkColorModelHSL.RGBtoHSLValues(color.getRed(), color.getGreen(), color.getBlue())); |
|
|
|
|
|
|
|
setHSLHue(h); |
|
|
|
rotation = -(getHue() * 2 * Math.PI) + Math.PI / 2; |
|
|
|
rotation = -(getHue() * 2 * Math.PI) + Math.PI / 2; |
|
|
|
invalidateWheel(); |
|
|
|
invalidateWheel(); |
|
|
|
fireColorChanged(source); |
|
|
|
fireColorChanged(source); |
|
|
|