Unified Typesetting API M1-20040817

de.inghuimische.uta.typeset
Interface EmbeddingLevel

All Superinterfaces:
Box
All Known Implementing Classes:
SimpleEmbeddingLevel

public interface EmbeddingLevel
extends Box

An embedding level has the purposes to group several items in one box. An embedding level uses its own, internal Cartesian coordinate system. When two embedding levels interact there is always a transformation from one coordinate system into the other.

Note: There's a difference between the normal/reference coordinate system and the global coordinate system. The reference system has the orientation of (1/0) for the x-axis and (0/1) for the y-axis. The global coordinate system has an orientation of (1/0) and (0/-1) respectivley.

Author:
Christian Ziesemer

Field Summary
static Point2D REFERENCE_NEG_X_AXIS
          Orientation of the negative x-axis of the reference coordinate system (-1/0).
static Point2D REFERENCE_NEG_Y_AXIS
          Orientation of the negative y-axis of the reference coordinate system (0/-1).
static Point2D REFERENCE_POS_X_AXIS
          Orientation of the positive x-axis of the reference coordinate system (1/0).
static Point2D REFERENCE_POS_Y_AXIS
          Orientation of the positive y-axis of the reference coordinate system (0/1).
 
Method Summary
 void add(Item anItem)
          Adds an item to this level.
 List getItems()
          Returns the items this embedding level consists of.
 int getOrder()
          Returns the order of the embedding level.
 Point2D getXAxis()
          Returns the orientation of the x-axis of the coordinate system used by this embedding level in relation to the reference coordinate system which has a x-axis of the orientation (1/0).
 Point2D getYAxis()
          Returns the orientation of the y-axis of the coordinate system used by this embedding level in relation to the normal coordinate system which has a y-axis of the orientation (0/1).
 
Methods inherited from interface de.inghuimische.uta.typeset.Box
getAnchors, getAnchorsByClass, getAttributes, getBoundingBox, getShape, getTransformation, setTransformation
 

Field Detail

REFERENCE_POS_X_AXIS

public static final Point2D REFERENCE_POS_X_AXIS
Orientation of the positive x-axis of the reference coordinate system (1/0).


REFERENCE_NEG_X_AXIS

public static final Point2D REFERENCE_NEG_X_AXIS
Orientation of the negative x-axis of the reference coordinate system (-1/0).


REFERENCE_POS_Y_AXIS

public static final Point2D REFERENCE_POS_Y_AXIS
Orientation of the positive y-axis of the reference coordinate system (0/1).


REFERENCE_NEG_Y_AXIS

public static final Point2D REFERENCE_NEG_Y_AXIS
Orientation of the negative y-axis of the reference coordinate system (0/-1).

Method Detail

add

public void add(Item anItem)
Adds an item to this level. Direct or indirect back-references are not allowed.

Note: Boxes contained within the item are added to an embedding level are placed relative to the coordinate system of the embedding level.

Parameters:
anItem - The item to add.

getItems

public List getItems()
Returns the items this embedding level consists of.

Returns:
The items this embedding level consists of.

getXAxis

public Point2D getXAxis()
Returns the orientation of the x-axis of the coordinate system used by this embedding level in relation to the reference coordinate system which has a x-axis of the orientation (1/0). For simplicity the point can only be on of (0/1), (0/-1), (1/0), (-1/0). Note that in any case both axis must form a Cartesian coordinate system. Thus, if you specifiy (1/0) here and (0/1) as y-axis you use the same orientation as the reference system.

Returns:
The orientation of the x-axis of the coordinate system used by this embedding level.
See Also:
REFERENCE_POS_X_AXIS, REFERENCE_NEG_X_AXIS, REFERENCE_POS_Y_AXIS, REFERENCE_NEG_Y_AXIS

getYAxis

public Point2D getYAxis()
Returns the orientation of the y-axis of the coordinate system used by this embedding level in relation to the normal coordinate system which has a y-axis of the orientation (0/1). For simplicity the point can only be on of (0/1), (0/-1), (1/0), (-1/0). Note that in any case both axis must form a Cartesian coordinate system. Thus, if you specifiy (0/1) here and (1/0) as x-axis you use the same orientation as the reference system.

Returns:
The orientation of the y-axis of the coordinate system used by this embedding level.
See Also:
REFERENCE_POS_X_AXIS, REFERENCE_NEG_X_AXIS, REFERENCE_POS_Y_AXIS, REFERENCE_NEG_Y_AXIS

getOrder

public int getOrder()
Returns the order of the embedding level.

Returns:
The order of the embedding level.

Unified Typesetting API M1-20040817


An inghuimische.de project.
Copyright (C) 2004 Christian Ziesemer; See the Mozilla Public License for more details.