Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hwpf.model
Class StyleSheet

    java.lang.Object
      org.apache.poi.hwpf.model.StyleSheet

All Implemented Interfaces:
  HDFType

    public final class StyleSheet

extends java.lang.Object
implements HDFType

Represents a document's stylesheet. A word documents formatting is stored as compressed styles that are based on styles contained in the stylesheet. This class also contains static utility functions to uncompress different formatting properties.

Author:
  Ryan Ackley

Field Summary
`static int` | `NIL_STYLE`

Constructor Summary
`StyleSheet(byte[] tableStream, int offset)` StyleSheet constructor.

Method Summary
`boolean` | `equals(java.lang.Object o)`
`CharacterProperties` | `getCharacterStyle(int x)`
`ParagraphProperties` | `getParagraphStyle(int x)`
`StyleDescription` | `getStyleDescription(int x)` Gets the StyleDescription at index x.
`int` | `numStyles()` Gets the number of styles in the style sheet.
`void` | `writeTo(HWPFOutputStream out)`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NIL_STYLE

    public static final int NIL_STYLE

See Also:
  Constant Field Values

Constructor Detail

### StyleSheet

    public StyleSheet(byte[] tableStream,
                      int offset)

  StyleSheet constructor. Loads a document's stylesheet information,

  Parameters:
    `tableStream` - A byte array containing a document's raw stylesheet info. Found by using FileInformationBlock.getFcStshf() and FileInformationBLock.getLcbStshf()

Method Detail

### writeTo

    public void writeTo(HWPFOutputStream out)
                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### equals

    public boolean equals(java.lang.Object o)

  Overrides:
    `equals` in class `java.lang.Object`

### numStyles

    public int numStyles()

  Gets the number of styles in the style sheet.

  Returns:
    The number of styles in the style sheet.

### getStyleDescription

    public StyleDescription getStyleDescription(int x)

  Gets the StyleDescription at index x.

  Parameters:
    `x` - the index of the desired StyleDescription.

### getCharacterStyle

    public CharacterProperties getCharacterStyle(int x)

### getParagraphStyle

    public ParagraphProperties getParagraphStyle(int x)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2010 The Apache Software Foundation or its licensors, as applicable.