public static class InlineElementData.RendererWrapper extends java.lang.Object implements EditorCustomElementRenderer
| Constructor and Description |
|---|
RendererWrapper(EditorCustomElementRenderer delegate) |
| Modifier and Type | Method and Description |
|---|---|
int |
calcWidthInPixels(Inlay inlay)
Renderer implementation should override this to define width of custom element (in pixels).
|
void |
paint(Inlay inlay,
java.awt.Graphics g,
java.awt.Rectangle r,
TextAttributes textAttributes)
Renderer implementation should override this to define the appearance of custom element.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalcGutterIconRenderer, calcHeightInPixels, calcWidthInPixels, getContextMenuGroup, getContextMenuGroupId, getContextMenuGroupId, paintpublic RendererWrapper(EditorCustomElementRenderer delegate)
public int calcWidthInPixels(Inlay inlay)
EditorCustomElementRendererInlay.getWidthInPixels() and the width of targetRegion parameter passed to renderer's
EditorCustomElementRenderer.paint(Inlay, Graphics, Rectangle, TextAttributes) method. For inline and after-line-end elements it should always be
a positive value.calcWidthInPixels in interface EditorCustomElementRendererpublic void paint(Inlay inlay, java.awt.Graphics g, java.awt.Rectangle r, TextAttributes textAttributes)
EditorCustomElementRendererpaint in interface EditorCustomElementRendererr - region where painting should be performed, location of this rectangle is calculated by editor implementation,
dimensions of the rectangle match element's width and height (provided by EditorCustomElementRenderer.calcWidthInPixels(Inlay)
and EditorCustomElementRenderer.calcHeightInPixels(Inlay))textAttributes - attributes of surrounding text