Class Tooltip
- All Implemented Interfaces:
JsonSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the direction where to open the tooltip. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic TooltipfromJson(com.google.gson.JsonObject obj) @Nullable StringGet the content of this tooltip rule.@Nullable Tooltip.DirectionGet the direction where to open the tooltip.@Nullable PointGet offset of this tooltip rule.@Nullable DoubleGet the tooltip opacity percent.@Nullable StringgetPane()Get the map pane where the tooltip will be added.inthashCode()booleanCheck whether all options are defaults (all are null)@Nullable BooleanGet whether to open the tooltip permanently or only on mouseover.@Nullable BooleanisSticky()Get whether the tooltip is sticky or not.setContent(@Nullable String content) Set the content for this tooltip rule.setDirection(@Nullable Tooltip.Direction direction) Set the direction where to open the tooltip.Set offset of this tooltip rule from marker point.setOpacity(@Nullable Double opacity) Set the tooltip opacity percent.Set the map pane where the tooltip will be added.setPermanent(@Nullable Boolean permanent) Set whether to open the tooltip permanently or only on mouseoverSet whether the tooltip is sticky or not.com.google.gson.JsonObjecttoJson()Jsonify this object.toString()
-
Field Details
-
DEFAULT_OFFSET
-
-
Constructor Details
-
Tooltip
public Tooltip()Create a tooltip rule with default options. -
Tooltip
-
-
Method Details
-
getContent
Get the content of this tooltip rule.If null, the tooltip rule is effectively disabled.
- Returns:
- tooltip content
-
setContent
-
getPane
Get the map pane where the tooltip will be added.Defaults to '
tooltipPane' if null.- Returns:
- map pane
-
setPane
-
getOffset
Get offset of this tooltip rule.Defaults to '
' if null.Point.ZERO- Returns:
- tooltip offset from marker point
-
setOffset
Set offset of this tooltip rule from marker point.Defaults to '
' if null.Point.ZERO- Parameters:
offset- tooltip offset- Returns:
- this tooltip rule
-
getDirection
Get the direction where to open the tooltip.Defaults to '
' if null.Tooltip.Direction.AUTO- Returns:
- opening direction
-
setDirection
Set the direction where to open the tooltip.Defaults to '
' if null.Tooltip.Direction.AUTO- Parameters:
direction- opening direction- Returns:
- this tooltip rule
-
isPermanent
Get whether to open the tooltip permanently or only on mouseover.Defaults to '
false' if null.- Returns:
- true if opened permanently
-
setPermanent
-
isSticky
Get whether the tooltip is sticky or not.A sticky tooltip will stick to and follow the mouse instead of the anchor.
Defaults to '
false' if null.- Returns:
- sticky state
-
setSticky
-
getOpacity
Get the tooltip opacity percent.Defaults to '
0.9D' if null.- Returns:
- tooltip opacity
-
setOpacity
-
isDefault
-
toJson
public com.google.gson.JsonObject toJson()Description copied from interface:JsonSerializableJsonify this object.- Returns:
- object as json element
-
fromJson
-
equals
-
hashCode
-
toString
-