creamtec.webcream.rendering.html
Class RenderContext

java.lang.Object
  extended by creamtec.webcream.rendering.html.RenderContext

public class RenderContext
extends java.lang.Object

Stores the current runtime information about the rendering process. The context is associated with a page and can be used to avoid passing parameters into methods. See individual attributes for more information.


Field Summary
 java.util.HashMap disabledComponents
          A map of components that used to be disabled because browsers do not send data for them and they may become enabled in response to an action
 java.lang.String errorMessage
          The error message that will be rendered at the top of the page
 boolean horizontalFill
          Set if currently rendering horizontal fill of a GridBagLayout
 boolean ignoreBackgroundColor
          Set to ignore rendering colors for components (browser versions 4+)
 boolean ignoreForegroundColor
          Set to ignore rendering colors for components (browser versions 4+)
 boolean isContainerTable
          Set if the component is directly positioned within an HTML table
 int offsetX
          Added to the value of the left coordinate of the rendered components
 int offsetY
          Added to the value of the top coordinate of the rendered components
 boolean positionComponents
          Set if components coordinates are being specified in HTML (browser versions 4+)
 boolean preserveHeight
          If set, the height of components will be preserved in positioned rendering
 boolean preserveWidth
          If set, the width of components will be preserved in positioned rendering
 boolean preserveWidthAndHeight
          If set, the width and height of components will be preserved in positioned rendering
 boolean renderingTableCell
          Set if a table cell is currently being rendered
 boolean tabbedPaneStylesAppended
          Set if the tabbed pane styles were appended to the page
 int tableCol
          If a table is being rendered, specifies the current column
 java.lang.String tableName
          If a table is being rendered, specifies the JTable name
 javax.swing.JTable tableObject
          If a table is being rendered, refers to JTable instance
 int tableRow
          If a table is being rendered, specifies the current row
 int treesRendered
          The number of rendered HTML trees
 boolean treeStylesAppended
          Set if the tree styles were appended to the page
 boolean useComponentNames
          If NOT set (default), component names are generated based on their class and hashCode If set, the name returned by Component.getName() will be used to identify it in HTML
 boolean verticalFill
          Set if currently rendering vertical fill of a GridBagLayout
 
Constructor Summary
RenderContext()
           
 
Method Summary
 java.util.Map getAttributes()
           
 java.awt.Container getRootContainer()
          Returns the root container of the page, such as Window
 void reset()
          Resets the context to the initial pre-rendering state
 void resetFill()
          Resets both fill properties to false
 void setFill(HTMLPage page, boolean horizontal, boolean vertical)
          Sets the fill properties for layout rendering (used for structured rendering)
 void setRootContainer(java.awt.Container container)
          Sets the root container
 boolean wasDisabled(java.lang.Object comp)
          Returns true if the given component was disabled before the rendering began
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

horizontalFill

public boolean horizontalFill
Set if currently rendering horizontal fill of a GridBagLayout


verticalFill

public boolean verticalFill
Set if currently rendering vertical fill of a GridBagLayout


positionComponents

public boolean positionComponents
Set if components coordinates are being specified in HTML (browser versions 4+)


useComponentNames

public boolean useComponentNames
If NOT set (default), component names are generated based on their class and hashCode If set, the name returned by Component.getName() will be used to identify it in HTML


ignoreForegroundColor

public boolean ignoreForegroundColor
Set to ignore rendering colors for components (browser versions 4+)


ignoreBackgroundColor

public boolean ignoreBackgroundColor
Set to ignore rendering colors for components (browser versions 4+)


isContainerTable

public boolean isContainerTable
Set if the component is directly positioned within an HTML table


tabbedPaneStylesAppended

public boolean tabbedPaneStylesAppended
Set if the tabbed pane styles were appended to the page


treeStylesAppended

public boolean treeStylesAppended
Set if the tree styles were appended to the page


preserveWidthAndHeight

public boolean preserveWidthAndHeight
If set, the width and height of components will be preserved in positioned rendering


preserveWidth

public boolean preserveWidth
If set, the width of components will be preserved in positioned rendering


preserveHeight

public boolean preserveHeight
If set, the height of components will be preserved in positioned rendering


renderingTableCell

public boolean renderingTableCell
Set if a table cell is currently being rendered


tableObject

public javax.swing.JTable tableObject
If a table is being rendered, refers to JTable instance


tableRow

public int tableRow
If a table is being rendered, specifies the current row


tableCol

public int tableCol
If a table is being rendered, specifies the current column


tableName

public java.lang.String tableName
If a table is being rendered, specifies the JTable name


offsetX

public int offsetX
Added to the value of the left coordinate of the rendered components


offsetY

public int offsetY
Added to the value of the top coordinate of the rendered components


treesRendered

public int treesRendered
The number of rendered HTML trees


errorMessage

public java.lang.String errorMessage
The error message that will be rendered at the top of the page


disabledComponents

public java.util.HashMap disabledComponents
A map of components that used to be disabled because browsers do not send data for them and they may become enabled in response to an action

Constructor Detail

RenderContext

public RenderContext()
Method Detail

getAttributes

public java.util.Map getAttributes()

reset

public void reset()
Resets the context to the initial pre-rendering state


getRootContainer

public java.awt.Container getRootContainer()
Returns the root container of the page, such as Window

Returns:
root container

setRootContainer

public void setRootContainer(java.awt.Container container)
Sets the root container

Parameters:
container - root container

setFill

public void setFill(HTMLPage page,
                    boolean horizontal,
                    boolean vertical)
Sets the fill properties for layout rendering (used for structured rendering)

Parameters:
page - HTMLPage
horizontal - fill
vertical - fill

resetFill

public void resetFill()
Resets both fill properties to false


wasDisabled

public boolean wasDisabled(java.lang.Object comp)
Returns true if the given component was disabled before the rendering began

Parameters:
comp - component
Returns:
true if was disabled


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