org.apache.poi.xssf.usermodel.extensions
Class XSSFCellFill

java.lang.Object
  extended by org.apache.poi.xssf.usermodel.extensions.XSSFCellFill

public final class XSSFCellFill
extends java.lang.Object

This element specifies fill formatting. A cell fill consists of a background color, foreground color, and pattern to be applied across the cell.


Constructor Summary
XSSFCellFill()
          Creates an empty CellFill
XSSFCellFill(CTFill fill)
          Creates a CellFill from the supplied parts
 
Method Summary
 boolean equals(java.lang.Object o)
           
 CTFill getCTFill()
          Returns the underlying XML bean.
 XSSFColor getFillBackgroundColor()
          Get the background fill color.
 XSSFColor getFillForegroundColor()
          Get the foreground fill color.
 STPatternType.Enum getPatternType()
          get the fill pattern
 int hashCode()
           
 void setFillBackgroundColor(int index)
          Set the background fill color represented as a indexed color value.
 void setFillBackgroundColor(XSSFColor color)
          Set the background fill color represented as a XSSFColor value.
 void setFillForegroundColor(int index)
          Set the foreground fill color as a indexed color value
 void setFillForegroundColor(XSSFColor color)
          Set the foreground fill color represented as a XSSFColor value.
 void setPatternType(STPatternType.Enum patternType)
          set the fill pattern
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSSFCellFill

public XSSFCellFill(CTFill fill)
Creates a CellFill from the supplied parts

Parameters:
fill - - fill

XSSFCellFill

public XSSFCellFill()
Creates an empty CellFill

Method Detail

getFillBackgroundColor

public XSSFColor getFillBackgroundColor()
Get the background fill color.

Returns:
fill color, null if color is not set

setFillBackgroundColor

public void setFillBackgroundColor(int index)
Set the background fill color represented as a indexed color value.

Parameters:
index -

setFillBackgroundColor

public void setFillBackgroundColor(XSSFColor color)
Set the background fill color represented as a XSSFColor value.

Parameters:
color -

getFillForegroundColor

public XSSFColor getFillForegroundColor()
Get the foreground fill color.

Returns:
XSSFColor - foreground color. null if color is not set

setFillForegroundColor

public void setFillForegroundColor(int index)
Set the foreground fill color as a indexed color value

Parameters:
index - - the color to use

setFillForegroundColor

public void setFillForegroundColor(XSSFColor color)
Set the foreground fill color represented as a XSSFColor value.

Parameters:
color - - the color to use

getPatternType

public STPatternType.Enum getPatternType()
get the fill pattern

Returns:
fill pattern type. null if fill pattern is not set

setPatternType

public void setPatternType(STPatternType.Enum patternType)
set the fill pattern

Parameters:
patternType - fill pattern to use

getCTFill

@Internal
public CTFill getCTFill()
Returns the underlying XML bean.

Returns:
CTFill

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright 2012 The Apache Software Foundation or its licensors, as applicable.