ru.novosoft.dc.rtf.dom
Class FormattingStyle

java.lang.Object
  |
  +--ru.novosoft.dc.rtf.dom.FormattingStyle

public class FormattingStyle
extends java.lang.Object

Formatting style is an entry of a style sheet table. Paragraph and character formatting styles are implemented in it.


Field Summary
static byte ADDITIVE
          Bit number for additive style.
static byte AUTOUPDATE
          Bit number for automatically updated style.
static byte BASE_STYLE
          Index of the based-on style number.
static byte CHARACTER
          Bit number for character style.
static byte EMAIL_COMPOSE
          Bit number for email compose style.
static byte EMAIL_PERSONAL
          Bit number for personal email style.
static byte EMAIL_REPLY
          Bit number for email reply style.
static byte HIDDEN
          Bit number for hidden style.
static byte NEXT_STYLE
          Index of the next style number.
static byte THIS_STYLE
          Index of this style number.
 
Constructor Summary
FormattingStyle()
           
 
Method Summary
 void attachCharacterContext(CharacterContext value)
          Attach a character context to the style.
 void attachParagraphContext(ParagraphContext value)
          Attach a paragraph context to the style.
 CharacterContext characterContext()
          Return the character context or null if no such context attached.
 void clearType(int bitNumber)
          Clear a specified bit in the style type.
 boolean equals(java.lang.Object obj)
          Compare this style with another formatting style and return true if their contexts coinside.
 void exportTo(org.w3c.dom.Element elem)
          Export the contents of this object to the specified DOM element.
 int get(int index)
          Return the style number for the specified index (222 means no style).
 java.lang.String getName()
          Return the style name or null if no name defined.
 boolean hasType(int bitNumber)
          Return true if a specified bit in the style type is equal to 1.
 ParagraphContext paragraphContext()
          Return the paragraph context or null if no such context attached.
 void set(int index, int value)
          Set a style number of the specified index.
 void setName(java.lang.String value)
          Set a name for the style.
 void setType(int bitNumber)
          Set a specified bit in the style type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

THIS_STYLE

public static final byte THIS_STYLE
Index of this style number.

NEXT_STYLE

public static final byte NEXT_STYLE
Index of the next style number.

BASE_STYLE

public static final byte BASE_STYLE
Index of the based-on style number.

CHARACTER

public static final byte CHARACTER
Bit number for character style.

ADDITIVE

public static final byte ADDITIVE
Bit number for additive style.

AUTOUPDATE

public static final byte AUTOUPDATE
Bit number for automatically updated style.

HIDDEN

public static final byte HIDDEN
Bit number for hidden style.

EMAIL_PERSONAL

public static final byte EMAIL_PERSONAL
Bit number for personal email style.

EMAIL_COMPOSE

public static final byte EMAIL_COMPOSE
Bit number for email compose style.

EMAIL_REPLY

public static final byte EMAIL_REPLY
Bit number for email reply style.
Constructor Detail

FormattingStyle

public FormattingStyle()
Method Detail

set

public final void set(int index,
                      int value)
Set a style number of the specified index.

get

public final int get(int index)
Return the style number for the specified index (222 means no style).

setType

public final void setType(int bitNumber)
Set a specified bit in the style type.

clearType

public final void clearType(int bitNumber)
Clear a specified bit in the style type.

hasType

public final boolean hasType(int bitNumber)
Return true if a specified bit in the style type is equal to 1.

setName

public final void setName(java.lang.String value)
Set a name for the style.

getName

public final java.lang.String getName()
Return the style name or null if no name defined.

attachCharacterContext

public final void attachCharacterContext(CharacterContext value)
Attach a character context to the style.

characterContext

public final CharacterContext characterContext()
Return the character context or null if no such context attached.

attachParagraphContext

public final void attachParagraphContext(ParagraphContext value)
Attach a paragraph context to the style.

paragraphContext

public final ParagraphContext paragraphContext()
Return the paragraph context or null if no such context attached.

equals

public boolean equals(java.lang.Object obj)
Compare this style with another formatting style and return true if their contexts coinside. Style numbers, types, and names are not compared.
Overrides:
equals in class java.lang.Object

exportTo

public void exportTo(org.w3c.dom.Element elem)
Export the contents of this object to the specified DOM element.