net.trajano.twiff.renderer
Class ComponentElement

java.lang.Object
  extended by net.trajano.twiff.renderer.ComponentElement
All Implemented Interfaces:
CompositePageElement, PageElement

public class ComponentElement
extends Object
implements CompositePageElement

This is an element that has a component.

Author:
Archimedes Trajano

Constructor Summary
ComponentElement(String elementName, String componentName, List<String> parameters, Map<String,String> attributes)
          Constructs the element.
 
Method Summary
 void accept(PageElementVisitor visitor)
          Accepts a visitor that should visit the page data.
 void addElement(PageElement element)
          Append page data to the composite.
 Map<String,String> getAttributes()
          Returns the attributes.
 int getColumnNumber()
          Return the column number where the current page element ends.
 String getComponentName()
           
 String getElementName()
           
 List<PageElement> getElements()
          Returns the sub-elements in the element.
 int getLineNumber()
          Return the line number where the current page element ends.
 List<String> getParameters()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentElement

public ComponentElement(String elementName,
                        String componentName,
                        List<String> parameters,
                        Map<String,String> attributes)
Constructs the element.

Parameters:
elementName - element name.
componentName -
parameters - parameters.
attributes - attributes in the element.
Method Detail

accept

public final void accept(PageElementVisitor visitor)
Accepts a visitor that should visit the page data.

Specified by:
accept in interface PageElement
Parameters:
visitor - visitor.

getAttributes

public final Map<String,String> getAttributes()
Returns the attributes.

Returns:
attributes.

getElements

public final List<PageElement> getElements()
Returns the sub-elements in the element.

Specified by:
getElements in interface CompositePageElement
Returns:
sub-elements.

getComponentName

public final String getComponentName()
Returns:
the component name

getElementName

public final String getElementName()
Returns:
the element name

getParameters

public final List<String> getParameters()
Returns:
the parameters of the component.

addElement

public final void addElement(PageElement element)
Description copied from interface: CompositePageElement
Append page data to the composite.

Specified by:
addElement in interface CompositePageElement
Parameters:
element - page data.
See Also:
CompositePageElement.addElement(net.trajano.twiff.renderer.PageElement)

getColumnNumber

public int getColumnNumber()
Description copied from interface: PageElement
Return the column number where the current page element ends.

Specified by:
getColumnNumber in interface PageElement
Returns:
the column number. -1 if unavailable.
See Also:
PageElement.getColumnNumber()

getLineNumber

public int getLineNumber()
Description copied from interface: PageElement
Return the line number where the current page element ends.

Specified by:
getLineNumber in interface PageElement
Returns:
the line number. -1 if unavailable.
See Also:
PageElement.getLineNumber()


Copyright © 2004-2005 trajano.net. All Rights Reserved.