public class Hover
extends java.lang.Object
Constructor and Description |
---|
Hover() |
Modifier and Type | Method and Description |
---|---|
static void |
hide()
Hide hoverCanvas shown via
show() |
static void |
show(Canvas contents,
Label properties)
Displays a standard Hover canvas containing the specified canvas as the content.
This method may also be called to modify the content of the hover if it is already showing. |
static void |
show(java.lang.String contents,
Label properties)
Displays a standard Hover canvas containing the specified HTML content.
This method may also be called to modify the content of the hover if it is already showing. |
static void |
showHoverComponent(Canvas component)
Similar to
Hover.show() but uses the hover mechanism to display some
component instead of showing HTML text in the builtin hoverCanvas . |
public static void hide()
show()
public static void showHoverComponent(Canvas component)
Hover.show()
but uses the hover mechanism to display some
component
instead of showing HTML text
in the builtin hoverCanvas
. Hover.showHoverComponent() is called automatically
instead of Hover.show() when Canvas.showHoverComponents
is true. As with Hover.show()
, the component-position is based on the mouse
pointer position, adjusted by leftOffset
and topOffset
. If this position would render the component partially clipped
or off-screen, it is moved to ensure the component is entirely visible.
See show()
for more information.
component
- component to show using the hover mechanismpublic static void show(java.lang.String contents, Label properties)
Hover.hide
to hide
the canvas again.Canvas.mouseOut
handler to track when the user moves off the component, or checking EventHandler.getTarget
as part of the asynchronous callback The
default Hover canvas position will be based on the mouse pointer position, adjusted by leftOffset
and topOffset
. If this position would render the Hover canvas partially clipped, it will be automatically modified to
ensure the Hover is entirely visible.
contents
- contents for the hover. See HTMLString
properties
- object containing attributes for managing the hover canvas' appearance. Valid properties include:public static void show(Canvas contents, Label properties)
Hover.hide
to hide
the canvas again.Canvas.mouseOut
handler to track when the user moves off the component, or checking EventHandler.getTarget
as part of the asynchronous callback The
default Hover canvas position will be based on the mouse pointer position, adjusted by leftOffset
and topOffset
. If this position would render the Hover canvas partially clipped, it will be automatically modified to
ensure the Hover is entirely visible.
contents
- contents for the hover. See HTMLString
properties
- object containing attributes for managing the hover canvas' appearance. Valid properties include: