diff options
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/TraitSetter.java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/TraitSetter.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/TraitSetter.java b/src/java/org/apache/fop/layoutmgr/TraitSetter.java index 24ace2733..d16593914 100644 --- a/src/java/org/apache/fop/layoutmgr/TraitSetter.java +++ b/src/java/org/apache/fop/layoutmgr/TraitSetter.java @@ -348,4 +348,16 @@ public class TraitSetter { } } } + + /** + * Sets the producer's ID as a trait on the area. This can be used to track back the + * generating FO node. + * @param area the area to set the traits on + * @param id the ID to set + */ + public static void setProducerID(Area area, String id) { + if (id != null && id.length() > 0) { + area.addTrait(Trait.PROD_ID, id); + } + } } |