|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.writersforge.catalan.layout.style.StyleChain
Style aggregator. Hooks multiple styles together in sequence, performing lookups on each style until it finds the property defined in one. Useful for complex style resolution and inheritance.
| Field Summary |
| Fields inherited from interface org.writersforge.catalan.layout.style.FontStyle |
FONT_STYLE_BOLD, FONT_STYLE_ITALIC, FONT_STYLE_PLAIN, STYLE_ENUM |
| Fields inherited from interface org.writersforge.catalan.layout.style.TextStyle |
WRAP_CHARACTER, WRAP_ENUM, WRAP_NEVER, WRAP_PHRASE, WRAP_SENTENCE, WRAP_WORD |
| Fields inherited from interface org.writersforge.catalan.layout.style.AlignStyle |
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_ENUM, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP |
| Constructor Summary | |
StyleChain()
Creates a new empty instance of StyleChain. |
|
StyleChain(StyleChain copy)
Creates a new instance of StyleChain using the copy as a template. |
|
| Method Summary | |
void |
addAllStyle(AllStyle allStyle)
Adds an AllStyle to the front of the lookup chain. |
void |
addAreaStyle(AreaStyle areaStyle)
Adds a AreaStyle to the front of the lookup chain. |
void |
addFontStyle(FontStyle fontStyle)
Adds a FontStyle to the front of the lookup chain. |
void |
addTextStyle(TextStyle textStyle)
Adds a TextStyle to the front of the lookup chain. |
AreaStyle[] |
getAreaStyles()
Returns an array of all AreaStyle objects in this chain. |
java.awt.Color |
getBackgroundColor()
Returns the background color of this area. |
java.awt.Color |
getBorderColor()
Returns the color of the border enclosing this area. |
int |
getBorderWidth()
Returns the width of the border enclosing this area. |
FontStyle |
getDefaultFont()
Returns the default FontStyle of this text. |
java.lang.String |
getDescription()
Returns an optional text description of this area. |
int |
getFirstLineIndent()
Returns the first line indent property of this text. |
java.awt.Color |
getFontColor()
Returns the color of this run of text. |
int |
getFontHeight()
Estimates the height of the font in point size. |
java.lang.String |
getFontName()
Returns the font name property of the style. |
int |
getFontSize()
Returns the font size property of the style. |
int |
getFontStyle()
Returns the font style property of the style. |
FontStyle[] |
getFontStyles()
Returns an array of all FontStyle objects in this chain. |
int |
getHAlign()
Returns the horizontal alignment property of the style. |
int |
getIndent()
Returns the left indent spacing of this area. |
java.awt.Insets |
getInsets()
Returns an Insets object set to the values of all four InsetStyle properties, indent, rightIndent, spaceBefore, and spaceAfter. |
java.awt.Dimension |
getMaximum()
Returns the maximum geometrical extents of this area. |
java.awt.Dimension |
getMinimum()
Returns the minimum geometrical extents of this area. |
java.awt.Dimension |
getPreferred()
Returns the preferred geometrical extents of this area. |
int |
getRightIndent()
Returns the right indent spacing of this area. |
int |
getSpaceAfter()
Returns the bottom indent spacing of this area. |
int |
getSpaceBefore()
Returns the top indent spacing of this area. |
TextStyle[] |
getTextStyles()
Returns an array of all TextStyle objects in this chain. |
int |
getVAlign()
Returns the vertical alignment property of the style. |
int |
getWrap()
Returns the wrap style of this text, according to the WRAP_xxx enumeration. |
boolean |
isBreakable()
Returns the atomic property of this text. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StyleChain()
public StyleChain(StyleChain copy)
copy - the StyleChain to copy into the new one| Method Detail |
public void addAllStyle(AllStyle allStyle)
allStyle - the style to add to the front of the listpublic void addFontStyle(FontStyle fontStyle)
fontStyle - the style to add to the front of the listpublic FontStyle[] getFontStyles()
public void addTextStyle(TextStyle textStyle)
textStyle - the style to add to the front of the listpublic TextStyle[] getTextStyles()
public void addAreaStyle(AreaStyle areaStyle)
areaStyle - the style to add to the front of the listpublic AreaStyle[] getAreaStyles()
public java.lang.String getFontName()
getFontName in interface FontStylepublic int getFontStyle()
getFontStyle in interface FontStylepublic int getFontSize()
getFontSize in interface FontStylepublic int getFontHeight()
getFontHeight in interface FontStylepublic java.awt.Color getFontColor()
getFontColor in interface FontStylepublic FontStyle getDefaultFont()
getDefaultFont in interface TextStylepublic int getWrap()
getWrap in interface TextStylepublic int getFirstLineIndent()
getFirstLineIndent in interface TextStylepublic boolean isBreakable()
isBreakable in interface AreaStylepublic int getHAlign()
getHAlign in interface AlignStylepublic int getVAlign()
getVAlign in interface AlignStylepublic int getIndent()
getIndent in interface InsetStylepublic int getRightIndent()
getRightIndent in interface InsetStylepublic int getSpaceBefore()
getSpaceBefore in interface InsetStylepublic int getSpaceAfter()
getSpaceAfter in interface InsetStylepublic java.awt.Insets getInsets()
getInsets in interface InsetStylepublic java.awt.Dimension getPreferred()
getPreferred in interface ExtentStylepublic java.awt.Dimension getMinimum()
getMinimum in interface ExtentStylepublic java.awt.Dimension getMaximum()
getMaximum in interface ExtentStylepublic int getBorderWidth()
getBorderWidth in interface BorderStylepublic java.awt.Color getBorderColor()
getBorderColor in interface BorderStylepublic java.awt.Color getBackgroundColor()
getBackgroundColor in interface AreaStylepublic java.lang.String getDescription()
getDescription in interface AreaStyle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||