jet.report.xls
Class GradientInfo

java.lang.Object
  extended by jet.report.xls.GradientInfo

public class GradientInfo
extends java.lang.Object

Contains the information of Area fill effects in the file.


Field Summary
static int DIAGONAL_DOWN
          Diagonal down shading style.
static int DIAGONAL_UP
          Diagonal up shading style.
static int FROM_CENTER
          From center shading style.
static int FROM_CORNER
          From corner shading style.
static int HORIZONAL
          Horizontal shading style.
static int STYLE1
           
static int STYLE2
           
static int STYLE3
           
static int STYLE4
           
static int VERTICAL
          Vertical shading style.
 
Constructor Summary
GradientInfo()
          Constructs a GradientInfo record.
GradientInfo(int rgb1, boolean isDark, int degree, int shadingStyle, int variant, GlobalWorksheet gws)
          Constructs a GradientInfo record and sets its fields appropriately.
GradientInfo(int rgb1, int rgb2, int shadingStyle, int variant, GlobalWorksheet gws)
          Constructs a GradientInfo record and sets its fields appropriately.
 
Method Summary
 int getColor1()
          Gets the first color of gradient color.
 int getColor2()
          Gets the the second color of gradient color.
 int getDegree()
          Gets dark or light degree for the gradient color.
 int getShadingStyle()
          Gets the shading style of gradient color.
 int getType()
          Gets the type of gradient color, one_color or two_colors,
 int getVariant()
          Gets the variant of gradient color.
 boolean isDark()
          Gets whether the gradient color is dark or light.
 void setColor1(int color, GlobalWorksheet gws)
          Sets the first color of gradient color.
 void setColor2(int color, GlobalWorksheet gws)
          Sets the second color of gradient color.
 void setDark(boolean isDark)
          Sets whether the gradient color is dark or light.
 void setDegree(int degree)
          Sets dark or light degree for the gradient color.
 void setShadingStyle(int shadingStyle)
          Sets the shading style of gradient color.
 void setVariant(int variant)
          Sets the variant of gradient color.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HORIZONAL

public static final int HORIZONAL
Horizontal shading style.

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
Vertical shading style.

See Also:
Constant Field Values

DIAGONAL_UP

public static final int DIAGONAL_UP
Diagonal up shading style.

See Also:
Constant Field Values

DIAGONAL_DOWN

public static final int DIAGONAL_DOWN
Diagonal down shading style.

See Also:
Constant Field Values

FROM_CORNER

public static final int FROM_CORNER
From corner shading style.

See Also:
Constant Field Values

FROM_CENTER

public static final int FROM_CENTER
From center shading style.

See Also:
Constant Field Values

STYLE1

public static final int STYLE1
See Also:
Constant Field Values

STYLE2

public static final int STYLE2
See Also:
Constant Field Values

STYLE3

public static final int STYLE3
See Also:
Constant Field Values

STYLE4

public static final int STYLE4
See Also:
Constant Field Values
Constructor Detail

GradientInfo

public GradientInfo()
Constructs a GradientInfo record.


GradientInfo

public GradientInfo(int rgb1,
                    int rgb2,
                    int shadingStyle,
                    int variant,
                    GlobalWorksheet gws)
Constructs a GradientInfo record and sets its fields appropriately.

Parameters:
rgb1 - color1 in the gradient color
rgb2 - color2 in the gradient color
shadingStyle - style of shade HORIZONAL, VERTICAL, DIAGONAL_UP, DIADONAL_DOWN, FROM_CORNER or FROM_CENTER
variant - variant of the gradient color STYLE1, STYLE2, STYLE3, STYLE4

GradientInfo

public GradientInfo(int rgb1,
                    boolean isDark,
                    int degree,
                    int shadingStyle,
                    int variant,
                    GlobalWorksheet gws)
Constructs a GradientInfo record and sets its fields appropriately.

Parameters:
rgb1 - color1 in the gradient color
isDark - whether the gradient color is dark or light, true for dark, false for light
degree - the dark or light degree of gradient color(0-255)
shadingStyle - style of shade HORIZONAL, VERTICAL, DIAGONAL_UP, DIADONAL_DOWN, FROM_CORNER or FROM_CENTER
variant - variant of the gradient color STYLE1, STYLE2, STYLE3, STYLE4
Method Detail

setColor1

public void setColor1(int color,
                      GlobalWorksheet gws)
Sets the first color of gradient color.

Parameters:
color - first color of gradient color

getColor1

public int getColor1()
Gets the first color of gradient color.

Returns:
the first color of gradient color

setColor2

public void setColor2(int color,
                      GlobalWorksheet gws)
Sets the second color of gradient color.

Parameters:
color - the second color of gradient color

getColor2

public int getColor2()
Gets the the second color of gradient color.

Returns:
the second color of gradient color

setShadingStyle

public void setShadingStyle(int shadingStyle)
Sets the shading style of gradient color.

Parameters:
shadingStyle - the shading style of gradient color
See Also:
HORIZONAL, VERTICAL, DIAGONAL_UP, DIAGONAL_DOWN, FROM_CORNER, FROM_CENTER

getShadingStyle

public int getShadingStyle()
Gets the shading style of gradient color.

Returns:
the shading style of gradient color
See Also:
HORIZONAL, VERTICAL, DIAGONAL_UP, DIAGONAL_DOWN, FROM_CORNER, FROM_CENTER

setVariant

public void setVariant(int variant)
Sets the variant of gradient color.

Parameters:
variant - the variant of gradient color
See Also:
STYLE1, STYLE2, STYLE3, STYLE4

getVariant

public int getVariant()
Gets the variant of gradient color.

Returns:
variant of gradient color
See Also:
STYLE1, STYLE2, STYLE3, STYLE4

getType

public int getType()
Gets the type of gradient color, one_color or two_colors,

Returns:
the type of gradient color
See Also:
ONE_COLOR, TWO_COLORS

setDark

public void setDark(boolean isDark)
Sets whether the gradient color is dark or light.

Parameters:
isDark - whether the gradient color is dark or light

isDark

public boolean isDark()
Gets whether the gradient color is dark or light.

Returns:
whether the gradient color is dark or light

setDegree

public void setDegree(int degree)
Sets dark or light degree for the gradient color.

Parameters:
degree - dark or light degree of the gradient color(0-255)

getDegree

public int getDegree()
Gets dark or light degree for the gradient color.

Returns:
dark or light degree of the gradient color(0-255)