com.jxcell
Class CellFormat

java.lang.Object
  extended byFormatIterator
      extended bycom.jxcell.CellFormat

public class CellFormat
extends FormatIterator

The JXCELL CellFormat class, providing information about a cell format

See Also:
Serialized Form

Field Summary
static short eBorderDashed
          Dashed line border
static short eBorderDotted
          Dotted line border
static short eBorderDouble
          Double border
static short eBorderHair
          Hairline border
static short eBorderMedium
          Medium solid line border
static short eBorderNone
          No border
static short eBorderThick
          Thick solid line border
static short eBorderThin
          Thin solid line border
static short eBottomBorder
           
static short eBottomBorderColor
           
static short eFontBold
           
static short eFontColor
           
static short eFontItalic
           
static short eFontName
           
static short eFontOutline
           
static short eFontShadow
           
static short eFontSize
           
static short eFontStrikeout
           
static short eFontUnderline
           
static short eHidden
           
static short eHorizontalAlignment
           
static short eHorizontalAlignmentCenter
          Centers data
static short eHorizontalAlignmentCenterAcrossCells
          Centers data across cells
static short eHorizontalAlignmentFill
          Fills cell with data
static short eHorizontalAlignmentGeneral
          Aligns according to data type
static short eHorizontalAlignmentJustify
          Justifies data
static short eHorizontalAlignmentLeft
          Aligns data left
static short eHorizontalAlignmentRight
          Aligns right
static short eHorizontalInsideBorder
           
static short eHorizontalInsideBorderColor
           
static short eLeftBorder
           
static short eLeftBorderColor
           
static short eLocked
           
static short eNumberFormat
           
static short eNumberFormatType
           
static short eNumberFormatTypeCurrency
          Currency format
static short eNumberFormatTypeDate
          Date format
static short eNumberFormatTypeDateTime
          DateTime format
static short eNumberFormatTypeFraction
          Fraction format
static short eNumberFormatTypeGeneral
          Displays numbers as integers and fractions as decimals.
static short eNumberFormatTypeNumber
          Number format
static short eNumberFormatTypePercent
          Percent format
static short eNumberFormatTypeScientific
          Scientific format
static short eNumberFormatTypeString
          String format
static short ePattern
           
static short ePatternBG
           
static short ePatternFG
           
static short eRightBorder
           
static short eRightBorderColor
           
static short eTopBorder
           
static short eTopBorderColor
           
static short eValidationRule
           
static short eValidationText
           
static short eVerticalAlignment
           
static short eVerticalAlignmentBottom
          Vertically aligns at the bottom
static short eVerticalAlignmentCenter
          Vertically aligns at the center
static short eVerticalAlignmentTop
          Vertically aligns at the top
static short eVerticalInsideBorder
           
static short eVerticalInsideBorderColor
           
static short eWordWrap
           
static short kMaxPattern
           
 
Method Summary
 short getBottomBorder()
          Returns the border for the bottom edge of the cell
 java.awt.Color getBottomBorderColor()
          Returns the color used to display the bottom edge of the cell
 java.awt.Color getFontColor()
          Returns the color used to display the font
 java.lang.String getFontName()
          Returns the name of the font
 int getFontSize()
          Returns the size of the font
 double getFontSizeInPoints()
          Returns the size of the font in points
 short getHorizontalAlignment()
          Returns the type of horizontal alignment.
 short getHorizontalInsideBorder()
          Returns the border type for the horizontal inside border
 java.awt.Color getHorizontalInsideBorderColor()
          Returns the color used to display the horizontal inside border
 short getLeftBorder()
          Returns the border for the left edge of the cell
 java.awt.Color getLeftBorderColor()
          Returns the color used to display the left edge of the cell
 java.lang.String getNumberFormat()
          Returns the number format associated with a cell.
 java.lang.String getNumberFormatLocal()
          Returns the number format associated with a cell in the local language.
 short getNumberFormatType()
          Returns the type of number format associated with a cell.
 short getPattern()
          Returns the pattern type.
 java.awt.Color getPatternBG()
          Returns the color used to display the pattern background
 java.awt.Color getPatternFG()
          Returns the color used to display the pattern foreground
 short getRightBorder()
          Returns the border for the right edge of the cell
 java.awt.Color getRightBorderColor()
          Returns the color used to display the right edge of the cell
 short getTopBorder()
          Returns the border for the top edge of the cell
 java.awt.Color getTopBorderColor()
          Returns the color used to display the top edge of the cell
 java.lang.String getValidationRule()
          Returns the validation rule associated with the active cell in US english.
 java.lang.String getValidationText()
          Returns the text to be displayed in the cell if the validation rule fails.
 short getVerticalAlignment()
          Returns the type of vertical alignment.
 short getVerticalInsideBorder()
          Returns the color used to display the vertical inside border
 java.awt.Color getVerticalInsideBorderColor()
           
 boolean isFontBold()
          Returns whether the font is bold.
 boolean isFontItalic()
          Returns whether the font is italic.
 boolean isFontOutline()
          Returns whether the font is outline.
 boolean isFontShadow()
          Returns whether the font is shadow.
 boolean isFontStrikeout()
          Returns whether the font is strikeout
 boolean isFontUnderline()
          Returns whether the font is underline
 boolean isHidden()
          Returns whether formulas are hidden
 boolean isLocked()
          Returns whether the active cell is locked
 boolean isUndefined(short property)
          Returns whether a CellFormat attribute has been defined.
 boolean isWordWrap()
          Determines whether word wrap is enabled.
 void setBottomBorder(short bottom)
          Sets the style for the bottom border.
 void setBottomBorderColor(java.awt.Color color)
          Sets the color used to display the bottom edge of the cell.
 void setFontBold(boolean bold)
          Sets the bold attribute of the font.
 void setFontColor(java.awt.Color color)
          Sets the color used to display the font.
 void setFontItalic(boolean italic)
          Sets the italic attribute of the font.
 void setFontName(java.lang.String name)
          Sets the font name.
 void setFontOutline(boolean outline)
          Sets the outline attribute of the font.
 void setFontShadow(boolean shadow)
          Sets the shadow attribute of the font.
 void setFontSize(int size)
          Sets the font size.
 void setFontSizeInPoints(double size)
          Sets the font size in points.
 void setFontStrikeout(boolean strikeout)
          Sets the strikeout attribute of the font.
 void setFontUnderline(boolean underline)
          Sets the underline attribute of the font.
 void setHidden(boolean hidden1)
          Sets the display status of an element.
 void setHorizontalAlignment(short alignment)
          Sets the horizontal alignment.
 void setHorizontalInsideBorder(short horizontalInside)
          Sets the horizontal inside border.
 void setHorizontalInsideBorderColor(java.awt.Color horizontalInside)
          Sets the color of the horizontal inside border.
 void setLeftBorder(short left)
          Sets the style for the left border
 void setLeftBorderColor(java.awt.Color color)
          Sets the color used to display the left edge of the cell.
 void setLocked(boolean flag)
          Sets the locked cell flag
 void setNumberFormat(java.lang.String format)
          Sets the number format string in U.
 void setNumberFormatLocal(java.lang.String format)
          Sets the number format string in the user's local language Each format string can have as many as four sections: one for positive numbers, one for negative numbers, one for zeros, and one for text.
 void setPattern(short pattern1)
          Sets the pattern type
 void setPatternBG(java.awt.Color color)
          Sets the color used to display the pattern backgroun
 void setPatternFG(java.awt.Color color)
          Sets the color used to display the pattern foreground
 void setRightBorder(short right)
          Sets the style for the right border.
 void setRightBorderColor(java.awt.Color color)
          Sets the color used to display the right edge of the cell.
 void setTopBorder(short top)
          Sets the style for the bottom border
 void setTopBorderColor(java.awt.Color color)
          Sets the color used to display the top edge of the cell.
 void setUndefined(short property, boolean undefined)
          Sets whether a cell format attribute has been defined
 void setValidationRule(View view1, java.lang.String rule)
          Sets the validation rule expression in U.
 void setValidationRule(View view1, java.lang.String rule, int row, int col)
          Sets the validation rule expression in U.
 void setValidationText(java.lang.String text)
          Sets the text to be displayed if a validation rule fails.
 void setVerticalAlignment(short alignment)
          Sets the type of vertical alignment
 void setVerticalInsideBorder(short verticalInside)
          Sets the border type for the vertical inside border
 void setVerticalInsideBorderColor(java.awt.Color verticalInside)
          Sets the color used to display the vertical inside border
 void setWordWrap(boolean wrap)
          Sets the wordwrap attribute
 java.lang.String toString()
           
 void useAllFormats()
          Instructs the CellFormat object to use all of the format settings.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

eFontName

public static final short eFontName
See Also:
Constant Field Values

eFontSize

public static final short eFontSize
See Also:
Constant Field Values

eFontBold

public static final short eFontBold
See Also:
Constant Field Values

eFontItalic

public static final short eFontItalic
See Also:
Constant Field Values

eFontUnderline

public static final short eFontUnderline
See Also:
Constant Field Values

eFontStrikeout

public static final short eFontStrikeout
See Also:
Constant Field Values

eFontColor

public static final short eFontColor
See Also:
Constant Field Values

eFontOutline

public static final short eFontOutline
See Also:
Constant Field Values

eFontShadow

public static final short eFontShadow
See Also:
Constant Field Values

eHorizontalAlignment

public static final short eHorizontalAlignment
See Also:
Constant Field Values

eVerticalAlignment

public static final short eVerticalAlignment
See Also:
Constant Field Values

eWordWrap

public static final short eWordWrap
See Also:
Constant Field Values

ePattern

public static final short ePattern
See Also:
Constant Field Values

ePatternFG

public static final short ePatternFG
See Also:
Constant Field Values

ePatternBG

public static final short ePatternBG
See Also:
Constant Field Values

eNumberFormat

public static final short eNumberFormat
See Also:
Constant Field Values

eNumberFormatType

public static final short eNumberFormatType
See Also:
Constant Field Values

eValidationRule

public static final short eValidationRule
See Also:
Constant Field Values

eValidationText

public static final short eValidationText
See Also:
Constant Field Values

eTopBorder

public static final short eTopBorder
See Also:
Constant Field Values

eLeftBorder

public static final short eLeftBorder
See Also:
Constant Field Values

eBottomBorder

public static final short eBottomBorder
See Also:
Constant Field Values

eRightBorder

public static final short eRightBorder
See Also:
Constant Field Values

eVerticalInsideBorder

public static final short eVerticalInsideBorder
See Also:
Constant Field Values

eHorizontalInsideBorder

public static final short eHorizontalInsideBorder
See Also:
Constant Field Values

eTopBorderColor

public static final short eTopBorderColor
See Also:
Constant Field Values

eLeftBorderColor

public static final short eLeftBorderColor
See Also:
Constant Field Values

eBottomBorderColor

public static final short eBottomBorderColor
See Also:
Constant Field Values

eRightBorderColor

public static final short eRightBorderColor
See Also:
Constant Field Values

eVerticalInsideBorderColor

public static final short eVerticalInsideBorderColor
See Also:
Constant Field Values

eHorizontalInsideBorderColor

public static final short eHorizontalInsideBorderColor
See Also:
Constant Field Values

eHidden

public static final short eHidden
See Also:
Constant Field Values

eLocked

public static final short eLocked
See Also:
Constant Field Values

eHorizontalAlignmentGeneral

public static final short eHorizontalAlignmentGeneral
Aligns according to data type

See Also:
Constant Field Values

eHorizontalAlignmentLeft

public static final short eHorizontalAlignmentLeft
Aligns data left

See Also:
Constant Field Values

eHorizontalAlignmentCenter

public static final short eHorizontalAlignmentCenter
Centers data

See Also:
Constant Field Values

eHorizontalAlignmentRight

public static final short eHorizontalAlignmentRight
Aligns right

See Also:
Constant Field Values

eHorizontalAlignmentFill

public static final short eHorizontalAlignmentFill
Fills cell with data

See Also:
Constant Field Values

eHorizontalAlignmentJustify

public static final short eHorizontalAlignmentJustify
Justifies data

See Also:
Constant Field Values

eHorizontalAlignmentCenterAcrossCells

public static final short eHorizontalAlignmentCenterAcrossCells
Centers data across cells

See Also:
Constant Field Values

eVerticalAlignmentTop

public static final short eVerticalAlignmentTop
Vertically aligns at the top

See Also:
Constant Field Values

eVerticalAlignmentCenter

public static final short eVerticalAlignmentCenter
Vertically aligns at the center

See Also:
Constant Field Values

eVerticalAlignmentBottom

public static final short eVerticalAlignmentBottom
Vertically aligns at the bottom

See Also:
Constant Field Values

kMaxPattern

public static final short kMaxPattern
See Also:
Constant Field Values

eNumberFormatTypeGeneral

public static final short eNumberFormatTypeGeneral
Displays numbers as integers and fractions as decimals. Numbers that are too wide for the cell are displayed using scientific notation.

See Also:
Constant Field Values

eNumberFormatTypeNumber

public static final short eNumberFormatTypeNumber
Number format

See Also:
Constant Field Values

eNumberFormatTypeCurrency

public static final short eNumberFormatTypeCurrency
Currency format

See Also:
Constant Field Values

eNumberFormatTypeDate

public static final short eNumberFormatTypeDate
Date format

See Also:
Constant Field Values

eNumberFormatTypeDateTime

public static final short eNumberFormatTypeDateTime
DateTime format

See Also:
Constant Field Values

eNumberFormatTypePercent

public static final short eNumberFormatTypePercent
Percent format

See Also:
Constant Field Values

eNumberFormatTypeFraction

public static final short eNumberFormatTypeFraction
Fraction format

See Also:
Constant Field Values

eNumberFormatTypeScientific

public static final short eNumberFormatTypeScientific
Scientific format

See Also:
Constant Field Values

eNumberFormatTypeString

public static final short eNumberFormatTypeString
String format

See Also:
Constant Field Values

eBorderNone

public static final short eBorderNone
No border

See Also:
Constant Field Values

eBorderThin

public static final short eBorderThin
Thin solid line border

See Also:
Constant Field Values

eBorderMedium

public static final short eBorderMedium
Medium solid line border

See Also:
Constant Field Values

eBorderDashed

public static final short eBorderDashed
Dashed line border

See Also:
Constant Field Values

eBorderDotted

public static final short eBorderDotted
Dotted line border

See Also:
Constant Field Values

eBorderThick

public static final short eBorderThick
Thick solid line border

See Also:
Constant Field Values

eBorderDouble

public static final short eBorderDouble
Double border

See Also:
Constant Field Values

eBorderHair

public static final short eBorderHair
Hairline border

See Also:
Constant Field Values
Method Detail

getBottomBorder

public short getBottomBorder()
Returns the border for the bottom edge of the cell

Returns:
a short integer representing one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium = 2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick = 5 eBorderDouble = 6 eBorderHair = 7

getBottomBorderColor

public java.awt.Color getBottomBorderColor()
Returns the color used to display the bottom edge of the cell

Returns:
a java.awt.Color representing the color

getFontColor

public java.awt.Color getFontColor()
Returns the color used to display the font

Returns:
a java.awt.Color representing the color

getFontName

public java.lang.String getFontName()
Returns the name of the font

Returns:
a string describing the font name

getFontSize

public int getFontSize()
Returns the size of the font

Returns:
an integer describing the font size

getFontSizeInPoints

public double getFontSizeInPoints()
Returns the size of the font in points

Returns:
a double-precision integer describing the font size

getHorizontalAlignment

public short getHorizontalAlignment()
Returns the type of horizontal alignment.

Returns:
an integer describing the type of horizontal alignment, one of the following: eHorizontalAlignmentGeneral = 0 eHorizontalAlignmentLeft = 1 eHorizontalAlignmentCenter = 2 eHorizontalAlignmentRight = 3 eHorizontalAlignmentFill = 4 eHorizontalAlignmentJustify = 5 eHorizontalAlignmentCenterAcrossCells = 6

getHorizontalInsideBorder

public short getHorizontalInsideBorder()
Returns the border type for the horizontal inside border

Returns:
a short integer representing one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium = 2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick = 5 eBorderDouble = 6 eBorderHair = 7

getHorizontalInsideBorderColor

public java.awt.Color getHorizontalInsideBorderColor()
Returns the color used to display the horizontal inside border

Returns:
a java.awt.Color representing the color

getLeftBorder

public short getLeftBorder()
Returns the border for the left edge of the cell

Returns:
a short integer representing one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium =2 eBorderDashed =3 eBorderDotted =4 eBorderThick =5 eBorderDouble =6 eBorderHair =7

getLeftBorderColor

public java.awt.Color getLeftBorderColor()
Returns the color used to display the left edge of the cell

Returns:
a java.awt.Color representing the color

getNumberFormat

public java.lang.String getNumberFormat()
Returns the number format associated with a cell.

Returns:
a string describing the format.

getNumberFormatLocal

public java.lang.String getNumberFormatLocal()
Returns the number format associated with a cell in the local language.

Returns:
a string describing the format

getNumberFormatType

public short getNumberFormatType()
Returns the type of number format associated with a cell.

Returns:
an integer describing one of the following format types: eNumberFormatTypeGeneral = 0 eNumberFormatTypeNumber = 1 eNumberFormatTypeCurrency = 2 eNumberFormatTypeDate = 3 eNumberFormatTypeDateTime = 4 eNumberFormatTypePercent = 5 eNumberFormatTypeFraction =6 eNumberFormatTypeScientific = 7 eNumberFormatTypeString = 8

getPattern

public short getPattern()
Returns the pattern type.

Returns:
a number between 0 and 18. 0 means no pattern. At this time, 1-18 mean solid because the current version of the JDK does not support patterns. Pattern support will be available in JXCell when it is available in the JDK.

getPatternBG

public java.awt.Color getPatternBG()
Returns the color used to display the pattern background

Returns:
a java.awt.Color representing the color

getPatternFG

public java.awt.Color getPatternFG()
Returns the color used to display the pattern foreground

Returns:
a java.awt.Color representing the color

getRightBorder

public short getRightBorder()
Returns the border for the right edge of the cell

Returns:
a short integer representing one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium = 2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick = 5 eBorderDouble = 6 eBorderHair = 7

getRightBorderColor

public java.awt.Color getRightBorderColor()
Returns the color used to display the right edge of the cell

Returns:
a java.awt.Color representing the color

getTopBorder

public short getTopBorder()
Returns the border for the top edge of the cell

Returns:
a short integer representing one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium = 2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick = 5 eBorderDouble = 6 eBorderHair = 7

getTopBorderColor

public java.awt.Color getTopBorderColor()
Returns the color used to display the top edge of the cell

Returns:
a java.awt.Color representing the color

getValidationRule

public java.lang.String getValidationRule()
Returns the validation rule associated with the active cell in US english.

Returns:
a string describing the validation rule such as "(A1 > 100)".

getValidationText

public java.lang.String getValidationText()
Returns the text to be displayed in the cell if the validation rule fails.

Returns:
a string describing the text

getVerticalAlignment

public short getVerticalAlignment()
Returns the type of vertical alignment.

Returns:
one of the following vertical alignment types: eVerticalAlignmentTop = 0 eVerticalAlignmentCenter = 1 eVerticalAlignmentBottom = 2

getVerticalInsideBorder

public short getVerticalInsideBorder()
Returns the color used to display the vertical inside border

Returns:
a java.awt.Color representing the color

getVerticalInsideBorderColor

public java.awt.Color getVerticalInsideBorderColor()

isFontBold

public boolean isFontBold()
Returns whether the font is bold.

Returns:
boolean True = bold, False = not bold

isFontItalic

public boolean isFontItalic()
Returns whether the font is italic.

Returns:
boolean True = italic, False = no italic

isFontOutline

public boolean isFontOutline()
Returns whether the font is outline.

Returns:
boolean True = outline, False = no outline

isFontShadow

public boolean isFontShadow()
Returns whether the font is shadow.

Returns:
boolean True = shadow, False = no shadow

isFontStrikeout

public boolean isFontStrikeout()
Returns whether the font is strikeout

Returns:
boolean True = strikeout, False = no strikeout

isFontUnderline

public boolean isFontUnderline()
Returns whether the font is underline

Returns:
boolean True = underline, False = no underlined

isHidden

public boolean isHidden()
Returns whether formulas are hidden

Returns:
boolean True = hidden, False = not hidden

isLocked

public boolean isLocked()
Returns whether the active cell is locked

Returns:
boolean True = locked, False = not locked

isUndefined

public boolean isUndefined(short property)
                    throws CellException
Returns whether a CellFormat attribute has been defined.

Parameters:
property - - One of the following attributes: eFontName, eFontSize, eFontBold, eFontItalic, eFontUnderline, eFontStrikeout, eFontColor, eFontOutline, eFontShadow, eHorizontalAlignment, eVerticalAlignment, eWordWrap, eOrientation, ePattern, ePatternFG, ePatternBG, eNumberFormat, eNumberFormatType eValidationRule, eValidationText, eTopBorder, eLeftBorder, eBottomBorder, eRightBorder, eVerticalInsideBorder, eHorizontalInsideBorder, eTopBorderColor, eLeftBorderColor, eBottomBorderColor, eRightBorderColor, eVerticalInsideBorder, eHorizontalInsideBorder, eHidden, eLocked,
Returns:
True if the attribute is undefined, False if the attribute is defined. If an attribute for any cell in the range is defined, this method returns False.
Throws:
CellException - invalid argument

isWordWrap

public boolean isWordWrap()
Determines whether word wrap is enabled.

Returns:
True if word wrap is enabled; False if word wrap is not enabled

setBottomBorder

public void setBottomBorder(short bottom)
                     throws CellException
Sets the style for the bottom border.

Parameters:
bottom - - one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium = 2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick = 5 eBorderDouble = 6 eBorderHair = 7
Throws:
CellException - invalid argument

setBottomBorderColor

public void setBottomBorderColor(java.awt.Color color)
                          throws CellException
Sets the color used to display the bottom edge of the cell.

Parameters:
color - - a java.awt.color that describes the border color.
Throws:
CellException - If there is no active cell.

setFontBold

public void setFontBold(boolean bold)
Sets the bold attribute of the font.

Parameters:
bold - - boolean True = bold, False = not bold.

setFontColor

public void setFontColor(java.awt.Color color)
Sets the color used to display the font.

Parameters:
color - - a java.awt.color that describes the border color.

setFontItalic

public void setFontItalic(boolean italic)
Sets the italic attribute of the font.

Parameters:
italic - - boolean True = italic, False = not italic.

setFontName

public void setFontName(java.lang.String name)
Sets the font name.

Parameters:
name - - a string that describes the font name.

setFontSize

public void setFontSize(int size)
                 throws CellException
Sets the font size.

Parameters:
size - - a number that describes the font size
Throws:
CellException - if size is less than zero.

setFontOutline

public void setFontOutline(boolean outline)
Sets the outline attribute of the font.

Parameters:
outline - - boolean True = outline, False = not outline.

setFontShadow

public void setFontShadow(boolean shadow)
Sets the shadow attribute of the font.

Parameters:
shadow - - boolean True = shadow, False = not shadow.

setFontSizeInPoints

public void setFontSizeInPoints(double size)
                         throws CellException
Sets the font size in points.

Parameters:
size - - a number that describes the font size.
Throws:
CellException - if size is less than zero

setFontStrikeout

public void setFontStrikeout(boolean strikeout)
Sets the strikeout attribute of the font.

Parameters:
strikeout - - True = strikeout, False = not strikeout.

setFontUnderline

public void setFontUnderline(boolean underline)
Sets the underline attribute of the font.

Parameters:
underline - - boolean True = underline, False = not underline.

setHidden

public void setHidden(boolean hidden1)
Sets the display status of an element.

Parameters:
hidden1 - - boolean True = hidden, False = visible.

setHorizontalAlignment

public void setHorizontalAlignment(short alignment)
                            throws CellException
Sets the horizontal alignment.

Parameters:
alignment - - an integer describing the type of horizontal alignment, one of the following: eHorizontalAlignmentGeneral = 0 eHorizontalAlignmentLeft = 1 eHorizontalAlignmentCenter = 2 eHorizontalAlignmentRight = 3 eHorizontalAlignmentFill = 4 eHorizontalAlignmentJustify = 5 eHorizontalAlignmentCenterAcrossCells = 6
Throws:
CellException - if a parameter is invalid

setHorizontalInsideBorder

public void setHorizontalInsideBorder(short horizontalInside)
                               throws CellException
Sets the horizontal inside border.

Parameters:
horizontalInside - - short integer representing one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium = 2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick = 5 eBorderDouble = 6 eBorderHair = 7
Throws:
CellException

setHorizontalInsideBorderColor

public void setHorizontalInsideBorderColor(java.awt.Color horizontalInside)
Sets the color of the horizontal inside border.

Parameters:
horizontalInside - - a java.awt.Color representing the color

setLeftBorder

public void setLeftBorder(short left)
                   throws CellException
Sets the style for the left border

Parameters:
left - - one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium = 2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick = 5 eBorderDouble = 6 eBorderHair = 7
Throws:
CellException - If there is no active cell.

setLeftBorderColor

public void setLeftBorderColor(java.awt.Color color)
Sets the color used to display the left edge of the cell.

Parameters:
color - - a java.awt.color that describes the border color. see CellFormat#getLeftBorderColor()

setLocked

public void setLocked(boolean flag)
Sets the locked cell flag

Parameters:
flag - - set to True to lock the cell, False to unlock the cell

setNumberFormat

public void setNumberFormat(java.lang.String format)
                     throws CellException
Sets the number format string in U. S. English Each format string can have as many as four sections: one for positive numbers, one for negative numbers, one for zeros, and one for text. Each section is option; the sections are separated by semicolons. For example: #,###;(#,###);0;"Error: Entry must be numeric"

Parameters:
format - - the string defining the number format
Throws:
CellException

setNumberFormatLocal

public void setNumberFormatLocal(java.lang.String format)
                          throws CellException
Sets the number format string in the user's local language Each format string can have as many as four sections: one for positive numbers, one for negative numbers, one for zeros, and one for text. Each section is option; the sections are separated by semicolons. For example: #,###;(#,###);0;"Error text "

Parameters:
format - - the string defining the number format
Throws:
CellException

setPattern

public void setPattern(short pattern1)
                throws CellException
Sets the pattern type

Parameters:
pattern1 - - a number between 0 and 18. 0 means no pattern. At this time, 1-18 mean solid because the JDK does not support patterns. Pattern support will be available in JXCell when it is available in the JDK.
Throws:
CellException - if a parameter is invalid

setPatternBG

public void setPatternBG(java.awt.Color color)
Sets the color used to display the pattern backgroun

Parameters:
color - - a java.awt.Color

setPatternFG

public void setPatternFG(java.awt.Color color)
Sets the color used to display the pattern foreground

Parameters:
color - - a java.awt.Color

setRightBorder

public void setRightBorder(short right)
                    throws CellException
Sets the style for the right border.

Parameters:
right - - one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium =2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick =5 eBorderDouble = 6 eBorderHair = 7
Throws:
CellException - If there is no active cell.

setRightBorderColor

public void setRightBorderColor(java.awt.Color color)
                         throws CellException
Sets the color used to display the right edge of the cell.

Parameters:
color - - a java.awt.color that describes the border color.
Throws:
CellException - If there is no active cell.

setTopBorder

public void setTopBorder(short top)
                  throws CellException
Sets the style for the bottom border

Parameters:
top - - one of the following border types: eBorderNone = 0 eBorderThin = 1 eBorderMedium =2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick =5 eBorderDouble = 6 eBorderHair = 7
Throws:
CellException - If there is no active cell.

setTopBorderColor

public void setTopBorderColor(java.awt.Color color)
                       throws CellException
Sets the color used to display the top edge of the cell.

Parameters:
color - - a java.awt.color that describes the border color.
Throws:
CellException - If there is no active cell.

setUndefined

public void setUndefined(short property,
                         boolean undefined)
                  throws CellException
Sets whether a cell format attribute has been defined

Parameters:
property - - One of the following attributes: eFontName, eFontSize, eFontBold, eFontItalic, eFontUnderline, eFontStrikeout, eFontColor, eFontOutline, eFontShadow, eHorizontalAlignment, eVerticalAlignment, eWordWrap, eOrientation, ePattern, ePatternFG, ePatternBG, eNumberFormat, eNumberFormatType eValidationRule, eValidationText, eTopBorder, eLeftBorder, eBottomBorder, eRightBorder, eVerticalInsideBorder, eHorizontalInsideBorder, eTopBorderColor, eLeftBorderColor, eBottomBorderColor, eRightBorderColor, eVerticalInsideBorder, eHorizontalInsideBorder, eHidden, eLocked,
undefined - - True if the attribute is not defined, False if the attribute is not defined
Throws:
CellException - If there is no active cell.

setValidationRule

public void setValidationRule(View view1,
                              java.lang.String rule)
                       throws CellException
Sets the validation rule expression in U. S. English

Parameters:
view1 - - the Formual One view
rule - - the validation rule expression, such as "(A1 > 100)".
Throws:
CellException - if a parameter is invalid

setValidationRule

public void setValidationRule(View view1,
                              java.lang.String rule,
                              int row,
                              int col)
                       throws CellException
Sets the validation rule expression in U. S. English Using the row and column coordinates as the starting point, the rule adjusts according to the position of the active cell.

Parameters:
view1 - - the Formual One view
rule - - the validation rule expression, such as "(A1>100)". The cell reference in the expression represents the ending point of a calculated relative reference.
row - - the coordinate of the row used as a starting point for the calculated relative reference
col - - the coordinate of the column used as the starting point for the calculated relative reference
Throws:
CellException - if a parameter is invalid

setValidationText

public void setValidationText(java.lang.String text)
Sets the text to be displayed if a validation rule fails.

Parameters:
text - - the text to be displayed if the entered data does not meet the condition specified by the validation expression

setVerticalAlignment

public void setVerticalAlignment(short alignment)
                          throws CellException
Sets the type of vertical alignment

Parameters:
alignment - - One of the following alignment types eVerticalAlignmentTop = 0 eVerticalAlignmentCenter = 1 eVerticalAlignmentBottom = 2
Throws:
CellException - if a parameter is invalid

setVerticalInsideBorder

public void setVerticalInsideBorder(short verticalInside)
                             throws CellException
Sets the border type for the vertical inside border

Parameters:
verticalInside - - One of the following border types eBorderNone = 0 eBorderThin = 1 eBorderMedium =2 eBorderDashed = 3 eBorderDotted = 4 eBorderThick =5 eBorderDouble = 6 eBorderHair = 7
Throws:
CellException - if a parameter is invalid

setVerticalInsideBorderColor

public void setVerticalInsideBorderColor(java.awt.Color verticalInside)
                                  throws CellException
Sets the color used to display the vertical inside border

Parameters:
verticalInside - - a java.awt.color that describes the border color
Throws:
CellException - If there is no active cell.

setWordWrap

public void setWordWrap(boolean wrap)
Sets the wordwrap attribute

Parameters:
wrap - - boolean indicating whether wordwrap is enabled

useAllFormats

public void useAllFormats()
Instructs the CellFormat object to use all of the format settings. Normally the CellFormat object will not use format settings unless the format or a related format has been set with an explicit call to a set*() method. To copy a format from one place to another you must call useAllFormats() in between the calls to View.getCellFormat(...) and View.setCellFormat(...).


toString

public java.lang.String toString()