Class RichTooltip
java.lang.Object
org.pushingpixels.flamingo.api.common.RichTooltip
Rich tooltip for command buttons.
In its most basic form, the rich tooltip has a title and one (possible multiline) description text:
+--------------------------------+ | Title | | Some description text | +--------------------------------+
The addDescriptionSection(String)
can be used to add multiple
sections to the description:
+--------------------------------+ | Title | | First multiline | | description section | | | | Second multiline | | description section | | | | Third multiline | | description section | +--------------------------------+
The setMainImage(Image)
can be used to place an image below the
title and to the left of the description sections:
+--------------------------------+ | Title | | ******* First multiline | | *image* description section | | ******* | | Second multiline | | description section | +--------------------------------+
The addFooterSection(String)
can be used to add (possibly) multiple
footer sections that will be shown below a horizontal separator:
+--------------------------------+ | Title | | First multiline | | description section | | | | Second multiline | | description section | |--------------------------------| | A multiline footer section | | placed below a separator | +--------------------------------+
The setFooterImage(Image)
can be used to place an image to the left
of the footer sections:
+--------------------------------+ | Title | | First multiline | | description section | | | | Second multiline | | description section | |--------------------------------| | ******* A multiline | | *image* footer section | | ******* | +--------------------------------+
Here is a fully fledged rich tooltip that shows all these APIs in action:
+--------------------------------+ | Title | | ******* First multiline | | *image* description section | | ******* | | Second multiline | | description section | |--------------------------------| | ******* First multiline | | *image* footer section | | ******* | | Second multiline | | footer section | +--------------------------------+
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty tooltip.RichTooltip
(String title, String descriptionSection) Creates a tooltip with the specified title and description section. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDescriptionSection
(String section) Adds the specified description section to this tooltip.void
addFooterSection
(String section) Adds the specified footer section to this tooltip.Returns an unmodifiable list of description sections of this tooltip.Returns the footer image of this tooltip.Returns an unmodifiable list of footer sections of this tooltip.Returns the main image of this tooltip.getTitle()
Returns the main title of this tooltip.void
setFooterImage
(Image image) Sets the footer image for this tooltip.void
setMainImage
(Image image) Sets the main image for this tooltip.void
Sets the title for this tooltip.
-
Field Details
-
title
The main title of this tooltip. -
mainImage
The main image of this tooltip. Can benull
.- See Also:
-
descriptionSections
The description sections of this tooltip.
-
-
Constructor Details
-
RichTooltip
public RichTooltip()Creates an empty tooltip. -
RichTooltip
Creates a tooltip with the specified title and description section.- Parameters:
title
- Tooltip title.descriptionSection
- Tooltip main description section.
-
-
Method Details
-
setTitle
Sets the title for this tooltip.- Parameters:
title
- The new tooltip title.
-
setMainImage
Sets the main image for this tooltip.- Parameters:
image
- The main image for this tooltip.- See Also:
-
addDescriptionSection
Adds the specified description section to this tooltip.- Parameters:
section
- The description section to add.- See Also:
-
getTitle
Returns the main title of this tooltip.- Returns:
- The main title of this tooltip.
- See Also:
-
getMainImage
Returns the main image of this tooltip. Can returnnull
.- Returns:
- The main image of this tooltip.
- See Also:
-
getDescriptionSections
Returns an unmodifiable list of description sections of this tooltip. Guaranteed to return a non-null
list.- Returns:
- An unmodifiable list of description sections of this tooltip.
- See Also:
-