Package ro.sync.ecss.component.editor
Class PopupCheckBoxRenderer
java.lang.Object
ro.sync.ecss.component.editor.PopupCheckBoxRenderer
- All Implemented Interfaces:
ro.sync.ecss.component.editor.LoggableInplaceRenderer
,InplaceRenderer
,Extension
@API(type=INTERNAL,
src=PUBLIC)
public class PopupCheckBoxRenderer
extends Object
implements InplaceRenderer, ro.sync.ecss.component.editor.LoggableInplaceRenderer
Presents a simple or a composed value (multiple values separated by a separator)
using a JLabel.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The text to render for empty labels.protected static final ro.sync.i18n.MessageBundle
The messages resource bundle. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
dump
(AuthorInplaceContext inplaceContext, StringBuilder builder) getCursorType
(int x, int y) Get a cursor to be used when the user hovers with the mouse over this renderer.getCursorType
(AuthorInplaceContext context, int x, int y) Get a cursor to be used when the user hovers with the mouse over this renderer.getRendererComponent
(AuthorInplaceContext context) Initialize the renderer with the given context and returns the component.getRenderingInfo
(AuthorInplaceContext context) Returns the rendering layout info.getTooltipText
(AuthorInplaceContext context, int x, int y) Gets a tooltip text to be presented when the cursor is over this renderer.
-
Field Details
-
messages
protected static final ro.sync.i18n.MessageBundle messagesThe messages resource bundle. -
EMPTY_LABEL
The text to render for empty labels.
-
-
Constructor Details
-
PopupCheckBoxRenderer
public PopupCheckBoxRenderer()Constructor.
-
-
Method Details
-
getDescription
- Specified by:
getDescription
in interfaceExtension
- Returns:
- The description of the extension.
- See Also:
-
getRendererComponent
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 interfaceInplaceRenderer
- Parameters:
context
- The editing context.- Returns:
- The renderer. A java.awt.Component implementation.
- See Also:
-
getRenderingInfo
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 interfaceInplaceRenderer
- Parameters:
context
- The editing context.- Returns:
- The rendering layout info.
- See Also:
-
getTooltipText
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 interfaceInplaceRenderer
- 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:
-
getCursorType
Description copied from interface:InplaceRenderer
Get a cursor to be used when the user hovers with the mouse over this renderer. For a more complex renderer, the given X,Y coordinates can be used to decide what cursor to return.- Specified by:
getCursorType
in interfaceInplaceRenderer
- Parameters:
context
- The editing context. Useful if the renderer is a more complex one, like a text field with an associated button and wants to provide different cursors when the cursor is over the textfield or over the button. In this case the renderer will have to initialize itself with this context in order to decide what the cursor is hovering.x
- The x coordinate relative to the renderer bounds.y
- The y coordinate relative to the renderer bounds.- Returns:
- The type of cursor to be used or
null
to let the viewport decide. - See Also:
-
getCursorType
Description copied from interface:InplaceRenderer
Get a cursor to be used when the user hovers with the mouse over this renderer. For a more complex renderer, the given X,Y coordinates can be used to decide what cursor to return. We recommend usingInplaceRenderer.getCursorType(AuthorInplaceContext, int, int)
as you can use the provided context to get additional information.- Specified by:
getCursorType
in interfaceInplaceRenderer
- Parameters:
x
- The x coordinate relative to the renderer bounds.y
- The y coordinate relative to the renderer bounds.- Returns:
- The type of cursor to be used or
null
to let the viewport decide. - See Also:
-
dump
- Specified by:
dump
in interfacero.sync.ecss.component.editor.LoggableInplaceRenderer
- See Also:
-
LoggableInplaceRenderer.dump(ro.sync.ecss.extensions.api.editor.AuthorInplaceContext, java.lang.StringBuilder)
-