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
           
static int DIAGONAL_UP
           
static int FROM_CENTER
           
static int FROM_CORNER
           
static int HORIZONAL
           
static int ONE_COLOR
           
static int STYLE1
           
static int STYLE2
           
static int STYLE3
           
static int STYLE4
           
static int TWO_COLORS
           
static int VERTICAL
           
 
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()
          Get the first color of gradient color
 int getColor2()
          Get the the second color of gradient color
 int getDegree()
          get dark or light degree of gradient color
 int getShadingStyle()
          get the shading style of gradient color
 int getType()
          get the type of gradient color one_color or two_colors
 int getVariant()
          get the variant of gradient color
 boolean isDark()
          get gradient color is dark or light
 void setColor1(int color, GlobalWorksheet gws)
          Set the first color of gradient color
 void setColor2(int color, GlobalWorksheet gws)
          Set the second color of gradient color
 void setDark(boolean isDark)
          set gradient color is dark or light
 void setDegree(int degree)
          set dark or light degree of gradient color
 void setShadingStyle(int shadingStyle)
          set the shading style of gradient color
 void setVariant(int variant)
          set the variant of gradient color
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONE_COLOR

public static final int ONE_COLOR
See Also:
Constant Field Values

TWO_COLORS

public static final int TWO_COLORS
See Also:
Constant Field Values

HORIZONAL

public static final int HORIZONAL
See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
See Also:
Constant Field Values

DIAGONAL_UP

public static final int DIAGONAL_UP
See Also:
Constant Field Values

DIAGONAL_DOWN

public static final int DIAGONAL_DOWN
See Also:
Constant Field Values

FROM_CORNER

public static final int FROM_CORNER
See Also:
Constant Field Values

FROM_CENTER

public static final int FROM_CENTER
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 - The color1 in the gradient color
rgb2 - The 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 - The color1 in the gradient color
isDark - 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)
Set the first color of gradient color

Parameters:
color - first color of gradient color

getColor1

public int getColor1()
Get the first color of gradient color

Returns:
the first color of gradient color

setColor2

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

Parameters:
color - the second color of gradient color

getColor2

public int getColor2()
Get the the second color of gradient color

Returns:
the second color of gradient color

setShadingStyle

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

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

getShadingStyle

public int getShadingStyle()
get the shading style of gradient color

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

setVariant

public void setVariant(int variant)
set the variant of gradient color

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

getVariant

public int getVariant()
get the variant of gradient color

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

getType

public int getType()
get 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)
set gradient color is dark or light

Parameters:
isDark - gradient color is dark or light

isDark

public boolean isDark()
get gradient color is dark or light

Returns:
gradient color is dark or light

setDegree

public void setDegree(int degree)
set dark or light degree of gradient color

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

getDegree

public int getDegree()
get dark or light degree of gradient color

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