gzz.view
Class CellHBox

java.lang.Object
  |
  +--gzz.view.CellHBox
All Implemented Interfaces:
gzz.vob.linebreaking.HBox

public class CellHBox
extends java.lang.Object
implements gzz.vob.linebreaking.HBox

An HBox that contains a cell, using a given CellView.


Nested Class Summary
 
Nested classes inherited from class gzz.vob.linebreaking.HBox
gzz.vob.linebreaking.HBox.Null, gzz.vob.linebreaking.HBox.VobHBox
 
Field Summary
 
Fields inherited from interface gzz.vob.linebreaking.HBox
rcsid, WH_KEY
 
Constructor Summary
CellHBox(Cell cell, CellView view, ViewContext context)
           
 
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.
 int getLength()
          Get this box's length in characters or other units.
 float getWidth(float scale)
           
 float getX(int i, float scale)
          Get the position after a unit (e.g.
 void place(VobScene vs, int coordsys, float scale)
          Place the contents of this box into a given coordsys.
 void setPrev(gzz.vob.linebreaking.HBox b)
          Set the preceding HBox.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellHBox

public CellHBox(Cell cell,
                CellView view,
                ViewContext context)
Method Detail

getWidth

public float getWidth(float scale)
Specified by:
getWidth in interface gzz.vob.linebreaking.HBox

getHeight

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

Specified by:
getHeight in interface gzz.vob.linebreaking.HBox

getDepth

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

Specified by:
getDepth in interface gzz.vob.linebreaking.HBox

getLength

public int getLength()
Description copied from interface: gzz.vob.linebreaking.HBox
Get this box's length in characters or other units. getX(i) is valid for i < getLength().

Specified by:
getLength in interface gzz.vob.linebreaking.HBox

getX

public float getX(int i,
                  float scale)
Description copied from interface: gzz.vob.linebreaking.HBox
Get the position after a unit (e.g. character) inside this HBox.

Specified by:
getX in interface gzz.vob.linebreaking.HBox

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

place

public void place(VobScene vs,
                  int coordsys,
                  float scale)
Description copied from interface: gzz.vob.linebreaking.HBox
Place the contents of this box into a given coordsys. This function may change this HBox and place it into the coordsys: the following is a legal implementation:
	public class FooBox extends Vob implements HBox {
		float scale;
   	...
   	...
		public void place(VobScene vs, int cs, float scale) {
			this.scale = scale;
			vs.map.put(this, cs);
		}
  }
 

Specified by:
place in interface gzz.vob.linebreaking.HBox

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