ActiveXLS v6.4.0 API Documentation

ActiveXLS
Class ExcelCondition

System.Object
  extended byActiveXLS.ExcelCondition

public class ExcelCondition
extends System.Object

This class stores the condition of the conditional formatting information like type, operator, first and second formula, font, border and pattern style.


Constructor Summary
ExcelCondition()
          Defines an instance of the condition.
ExcelCondition(int nOperator, System.String firstFormula, System.String secondFormula)
          Defines an instance of the condition, having the specified operator and formula restrictions.
ExcelCondition(int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground)
          Defines an instance of the condition, having the specified operator, formula restrictions and font settings.
ExcelCondition(int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground, System.Drawing.Color background)
          Defines an instance of the condition, having the specified operator, formula restrictions, font settings and background.
ExcelCondition(int nOperator, System.String firstFormula, System.String secondFormula, System.Drawing.Color background)
          Defines an instance of the condition, having the specified operator, formula restrictions and background.
 
Method Summary
 void clearBackgroundSettings()
          Removes all the background settings.
 void clearBorderSettings()
          Removes all the border settings.
 void clearFontSettings()
          Removes all the font settings.
 ExcelCondition Clone()
          Creates and returns a copy of this object.
 bool ContainsBorderFormatting()
          Internal use only
 bool ContainsFontFormatting()
          Internal use only
 bool ContainsPatternFormatting()
          Internal use only
 System.Drawing.Color getBackground()
          Returns the color of the conditional formatting background.
 System.Drawing.Color getBottomColor_Border()
          Returns the color of the conditional formatting bottom border.
 int getBottomStyle_Border()
          Returns the style of the conditional formatting bottom border.
 int getConditionType()
          Returns the conditional formatting type.
 System.String getFirstFormula()
          Returns the conditional formatting first formula
 System.Drawing.Color getForeground()
          Returns the foreground of the conditional formatting font.
 System.Drawing.Color getLeftColor_Border()
          Returns the color of the conditional formatting left border.
 int getLeftStyle_Border()
          Returns the style of the conditional formatting left border.
 int getOperator()
          Returns the conditional formatting operator.
 System.Drawing.Color getRightColor_Border()
          Returns the color of the conditional formatting right border.
 int getRightStyle_Border()
          Returns the style of the conditional formatting right border.
 System.String getSecondFormula()
          Returns the conditional formatting second formula
 System.Drawing.Color getTopColor_Border()
          Returns the color of the conditional formatting top border.
 int getTopStyle_Border()
          Returns the style of the conditional formatting top border.
 int getUnderlineStyle()
          Returns the underline style of the conditional formatting font.
 bool IsBackgroundModified()
          Returns true if the condition modifies the background of the cell font, false otherwise.
 bool IsBold()
          Returns the bold setting of the conditional formatting font.
 bool IsBottomBorderModified()
          Returns true if the condition modifies the bottom border style of the cell, false otherwise.
 bool IsFontBoldItalicModified()
          Returns true if the condition modifies the style property of the cell font, false otherwise.
 bool IsFontColorModified()
          Returns true if the condition modifies the color of the cell font, false otherwise.
 bool IsFontStrikethroughModified()
          Returns true if the condition modifies the strikethrough property of the cell font, false otherwise.
 bool IsFontUnderlineModified()
          Returns true if the condition modifies the underline property of the cell font, false otherwise.
 bool IsItalic()
          Returns the italic setting of the conditional formatting font.
 bool IsLeftBorderModified()
          Returns true if the condition modifies the left border style of the cell, false otherwise.
 bool IsRightBorderModified()
          Returns true if the condition modifies the right border style of the cell, false otherwise.
 bool IsStrikethrough()
          Returns the strikethrough setting of the conditional formatting font.
 bool IsTopBorderModified()
          Returns true if the condition modifies the top border style of the cell, false otherwise.
 void setBackground(System.Drawing.Color color)
          Sets the color of the conditional formatting background.
 void setBold(bool isBold)
          Sets the bold setting of the conditional formatting font.
 void setBorderColors(System.Drawing.Color borderTop, System.Drawing.Color borderBottom, System.Drawing.Color borderLeft, System.Drawing.Color borderRight)
          Sets the color of the conditional formatting borders.
 void setBorderStyles(int borderTop, int borderBottom, int borderLeft, int borderRight)
          Sets the style of the conditional formatting borders.
 void setBottomColor_Border(System.Drawing.Color color)
          Sets the color of the conditional formatting bottom border.
 void setBottomStyle_Border(int borderStyle)
          Sets the style of the conditional formatting bottom border.
 void setConditionType(int type)
          Sets the conditional formatting type.
 void setFirstFormula(System.String firstFormula)
          Sets the conditional formatting first formula.
 void setForeground(System.Drawing.Color color)
          Sets the foreground of the conditional formatting font.
 void setItalic(bool isItalic)
          Sets the italic setting of the conditional formatting font.
 void setLeftColor_Border(System.Drawing.Color color)
          Sets the color of the conditional formatting left border.
 void setLeftStyle_Border(int borderStyle)
          Sets the style of the conditional formatting left border.
 void setOperator(int nOperator)
          Sets the conditional formatting operator.
 void setRightColor_Border(System.Drawing.Color color)
          Sets the color of the conditional formatting right border.
 void setRightStyle_Border(int borderStyle)
          Sets the style of the conditional formatting right border.
 void setSecondFormula(System.String secondFormula)
          Sets the conditional formatting second formula.
 void setStrikethrough(bool isStrikethrough)
          Sets the strikethrough setting of the conditional formatting font.
 void setTopColor_Border(System.Drawing.Color color)
          Sets the color of the conditional formatting top border.
 void setTopStyle_Border(int borderStyle)
          Sets the style of the conditional formatting top border.
 void setUnderlineStyle(int underlineStyle)
          Sets the underline style of the conditional formatting font.
 

Constructor Detail

ExcelCondition

public ExcelCondition()
Defines an instance of the condition.


ExcelCondition

public ExcelCondition(int nOperator,
                      System.String firstFormula,
                      System.String secondFormula)
Defines an instance of the condition, having the specified operator and formula restrictions.

Parameters:
nOperator - the conditional formatting operator. Possible values are available in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula

ExcelCondition

public ExcelCondition(int nOperator,
                      System.String firstFormula,
                      System.String secondFormula,
                      System.Drawing.Color background)
Defines an instance of the condition, having the specified operator, formula restrictions and background.

Parameters:
nOperator - the conditional formatting operator. Possible values are available in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula
background - the color of the conditional formatting background

ExcelCondition

public ExcelCondition(int nOperator,
                      System.String firstFormula,
                      System.String secondFormula,
                      bool isBold,
                      bool isItalic,
                      System.Drawing.Color foreground)
Defines an instance of the condition, having the specified operator, formula restrictions and font settings.

Parameters:
nOperator - the conditional formatting operator. Possible values are available in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula
isBold - the bold setting of the conditional formatting font
isItalic - the italic setting of the conditional formatting font
foreground - the foreground of the conditional formatting font

ExcelCondition

public ExcelCondition(int nOperator,
                      System.String firstFormula,
                      System.String secondFormula,
                      bool isBold,
                      bool isItalic,
                      System.Drawing.Color foreground,
                      System.Drawing.Color background)
Defines an instance of the condition, having the specified operator, formula restrictions, font settings and background.

Parameters:
nOperator - the conditional formatting operator. Possible values are available in ConditionalFormatting class.
firstFormula - the conditional formatting first formula
secondFormula - the conditional formatting second formula
isBold - the bold setting of the conditional formatting font
isItalic - the italic setting of the conditional formatting font
foreground - the foreground of the conditional formatting font
background - the color of the conditional formatting background
Method Detail

IsFontUnderlineModified

public bool IsFontUnderlineModified()
Returns true if the condition modifies the underline property of the cell font, false otherwise.

Returns:
true if the condition modifies the underline property of the cell font, false otherwise
See Also:
setUnderlineStyle(int), getUnderlineStyle()

IsFontBoldItalicModified

public bool IsFontBoldItalicModified()
Returns true if the condition modifies the style property of the cell font, false otherwise.

Returns:
true if the condition modifies the style property of the cell font, false otherwise
See Also:
setBold(bool), IsBold(), setItalic(bool), IsItalic()

IsFontStrikethroughModified

public bool IsFontStrikethroughModified()
Returns true if the condition modifies the strikethrough property of the cell font, false otherwise.

Returns:
true if the condition modifies the strikethrough property of the cell font, false otherwise
See Also:
setStrikethrough(bool), IsStrikethrough()

IsFontColorModified

public bool IsFontColorModified()
Returns true if the condition modifies the color of the cell font, false otherwise.

Returns:
true if the condition modifies the color of the cell font, false otherwise
See Also:
setForeground(System.Drawing.Color), getForeground()

clearFontSettings

public void clearFontSettings()
Removes all the font settings.


IsLeftBorderModified

public bool IsLeftBorderModified()
Returns true if the condition modifies the left border style of the cell, false otherwise.

Returns:
true if the condition modifies the left border style of the cell, false otherwise
See Also:
setBorderStyles(int, int, int, int), IsRightBorderModified(), IsTopBorderModified(), IsBottomBorderModified()

IsRightBorderModified

public bool IsRightBorderModified()
Returns true if the condition modifies the right border style of the cell, false otherwise.

Returns:
true if the condition modifies the right border style of the cell, false otherwise
See Also:
setBorderStyles(int, int, int, int), IsLeftBorderModified(), IsTopBorderModified(), IsBottomBorderModified()

IsTopBorderModified

public bool IsTopBorderModified()
Returns true if the condition modifies the top border style of the cell, false otherwise.

Returns:
true if the condition modifies the top border style of the cell, false otherwise
See Also:
setBorderStyles(int, int, int, int), IsLeftBorderModified(), IsRightBorderModified(), IsBottomBorderModified()

IsBottomBorderModified

public bool IsBottomBorderModified()
Returns true if the condition modifies the bottom border style of the cell, false otherwise.

Returns:
true if the condition modifies the bottom border style of the cell, false otherwise
See Also:
setBorderStyles(int, int, int, int), IsLeftBorderModified(), IsRightBorderModified(), IsTopBorderModified()

clearBorderSettings

public void clearBorderSettings()
Removes all the border settings.


IsBackgroundModified

public bool IsBackgroundModified()
Returns true if the condition modifies the background of the cell font, false otherwise.

Returns:
true if the condition modifies the background of the cell font, false otherwise
See Also:
setBackground(System.Drawing.Color), getBackground()

clearBackgroundSettings

public void clearBackgroundSettings()
Removes all the background settings.


ContainsFontFormatting

public bool ContainsFontFormatting()
Internal use only


ContainsPatternFormatting

public bool ContainsPatternFormatting()
Internal use only


ContainsBorderFormatting

public bool ContainsBorderFormatting()
Internal use only


getConditionType

public int getConditionType()
Returns the conditional formatting type. Possible values are available in ConditionalFormatting class.

Returns:
the conditional formatting type
See Also:
setConditionType(int)

setConditionType

public void setConditionType(int type)
Sets the conditional formatting type. Possible values are available in ConditionalFormatting class.

Parameters:
type - the conditional formatting type
See Also:
getConditionType()

getOperator

public int getOperator()
Returns the conditional formatting operator. Possible values are available in ConditionalFormatting class.

Returns:
the conditional formatting operator
See Also:
setOperator(int)

setOperator

public void setOperator(int nOperator)
Sets the conditional formatting operator. Possible values are available in ConditionalFormatting class.

Parameters:
nOperator - the conditional formatting operator
See Also:
getOperator()

getFirstFormula

public System.String getFirstFormula()
Returns the conditional formatting first formula

Returns:
the conditional formatting first formula
See Also:
setFirstFormula(System.String), setSecondFormula(System.String), getSecondFormula()

setFirstFormula

public void setFirstFormula(System.String firstFormula)
Sets the conditional formatting first formula. The formula must start with "=" symbol.

Parameters:
firstFormula - the conditional formatting first formula
See Also:
getFirstFormula(), setSecondFormula(System.String), getSecondFormula()

getSecondFormula

public System.String getSecondFormula()
Returns the conditional formatting second formula

Returns:
the conditional formatting second formula
See Also:
setSecondFormula(System.String), getSecondFormula(), setFirstFormula(System.String)

setSecondFormula

public void setSecondFormula(System.String secondFormula)
Sets the conditional formatting second formula. The formula must start with "=" symbol.

Parameters:
secondFormula - the conditional formatting second formula
See Also:
getSecondFormula(), getFirstFormula(), setFirstFormula(System.String)

getForeground

public System.Drawing.Color getForeground()
Returns the foreground of the conditional formatting font.

Returns:
the foreground of the conditional formatting font
See Also:
setForeground(System.Drawing.Color), IsFontColorModified()

setForeground

public void setForeground(System.Drawing.Color color)
Sets the foreground of the conditional formatting font.

Parameters:
color - the foreground of the conditional formatting font
See Also:
getForeground(), IsFontColorModified()

IsBold

public bool IsBold()
Returns the bold setting of the conditional formatting font.

Returns:
the bold setting of the conditional formatting font
See Also:
setBold(bool), IsFontBoldItalicModified()

setBold

public void setBold(bool isBold)
Sets the bold setting of the conditional formatting font.

Parameters:
isBold - the bold setting of the conditional formatting font
See Also:
IsBold(), IsFontBoldItalicModified()

IsItalic

public bool IsItalic()
Returns the italic setting of the conditional formatting font.

Returns:
the italic setting of the conditional formatting font
See Also:
setItalic(bool), IsFontBoldItalicModified()

setItalic

public void setItalic(bool isItalic)
Sets the italic setting of the conditional formatting font.

Parameters:
isItalic - the italic setting of the conditional formatting font
See Also:
IsItalic(), IsFontBoldItalicModified()

IsStrikethrough

public bool IsStrikethrough()
Returns the strikethrough setting of the conditional formatting font.

Returns:
the strikethrough setting of the conditional formatting font
See Also:
setStrikethrough(bool), IsFontStrikethroughModified()

setStrikethrough

public void setStrikethrough(bool isStrikethrough)
Sets the strikethrough setting of the conditional formatting font.

Parameters:
isStrikethrough - the strikethrough setting of the conditional formatting font
See Also:
IsStrikethrough(), IsFontStrikethroughModified()

getUnderlineStyle

public int getUnderlineStyle()
Returns the underline style of the conditional formatting font. Possible values are available in FontSettings

Returns:
the underline style of the conditional formatting font
See Also:
setUnderlineStyle(int), IsFontUnderlineModified()

setUnderlineStyle

public void setUnderlineStyle(int underlineStyle)
Sets the underline style of the conditional formatting font. Possible values are available in FontSettings

Parameters:
underlineStyle - the underline style of the conditional formatting font
See Also:
getUnderlineStyle(), IsFontUnderlineModified()

setBorderStyles

public void setBorderStyles(int borderTop,
                            int borderBottom,
                            int borderLeft,
                            int borderRight)
Sets the style of the conditional formatting borders. Possible values are available in Border class.

Parameters:
borderTop - the style of the conditional formatting top border
borderBottom - the style of the conditional formatting bottom border
borderLeft - the style of the conditional formatting left border
borderRight - the style of the conditional formatting right border
See Also:
getTopStyle_Border(), getBottomStyle_Border(), getLeftStyle_Border(), getRightStyle_Border(), setBorderColors(System.Drawing.Color, System.Drawing.Color, System.Drawing.Color, System.Drawing.Color), IsLeftBorderModified(), IsRightBorderModified(), IsTopBorderModified(), IsBottomBorderModified()

getTopStyle_Border

public int getTopStyle_Border()
Returns the style of the conditional formatting top border. Possible values are available in Border class.

Returns:
the style of the conditional formatting top border
See Also:
setTopStyle_Border(int)

setTopStyle_Border

public void setTopStyle_Border(int borderStyle)
Sets the style of the conditional formatting top border. Possible values are available in Border class.

Parameters:
borderStyle - the style of the conditional formatting top border
See Also:
getTopStyle_Border()

getBottomStyle_Border

public int getBottomStyle_Border()
Returns the style of the conditional formatting bottom border. Possible values are available in Border class.

Returns:
the style of the conditional formatting bottom border
See Also:
setBottomStyle_Border(int)

setBottomStyle_Border

public void setBottomStyle_Border(int borderStyle)
Sets the style of the conditional formatting bottom border. Possible values are available in Border class.

Parameters:
borderStyle - the style of the conditional formatting bottom border
See Also:
getBottomStyle_Border()

getLeftStyle_Border

public int getLeftStyle_Border()
Returns the style of the conditional formatting left border. Possible values are available in Border class.

Returns:
the style of the conditional formatting left border
See Also:
setLeftStyle_Border(int)

setLeftStyle_Border

public void setLeftStyle_Border(int borderStyle)
Sets the style of the conditional formatting left border. Possible values are available in Border class.

Parameters:
borderStyle - the style of the conditional formatting left border
See Also:
getLeftStyle_Border()

getRightStyle_Border

public int getRightStyle_Border()
Returns the style of the conditional formatting right border. Possible values are available in Border class.

Returns:
the style of the conditional formatting right border
See Also:
setRightStyle_Border(int)

setRightStyle_Border

public void setRightStyle_Border(int borderStyle)
Sets the style of the conditional formatting right border. Possible values are available in Border class.

Parameters:
borderStyle - the style of the conditional formatting right border
See Also:
getRightStyle_Border()

setBorderColors

public void setBorderColors(System.Drawing.Color borderTop,
                            System.Drawing.Color borderBottom,
                            System.Drawing.Color borderLeft,
                            System.Drawing.Color borderRight)
Sets the color of the conditional formatting borders.

Parameters:
borderTop - the color of the conditional formatting top border
borderBottom - the color of the conditional formatting bottom border
borderLeft - the color of the conditional formatting left border
borderRight - the color of the conditional formatting right border
See Also:
getTopColor_Border(), getBottomColor_Border(), getLeftColor_Border(), getRightColor_Border(), setBorderStyles(int, int, int, int)

getTopColor_Border

public System.Drawing.Color getTopColor_Border()
Returns the color of the conditional formatting top border.

Returns:
the color of the conditional formatting top border
See Also:
setTopColor_Border(System.Drawing.Color)

setTopColor_Border

public void setTopColor_Border(System.Drawing.Color color)
Sets the color of the conditional formatting top border.

Parameters:
color - the color of the conditional formatting top border
See Also:
getTopColor_Border()

getBottomColor_Border

public System.Drawing.Color getBottomColor_Border()
Returns the color of the conditional formatting bottom border.

Returns:
the color of the conditional formatting bottom border
See Also:
setBottomColor_Border(System.Drawing.Color)

setBottomColor_Border

public void setBottomColor_Border(System.Drawing.Color color)
Sets the color of the conditional formatting bottom border.

Parameters:
color - the color of the conditional formatting bottom border
See Also:
getBottomColor_Border()

getLeftColor_Border

public System.Drawing.Color getLeftColor_Border()
Returns the color of the conditional formatting left border.

Returns:
the color of the conditional formatting left border
See Also:
setLeftColor_Border(System.Drawing.Color)

setLeftColor_Border

public void setLeftColor_Border(System.Drawing.Color color)
Sets the color of the conditional formatting left border.

Parameters:
color - the color of the conditional formatting left border
See Also:
getLeftColor_Border()

getRightColor_Border

public System.Drawing.Color getRightColor_Border()
Returns the color of the conditional formatting right border.

Returns:
the color of the conditional formatting right border
See Also:
setRightColor_Border(System.Drawing.Color)

setRightColor_Border

public void setRightColor_Border(System.Drawing.Color color)
Sets the color of the conditional formatting right border.

Parameters:
color - the color of the conditional formatting right border
See Also:
getRightColor_Border()

getBackground

public System.Drawing.Color getBackground()
Returns the color of the conditional formatting background.

Returns:
the color of the conditional formatting background
See Also:
setBackground(System.Drawing.Color), IsBackgroundModified()

setBackground

public void setBackground(System.Drawing.Color color)
Sets the color of the conditional formatting background.

Parameters:
color - the color of the conditional formatting background
See Also:
getBackground(), IsBackgroundModified()

Clone

public ExcelCondition Clone()
Creates and returns a copy of this object.

Returns:
a clone of this instance.

Copyright 2009 On Time Computing Solutions