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, wait
calcGutterIconRenderer, calcHeightInPixels, calcWidthInPixels, getContextMenuGroup, getContextMenuGroupId, getContextMenuGroupId, paint
public RendererWrapper(EditorCustomElementRenderer delegate)
public int calcWidthInPixels(Inlay inlay)
EditorCustomElementRenderer
Inlay.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 EditorCustomElementRenderer
public void paint(Inlay inlay, java.awt.Graphics g, java.awt.Rectangle r, TextAttributes textAttributes)
EditorCustomElementRenderer
paint
in interface EditorCustomElementRenderer
r
- 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