|
xmlgraphics-commons 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xmlgraphics.ps.dsc.ResourceTracker
public class ResourceTracker
This class is used to track resources in a DSC-compliant PostScript file. The distinction is made between supplied and needed resources. For the details of this distinction, please see the DSC specification.
Constructor Summary | |
---|---|
ResourceTracker()
|
Method Summary | |
---|---|
java.util.Set |
getDocumentNeededResources()
Returns the set of needed resources. |
java.util.Set |
getDocumentSuppliedResources()
Returns the set of supplied resources. |
boolean |
isResourceSupplied(PSResource res)
Indicates whether a particular resource is supplied, rather than needed. |
void |
notifyResourceUsageOnPage(java.util.Collection resources)
Notifies the resource tracker about the usage of resources on the current page. |
void |
notifyResourceUsageOnPage(PSResource res)
Notifies the resource tracker about the usage of a resource on the current page. |
void |
notifyStartNewPage()
Notifies the resource tracker that a new page has been started and that the page resource set can be cleared. |
void |
registerNeededResource(PSResource res)
Registers a needed resource. |
void |
registerSuppliedResource(PSResource res)
Registers a supplied resource. |
void |
writeResources(boolean pageLevel,
PSGenerator gen)
Writes a DSC comment for the accumulated used resources, either at page level or at document level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceTracker()
Method Detail |
---|
public java.util.Set getDocumentSuppliedResources()
public java.util.Set getDocumentNeededResources()
public void notifyStartNewPage()
public void registerSuppliedResource(PSResource res)
res
- the resourcepublic void registerNeededResource(PSResource res)
res
- the resourcepublic void notifyResourceUsageOnPage(PSResource res)
res
- the resource being usedpublic void notifyResourceUsageOnPage(java.util.Collection resources)
resources
- the resources being usedpublic boolean isResourceSupplied(PSResource res)
res
- the resource
public void writeResources(boolean pageLevel, PSGenerator gen) throws java.io.IOException
pageLevel
- true if the DSC comment for the page level should be generated,
false for the document level (in the trailer)gen
- the PSGenerator to write the DSC comments with
java.io.IOException
- In case of an I/O problem
|
xmlgraphics-commons 1.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |