zkex.inp
Class Color

java.lang.Object
  extended by zk.Object
      extended by zkex.inp.Color

public class Color
extends Object

Defines a color for a colorbox (Colorbox).

Available in ZK PE and EE


Field Summary
 
Fields inherited from class zk.Object
$class, $oid
 
Method Summary
 void $init(String hex)
          Constructor.
 String getHex()
          Returns the color (in string as #RRGGBB).
 int getHue()
          Returns the color hue
 Array getRGB()
          Returns a color Array in [R,G,B] format, R,G,B are integer
 int getSaturation()
          Returns the color saturation
 int getValue()
          Returns the color value
 boolean setHex(String color)
          verify the format of color string, and sets the color
 boolean setHSV(int h, int s, int v)
          Stes the color hsv
 void setRGB(int r, int g, int b)
          Sets the color into the color value of this widget in rgb integer
 
Methods inherited from class zk.Object
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

$init

public void $init(String hex)
Constructor.

Parameters:
hex - the color in #RRGGBB format (hexdecimal).

setRGB

public void setRGB(int r,
                   int g,
                   int b)
Sets the color into the color value of this widget in rgb integer

Parameters:
r - the color code of red
g - the color code of green
b - the color code of biue

getRGB

public Array getRGB()
Returns a color Array in [R,G,B] format, R,G,B are integer

Returns:
Array

getHue

public int getHue()
Returns the color hue

Returns:
int

getSaturation

public int getSaturation()
Returns the color saturation

Returns:
int

getValue

public int getValue()
Returns the color value

Returns:
int

setHex

public boolean setHex(String color)
verify the format of color string, and sets the color

Parameters:
color - the color in #RRGGBB format (hexdecimal).
Returns:
boolean

getHex

public String getHex()
Returns the color (in string as #RRGGBB).

Default: #000000

Returns:
String

setHSV

public boolean setHSV(int h,
                      int s,
                      int v)
Stes the color hsv

Parameters:
h - the color hue
s - the color saturation
v - the color value
Returns:
boolean


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo