|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--ru.novosoft.dc.rtf.dom.ShadingContext
|
+--ru.novosoft.dc.rtf.dom.CharacterContext
Character formatting context. The following character formatting properties are not implemented here: animation, accent controls, character style, grid controls, text fitting, language controls, left-to-right/right-to-left controls, and associated font and character properties.
| Fields inherited from interface ru.novosoft.dc.rtf.dom.objects.CharacterUnderline |
CONTINUOUS,
DASH,
DASH_DOT,
DASH_DOT_DOT,
DOTTED,
DOUBLE,
DOUBLE_WAVE,
HEAVY_WAVE,
LONG_DASH,
NONE,
THICK,
THICK_DASH,
THICK_DASH_DOT,
THICK_DASH_DOT_DOT,
THICK_DOTTED,
THICK_LONG_DASH,
WAVE,
WORDS_ONLY |
| Fields inherited from interface ru.novosoft.dc.rtf.dom.objects.CharacterShape |
ALL_CAPS,
BOLD,
DELETED,
DOUBLE_STRIKE,
EMBOSS,
ENGRAVE,
HIDDEN,
ITALIC,
M_ALL,
M_ALL_CAPS,
M_BOLD,
M_DELETED,
M_DOUBLE_STRIKE,
M_EMBOSS,
M_ENGRAVE,
M_HIDDEN,
M_ITALIC,
M_OUTLINE,
M_REVISED,
M_SHADOW,
M_SMALL_CAPS,
M_STRIKE,
M_SUBSCRIPT,
M_SUPERSCRIPT,
M_WEB_HIDDEN,
OUTLINE,
REVISED,
SHADOW,
SMALL_CAPS,
STRIKE,
SUBSCRIPT,
SUPERSCRIPT,
WEB_HIDDEN |
| Constructor Summary | |
CharacterContext()
Construct a character formatting context. |
|
| Method Summary | |
Border |
border()
Return the border or null if no border defined. |
int |
characterShape()
Return the current character shape (see CharacterShape). |
CharacterSpacing |
characterSpacing()
Return the current character spacing object or null if no spacing parameters specified. |
void |
clearForMerge()
Clear font, shading, and underline style for further merge another character context with this context (this context is considered as a templated aplied to another context). |
void |
clearShape(int bitNumber)
Clear a specified bit in the character shape. |
void |
clearShapeByMask(int mask)
Clear bits of the character shape by the specified mask. |
java.lang.Object |
clone()
Create a clone of this context. |
Border |
defineBorder()
Define a new border and return it. |
void |
defineSpacing(int index,
int value)
Define a character spacing parameter of the specified index. |
boolean |
equals(java.lang.Object obj)
Compare this context with another character context and return true if contexts coinside. |
static java.lang.String |
exportShape(int shape)
Export a font shape code to string representation. |
void |
exportTo(org.w3c.dom.Element elem)
Export the contents of this object to the specified DOM element. |
RTFColor |
fillColor()
Return the current fill color which will be either highlight color, or background color, if no highlighting specified, or null, if both highlight and background color do not specified. |
RTFColor |
getBackgroundColor()
Return the background color or null if it was not specified. |
RTFFont |
getFont()
Return the current font. |
int |
getFontSize()
Return the current font size in half-points. |
RTFColor |
getForegroundColor()
Return the foreground color or null if it was not specified. |
int |
getStyle()
Return the style number. |
RTFColor |
getUnderlineColor()
Return the underline color or null if it was not specified. |
int |
getUnderlineStyle()
Return the current underline style ( CharacterUnderline.NONE
means no underlining). |
boolean |
hasBorder()
Return true if a border is defined in this context. |
boolean |
hasHighlighting()
Return true if a highlight color is specified. |
boolean |
hasShape(int bitNumber)
Return true if a specified bit in the character shape is equal to 1. |
void |
highlight(RTFColor value)
Set a highlight color (the reset method has no affect on the highlight color). |
void |
mergeWith(CharacterContext context)
Add properties defined in context passed in the parameter to this context. |
void |
reset()
Restore the character formatting properties to defaults. |
void |
setBackgroundColor(RTFColor value)
Set a background color. |
void |
setFont(RTFFont value)
Set a font. |
void |
setFontSize(int value)
Set a font size in half-points. |
void |
setForegroundColor(RTFColor value)
Set a foreground color. |
void |
setShape(int bitNumber)
Set a specified bit in the character shape. |
void |
setShapeByMask(int mask)
Set bits of the character shape by the specified mask. |
void |
setStyle(int value)
Set a style number (222 means no style). |
void |
setUnderlineColor(RTFColor value)
Set an underline color. |
void |
setUnderlineStyle(int value)
Set an underline style. |
| Methods inherited from class ru.novosoft.dc.rtf.dom.ShadingContext |
defineShadingBackground,
defineShadingFill,
defineShadingStyle,
exportTo,
shading |
| Methods inherited from class java.lang.Object |
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public CharacterContext()
| Method Detail |
public final void setFont(RTFFont value)
public final RTFFont getFont()
public final void setFontSize(int value)
public final int getFontSize()
public final void setStyle(int value)
public final int getStyle()
public final void setBackgroundColor(RTFColor value)
public final RTFColor getBackgroundColor()
public final void setForegroundColor(RTFColor value)
public final RTFColor getForegroundColor()
public final void setUnderlineColor(RTFColor value)
public final RTFColor getUnderlineColor()
public final void setUnderlineStyle(int value)
public final int getUnderlineStyle()
CharacterUnderline.NONE
means no underlining).public final void highlight(RTFColor value)
public final boolean hasHighlighting()
public final RTFColor fillColor()
public final boolean hasBorder()
public final Border defineBorder()
public final Border border()
public final void setShapeByMask(int mask)
public final void clearShapeByMask(int mask)
public final void setShape(int bitNumber)
public final void clearShape(int bitNumber)
public final boolean hasShape(int bitNumber)
public final int characterShape()
CharacterShape).
public final void defineSpacing(int index,
int value)
public final CharacterSpacing characterSpacing()
public void clearForMerge()
public void mergeWith(CharacterContext context)
public void reset()
public java.lang.Object clone()
public boolean equals(java.lang.Object obj)
public void exportTo(org.w3c.dom.Element elem)
public static java.lang.String exportShape(int shape)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||