Oxygen XML Editor 14.1 Author API

ro.sync.ecss.extensions.api.editor
Class InplaceRendererAdapter

java.lang.Object
  extended by ro.sync.ecss.extensions.api.editor.InplaceRendererAdapter
All Implemented Interfaces:
InplaceRenderer, Extension

public abstract class InplaceRendererAdapter
extends java.lang.Object
implements InplaceRenderer

Convenience implementation of the InplaceRenderer. By extending this adapter you are protected if any new methods are added inside InplaceRenderer.

Since:
14.1

*********************************
EXPERIMENTAL - Subject to change
********************************

Please note that this API is not marked as final and it can change in one of the next versions of the application. If you have suggestions, comments about it, please let us know.


Constructor Summary
InplaceRendererAdapter()
           
 
Method Summary
 java.lang.String getDescription()
           
 java.lang.Object getRendererComponent(AuthorInplaceContext context)
          Initialize the renderer with the given context and returns the component.
 RendererLayoutInfo getRenderingInfo(AuthorInplaceContext context)
          Returns the rendering layout info.
 java.lang.String getTooltipText(AuthorInplaceContext context, int x, int y)
          Gets a tooltip text to be presented when the cursor is over this renderer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ro.sync.ecss.extensions.api.editor.InplaceRenderer
getCursorType
 

Constructor Detail

InplaceRendererAdapter

public InplaceRendererAdapter()
Method Detail

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Extension
Returns:
The description of the extension.
See Also:
Extension.getDescription()

getRendererComponent

public java.lang.Object getRendererComponent(AuthorInplaceContext context)
Description copied from interface: InplaceRenderer
Initialize the renderer with the given context and returns the component. It's up to the caller to use the renderer to paint.

Specified by:
getRendererComponent in interface InplaceRenderer
Parameters:
context - The editing context.
Returns:
The renderer. A java.awt.Component implementation.
See Also:
InplaceRenderer.getRendererComponent(ro.sync.ecss.extensions.api.editor.AuthorInplaceContext)

getRenderingInfo

public RendererLayoutInfo getRenderingInfo(AuthorInplaceContext context)
Description copied from interface: InplaceRenderer
Returns the rendering layout info. This contains information about the baseline and the size in a certain context. The baseline is measured from the top of the component. Because a renderer is reused, when this call is received, the renderer must re-initialize itself from the given context.

Specified by:
getRenderingInfo in interface InplaceRenderer
Parameters:
context - The editing context.
Returns:
The rendering layout info.
See Also:
InplaceRenderer.getRenderingInfo(ro.sync.ecss.extensions.api.editor.AuthorInplaceContext)

getTooltipText

public java.lang.String getTooltipText(AuthorInplaceContext context,
                                       int x,
                                       int y)
Description copied from interface: InplaceRenderer
Gets a tooltip text to be presented when the cursor is over this renderer. Because a renderer is reused, when this called is received, the renderer must re-initialize itself from the given context.

Specified by:
getTooltipText in interface InplaceRenderer
Parameters:
context - The editing context.
x - The x coordinate relative to the renderer bounds.
y - The y coordinate relative to the renderer bounds.
Returns:
A tooltip text or null if no tooltip.
See Also:
InplaceRenderer.getTooltipText(ro.sync.ecss.extensions.api.editor.AuthorInplaceContext, int, int)

Oxygen XML Editor 14.1 Author API

© Copyright SyncRO Soft SRL 2002 - 2012. All rights reserved.