WUI : API


org.westofj.wui
Class WPage

java.lang.Object
  extended byorg.westofj.wui.WPage
Direct Known Subclasses:
WExternalPage

public class WPage
extends Object

The top level of a widget hierarchy.

Version:
$Revision: 1.6 $, $Date: 2004/05/03 00:49:24 $
Author:
bill

Constructor Summary
WPage()
          Constructs a page.
WPage(String title)
          Constructs a page with the specified title.
WPage(WDisplayable title)
          Constructs a page with the specified title.
 
Method Summary
 WRenderContext getContext()
          Returns the render context of the page.
 int getMargin()
          Returns the margin scalar value;
 WLengthUnit getMarginUnit()
          Returns the margin unit type.
 WRunner getRunner()
          Returns the current runner context.
 WDisplayable getTitle()
          Returns the title of the page.
 Widget getWidget()
          Returns the root widget of the widget hierarchy.
 void render(WRunner runner, PrintWriter out)
          Renders the page to the display.
 void setContext(WRenderContext context)
          Sets the render context of the page.
 void setMargin(int margin)
          Sets the margin scalar value.
 void setMargin(int margin, WLengthUnit marginUnit)
          Sets the margin.
 void setMarginUnit(WLengthUnit marginUnit)
          Sets the margin unit type.
 void setTitle(String title)
          Sets the title of the page.
 void setTitle(WDisplayable title)
          Sets the title of the page.
 void setWidget(Widget widget)
          Sets the root widget of the widget hierarchy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WPage

public WPage()
Constructs a page.


WPage

public WPage(String title)
Constructs a page with the specified title.

Parameters:
title - the title of the page.

WPage

public WPage(WDisplayable title)
Constructs a page with the specified title.

Parameters:
title - the title of the page.
Method Detail

getContext

public WRenderContext getContext()
Returns the render context of the page.

Returns:
Returns the render context.

setContext

public void setContext(WRenderContext context)
Sets the render context of the page.

Parameters:
context - The context to set.

getMargin

public int getMargin()
Returns the margin scalar value;

Returns:
Returns the margin scalar value.

getMarginUnit

public WLengthUnit getMarginUnit()
Returns the margin unit type.

Returns:
Returns the margin unit type.

getRunner

public final WRunner getRunner()
Returns the current runner context.

Returns:
WRunner the current runner context.

getTitle

public WDisplayable getTitle()
Returns the title of the page.

Returns:
WDisplayable the title of the page.

getWidget

public Widget getWidget()
Returns the root widget of the widget hierarchy.

Returns:
Widget the root widget of the pages widget hierarchy.

render

public void render(WRunner runner,
                   PrintWriter out)
            throws WRenderException
Renders the page to the display.

Parameters:
runner - the current runner context.
out - the output print writer.
Throws:
WRenderException

setMargin

public void setMargin(int margin)
Sets the margin scalar value.

Parameters:
margin - the margin scalar value.

setMargin

public void setMargin(int margin,
                      WLengthUnit marginUnit)
Sets the margin.

Parameters:
margin - the margin scalar value.
marginUnit - the margin unit type.

setMarginUnit

public void setMarginUnit(WLengthUnit marginUnit)
Sets the margin unit type. param marginUnit the margin unit type.


setTitle

public void setTitle(String title)
Sets the title of the page.

Parameters:
title - the title of the page.

setTitle

public void setTitle(WDisplayable title)
Sets the title of the page.

Parameters:
title - the title of the page.

setWidget

public void setWidget(Widget widget)
Sets the root widget of the widget hierarchy.

Parameters:
widget - the root widget of the widget hierarchy.

Copyright (c) 2003 West of J - All rights reserved.