Class APTSpaces

  extended by
      extended by
          extended by
All Implemented Interfaces:
IgnoreChildren, NonParentSpaceReceiver

public class APTSpaces
extends APTText

This represents a set of spaces in a paragraph. This has nothing to do with an APT formatting.

Since we are converting from an XML format and since parsers like the SAX parser trims away white space the ODF people decided to represent spaces at the beginning of a line with a <text:s text:c="5"/> element where the attribute specifies the number of spaces.

Such an element maps directly to this class. It is an APTText subclass an can be added to an APTParagraph as any other APTText. It will return the specified amount of spaces as its value. It will also prefix the spaces with a new line ('\n') since this type of spaces only exist at the beginning of a line.

Field Summary
private  String spaces
          The spaces this object represents.
Constructor Summary
APTSpaces(int count)
          Creates a new APTSpaces instance.
Method Summary
 String getUnformattedValue()
          Returns the unformatted value.
 String getValue()
          Returns the value.
Methods inherited from class
addSpace, getAPTTextValue
Methods inherited from class
done, formatText, getParent, hasValue, isAllowFormat, isLink, setAllowFormat, setLink, setParent, setValue, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail


private String spaces
The spaces this object represents.

Constructor Detail


public APTSpaces(int count)
Creates a new APTSpaces instance.

count - The number of spaces this instance represents.
Method Detail


public String getUnformattedValue()
Returns the unformatted value.

getUnformattedValue in class APTText


public String getValue()
Returns the value.

getValue in class APTText

Copyright © 2009-2010 Biltmore Group AB. All Rights Reserved.