info.informatica.doc.style.css.visual
Class CSSBoxFactory

java.lang.Object
  extended by info.informatica.doc.style.css.visual.CSSBoxFactory

public class CSSBoxFactory
extends Object

Factory for CSS boxes.

Author:
Carlos Amengual (amengual at informatica.info)

Constructor Summary
CSSBoxFactory()
           
 
Method Summary
 CSSBox create(CSS2ComputedProperties style)
          Creates a box of the appropriate type according to CSS box model.
 CSSContainerBox createBlockBox(CSS2ComputedProperties style)
           
 CSSInlineBox createInlineBox(CSS2ComputedProperties style)
           
 CSSContainerBox createInlineTableBox(CSS2ComputedProperties style)
           
 CSSContainerBox createListItemBox(CSS2ComputedProperties style)
           
 CSSBox createRunInBox(CSS2ComputedProperties style)
           
 CSSContainerBox createTableBox(CSS2ComputedProperties style)
           
 CSSTableCellBox createTableCellBox(CSS2ComputedProperties style)
           
 CSSTableRowBox createTableRowBox(CSS2ComputedProperties style)
           
 CSSErrorHandler getErrorHandler()
          Gets the error handler.
 void setErrorHandler(CSSErrorHandler errorHandler)
          Sets the error handler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSSBoxFactory

public CSSBoxFactory()
Method Detail

getErrorHandler

public CSSErrorHandler getErrorHandler()
Gets the error handler.

Returns:
the CSS error handler.

setErrorHandler

public void setErrorHandler(CSSErrorHandler errorHandler)
Sets the error handler.

Parameters:
errorHandler - the CSS error handler.

create

public CSSBox create(CSS2ComputedProperties style)
              throws CSSStyleException
Creates a box of the appropriate type according to CSS box model.

Note that table sub-elements are not generated here.

Parameters:
style - the computed style that applies to the box.
Returns:
the generated box, or null if the element generates no box (display: none).
Throws:
CSSStyleException - if an error occurs generating the box.

createInlineBox

public CSSInlineBox createInlineBox(CSS2ComputedProperties style)

createBlockBox

public CSSContainerBox createBlockBox(CSS2ComputedProperties style)

createListItemBox

public CSSContainerBox createListItemBox(CSS2ComputedProperties style)

createRunInBox

public CSSBox createRunInBox(CSS2ComputedProperties style)

createTableBox

public CSSContainerBox createTableBox(CSS2ComputedProperties style)

createInlineTableBox

public CSSContainerBox createInlineTableBox(CSS2ComputedProperties style)

createTableRowBox

public CSSTableRowBox createTableRowBox(CSS2ComputedProperties style)

createTableCellBox

public CSSTableCellBox createTableCellBox(CSS2ComputedProperties style)


Copyright © 2011 informatica.info. All Rights Reserved.