danger.text.span
Class StripeSpan

java.lang.Object
  extended by danger.text.span.StripeSpan
All Implemented Interfaces:
LeftMarginSpan, MetricAffectingSpan, ParagraphSpan


public class StripeSpan
extends Object
implements LeftMarginSpan

StripeSpan is a LeftMarginSpan that draws a blue stripe down the left margin, as is a common convention for quoted text in mail.


Nested Class Summary
 
Nested classes/interfaces inherited from interface danger.text.span.LeftMarginSpan
LeftMarginSpan.Standard
 
Nested classes/interfaces inherited from interface danger.text.span.ParagraphSpan
ParagraphSpan.Set
 
Field Summary
 
Fields inherited from interface danger.text.span.ParagraphSpan
PARAGRAPH_SPAN_TYPE
 
Constructor Summary
StripeSpan()
           
 
Method Summary
 int drawLeftMargin(Pen p, int x, int top, int baseline, int bottom, Object[] spans, CharSequence text, int parStart, int lineStart, int paragraphDistance, Object[] characterSpans)
          Draw the blue stripe.
 int modifyLeftMargin(int margin, Object[] spans, Font f, CharSequence text, int parStart, int lineStart, int paragraphDistance)
          Return the amount of space occupied by the blue stripe.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StripeSpan

public StripeSpan()
Method Detail

modifyLeftMargin

public int modifyLeftMargin(int margin,
                            Object[] spans,
                            Font f,
                            CharSequence text,
                            int parStart,
                            int lineStart,
                            int paragraphDistance)
Return the amount of space occupied by the blue stripe.

Specified by:
modifyLeftMargin in interface LeftMarginSpan

drawLeftMargin

public int drawLeftMargin(Pen p,
                          int x,
                          int top,
                          int baseline,
                          int bottom,
                          Object[] spans,
                          CharSequence text,
                          int parStart,
                          int lineStart,
                          int paragraphDistance,
                          Object[] characterSpans)
Draw the blue stripe.

Specified by:
drawLeftMargin in interface LeftMarginSpan