creamtec.webcream.rendering.html.positioned
Class PositionedPageRenderer

java.lang.Object
  extended by creamtec.webcream.rendering.AbstractDocumentRenderer
      extended by creamtec.webcream.rendering.html.HTMLPageRenderer
          extended by creamtec.webcream.rendering.html.positioned.PositionedPageRenderer
All Implemented Interfaces:
ComponentRenderer, DocumentRenderer

public class PositionedPageRenderer
extends HTMLPageRenderer

Implements positioned rendering, where instead of following container layouts the components are rendered into HTML with the fixed coordinates using CSS2 style property.


Field Summary
 
Fields inherited from class creamtec.webcream.rendering.AbstractDocumentRenderer
dummyField1, LIMIT_MODE
 
Constructor Summary
PositionedPageRenderer()
           
 
Method Summary
 void appendClippingClause(HTMLPage page, java.awt.Component comp)
          Appends the clipping clause to component style
 void appendComponentStyle(HTMLPage page, java.lang.Object obj, boolean renderingStyle)
          Appends component style to the given page.
 void appendWidthHeight(java.awt.Component comp, HTMLPage page, java.awt.Rectangle rect)
           
 Document createDocument()
          Overrides to create a positioned HTML page
 java.awt.Rectangle getComponentRect(HTMLPage page, java.awt.Component comp)
          Returns the component rectangle
 java.lang.String getCssClassName(java.awt.Component comp, HTMLPage page)
           
 javax.swing.border.TitledBorder getTitledBorder(HTMLPage page, java.awt.Container container)
           
 boolean hasBorder(java.awt.Component comp)
           
 boolean needsClipping(java.awt.Component comp)
          Returns true if the component requires a clipping clause in style
 boolean needsScrollbars(java.awt.Component comp)
          Returns true if the component requires scrollbars
 void renderContainer(HTMLPage page, java.awt.Container container)
          Renders a container into the page using fixed positioning.
 
Methods inherited from class creamtec.webcream.rendering.html.HTMLPageRenderer
afterRenderComponent, afterRenderComponent, appendHeader, appendStyleSheet, beforeRenderComponent, beforeRenderComponent, findTitledBorder, getDeflatedHeight, getDeflatedWidth, getInflatedHeight, getInflatedWidth, getTitleForComponent, renderComponent, renderContainer, renderDocument
 
Methods inherited from class creamtec.webcream.rendering.AbstractDocumentRenderer
getCustomComponentRenderer, getDefaultJComponentRenderer, knownContainer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionedPageRenderer

public PositionedPageRenderer()
Method Detail

renderContainer

public void renderContainer(HTMLPage page,
                            java.awt.Container container)
                     throws java.lang.Exception
Renders a container into the page using fixed positioning.

Specified by:
renderContainer in class HTMLPageRenderer
Parameters:
page - HTMLPage
container - Container
Throws:
java.lang.Exception

createDocument

public Document createDocument()
                        throws java.lang.Exception
Overrides to create a positioned HTML page

Overrides:
createDocument in class HTMLPageRenderer
Returns:
Document
Throws:
java.lang.Exception

appendComponentStyle

public void appendComponentStyle(HTMLPage page,
                                 java.lang.Object obj,
                                 boolean renderingStyle)
Appends component style to the given page. The style includes properties such as the left, top, width, height and the scrolling parameters.

Overrides:
appendComponentStyle in class HTMLPageRenderer
Parameters:
page - HTMLPage
obj - component
renderingStyle - if false, this method will append " style=" string, otherwise it will just append style attributes.

hasBorder

public boolean hasBorder(java.awt.Component comp)

getCssClassName

public java.lang.String getCssClassName(java.awt.Component comp,
                                        HTMLPage page)

appendWidthHeight

public void appendWidthHeight(java.awt.Component comp,
                              HTMLPage page,
                              java.awt.Rectangle rect)

needsClipping

public boolean needsClipping(java.awt.Component comp)
Returns true if the component requires a clipping clause in style

Parameters:
comp - Component
Returns:
true if clipping is required

needsScrollbars

public boolean needsScrollbars(java.awt.Component comp)
Returns true if the component requires scrollbars

Parameters:
comp - Component
Returns:
true if scrollbars are required

getComponentRect

public java.awt.Rectangle getComponentRect(HTMLPage page,
                                           java.awt.Component comp)
Returns the component rectangle

Overrides:
getComponentRect in class HTMLPageRenderer
Parameters:
page - HTMLPage
comp - Component
Returns:
Rectangle

appendClippingClause

public void appendClippingClause(HTMLPage page,
                                 java.awt.Component comp)
Appends the clipping clause to component style

Overrides:
appendClippingClause in class HTMLPageRenderer
Parameters:
page - HTMLPage
comp - Component

getTitledBorder

public javax.swing.border.TitledBorder getTitledBorder(HTMLPage page,
                                                       java.awt.Container container)


Copyright © 2000-2006 CreamTec LLC. All Rights Reserved.