public interface RenderingContextView
ViewRenderingContext
in the view hierarchy.
Accessing of the ViewRenderingContext
from a view
must always be done like this:
RenderingContextView rcView = RenderingContextView.get(view); if (rcView != null) { rcView.acquireRenderingContext(); try { ... } finally { rcView.releaseRenderingContext(); } }
Only one thread at the time can safely access methods
of the RenderingContextView
. It does not have
to be event dispatch thread.
Modifier and Type | Method and Description |
---|---|
ViewRenderingContext |
acquireRenderingContext(View v)
Acquire an instance of rendering context.
|
void |
releaseRenderingContext(ViewRenderingContext vrc)
Release rendering context previously acquired by
RenderingContextView.acquireRenderingContext(javax.swing.text.View) . |
ViewRenderingContext acquireRenderingContext(View v)
RenderingContextView.releaseRenderingContext(ViewRenderingContext)
.v
- view for which the rendering context is being obtained.void releaseRenderingContext(ViewRenderingContext vrc)
RenderingContextView.acquireRenderingContext(javax.swing.text.View)
.vrc
- rendering context to be released.