gzz.client.awt
Class TextSpanVob

java.lang.Object
  |
  +--gzz.vob.Vob
        |
        +--gzz.vob.linebreaking.HBox.VobHBox
              |
              +--gzz.vob.vobs.TextVob
                    |
                    +--gzz.client.awt.TextSpanVob
All Implemented Interfaces:
gzz.vob.linebreaking.HBox, SpanVob

public class TextSpanVob
extends gzz.vob.vobs.TextVob
implements SpanVob

A vob which shows a single span of text. XXX Prev/Next


Nested Class Summary
 
Nested classes inherited from class gzz.vob.Vob
Vob.RenderInfo
 
Nested classes inherited from class gzz.vob.linebreaking.HBox
gzz.vob.linebreaking.HBox.Null, gzz.vob.linebreaking.HBox.VobHBox
 
Field Summary
protected  TextSpanVob next
           
protected  TextSpanVob prev
           
protected  TextSpan span
           
protected  gzz.vob.vobs.TextCursorVob tcv
           
 
Fields inherited from class gzz.vob.vobs.TextVob
baselined, dbg, key, style, text, textColor
 
Fields inherited from class gzz.vob.linebreaking.HBox.VobHBox
scale
 
Fields inherited from class gzz.vob.Vob
rcsid
 
Fields inherited from interface gzz.client.SpanVob
rcsid
 
Fields inherited from interface gzz.vob.linebreaking.HBox
rcsid, WH_KEY
 
Constructor Summary
TextSpanVob(TextSpan span, TextStyle style)
           
TextSpanVob(TextSpan span, TextStyle style, int cursorOffset)
           
 
Method Summary
static void addToChain(gzz.vob.linebreaking.LinebreakableChain ch, TextSpan span, TextStyle style, gzz.vob.linebreaking.LinebreakableChain.GlueStyle gs)
           
static void addToChain(gzz.vob.linebreaking.LinebreakableChain ch, TextSpan span, TextStyle style, gzz.vob.linebreaking.LinebreakableChain.GlueStyle gs, int cursorOffset)
           
 java.lang.Object getKey()
          The key for this HBox.
 SpanVob getPart(Span subspan)
          Get the part of this vob corresponding to subspan.
 void getPartCoords(int x, int y, int w, int h, Span subspan, java.awt.Rectangle write)
          Get the coordinates of the part of this vob corresponding to subspan.
 Span getSpan()
          Get the span associated with this vob.
 void render(java.awt.Graphics g, boolean fast, Vob.RenderInfo info1, Vob.RenderInfo info2)
          Renders this vob at the given screen coordinates and in given size.
 void setPrev(gzz.vob.linebreaking.HBox h)
          Set the preceding HBox.
 
Methods inherited from class gzz.vob.vobs.TextVob
getDepth, getHeight, getLength, getScale, getStartCode, getStopCode, getText, getTextStyle, getWidth, getX, putGL, setPosition, toString
 
Methods inherited from class gzz.vob.linebreaking.HBox.VobHBox
place
 
Methods inherited from class gzz.vob.Vob
addToListGL, addToListGL, intersect, putGL, putGL, putGL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

span

protected final TextSpan span

prev

protected TextSpanVob prev

next

protected TextSpanVob next

tcv

protected gzz.vob.vobs.TextCursorVob tcv
Constructor Detail

TextSpanVob

public TextSpanVob(TextSpan span,
                   TextStyle style)

TextSpanVob

public TextSpanVob(TextSpan span,
                   TextStyle style,
                   int cursorOffset)
Method Detail

getSpan

public Span getSpan()
Description copied from interface: SpanVob
Get the span associated with this vob.

Specified by:
getSpan in interface SpanVob

getKey

public java.lang.Object getKey()
Description copied from interface: gzz.vob.linebreaking.HBox
The key for this HBox. XXX

Specified by:
getKey in interface gzz.vob.linebreaking.HBox
Overrides:
getKey in class gzz.vob.vobs.TextVob

getPart

public SpanVob getPart(Span subspan)
Description copied from interface: SpanVob
Get the part of this vob corresponding to subspan. subspan must be wholly contained in what getSpan() returns.

Specified by:
getPart in interface SpanVob

getPartCoords

public void getPartCoords(int x,
                          int y,
                          int w,
                          int h,
                          Span subspan,
                          java.awt.Rectangle write)
Description copied from interface: SpanVob
Get the coordinates of the part of this vob corresponding to subspan. x, y, w and h are the coordinates of this span as a whole.

subspan must be wholly contained in what getSpan() returns.

Specified by:
getPartCoords in interface SpanVob
Parameters:
write - An existing rectangle object to write the coords into.

setPrev

public void setPrev(gzz.vob.linebreaking.HBox h)
Description copied from interface: gzz.vob.linebreaking.HBox
Set the preceding HBox. This is useful for beaming where shared sequences should be truly shared.

Specified by:
setPrev in interface gzz.vob.linebreaking.HBox
Overrides:
setPrev in class gzz.vob.vobs.TextVob

render

public void render(java.awt.Graphics g,
                   boolean fast,
                   Vob.RenderInfo info1,
                   Vob.RenderInfo info2)
Description copied from class: Vob
Renders this vob at the given screen coordinates and in given size.

Overrides:
render in class gzz.vob.vobs.TextVob
Parameters:
g - The graphics context to draw into The color should already be set to the default foreground color, mixed by the caller.
fast - Whether to draw quickly (true) or beautifully (false)
info1 - General parameters and coordinate systems of cs1
info2 - General parameters and coordinate systems of cs2
See Also:
VobPlacer#put(Vob vob, int depth, int x, int y, int w, int h), Vob.RenderInfo

addToChain

public static void addToChain(gzz.vob.linebreaking.LinebreakableChain ch,
                              TextSpan span,
                              TextStyle style,
                              gzz.vob.linebreaking.LinebreakableChain.GlueStyle gs)

addToChain

public static void addToChain(gzz.vob.linebreaking.LinebreakableChain ch,
                              TextSpan span,
                              TextStyle style,
                              gzz.vob.linebreaking.LinebreakableChain.GlueStyle gs,
                              int cursorOffset)