com.jrefinery.workbook
Class StyleColorModifier
java.lang.Object
|
+--com.jrefinery.workbook.StyleColorModifier
- All Implemented Interfaces:
- StyleModifier
- public class StyleColorModifier
- extends java.lang.Object
- implements StyleModifier
A style modifier that changes the foreground, background or pattern color for a style, but leaves
all other settings unchanged.
|
Field Summary |
protected StyleColor |
color
The new color. |
protected int |
which
Foreground, background or pattern color. |
|
Method Summary |
Style |
getModifiedStyle(Style style)
Returns a new style with the same settings as the style passed in, except with a different
foreground, background or pattern color. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
which
protected int which
- Foreground, background or pattern color.
color
protected StyleColor color
- The new color.
StyleColorModifier
public StyleColorModifier(int which,
StyleColor color)
- Standard constructor.
- Parameters:
which - Indicates which color to change (use constants BACKGROUND_COLOR,
FOREGROUND_COLOR and PATTERN_COLOR in the StyleColor class).color - The new color.
getModifiedStyle
public Style getModifiedStyle(Style style)
- Returns a new style with the same settings as the style passed in, except with a different
foreground, background or pattern color.
- Specified by:
getModifiedStyle in interface StyleModifier
- Parameters:
style - The style to be modified.- Returns:
- A new style with the same settings as the style passed in, except with a different
foreground, background or pattern color.