http://www.jpicedt.org

jpicedt.format.input.util
Class InstanciationExpression

java.lang.Object
  extended by jpicedt.format.input.util.AbstractRegularExpression
      extended by jpicedt.format.input.util.LiteralExpression
          extended by jpicedt.format.input.util.InstanciationExpression

public class InstanciationExpression
extends LiteralExpression

An expression that can instanciate a new Element by cloning the given graphic element when it finds a given litteral tag, then add it to the current PicGroup in the pool.

Since:
jpicedt 1.3
Version:
$Id: InstanciationExpression.java,v 1.9 2013/03/31 06:59:39 vincentb1 Exp $
Author:
Sylvain Reynal

Constructor Summary
InstanciationExpression(String tag, Element prototype, PicAttributeSet attributes, Pool pl)
           
 
Method Summary
 void action(ParserEvent e)
          Called when the tag-string was matched ; instanciate a new element, then add it to the current PicGroup.
 String toString()
           
 
Methods inherited from class jpicedt.format.input.util.LiteralExpression
interpret
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstanciationExpression

public InstanciationExpression(String tag,
                               Element prototype,
                               PicAttributeSet attributes,
                               Pool pl)
Parameters:
tag - string to be matched
prototype - element to be cloned, then added to the current PicGroup
attributes - attribute set used to set the attributes for the newly cloned element ; can be null, in which case the attribute set of the prototype is used (yet it's static in this case)
pl - pool used to share variable across the grammar tree.
Method Detail

action

public void action(ParserEvent e)
Called when the tag-string was matched ; instanciate a new element, then add it to the current PicGroup.

Overrides:
action in class AbstractRegularExpression

toString

public String toString()
Overrides:
toString in class LiteralExpression

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org