danger.text.span
Interface BaselineShiftSpan

All Superinterfaces:
CharacterHeightAffectingSpan, CharacterSpan, MetricAffectingSpan
All Known Implementing Classes:
BaselineShiftSpan.Standard, BaselineShiftSpan.Subscript, BaselineShiftSpan.Superscript


public interface BaselineShiftSpan
extends CharacterSpan, CharacterHeightAffectingSpan

Implementations of BaselineShiftSpan cause the text baseline to be shifted upward or downward.


Nested Class Summary
static class BaselineShiftSpan.Standard
          Standard implementation of BaselineShiftSpan to shift the baseline by a specified number of pixels.
static class BaselineShiftSpan.Subscript
          Standard implementation of BaselineShiftSpan to create subscript text.
static class BaselineShiftSpan.Superscript
          Standard implementation of BaselineShiftSpan to create superscript text.
 
Field Summary
 
Fields inherited from interface danger.text.span.CharacterHeightAffectingSpan
CHARACTER_HEIGHT_AFFECTING_SPAN_TYPE
 
Method Summary
 int getBaselineShift(Font f)
          Return the baseline shift associated with this span.
 

Method Detail

getBaselineShift

int getBaselineShift(Font f)
Return the baseline shift associated with this span. Negative numbers move the baseline upward; positive numbers move it downward. The font argument is provided so that implementations can return shifts relative to the metrics of the affected text.