|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AttributeHandler
Name: AttributeParser
Description: Parses argument values from given strings.
| Method Summary | |
|---|---|
TypedAttributeHandler |
getBooleanHandler()
Gets the boolean attribute handler. |
TypedAttributeHandler |
getBorderHandler()
Gets the boolean attribute handler. |
TypedAttributeHandler |
getColorHandler()
Gets the color attribute handler. |
TypedAttributeHandler |
getDimensionHandler()
Gets the dimension attribute handler. |
TypedAttributeHandler |
getDoubleHandler()
Gets the double attribute handler. |
TypedAttributeHandler |
getEscapeSequenceTextHandler()
Gets the integer attribute handler. |
TypedAttributeHandler |
getFloatHandler()
Gets the float attribute handler. |
TypedAttributeHandler |
getHorizontalAlignmentHandler()
Gets the horizontal alignment attribute handler. |
TypedAttributeHandler |
getIntegerHandler()
Gets the integer attribute handler. |
TypedAttributeHandler |
getTextHandler()
Gets the integer attribute handler. |
TypedAttributeHandler |
getVerticalAlignmentHandler()
Gets the vertical alignment attribute handler. |
boolean |
parseBooleanAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
Gets the boolean value for the given attribute's name. |
int |
parseBorderAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
Parses the border value from the given attribute. |
Color |
parseColorAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
Parses the color value from the given attribute. |
float |
parseDimensionAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
Parses a dimension value from the given string. |
double |
parseDoubleAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
Parses a double value from the given string. |
float |
parseFloatAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
Parses a float value from the given string. |
int |
parseHorizontalAlignmentAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
Parses the horizontal alignment value from the given attribute. |
int |
parseIntAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
Parses an integer value from the given string. |
String |
parseTextAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate,
boolean translateEscapeSequences)
Gets the value for the given attribute's name. |
int |
parseVerticalAlignmentAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
Parses the vertical alignment value from the given attribute. |
void |
setDocumentHandler(DocumentHandler documentHandler)
Sets the document handler. |
Object |
typeCastAttributeValue(Locator locator,
AttributeDefinition attrDef,
String attrName,
Object value)
Casts the given object value into a the correct type for the specified attribute definition. |
| Method Detail |
|---|
void setDocumentHandler(DocumentHandler documentHandler)
documentHandler - The document handler to set.
Object typeCastAttributeValue(Locator locator,
AttributeDefinition attrDef,
String attrName,
Object value)
throws DocumentHandlerException
locator - The source locator.attrDef - The attribute definition.attrName - The attribute name.value - The value to convert.
DocumentHandlerException - In case the type conversion failed.
String parseTextAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate,
boolean translateEscapeSequences)
throws TagAttributeException
getStringAttribute(java.lang.String, java.lang.String, boolean) but takes care of escape sequences.
locator - The tag source locator.attrName - The attribute's name.attrValue - The argument value.evaluate - If this flag is set to true, the attribute will get evaluated.translateEscapeSequences - Tells whether or not to translate escape sequences.
TagAttributeException - if the item contains an invalid value or an required attribute was not defined.
float parseFloatAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
throws TagAttributeException
locator - The tag source locator.attrName - The attribute's name.attrValue - The argument value.evaluate - If this flag is set to true, the attribute will get evaluated.
TagAttributeException - Thrown in case the item contained an invalid value.
float parseDimensionAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
throws TagAttributeException
locator - The tag source locator.attrName - The attribute's name.attrValue - The argument value.evaluate - If this flag is set to true, the attribute will get evaluated.
TagAttributeException - Thrown in case the item contained an invalid value.
double parseDoubleAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
throws TagAttributeException
locator - The tag source locator.attrName - The attribute's name.attrValue - The argument value.evaluate - If this flag is set to true, the attribute will get evaluated.
TagAttributeException - Thrown in case the item contained an invalid value.
int parseIntAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
throws TagAttributeException
locator - The tag source locator.attrName - The attribute's name.attrValue - The argument value.evaluate - If this flag is set to true, the attribute will get evaluated.
TagAttributeException - Thrown in case the item contained an invalid value.
boolean parseBooleanAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
throws TagAttributeException
locator - The tag source locator.attrName - The attribute's name.attrValue - The argument value.evaluate - If this flag is set to true, the attribute will get evaluated.
TagAttributeException - if the item contains an invalid value or an required attribute was not defined.
Color parseColorAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
throws TagAttributeException
locator - The tag source locator.attrName - The name of the attribute to parse.attrValue - The attribute value to parse.evaluate - If this flag is set to true, the attribute will get evaluated.
TagAttributeException - Thrown in case the item contained an invalid value.
int parseBorderAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
throws TagAttributeException
locator - The tag source locator.attrName - The name of the attribute to parse.attrValue - The attribute value to parse.evaluate - If this flag is set to true, the attribute will get evaluated.
TagAttributeException - Thrown in case the item contained an invalid value.
int parseHorizontalAlignmentAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
throws TagAttributeException
locator - The tag source locator.attrName - The name of the attribute to parse.attrValue - The attribute value to parse.evaluate - If this flag is set to true, the attribute will get evaluated.
TagAttributeException - Thrown in case the item contained an invalid value.
int parseVerticalAlignmentAttribute(Locator locator,
String attrName,
Object attrValue,
boolean evaluate)
throws TagAttributeException
locator - The tag source locator.attrName - The name of the attribute to parse.attrValue - The attribute value to parse.evaluate - If this flag is set to true, the attribute will get evaluated.
TagAttributeException - Thrown in case the item contained an invalid value.TypedAttributeHandler getTextHandler()
TypedAttributeHandler getEscapeSequenceTextHandler()
TypedAttributeHandler getIntegerHandler()
TypedAttributeHandler getFloatHandler()
TypedAttributeHandler getDimensionHandler()
TypedAttributeHandler getDoubleHandler()
TypedAttributeHandler getBooleanHandler()
TypedAttributeHandler getColorHandler()
TypedAttributeHandler getBorderHandler()
TypedAttributeHandler getHorizontalAlignmentHandler()
TypedAttributeHandler getVerticalAlignmentHandler()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||