Interface PaintTarget

This interface defines the methods for painting XML to the UIDL stream.

Synopsis

Since

3.0

Inheritance Path.  com.itmill.toolkit.terminal.PaintTarget

addAttribute(String, boolean)

Parameters

name

Attribute name

value

Attribute value

return

this object

Adds a boolean attribute to component. Atributes must be added before any content is written.

addAttribute(String, int)

Parameters

name

Attribute name

value

Attribute value

return

this object

Adds a integer attribute to component. Atributes must be added before any content is written.

addAttribute(String, long)

Parameters

name

Attribute name

value

Attribute value

return

this object

Adds a long attribute to component. Atributes must be added before any content is written.

addAttribute(String, Resource)

Parameters

name

Attribute name

value

Attribute value

return

this object

Adds a resource attribute to component. Atributes must be added before any content is written.

addAttribute(String, String)

Parameters

name

Boolean attribute name

value

Boolean attribute value

return

this object

Adds a string attribute to component. Atributes must be added before any content is written.

addCharacterData(String)

Parameters

text

Character data to add

Since

3.1

Add CDATA node to target UIDL-tree.

addSection(String, String)

Print single XMLsection. Prints full XML section. The section data is escaped from XML tags and surrounded by XML start and end-tags.

addText(String)

Parameters

text

Text to add

Add text node. All the contents of the text are XML-escaped.

addUIDL(String)

Add UIDL directly. The UIDL must be valid in accordance with the UIDL.dtd

addUploadStreamVariable(VariableOwner, String)

Parameters

owner

Listener for variable changes

name

Variable name

value

Variable initial value

return

Reference to this.

Add a upload stream type variable.

addVariable(VariableOwner, String, boolean)

Parameters

owner

Listener for variable changes

name

Variable name

value

Variable initial value

return

Reference to this.

Add a boolean type variable.

addVariable(VariableOwner, String, int)

Parameters

owner

Listener for variable changes

name

Variable name

value

Variable initial value

return

Reference to this.

Add a int type variable.

addVariable(VariableOwner, String, String)

Parameters

owner

Listener for variable changes

name

Variable name

value

Variable initial value

return

Reference to this.

Add a string type variable.

addVariable(VariableOwner, String, String[])

Parameters

owner

Listener for variable changes

name

Variable name

value

Variable initial value

return

Reference to this.

Add a string array type variable.

addXMLSection(String, String, String)

Print single XML section. Prints full XML section. The section data must be XML and it is surrounded by XML start and end-tags.

endTag(String)

Parameters

tag

The name of the end tag

Exceptions

IOException

The writing failed due to input/output error

Print element end tag. If the parent tag is closed before every child tag is closed an PaintException is raised.

startTag(Paintable, String)

Parameters

paintable

The paintable to start

tagName

The name of the start tag

return

true if paintable found in cache, false otherwise.

See Also
startTag(java.lang.String)
Since

3.1

Print element start tag of a paintable section. Starts a paintable section using the given tag. The PaintTarget may implement a caching scheme, that checks the paintable has actually changed or can a cached version be used instead. This method should call the startTag method. If the Paintable is found in cache and this function returns true it may omit the content and close the tag, in which case cached content should be used.

startTag(String)

Parameters

tagName

The name of the start tag

Print element start tag.

Todo:
 Checking of input values