org.pentaho.reporting.engine.classic.core.layout
Interface SizeCalculator

All Known Implementing Classes:
DefaultSizeCalculator

Deprecated. The size-calculator does no longer yield correct results, as the layouting depends on more than just the element itself. Functions should not try to precompute a layout, they should rely on a correct report-definition and style instead.

public interface SizeCalculator

The interface for an class that is able to calculate the width of a given string, and the height of a line of text. The calculations rely on state information (e.g. font size, graphics device, etc) maintained by the calculator.

Every LayoutSupport can create an instance of a class that implements this interface, via the LayoutSupport.createTextSizeCalculator(org.pentaho.reporting.engine.classic.core.style.FontDefinition) method.

Author:
Thomas Morgner

Field Summary
static String CLIP_TEXT
          Deprecated. This config-key is no longer used.
static String USE_MAX_CHAR_SIZE
          Deprecated. This config-key should not be declared here.
 
Method Summary
 float getLineHeight()
          Deprecated. Returns the line height.
 float getStringWidth(String text, int lineStartPos, int endPos)
          Deprecated. Calculates the width of a String in the current Graphics context.
 

Field Detail

USE_MAX_CHAR_SIZE

static final String USE_MAX_CHAR_SIZE
Deprecated. This config-key should not be declared here.
See Also:
Constant Field Values

CLIP_TEXT

static final String CLIP_TEXT
Deprecated. This config-key is no longer used.
See Also:
Constant Field Values
Method Detail

getStringWidth

float getStringWidth(String text,
                     int lineStartPos,
                     int endPos)
Deprecated. 
Calculates the width of a String in the current Graphics context.

Parameters:
text - the text.
lineStartPos - the start position of the substring to be measured.
endPos - the position of the last character to be measured.
Returns:
the width of the string in Java2D units.

getLineHeight

float getLineHeight()
Deprecated. 
Returns the line height. This includes the font's ascent, descent and leading.

Returns:
the line height.