|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcreamtec.webcream.rendering.AbstractDocumentRenderer
creamtec.webcream.rendering.html.HTMLPageRenderer
public abstract class HTMLPageRenderer
Contains logic that creates HTML page from parts such as the header and the body.
| Field Summary |
|---|
| Fields inherited from class creamtec.webcream.rendering.AbstractDocumentRenderer |
|---|
dummyField1, LIMIT_MODE |
| Constructor Summary | |
|---|---|
HTMLPageRenderer()
|
|
| Method Summary | |
|---|---|
void |
afterRenderComponent(Document page,
java.lang.Object obj)
Callback method invoked after rendering a component. |
void |
afterRenderComponent(HTMLPage page,
java.lang.Object obj)
Callback method invoked after rendering a component |
void |
appendClippingClause(HTMLPage page,
java.awt.Component comp)
Should be overriden to get clipping style clause of component in the positioning page renderers. |
void |
appendComponentStyle(HTMLPage page,
java.lang.Object obj,
boolean renderingStyle)
Can be overridden to add styles to compoents |
void |
appendHeader(HTMLPage page,
java.awt.Window window)
Appends page header which contains the title and a link to the stylesheet |
void |
appendStyleSheet(HTMLPage page)
Appends stylesheet link depending on the page theme and the agent's browser |
void |
beforeRenderComponent(Document page,
java.lang.Object obj)
Callback method invoked before rendering a component. |
void |
beforeRenderComponent(HTMLPage page,
java.lang.Object obj)
Callback method invoked before rendering a component |
Document |
createDocument()
Creates a new HTML page |
javax.swing.border.TitledBorder |
findTitledBorder(javax.swing.border.Border border)
Finds a titled border in the tree identified by the border (can be compound border) |
java.awt.Rectangle |
getComponentRect(HTMLPage page,
java.awt.Component comp)
Should be overriden to get rectangle of component in the positioning page renderers. |
int |
getDeflatedHeight(int height)
Returns the height decreased by configured percentage (see application property html.inflate.height). |
int |
getDeflatedWidth(int width)
Returns the width decreased by configured percentage (see application property html.inflate.width). |
int |
getInflatedHeight(int height)
Returns the height increased by configured percentage (see application property html.inflate.height). |
int |
getInflatedWidth(int width)
Returns the width increased by configured percentage (see application property html.inflate.width). |
static java.lang.String |
getTitleForComponent(java.awt.Component comp)
Extracts the title from the component depending on the component type |
void |
renderComponent(Document document,
java.lang.Object component)
Facade method for rendering a component into the document. |
void |
renderContainer(Document document,
java.awt.Container container)
Helper method that forwards to renderContainer(HTMLPage, Container) |
abstract void |
renderContainer(HTMLPage page,
java.awt.Container container)
Must be overridden by subclasses to actually insert the logic of rendering |
Document |
renderDocument(ClientAgent agent,
java.awt.Window window)
Overrides AbstractDocumentRenderer implementation to render the given window as HTML page. |
| 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 |
|---|
public HTMLPageRenderer()
| Method Detail |
|---|
public Document renderDocument(ClientAgent agent,
java.awt.Window window)
throws java.lang.Exception
agent - an agent representing a client to WebCream applicationwindow - java.awt.Window or a subclass to be rendered
java.lang.Exception
public void appendHeader(HTMLPage page,
java.awt.Window window)
public void appendStyleSheet(HTMLPage page)
public static java.lang.String getTitleForComponent(java.awt.Component comp)
public javax.swing.border.TitledBorder findTitledBorder(javax.swing.border.Border border)
border - Border
public int getInflatedWidth(int width)
width - the original width
public int getInflatedHeight(int height)
height - the original height
public int getDeflatedWidth(int width)
width - the original width
public int getDeflatedHeight(int height)
height - the original height
public void renderContainer(Document document,
java.awt.Container container)
throws java.lang.Exception
renderContainer in class AbstractDocumentRendererjava.lang.Exception
public abstract void renderContainer(HTMLPage page,
java.awt.Container container)
throws java.lang.Exception
java.lang.Exception
public void beforeRenderComponent(Document page,
java.lang.Object obj)
beforeRenderComponent in class AbstractDocumentRenderer
public void afterRenderComponent(Document page,
java.lang.Object obj)
afterRenderComponent in class AbstractDocumentRenderer
public void beforeRenderComponent(HTMLPage page,
java.lang.Object obj)
public void afterRenderComponent(HTMLPage page,
java.lang.Object obj)
public void appendComponentStyle(HTMLPage page,
java.lang.Object obj,
boolean renderingStyle)
public java.awt.Rectangle getComponentRect(HTMLPage page,
java.awt.Component comp)
public void appendClippingClause(HTMLPage page,
java.awt.Component comp)
public Document createDocument()
throws java.lang.Exception
createDocument in class AbstractDocumentRendererjava.lang.Exception
public void renderComponent(Document document,
java.lang.Object component)
throws java.lang.Exception
renderComponent in interface ComponentRendererrenderComponent in class AbstractDocumentRendererdocument - such as HTML page that is being renderedcomponent - GUI component that needs to be rendered. Can be subclasses of java.awt.Component
or other components such as JMenuItem
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||