Java Doc for PropertyMaker.java in  » Graphic-Library » fop » org » apache » fop » fo » properties » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Graphic Library » fop » org.apache.fop.fo.properties 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.fop.fo.properties.PropertyMaker

All known Subclasses:   org.apache.fop.fo.properties.CompoundPropertyMaker,
PropertyMaker
public class PropertyMaker implements Cloneable(Code)
Base class for all property makers


Field Summary
protected  booleancontextDep
     Indicates whether the property is context-dependant and therefore can't be cached.
protected  CorrespondingPropertyMakercorresponding
    
protected  PropertydefaultProperty
    
protected  StringdefaultValue
    
protected  intpropId
    
protected  booleansetByShorthand
     Indicates whether the property is set through a shorthand.

Constructor Summary
public  PropertyMaker(int propId)
     Construct an instance of a Property.Maker for the given property.

Method Summary
public  voidaddEnum(String constant, Property value)
     Add a enum constant.
public  voidaddKeyword(String keyword, String value)
     Add a keyword-equiv to the maker.
public  voidaddShorthand(PropertyMaker shorthand)
     Add a shorthand to this maker.
public  voidaddSubpropMaker(PropertyMaker subproperty)
     Add a subproperty to this maker.
protected  PropertycheckEnumValues(String value)
     For properties that contain enumerated values.
protected  StringcheckValueKeywords(String keyword)
     Return a String to be parsed if the passed value corresponds to a keyword which can be parsed and used to initialize the property. For example, the border-width family of properties can have the initializers "thin", "medium", or "thick".
public  Objectclone()
     Return a clone of the makers.
protected  Propertycompute(PropertyList propertyList)
     Return a Property object representing the value of this property, based on other property values for this FO. A special case is properties which inherit the specified value, rather than the computed value.
Parameters:
  propertyList - The PropertyList for the FO.
protected  PropertyconvertProperty(Property p, PropertyList propertyList, FObj fo)
     Return a Property object based on the passed Property object. This method is called if the Property object built by the parser isn't the right type for this property. It is overridden by subclasses.
Parameters:
  p - The Property object return by the expression parser
Parameters:
  propertyList - The PropertyList object being built for this FO.
Parameters:
  fo - The parent FO for the FO whose property is being made.
protected  PropertyconvertPropertyDatatype(Property p, PropertyList propertyList, FObj fo)
     For properties that have more than one legal way to be specified, this routine should be overridden to attempt to set them based upon the other methods.
public  PropertyconvertShorthandProperty(PropertyList propertyList, Property prop, FObj fo)
     Converts a shorthand property
Parameters:
  propertyList - the propertyList for which to convert
Parameters:
  prop - the shorthand property
Parameters:
  fo - ...
public  PropertyfindProperty(PropertyList propertyList, boolean tryInherit)
     If the property is a relative property with a corresponding absolute value specified, the absolute value is used.
public  Propertyget(int subpropertyId, PropertyList propertyList, boolean tryInherit, boolean tryDefault)
     Return the property on the current FlowObject.
public  StringgetName()
     the name of the property this maker is used for.
public  PercentBasegetPercentBase(PropertyList pl)
     This is used to handle properties specified as a percentage of some "base length", such as the content width of their containing box. Overridden by subclasses which allow percent specifications.
public  intgetPropId()
    
public  PropertygetShorthand(PropertyList propertyList)
     For properties that can be set by shorthand properties, this method should return the Property, if any, that is parsed from any shorthand properties that affect this property. This method expects to be overridden by subclasses. For example, the border-right-width property could be set implicitly from the border shorthand property, the border-width shorthand property, or the border-right shorthand property.
public  PropertygetSubprop(Property p, int subpropertyId)
     Return a property value for the given component of a compound property.
Parameters:
  p - A property value for a compound property type such asSpaceProperty.
Parameters:
  subpropertyId - the id of the component whose value is to bereturned.NOTE: this is only to ease porting when calls are made toPropertyList.get() using a component name of a compound property,such as get("space.optimum").
public  PropertyMakergetSubpropMaker(int subpropertyId)
     Return a subproperty maker for the subpropertyId.
public  booleanisInherited()
     Default implementation of isInherited.
public  Propertymake(PropertyList propertyList)
     Return the default value.
public  Propertymake(PropertyList propertyList, String value, FObj fo)
     Create a Property object from an attribute specification.
Parameters:
  propertyList - The PropertyList object being built for this FO.
Parameters:
  value - The attribute value.
Parameters:
  fo - The parent FO for the FO whose property is being made.
public  Propertymake(Property baseProperty, int subpropertyId, PropertyList propertyList, String value, FObj fo)
     Make a property value for a compound property.
public  PropertymakeNewProperty()
     Create a new empty property.
public  voidsetByShorthand(boolean setByShorthand)
     Set the setByShorthand flag which only is applicable for subproperty makers.
public  voidsetCorresponding(CorrespondingPropertyMaker corresponding)
     Set the correspoding property information.
public  voidsetDatatypeParser(ShorthandParser parser)
     Set the shorthand datatype parser.
public  voidsetDefault(String defaultValue)
     Set the default value for this maker.
public  voidsetDefault(String defaultValue, boolean contextDep)
     Set the default value for this maker.
public  voidsetInherited(boolean inherited)
     Set the inherited flag.
public  voidsetPercentBase(int percentBase)
     Set the percent base identifier for this maker.
protected  PropertysetSubprop(Property baseProperty, int subpropertyId, Property subproperty)
     Set a component in a compound property and return the modified compound property object. This default implementation returns the original base property without modifying it. It is overridden by property maker subclasses which handle compound properties.
Parameters:
  baseProperty - The Property object representing the compound property,such as SpaceProperty.
Parameters:
  subpropertyId - The ID of the component whose value is specified.
Parameters:
  subproperty - A Property object holding the specified value of thecomponent to be set.
public  voiduseGeneric(PropertyMaker generic)
     Copy all the values from the generic maker to this maker.

Field Detail
contextDep
protected boolean contextDep(Code)
Indicates whether the property is context-dependant and therefore can't be cached.



corresponding
protected CorrespondingPropertyMaker corresponding(Code)
Maker for 'corresponding' properties *



defaultProperty
protected Property defaultProperty(Code)
default property *



defaultValue
protected String defaultValue(Code)
the default value for the maker



propId
protected int propId(Code)
the property ID



setByShorthand
protected boolean setByShorthand(Code)
Indicates whether the property is set through a shorthand.




Constructor Detail
PropertyMaker
public PropertyMaker(int propId)(Code)
Construct an instance of a Property.Maker for the given property.
Parameters:
  propId - The Constant ID of the property to be made.




Method Detail
addEnum
public void addEnum(String constant, Property value)(Code)
Add a enum constant.
Parameters:
  constant - the enum constant
Parameters:
  value - the Property value to use when the constant is specified



addKeyword
public void addKeyword(String keyword, String value)(Code)
Add a keyword-equiv to the maker.
Parameters:
  keyword - the keyword
Parameters:
  value - the value to be used when the keyword is specified



addShorthand
public void addShorthand(PropertyMaker shorthand)(Code)
Add a shorthand to this maker. Only an Integer is added to the shorthands list. Later the Integers are replaced with references to the actual shorthand property makers.
Parameters:
  shorthand - a property maker thar is that is checked forshorthand values.



addSubpropMaker
public void addSubpropMaker(PropertyMaker subproperty)(Code)
Add a subproperty to this maker.
Parameters:
  subproperty - the PropertyMaker for the subproperty



checkEnumValues
protected Property checkEnumValues(String value)(Code)
For properties that contain enumerated values. This method should be overridden by subclasses.
Parameters:
  value - the string containing the property value the Property encapsulating the enumerated equivalent of theinput value



checkValueKeywords
protected String checkValueKeywords(String keyword)(Code)
Return a String to be parsed if the passed value corresponds to a keyword which can be parsed and used to initialize the property. For example, the border-width family of properties can have the initializers "thin", "medium", or "thick". The FOPropertyMapping file specifies a length value equivalent for these keywords, such as "0.5pt" for "thin".
Parameters:
  keyword - the string value of property attribute. a String containing a parseable equivalent or null if the passed value isn't a keyword initializer for this Property



clone
public Object clone()(Code)
Return a clone of the makers. Used by useGeneric() to clone the subproperty makers of the generic compound makers.
See Also:   java.lang.Object.clone



compute
protected Property compute(PropertyList propertyList) throws PropertyException(Code)
Return a Property object representing the value of this property, based on other property values for this FO. A special case is properties which inherit the specified value, rather than the computed value.
Parameters:
  propertyList - The PropertyList for the FO. Property A computed Property value or null if no rulesare specified to compute the value.
throws:
  PropertyException - for invalid or inconsistent FO input



convertProperty
protected Property convertProperty(Property p, PropertyList propertyList, FObj fo) throws PropertyException(Code)
Return a Property object based on the passed Property object. This method is called if the Property object built by the parser isn't the right type for this property. It is overridden by subclasses.
Parameters:
  p - The Property object return by the expression parser
Parameters:
  propertyList - The PropertyList object being built for this FO.
Parameters:
  fo - The parent FO for the FO whose property is being made. A Property of the correct type or null if the parsed valuecan't be converted to the correct type.
throws:
  PropertyException - for invalid or inconsistent FO input



convertPropertyDatatype
protected Property convertPropertyDatatype(Property p, PropertyList propertyList, FObj fo) throws PropertyException(Code)
For properties that have more than one legal way to be specified, this routine should be overridden to attempt to set them based upon the other methods. For example, colors may be specified using an RGB model, or they may be specified using an NCname.
Parameters:
  p - property whose datatype should be converted
Parameters:
  propertyList - collection of properties. (TODO: explain whythis is needed, or remove it from the signature.)
Parameters:
  fo - The parent FO for the FO whose property is being made.why this is needed, or remove it from the signature). an Property with the appropriate datatype used
throws:
  PropertyException - for invalid or inconsistent input



convertShorthandProperty
public Property convertShorthandProperty(PropertyList propertyList, Property prop, FObj fo) throws PropertyException(Code)
Converts a shorthand property
Parameters:
  propertyList - the propertyList for which to convert
Parameters:
  prop - the shorthand property
Parameters:
  fo - ... the converted property
throws:
  PropertyException - ...



findProperty
public Property findProperty(PropertyList propertyList, boolean tryInherit) throws PropertyException(Code)
If the property is a relative property with a corresponding absolute value specified, the absolute value is used. This is also true of the inheritance priority (I think...) If the property is an "absolute" property and it isn't specified, then we try to compute it from the corresponding relative property: this happens in computeProperty.
Parameters:
  propertyList - the applicable property list
Parameters:
  tryInherit - true if inherited properties should be examined. the property value
throws:
  PropertyException - if there is a problem evaluating the property



get
public Property get(int subpropertyId, PropertyList propertyList, boolean tryInherit, boolean tryDefault) throws PropertyException(Code)
Return the property on the current FlowObject. Depending on the passed flags, this will try to compute it based on other properties, or if it is inheritable, to return the inherited value. If all else fails, it returns the default value.
Parameters:
  subpropertyId - The subproperty id of the property being retrieved.Is 0 when retriving a base property.
Parameters:
  propertyList - The PropertyList object being built for this FO.
Parameters:
  tryInherit - true if inherited properties should be examined.
Parameters:
  tryDefault - true if the default value should be returned. the property value
throws:
  PropertyException - if there is a problem evaluating the property



getName
public String getName()(Code)
the name of the property this maker is used for.



getPercentBase
public PercentBase getPercentBase(PropertyList pl) throws PropertyException(Code)
This is used to handle properties specified as a percentage of some "base length", such as the content width of their containing box. Overridden by subclasses which allow percent specifications. See the documentation on properties.xsl for details.
Parameters:
  fo - the FObj containing the PercentBase
Parameters:
  pl - the PropertyList containing the property. (TODO: explainwhat this is used for, or remove it from the signature.) an object implementing the PercentBase interface.
throws:
  PropertyException - if there is a problem while evaluating the base property



getPropId
public int getPropId()(Code)
the name of the property for this Maker



getShorthand
public Property getShorthand(PropertyList propertyList) throws PropertyException(Code)
For properties that can be set by shorthand properties, this method should return the Property, if any, that is parsed from any shorthand properties that affect this property. This method expects to be overridden by subclasses. For example, the border-right-width property could be set implicitly from the border shorthand property, the border-width shorthand property, or the border-right shorthand property. This method should be overridden in the appropriate subclass to check each of these, and return an appropriate border-right-width Property object.
Parameters:
  propertyList - the collection of properties to be considered the Property, if found, the correspons, otherwise, null
throws:
  PropertyException - if there is a problem while evaluating the shorthand



getSubprop
public Property getSubprop(Property p, int subpropertyId)(Code)
Return a property value for the given component of a compound property.
Parameters:
  p - A property value for a compound property type such asSpaceProperty.
Parameters:
  subpropertyId - the id of the component whose value is to bereturned.NOTE: this is only to ease porting when calls are made toPropertyList.get() using a component name of a compound property,such as get("space.optimum"). The recommended technique is:get("space").getOptimum().Overridden by property maker subclasses which handlecompound properties. the Property containing the subproperty



getSubpropMaker
public PropertyMaker getSubpropMaker(int subpropertyId)(Code)
Return a subproperty maker for the subpropertyId.
Parameters:
  subpropertyId - The subpropertyId of the maker. The subproperty maker.



isInherited
public boolean isInherited()(Code)
Default implementation of isInherited. A boolean indicating whether this property is inherited.



make
public Property make(PropertyList propertyList) throws PropertyException(Code)
Return the default value.
Parameters:
  propertyList - The PropertyList object being built for this FO. the Property object corresponding to the parameters
throws:
  PropertyException - for invalid or inconsisten FO input



make
public Property make(PropertyList propertyList, String value, FObj fo) throws PropertyException(Code)
Create a Property object from an attribute specification.
Parameters:
  propertyList - The PropertyList object being built for this FO.
Parameters:
  value - The attribute value.
Parameters:
  fo - The parent FO for the FO whose property is being made. The initialized Property object.
throws:
  PropertyException - for invalid or inconsistent FO input



make
public Property make(Property baseProperty, int subpropertyId, PropertyList propertyList, String value, FObj fo) throws PropertyException(Code)
Make a property value for a compound property. If the property value is already partially initialized, this method will modify it.
Parameters:
  baseProperty - The Property object representing the compound property,for example: SpaceProperty.
Parameters:
  subpropertyId - The Constants ID of the subproperty (component)whose value is specified.
Parameters:
  propertyList - The propertyList being built.
Parameters:
  fo - The parent FO for the FO whose property is being made.
Parameters:
  value - the value of the baseProperty (or if null, a new compound property object) withthe new subproperty added
throws:
  PropertyException - for invalid or inconsistent FO input



makeNewProperty
public Property makeNewProperty()(Code)
Create a new empty property. Must be overriden in compound subclasses. a new instance of the Property for which this is a maker.



setByShorthand
public void setByShorthand(boolean setByShorthand)(Code)
Set the setByShorthand flag which only is applicable for subproperty makers. It should be true for the subproperties which must be assigned a value when the base property is assigned a attribute value directly.
Parameters:
  setByShorthand - true if this subproperty must be set when the base property is set



setCorresponding
public void setCorresponding(CorrespondingPropertyMaker corresponding)(Code)
Set the correspoding property information.
Parameters:
  corresponding - a corresponding maker where the isForcedCorresponding and compute methods are delegated to.



setDatatypeParser
public void setDatatypeParser(ShorthandParser parser)(Code)
Set the shorthand datatype parser.
Parameters:
  parser - the shorthand parser



setDefault
public void setDefault(String defaultValue)(Code)
Set the default value for this maker.
Parameters:
  defaultValue - the default value.



setDefault
public void setDefault(String defaultValue, boolean contextDep)(Code)
Set the default value for this maker.
Parameters:
  defaultValue - the default value
Parameters:
  contextDep - true when the value context dependent andmust not be cached.



setInherited
public void setInherited(boolean inherited)(Code)
Set the inherited flag.
Parameters:
  inherited - true if this is an inherited property



setPercentBase
public void setPercentBase(int percentBase)(Code)
Set the percent base identifier for this maker.
Parameters:
  percentBase - the percent base (ex. LengthBase.FONTSIZE)



setSubprop
protected Property setSubprop(Property baseProperty, int subpropertyId, Property subproperty)(Code)
Set a component in a compound property and return the modified compound property object. This default implementation returns the original base property without modifying it. It is overridden by property maker subclasses which handle compound properties.
Parameters:
  baseProperty - The Property object representing the compound property,such as SpaceProperty.
Parameters:
  subpropertyId - The ID of the component whose value is specified.
Parameters:
  subproperty - A Property object holding the specified value of thecomponent to be set. The modified compound property object.



useGeneric
public void useGeneric(PropertyMaker generic)(Code)
Copy all the values from the generic maker to this maker.
Parameters:
  generic - a generic property maker.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.