net.sf.vex.layout
Class LayoutContext

java.lang.Object
  |
  +--net.sf.vex.layout.LayoutContext

public class LayoutContext
extends java.lang.Object

Encapsulation of all the resources needed to create a box tree. Most operations on a box tree, such as creating the tree, painting the tree, and converting between spatial and model coordinates, require the context.


Constructor Summary
LayoutContext()
          Class constructor.
 
Method Summary
 BoxFactory getBoxFactory()
          Returns the BoxFactory used to generate boxes for the layout.
 Document getDocument()
          Returns the document being layed out.
 java.awt.Graphics getGraphics()
          Returns the Graphics object used for layout.
 int getSelectionEnd()
          Returns the offset where the current selection ends.
 int getSelectionStart()
          Returns the offset where the current selection starts.
 StyleSheet getStyleSheet()
          Returns the StyleSheet used for this layout.
 void setBoxFactory(BoxFactory factory)
          Sets the BoxFactory used to generate boxes for this layout.
 void setDocument(Document document)
          Sets the document being layed out.
 void setGraphics(java.awt.Graphics graphics)
          Sets the Graphics object used for this layout.
 void setSelectionEnd(int i)
          Sets the offset where the current selection ends.
 void setSelectionStart(int i)
          Sets the offset where the current selection starts.
 void setStyleSheet(StyleSheet sheet)
          Sets the stylesheet used for this layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutContext

public LayoutContext()
Class constructor.

Method Detail

getBoxFactory

public BoxFactory getBoxFactory()
Returns the BoxFactory used to generate boxes for the layout.


getDocument

public Document getDocument()
Returns the document being layed out.


getGraphics

public java.awt.Graphics getGraphics()
Returns the Graphics object used for layout. Box paint methods use this graphics for painting.


getStyleSheet

public StyleSheet getStyleSheet()
Returns the StyleSheet used for this layout.


setBoxFactory

public void setBoxFactory(BoxFactory factory)
Sets the BoxFactory used to generate boxes for this layout.


setDocument

public void setDocument(Document document)
Sets the document being layed out.


setGraphics

public void setGraphics(java.awt.Graphics graphics)
Sets the Graphics object used for this layout.


setStyleSheet

public void setStyleSheet(StyleSheet sheet)
Sets the stylesheet used for this layout.


getSelectionEnd

public int getSelectionEnd()
Returns the offset where the current selection ends.


getSelectionStart

public int getSelectionStart()
Returns the offset where the current selection starts.


setSelectionEnd

public void setSelectionEnd(int i)
Sets the offset where the current selection ends.

Parameters:
i - the new value for selectionEnd

setSelectionStart

public void setSelectionStart(int i)
Sets the offset where the current selection starts.

Parameters:
i - the new value for selectionStart