edu.washington.cs.supple.wlib.html
Interface HtmlWidget

All Superinterfaces:
java.lang.Cloneable, Widget
All Known Implementing Classes:
ContainerHtmlWidget, SimpleHtmlWidget

public interface HtmlWidget
extends Widget

Author:
kgajos Common interface for all HTML widgets

Field Summary
 
Fields inherited from interface edu.washington.cs.supple.render.Widget
MAX_HINT, NO_BORDER, NO_NAME, TOP_LEVEL_WIDGET
 
Method Summary
 HtmlView doAction(java.lang.String name)
          This method is called when a user clicks an html button.
 java.lang.String getHtmlComponent(int hints)
          Produces HTML code for that instance of the widget
 java.lang.String getHtmlId()
          Get the unique id used to identify this widget within an HTML document.
 void setParameterValue(java.lang.String name, java.lang.String value)
          This method is called in response to a user changing widget values.
 
Methods inherited from interface edu.washington.cs.supple.render.Widget
childIterator, clone, clone, disengage, engage, getBag, getConcreteWidget, getConcreteWidget, getCost, getEffortEstimate, getPath, getSize, getSizeCache, getTextLabel, getType, getUiObject, getWidgetDescriptor, getWidgetProperties, hasChildren, isEngaged, isEquivalent, setBag, setCost, setEnabled, setParent, setSizeCache, setWrapper, unwrapWidget
 

Method Detail

getHtmlId

public java.lang.String getHtmlId()
Get the unique id used to identify this widget within an HTML document.


getHtmlComponent

public java.lang.String getHtmlComponent(int hints)
Produces HTML code for that instance of the widget

Parameters:
hints - rendering hints
Returns:
the HTML code

setParameterValue

public void setParameterValue(java.lang.String name,
                              java.lang.String value)
                       throws java.lang.IllegalArgumentException
This method is called in response to a user changing widget values.

Parameters:
name - Name of the parameter
value - the value passed back
Throws:
java.lang.IllegalArgumentException - thrown if the value could not be accepted for some reason

doAction

public HtmlView doAction(java.lang.String name)
                  throws java.lang.IllegalArgumentException
This method is called when a user clicks an html button.

Returns:
returns the new view associated with the given action, or null (if no view was created)
Throws:
java.lang.IllegalArgumentException