gzz.vob.buoy
Class BuoyAnchor

java.lang.Object
  |
  +--gzz.vob.Vob
        |
        +--gzz.vob.linebreaking.HBox.VobHBox
              |
              +--gzz.vob.buoy.BuoyAnchor
All Implemented Interfaces:
gzz.vob.linebreaking.HBox

public class BuoyAnchor
extends gzz.vob.linebreaking.HBox.VobHBox

An endpoint that a buoy con be anchored to.


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
static boolean dbg
           
 
Fields inherited from class gzz.vob.linebreaking.HBox.VobHBox
scale
 
Fields inherited from class gzz.vob.Vob
rcsid
 
Fields inherited from interface gzz.vob.linebreaking.HBox
rcsid, WH_KEY
 
Constructor Summary
BuoyAnchor(TextStyle style, boolean marked, BuoyPlacer placer, BuoyPlacer.Buoy buoy)
           
 
Method Summary
 float getDepth(float scale)
          Get the descent of the hbox from the baseline upwards.
 float getHeight(float scale)
          Get the ascent of the hbox from the baseline upwards.
 java.lang.Object getKey()
          The key for this HBox.
 float getWidth(float scale)
           
 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 setPosition(int depth, int x, int y, int w, int h)
           
 void setPrev(gzz.vob.linebreaking.HBox b)
          Set the preceding HBox.
 
Methods inherited from class gzz.vob.linebreaking.HBox.VobHBox
getLength, getScale, getX, place
 
Methods inherited from class gzz.vob.Vob
addToListGL, addToListGL, intersect, putGL, putGL, putGL, putGL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbg

public static boolean dbg
Constructor Detail

BuoyAnchor

public BuoyAnchor(TextStyle style,
                  boolean marked,
                  BuoyPlacer placer,
                  BuoyPlacer.Buoy buoy)
Method Detail

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.linebreaking.HBox.VobHBox

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.

Specified by:
render in class Vob
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

getWidth

public float getWidth(float scale)

getHeight

public float getHeight(float scale)
Description copied from interface: gzz.vob.linebreaking.HBox
Get the ascent of the hbox from the baseline upwards.


getDepth

public float getDepth(float scale)
Description copied from interface: gzz.vob.linebreaking.HBox
Get the descent of the hbox from the baseline upwards.


setPrev

public void setPrev(gzz.vob.linebreaking.HBox b)
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.linebreaking.HBox.VobHBox

setPosition

public void setPosition(int depth,
                        int x,
                        int y,
                        int w,
                        int h)
Overrides:
setPosition in class gzz.vob.linebreaking.HBox.VobHBox