org.jfree.workbook
Class GeneralStyleModifier

java.lang.Object
  |
  +--org.jfree.workbook.GeneralStyleModifier
All Implemented Interfaces:
StyleModifier

public class GeneralStyleModifier
extends java.lang.Object
implements StyleModifier

A general style modifier that can change a variety of style settings.


Field Summary
protected  int horizontalAlignment
          The new horizontal alignment, if required.
protected  boolean modifyHorizontalAlignment
          Change the horizontal alignment (yes/no).
protected  boolean modifyVerticalAlignment
          Change the vertical alignment (yes/no).
protected  boolean modifyWrapText
          Change the wrap text setting (yes/no).
protected  int verticalAlignment
          The new vertical alignment, if required.
protected  boolean wrapText
          The new wrap text setting, if required.
 
Constructor Summary
GeneralStyleModifier(boolean modifyWrapText, boolean wrapText)
          Standard constructor.
GeneralStyleModifier(boolean modifyHorizontalAlignment, int horizontalAlignment, boolean modifyVerticalAlignment, int verticalAlignment)
          Standard constructor.
 
Method Summary
 Style getModifiedStyle(Style style)
          Returns a new style based on the supplied style, but modified in some way.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modifyHorizontalAlignment

protected boolean modifyHorizontalAlignment
Change the horizontal alignment (yes/no).


horizontalAlignment

protected int horizontalAlignment
The new horizontal alignment, if required.


modifyVerticalAlignment

protected boolean modifyVerticalAlignment
Change the vertical alignment (yes/no).


verticalAlignment

protected int verticalAlignment
The new vertical alignment, if required.


modifyWrapText

protected boolean modifyWrapText
Change the wrap text setting (yes/no).


wrapText

protected boolean wrapText
The new wrap text setting, if required.

Constructor Detail

GeneralStyleModifier

public GeneralStyleModifier(boolean modifyHorizontalAlignment,
                            int horizontalAlignment,
                            boolean modifyVerticalAlignment,
                            int verticalAlignment)
Standard constructor.

Parameters:
modifyHorizontalAlignment - change the horizontal alignment (yes/no).
horizontalAlignment - the new horizontal alignment.
modifyVerticalAlignment - change the vertical alignment (yes/no).
verticalAlignment - the new vertical alignment.

GeneralStyleModifier

public GeneralStyleModifier(boolean modifyWrapText,
                            boolean wrapText)
Standard constructor.

Parameters:
modifyWrapText - change the wrap text setting (yes/no).
wrapText - the new wrap text setting.
Method Detail

getModifiedStyle

public Style getModifiedStyle(Style style)
Returns a new style based on the supplied style, but modified in some way.

Specified by:
getModifiedStyle in interface StyleModifier
Parameters:
style - the style to be changed.
Returns:
The modified style.