ZenMagick 0.9.6


org.zenmagick.widgets.ZMWidget

Class ZMWidget

ZMObject
|
+--ZMWidget

public abstract class ZMWidget
extends ZMObject

Widget base class.

Widgets are simple UI element container. They have some basic meta data (title, description) and can either be enabled or disabled.

Depending on the nature of the widgets, subclasses might implement custom properties as needed.

Since widgets are used in the context of an HTML page, the render() method is expected to return valid HTML that will display the widget.

Author:
DerManoMann
Version:
$Id: ZMWidget.php 1966 2009-02-14 10:52:50Z dermanomann $

Fields inherited from org.zenmagick.ZMObject
properties_
Constructor Summary

ZMWidget()

Create new instance.

Method Summary
string

getDescription()

Get the description.

string

getTitle()

Get the title.

boolean

isEnabled()

Check if this widget is enabled.

abstract string

render()

Get the HTML to render this widget.

void

setDescription(string description)

Set the description.

void

setEnabled(boolean enabled)

Controls whether this widget is enabled or not.

void

setTitle(string title)

Set the title.

Methods inherited from org.zenmagick.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

ZMWidget

public ZMWidget()

Create new instance. /


Method Detail

getDescription

public string getDescription()

Get the description.

Returns:
The description.

getTitle

public string getTitle()

Get the title.

Returns:
The title.

isEnabled

public boolean isEnabled()

Check if this widget is enabled.

Returns:
The enabled state.

render

public abstract string render()

Get the HTML to render this widget.

Returns:
The HTML.

setDescription

public void setDescription(string description)

Set the description.

Parameters:
description - The description.

setEnabled

public void setEnabled(boolean enabled)

Controls whether this widget is enabled or not.

Parameters:
enabled - The enabled state.

setTitle

public void setTitle(string title)

Set the title.

Parameters:
title - The title.

ZenMagick 0.9.6