public class Fill extends Object implements OOXMLElement
| Constructor and Description |
|---|
Fill(Fill f) |
Fill(int pattern,
int fg,
String fgColorCustom,
int bg,
String bgColorCustom,
Theme t)
create a new Fill from external vals
|
Fill(io.starter.formats.OOXML.PatternFill p,
io.starter.formats.OOXML.GradientFill g,
Theme t) |
Fill(String fs,
int fg,
int bg,
Theme t)
create a new Fill from external vals
|
| Modifier and Type | Method and Description |
|---|---|
OOXMLElement |
cloneElement() |
int |
getBgColorAsInt(Theme t)
return the bg color in indexed (int) representation
|
String |
getBgColorAsRGB(Theme t)
return the bg color of this fill, if any
|
int |
getFgColorAsInt(Theme t)
return the fg color in indexed (int) representation
|
String |
getFgColorAsRGB(Theme t)
return the foreground color of this fill, if any
|
String |
getFillPattern() |
int |
getFillPatternInt()
return the fill pattern in 2003 int representation
|
String |
getOOXML() |
String |
getOOXML(boolean isDxf)
dxfs apparently have different pattern fill syntax -- UNDOCUMENTED ****
|
static String |
getOOXML(int fs,
int fg,
int bg)
returns the OOXML specifying the fill based on fill pattern fs,
foreground color fg, background color bg
|
static String |
getOOXML(Xf xf)
returns the OOXML specifying the fill based on this FormatHandle object
|
boolean |
isBackgroundSolid()
returns true if the background pattern is solid
|
static OOXMLElement |
parseOOXML(org.xmlpull.v1.XmlPullParser xpp,
boolean isDxf,
WorkBookHandle bk) |
void |
setBgColor(int t)
sets the bg fill color via color int
|
void |
setBgColor(int t,
String colorString)
sets the foreground fill color to a color string and Excel-2003-mapped
color int
|
void |
setFgColor(int t)
sets the foreground fill color via color int
|
void |
setFgColor(int t,
String colorString)
sets the foreground fill color to a color string and Excel-2003-mapped
color int
|
void |
setFillPattern(int t)
sets the fill pattern
|
protected static String |
transformToOOXMLRGBColor(String rgbcolor)
OOXML values are stored with an intiall FF in their value,
this method assures that values returned are 8 digits with
ff appended to rgb value for ooxml usage
|
protected static String |
transformToWebRGBColor(String rgbcolor)
OOXML values are stored with an intiall FF in their value,
this method assures that values returned are 6 digits + # for web usage
|
public Fill(io.starter.formats.OOXML.PatternFill p,
io.starter.formats.OOXML.GradientFill g,
Theme t)
public Fill(Fill f)
public Fill(String fs, int fg, int bg, Theme t)
fs - String pattern typefg - int color indexbg - int color indexpublic static OOXMLElement parseOOXML(org.xmlpull.v1.XmlPullParser xpp, boolean isDxf, WorkBookHandle bk)
protected static String transformToWebRGBColor(String rgbcolor)
rgbcolor - protected static String transformToOOXMLRGBColor(String rgbcolor)
rgbcolor - public String getOOXML()
getOOXML in interface OOXMLElementOOXMLElement.getOOXML()public String getOOXML(boolean isDxf)
isDxf - if this is an Dxf-generated fill, solid fills are handled
differently than regular fillspublic OOXMLElement cloneElement()
cloneElement in interface OOXMLElementOOXMLElement.cloneElement()public static String getOOXML(Xf xf)
public static String getOOXML(int fs, int fg, int bg)
public String getFgColorAsRGB(Theme t)
public int getFgColorAsInt(Theme t)
public String getBgColorAsRGB(Theme t)
public int getBgColorAsInt(Theme t)
public void setFgColor(int t)
t - public void setFgColor(int t,
String colorString)
t - Excel-2003-mapped color int for the hex color stringcolorString - hex color stringpublic void setBgColor(int t)
t - public void setBgColor(int t,
String colorString)
t - Excel-2003-mapped color int for the hex color stringcolorString - hex color stringpublic String getFillPattern()
public int getFillPatternInt()
public void setFillPattern(int t)
public boolean isBackgroundSolid()
Copyright © 2002–2019 Starter Inc.. All rights reserved.