de.goerntkai.scot.app.document
Class TableBlock

java.lang.Object
  extended byde.goerntkai.scot.app.document.SCoTBlock
      extended byde.goerntkai.scot.app.document.TableBlock
All Implemented Interfaces:
ISCoTComponent

public class TableBlock
extends SCoTBlock

Represents a block of lines forming a table.

Version:
$Id: TableBlock.java,v 1.4 2005/05/16 13:16:03 GoerntKai Exp $
Author:
Kai Görnt

Constructor Summary
TableBlock(java.lang.String line)
          This constructor interpretes the given line.
 
Method Summary
 void add(java.lang.String line)
          Adds a new tablerow to the components.
 boolean isMeaningEqual(java.lang.String line)
          Returns true when the meaning of the line is the same as the meaning of the block and false if not.
 org.w3c.dom.Node toHTML(org.w3c.dom.Document doc)
          Returns the HTML representation of the element.
 
Methods inherited from class de.goerntkai.scot.app.document.SCoTBlock
add, getAttributes, getComponents, getConfiguration, getLastComponent, replaceLastComponentBy, setAttributes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableBlock

public TableBlock(java.lang.String line)
           throws SCoTException
This constructor interpretes the given line. The line given must have the format <line> ::= <meaning><content>.

Parameters:
line - the line as found in a SCoT document
Throws:
SCoTException
Method Detail

add

public void add(java.lang.String line)
         throws SCoTException
Adds a new tablerow to the components.

Specified by:
add in class SCoTBlock
Parameters:
line - the new component line
Throws:
SCoTException
See Also:
SCoTBlock.add(java.lang.String)

toHTML

public org.w3c.dom.Node toHTML(org.w3c.dom.Document doc)
Returns the HTML representation of the element. Uses the parent document for creating the node.

Specified by:
toHTML in interface ISCoTComponent
Specified by:
toHTML in class SCoTBlock
Parameters:
doc - the parent document
Returns:
the HTML representation
See Also:
ISCoTComponent.toHTML(org.w3c.dom.Document)

isMeaningEqual

public boolean isMeaningEqual(java.lang.String line)
Returns true when the meaning of the line is the same as the meaning of the block and false if not. The meaning of the line is equal to the meaning of the block if the first character of the line is a '|' or a '!'.

Specified by:
isMeaningEqual in class SCoTBlock
Parameters:
line - the line to be checked
Returns:
wether the line has the same meaning as the block
See Also:
SCoTBlock.isMeaningEqual(java.lang.String)


© 2004 by Kai Görnt