net.sf.jzeno.echo
Class ZenoLayout

java.lang.Object
  extended by nextapp.echo.AbstractComponent
      extended by nextapp.echo.AbstractPane
          extended by nextapp.echo.ContentPane
              extended by net.sf.jzeno.echo.AbstractLayout
                  extended by net.sf.jzeno.echo.ZenoLayout
All Implemented Interfaces:
java.io.Serializable, PropertyComponent, RebindableComponent, EventSink, Layout, Component

public class ZenoLayout
extends AbstractLayout

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Fields inherited from class nextapp.echo.ContentPane
BACKGROUND_IMAGE_PROPERTIES_CHANGED_PROPERTY, DEFAULT_INSETS, HEIGHT_CHANGED_PROPERTY, HEIGHT_EXTENT_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, INSETS_CHANGED_PROPERTY, SCROLL_BAR_ALWAYS, SCROLL_BAR_AUTO, SCROLL_BAR_NEVER, SCROLL_BAR_POLICY_CHANGED_PROPERTY, SCROLL_BAR_X_CHANGED_PROPERTY, SCROLL_BAR_Y_CHANGED_PROPERTY, STYLE_BACKGROUND_IMAGE, STYLE_BACKGROUND_IMAGE_PROPERTIES, STYLE_HEIGHT, STYLE_HEIGHT_EXTENT, STYLE_HORIZONTAL_ALIGNMENT, STYLE_INSETS, STYLE_SCROLL_BAR_POLICY, STYLE_VERTICAL_ALIGNMENT, STYLE_WIDTH, STYLE_WIDTH_EXTENT, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, WIDTH_CHANGED_PROPERTY, WIDTH_EXTENT_CHANGED_PROPERTY
 
Fields inherited from class nextapp.echo.AbstractPane
PROPORTIONAL, RESIZABLE_CHANGED_PROPERTY, STYLE_RESIZABLE
 
Fields inherited from interface nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, SELECTABLE_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
ZenoLayout()
           
 
Method Summary
 void addOnLoadScriptOnce(java.lang.String javaScriptExecutedOnceOnWindowLoad)
           Often it is handy to send some javascript to the client browser for execution on the onLoad event of the page.
 void applyStyle(Style style)
          Sets stylistic properties of this component based on a Style object.
 Component createHeader(java.lang.String appName)
           
protected  Application getApplication()
           Returns the user's application instance, cast to its specific type.
 Component getContent()
           Retrieves the current content component last set by setContent().
 Font getFont()
           Returns the default font.
 Color getForeground()
           Returns the default text color.
 int getHeaderHeight()
           Gets the height of the header, in pixels.
 Color getTitleBackground()
           Gets the background color for the title.
 Font getTitleFont()
           Returns the font of the title.
 Color getTitleForeground()
           Gets the color of the title text.
 int getTitleOffset()
           
 void reload()
           
 void setContent(Component c)
           When navigating from one screen to another, the application calls EchoSupport.setScreen() (EchoSupport#setScreen(Component)) and this triggers among other things this method on your Layout component.
 void setErrors(java.util.List errorsAfterTranslation)
           Sets the current list of errors.
 void setFont(Font font)
           Sets the default font.
 void setForeground(Color foreground)
           Sets the default text color.
 void setHeaderHeight(int heightInPixels)
           Sets the height of the header, in pixels.
 void setMessages(java.util.List messagesAfterTranslation)
           Sets the current list of messages.
 void setTitleBackground(Color titleBackground)
           Sets the background color for the title.
 void setTitleFont(Font titleFont)
           Sets the font of the title.
 void setTitleForeground(Color titleForeground)
           Sets the color of the title text.
 void setTitleOffset(int heightInPixels)
           
 void setWarnings(java.util.List warningsAfterTranslation)
           Sets the current list of warnings.
 
Methods inherited from class net.sf.jzeno.echo.AbstractLayout
addValidator, clearScrollPosition, getBean, getBeanClass, getDecorator, getNullObject, getProperty, getValidationErrors, getValidators, getValue, isBound, isMarkedInvalid, isReadOnly, isRequired, isValid, loadPersistentState, markInvalid, markValid, preRender, rebind, removeValidator, resetScheduledDowntime, savePersistentState, setBean, setBeanClass, setDecorator, setNullObject, setProperty, setReadOnly, setRequired, setScheduledDowntime, setValue, traceValue
 
Methods inherited from class nextapp.echo.ContentPane
addCssFile, getBackgroundImage, getBackgroundImageProperties, getCssFiles, getHeightExtent, getHorizontalAlignment, getInsets, getScrollBarPolicy, getScrollBarX, getScrollBarY, getVerticalAlignment, getWidthExtent, isCssStyled, isScrollBarPositionModified, setBackgroundImage, setBackgroundImageProperties, setCssStyled, setHeight, setHeightExtent, setHorizontalAlignment, setInsets, setScrollBarPolicy, setScrollBarPositionModified, setScrollBarX, setScrollBarY, setVerticalAlignment, setWidth, setWidthExtent
 
Methods inherited from class nextapp.echo.AbstractPane
getHeight, getWidth, isResizable, setResizable
 
Methods inherited from class nextapp.echo.AbstractComponent
add, add, addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getClientId, getComponent, getComponentCount, getComponents, getEchoInstance, getIdentifier, getListenerList, getLocale, getParent, indexOf, init, isAncestorOf, isDifferent, isEnabled, isFocused, isRecursivelyVisible, isRegistered, isSelectableForScriptRecorder, isShowing, isVisible, processHierarchyEvent, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setClientId, setEnabled, setFocused, setIdentifier, setLocale, setParent, setRegistered, setSelectableForScriptRecorder, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jzeno.echo.Layout
addCssFile, getCssFiles
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ZenoLayout

public ZenoLayout()
Method Detail

reload

public void reload()

getApplication

protected Application getApplication()

Returns the user's application instance, cast to its specific type.


createHeader

public Component createHeader(java.lang.String appName)

setContent

public void setContent(Component c)
Description copied from interface: Layout

When navigating from one screen to another, the application calls EchoSupport.setScreen() (EchoSupport#setScreen(Component)) and this triggers among other things this method on your Layout component. The typical implementation would be to replace a sub component of your Layout with the new content component .

It is important to realize that this new content component is actually the screen that the user code is currently setting with setScreen, so it will typically be an instance of a subclass of the AbstractScreen class.


getContent

public Component getContent()
Description copied from interface: Layout

Retrieves the current content component last set by setContent(). Basically retrieves the Screen that was assigned as current screen to your Layout component.


addOnLoadScriptOnce

public void addOnLoadScriptOnce(java.lang.String javaScriptExecutedOnceOnWindowLoad)
Description copied from interface: Layout

Often it is handy to send some javascript to the client browser for execution on the onLoad event of the page. Examples of this include opening a popup that visualizes a URL outside of the application.

It is important to realize that the script(s) set via the method must only execute in the next rendering of the screen, and not in subsequent renderings.

A convenient way of satisfying this operation is adding an instance of OnLoadScriptOnceComponent.


getFont

public Font getFont()

Returns the default font.

Specified by:
getFont in interface Component
Overrides:
getFont in class AbstractComponent
Returns:
The font of the component.

setFont

public void setFont(Font font)

Sets the default font.

Specified by:
setFont in interface Component
Overrides:
setFont in class AbstractComponent
Parameters:
font - The new font of the component.

getForeground

public Color getForeground()

Returns the default text color.

Specified by:
getForeground in interface Component
Overrides:
getForeground in class AbstractComponent
Returns:
The foreground of the component.

setForeground

public void setForeground(Color foreground)

Sets the default text color.

Specified by:
setForeground in interface Component
Overrides:
setForeground in class AbstractComponent
Parameters:
foreground - The new foreground color of the component.

getTitleFont

public Font getTitleFont()

Returns the font of the title.


setTitleFont

public void setTitleFont(Font titleFont)

Sets the font of the title.


getTitleForeground

public Color getTitleForeground()

Gets the color of the title text.


setTitleForeground

public void setTitleForeground(Color titleForeground)

Sets the color of the title text.


getTitleBackground

public Color getTitleBackground()

Gets the background color for the title.


setTitleBackground

public void setTitleBackground(Color titleBackground)

Sets the background color for the title.


setHeaderHeight

public void setHeaderHeight(int heightInPixels)

Sets the height of the header, in pixels.


getHeaderHeight

public int getHeaderHeight()

Gets the height of the header, in pixels.


setTitleOffset

public void setTitleOffset(int heightInPixels)

getTitleOffset

public int getTitleOffset()

applyStyle

public void applyStyle(Style style)
Description copied from interface: Component
Sets stylistic properties of this component based on a Style object. The version of this method in Component will set foreground and background colors and the font from the style if they are present. Components should override this method if they allow more properties to be set from a style object, and should call super.applyStyle() if necessary.

Specified by:
applyStyle in interface Component
Overrides:
applyStyle in class ContentPane
Parameters:
style - The style object from which to retrieve properties for this Component.
See Also:
Component.applyStyle(Style)

setErrors

public void setErrors(java.util.List errorsAfterTranslation)
Description copied from interface: Layout

Sets the current list of errors. It is your duty to visualize all of the strings in this List to the users. Any i18n translation, parametrization and removing of duplicate messages will have been done for you.


setMessages

public void setMessages(java.util.List messagesAfterTranslation)
Description copied from interface: Layout

Sets the current list of messages. It is your duty to visualize all of the strings in this List to the users. Any i18n translation, parametrization and removing of duplicate messages will have been done for you.


setWarnings

public void setWarnings(java.util.List warningsAfterTranslation)
Description copied from interface: Layout

Sets the current list of warnings. It is your duty to visualize all of the strings in this List to the users. Any i18n translation, parametrization and removing of duplicate messages will have been done for you.