SourceForge.net Logo
aXSL API 0.2

org.axsl.text.line
Interface LineOutput

All Known Subinterfaces:
LineArea

public interface LineOutput

Interface for objects that represent a line of actual output.


Method Summary
 int capacityRemaining()
          The portion of the line still available to be filled with content.
 int capacityTotal()
          Provides size of the portion of the line on which content can actually be placed.
 int capacityUsed()
          The portion of the line that is already filled with content.
 boolean hasAnyContent()
          Tells the line-breaking system whether this line already has any content on it.
 

Method Detail

capacityTotal

int capacityTotal()
Provides size of the portion of the line on which content can actually be placed. Margins, indentations, etc. should not be included in this size. So, for example, if the line is 8 inches long, has an inch margin at each end, and is indented .5 inches, the value returned here should be 5.5 inches, which is 396,000 millipoints.

Returns:
The size of the line available for content, in millipoints.

capacityUsed

int capacityUsed()
The portion of the line that is already filled with content.

Returns:
The size of content already on the line, in millipoints.

capacityRemaining

int capacityRemaining()
The portion of the line still available to be filled with content. This is always equal to capacityTotal() minus capacityUsed().

Returns:
The portion of the line still available to be filled with content, in millipoints.

hasAnyContent

boolean hasAnyContent()
Tells the line-breaking system whether this line already has any content on it. If there is no content on the line, leading spaces are eligible to be "eaten". It might be tempting to test for capacityUsed() == 0 instead of using this method, but this method allows for the possibility of zero-width items on the line.

Returns:
True iff this line already has content on it.

SourceForge.net Logo
aXSL API 0.2

This documentation was created August 8 2007 by The aXSL Group and may be freely copied. See license for details.