Shown below is a screenshot of the InfoOverlay control in both its
collapsed and expanded states:
| Modifier and Type | Field and Description |
|---|---|
| private ObjectProperty | content
* Properties * * |
| private static final String | DEFAULT_STYLE_CLASS
* Stylesheet Handling * * |
| private BooleanProperty | |
| private StringProperty |
| Access | Constructor and Description |
|---|---|
| public | |
| public | InfoOverlay(String
The image file to attempt to load. imageUrl, String The text to display over top of the image. text)Attempts to construct an InfoOverlay instance using the given string to load an image, and to place the given text string over top of it. |
| public | InfoOverlay(Node
The arbitrarily complex scenegraph over which the text will be displayed. content, String The text to display over top of the node. text)Constructs an InfoOverlay instance using the given Node (which can be an arbitrarily complex node / scenegraph, or a simple ImageView, for example), and places the given text string over top of it. |
| Modifier and Type | Method and Description |
|---|---|
| public final ObjectProperty | contentProperty()
Returns: an |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public final Node | |
| public final String | |
| public String | getUserAgentStylesheet()
Overrides javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. |
| public final boolean | |
| public final void | |
| public final void | setShowOnHover(boolean value)
Specifies whether to show the overlay on hover of the content node (and to hide it again when the content is no longer being hovered). |
| public final void | |
| public final BooleanProperty | showOnHoverProperty()
Returns: A |
| public final StringProperty |
| content | back to summary |
|---|---|
| private ObjectProperty<Node> content * Properties * * | |
| DEFAULT_STYLE_CLASS | back to summary |
|---|---|
| private static final String DEFAULT_STYLE_CLASS * Stylesheet Handling * * | |
| showOnHover | back to summary |
|---|---|
| private BooleanProperty showOnHover | |
| text | back to summary |
|---|---|
| private StringProperty text | |
| InfoOverlay | back to summary |
|---|---|
| public InfoOverlay() Constructs a default InfoOverlay control with no node or text. | |
| InfoOverlay | back to summary |
|---|---|
| public InfoOverlay(String imageUrl, String text) Attempts to construct an InfoOverlay instance using the given string to load an image, and to place the given text string over top of it. | |
| InfoOverlay | back to summary |
|---|---|
| public InfoOverlay(Node content, String text) Constructs an InfoOverlay instance using the given Node (which can be an arbitrarily complex node / scenegraph, or a simple ImageView, for example), and places the given text string over top of it. | |
| contentProperty | back to summary |
|---|---|
public final ObjectProperty
| |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS
| |
| getContent | back to summary |
|---|---|
public final Node getContent()
| |
| getText | back to summary |
|---|---|
| public final String getText() | |
| getUserAgentStylesheet | back to summary |
|---|---|
| public String getUserAgentStylesheet() Overrides javafx. Doc from javafx. An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. These styles are used in addition to whatever user-agent stylesheets are in use. This provides a mechanism for third parties to introduce styles for custom controls. The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath. Subclasses overriding this method should not assume any particular implementation approach as to the number and frequency with which it is called. For this reason, attempting any kind of dynamic implementation (i.e. returning different user agent stylesheet values) based on some state change is highly discouraged, as there is no guarantee when, or even if, this method will be called. Some JavaFX CSS implementations may choose to cache this response for an indefinite period of time, and therefore there should be no expectation around when this method is called.
For additional information about using CSS with the scene graph,
see the CSS Reference Guide.
| |
| isShowOnHover | back to summary |
|---|---|
public final boolean isShowOnHover()
| |
| setContent | back to summary |
|---|---|
| public final void setContent(Node content) Sets a new value for the | |
| setShowOnHover | back to summary |
|---|---|
| public final void setShowOnHover(boolean value) Specifies whether to show the overlay on hover of the content node (and to hide it again when the content is no longer being hovered). By default this is true. | |
| setText | back to summary |
|---|---|
| public final void setText(String text) Specifies the text to display over top of the | |
| showOnHoverProperty | back to summary |
|---|---|
public final BooleanProperty showOnHoverProperty()
| |
| textProperty | back to summary |
|---|---|
public final StringProperty textProperty()
| |