Package jpicedt.format.input.util
Class InstanciationExpression
- java.lang.Object
-
- jpicedt.format.input.util.AbstractRegularExpression
-
- jpicedt.format.input.util.LiteralExpression
-
- jpicedt.format.input.util.InstanciationExpression
-
- All Implemented Interfaces:
ExpressionConstants
public class InstanciationExpression extends LiteralExpression implements ExpressionConstants
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.4.2.1 2007/09/02 11:56:13 reynal Exp $
- Author:
- Sylvain Reynal
-
-
Field Summary
-
Fields inherited from interface jpicedt.format.input.util.ExpressionConstants
ANY_CHAR, ANY_CHAR_EOL, ANY_SIGN, AT_LEAST, AT_MOST, DEBUG, DOUBLE, EOL, EXACTLY, INTEGER, NEGATIVE, NON_NULL, POSITIVE, STRICTLY_NEGATIVE, STRICTLY_POSITIVE, WHITE_SPACES, WHITE_SPACES_OR_EOL
-
-
Constructor Summary
Constructors Constructor Description InstanciationExpression(java.lang.String tag, Element prototype, PicAttributeSet attributes, Pool pl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaction(ParserEvent e)Called when the tag-string was matched ; instanciate a new element, then add it to the current PicGroup.java.lang.StringtoString()-
Methods inherited from class jpicedt.format.input.util.LiteralExpression
interpret
-
-
-
-
Constructor Detail
-
InstanciationExpression
public InstanciationExpression(java.lang.String tag, Element prototype, PicAttributeSet attributes, Pool pl)- Parameters:
tag- string to be matchedprototype- element to be cloned, then added to the current PicGroupattributes- 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:
actionin classAbstractRegularExpression
-
toString
public java.lang.String toString()
- Overrides:
toStringin classLiteralExpression
-
-