|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ujac.print.AbstractTagTest
public abstract class AbstractTagTest
Name: AbstractTagTest
Description: An abstract tag test implementation, used at class TestTagInterceptor
to define single tag tests during document processing.
Field Summary | |
---|---|
protected BaseDocumentTag |
tag
The tag to test. |
static int |
TEST_CLOSE
Tells to perform tests when closing the tag. |
static int |
TEST_OPEN
Tells to perform tests when opening the tag. |
Constructor Summary | |
---|---|
AbstractTagTest()
Constructs a AbstractTagTest instance with no specific attributes. |
|
AbstractTagTest(int testMode)
Constructs a AbstractTagTest instance with specific attributes. |
Method Summary | |
---|---|
protected void |
doIt()
Performs the tests, sets the testPassed flag,
in case the test was successful. |
protected boolean |
getBooleanAttribute(String name)
Gets a boolean attribute. |
protected boolean |
getBooleanStyleAttribute(String name)
Gets a boolean style attribute. |
protected Color |
getColorAttribute(String name)
Gets a color attribute. |
protected Color |
getColorStyleAttribute(String name)
Gets a color style attribute. |
protected String |
getContent()
Gets the tags textual content. |
protected float |
getDimensionAttribute(String name)
Gets a dimension attribute. |
protected float |
getDimensionStyleAttribute(String name)
Gets a dimension style attribute. |
protected float |
getFloatAttribute(String name)
Gets a float attribute. |
protected float |
getFloatStyleAttribute(String name)
Gets a float style attribute. |
protected int |
getHorizontalAlignmentAttribute(String name)
Gets a horizontal alignment attribute. |
protected int |
getHorizontalAlignmentStyleAttribute(String name)
Gets a horizontal alignment style attribute. |
protected int |
getIntegerAttribute(String name)
Gets a integer style attribute. |
protected int |
getIntegerStyleAttribute(String name)
Gets a integer style attribute. |
protected String |
getStringAttribute(String name)
Gets a string attribute. |
protected String |
getStringStyleAttribute(String name)
Gets a string style attribute. |
BaseDocumentTag |
getTag()
Gets the attached document tag instance. |
int |
getTestMode()
Gets the current test mode. |
protected int |
getVerticalAlignmentAttribute(String name)
Gets a vertical alignment attribute. |
protected int |
getVerticalAlignmentStyleAttribute(String name)
Gets a vertical alignment style attribute. |
boolean |
isTestPassed()
Tells, whether or not the test has been passed. |
abstract void |
performTest()
Performs the test. |
protected void |
setup(BaseDocumentTag tag)
Sets up the test. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TEST_OPEN
public static final int TEST_CLOSE
protected BaseDocumentTag tag
Constructor Detail |
---|
public AbstractTagTest()
public AbstractTagTest(int testMode)
testMode
- The initial test mode.Method Detail |
---|
protected void setup(BaseDocumentTag tag)
tag
- The tag to test.public abstract void performTest() throws DocumentHandlerException
DocumentHandlerException
- In case a document handler problem occurred, during the tests.protected void doIt() throws DocumentHandlerException
testPassed
flag,
in case the test was successful.
DocumentHandlerException
- In case a document handler problem occurred, during the tests.public BaseDocumentTag getTag()
public int getTestMode()
public boolean isTestPassed()
protected String getStringAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected String getStringStyleAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected float getFloatAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected float getFloatStyleAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected int getIntegerAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected int getIntegerStyleAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected float getDimensionAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected float getDimensionStyleAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected boolean getBooleanAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected boolean getBooleanStyleAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected Color getColorAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected Color getColorStyleAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected int getHorizontalAlignmentAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected int getHorizontalAlignmentStyleAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected int getVerticalAlignmentAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected int getVerticalAlignmentStyleAttribute(String name) throws TagAttributeException
name
- The attribute name.
TagAttributeException
- If the item contains an invalid value
or an required attribute was not defined.protected String getContent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |