|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DocumentRenderer
The DocumentRenderer
interface describes the routines needed for rendering an entire document. The rendering process generates a set of styled fragments which can be used for painting or printing a document.
The DocumentRenderer
is the point of contact responsible for rendering the whole document. In many cases, it may delegate the rendering of various regions of the document to individual BlockRenderers
. For example, a JavaDocumentRenderer
may delegate rendering of a Java document to a JavaBlockRenderer
and a SQLJBlockRenderer
. It is expected that implementations of this interface will be called only for the purposes of painting or printing. As such, it is up to the caller (such as BasicView
) to handle proper document locking. There is no requirement for BlockRenderer
implementations to handle document locking.
When syntax highlighting styles change, any DocumentRenderers
in use will be notified to reload their styles through reloadStyles()
. It is the responsibility of the DocumentRenderers
to notify their block renderers in turn to reload their styles (if necessary.)
Lastly, since BlockRenderer
implementations are used primarily for rendering, they are not allowed to make modifications to the underlying document.
BlockRenderer
Method Summary | |
---|---|
void |
calculateDamage(javax.swing.event.DocumentEvent changes, NumberRange damageRange) Calculates what range of the document is "damaged" or needs to be repainted based on a given insert or removal of text. |
void |
notifyUpdate(javax.swing.event.DocumentEvent changes) Notifies the DocumentRenderer that the given document has been updated - this allows DocumentRenderers which cache offset information to update or invalidate their cache. |
void |
recycleFragmentsList(StyledFragmentsList fragmentsList) Recyle the previously gotten StyledFragment's to reduce memory allocations. |
StyledFragmentsList |
renderLines(int startLine, int endLine) Renders a region of text based on the line information provided. |
Method Detail |
---|
StyledFragmentsList renderLines(int startLine, int endLine)
startLine
- the line to start rendering from (inclusive)endLine
- the last line to render (inclusive)void calculateDamage(javax.swing.event.DocumentEvent changes, NumberRange damageRange)
changes
- the document event indicating what changeddamageRange
- the number range to return the damage range invoid notifyUpdate(javax.swing.event.DocumentEvent changes)
changes
- the document event indicating what changedvoid recycleFragmentsList(StyledFragmentsList fragmentsList)
fragments
- the fragments to recycle.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.5.0) E13403-06 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |