- All Implemented Interfaces:
Styleable
,EventTarget
,Skinnable
GeoView
at a given map coordinate. The callout is displayed with a leader (arrow) that points to the
given location.
The callout can't be created directly, it must be retrieved from the view by calling GeoView.getCallout()
. A
GeoView has only one Callout. Call showCalloutAt(com.esri.arcgisruntime.geometry.Point)
to display the Callout and dismiss()
to hide it (this will clean up any internal resources, so prefer calling it over changing the visibility directly.)
A callout with default view looks like this:
The following screenshot shows a callout with intentionally exaggerated properties that you would never see in a real-world application. The image does, however, label the main properties of a callout, and the table describes how to access and modify them.
Label | Properties |
1 | Title - Short description of callout's purpose. See |
2 | Detail - Detail text for the callout, which might be location-specific, as in both screenshots above.
See |
3 | Image - Optional image. See |
Default View |
The default view is a rectangular area composed of 1, 2, and 3 (title, detail, and image). The default view is assigned if you do not provide a custom view. |
Custom View |
You can provide a custom view, which covers the same area as the default view.
See |
4 | Margin - Empty space surrounding the custom or default view. See
|
5 | Border - |
6 | Leader length - How much the point of the leader sticks out from the callout rectangle. (Dotted lines in
the labeled screenshot are for illustration only. They do not appear on the actual callout.) See
|
7 | Leader width - The leader's width can occupy most of the open side of the callout rectangle, as in the
labeled screenshot, or a smaller portion of it, as in the default screenshot. (Dotted lines in the labeled screenshot
are for illustration only. They do not appear on the actual callout.) See
|
8 | Corner radius - In the default screenshot, the corner radius is the default of 10 device-independent pixels (dp). In the labeled
screenshot, the corner radius is set to 1 dp, which appears as a right angle.
See |
9 | Callout location - Location on the map to which the callout is pointing. See
Leader position - Side of the callout on which leader appears: TOP, BOTTOM, LEFT, RIGHT, ANY.
See |
Background Color | You can set the background color of the callout.
See |
Styling
Callout can be styled using CSS. See the individual properties for details.
- Styles can be applied inline, as below:
geoView.getCallout().setStyle("border-width:20; border-color: red;");
- Styles can be applied using a stylesheet, on the .callout class, as below:
scene.getStylesheets().add("myCallout.css");
Content of stylesheet (myCallout.css): .callout { auto-adjust-width: true; background-color: red; border-color: black; border-width: 10; corner-radius: 16; detail-color: white; image-uri: "file:///C://JavaRuntimeTestData//icons//globe-16x16.png"; leader-length: 24; leader-position: top; leader-width: 24; margin: 16; title-color: yellow; }
- Since:
- 100.0.0
-
Property Summary
TypePropertyDescriptionGives access to the auto-adjust-width of the default callout.Gives access to the background color of the callout.Gives access to the border color of the callout.Gives access to the callout's border width.Gives access to the corner radius of the callout.Gives access to the custom view property.Gives access to the detail text color of the default callout.Gives access to the detail text of the default callout.Gives access to the image displayed on the default callout.Gives access to the leader length.Gives access to the leader position property.Gives access to the leader width.Gives access to the read only location property.Gives access to the margin between the callout's border and its content.Gives access to the title color property of the default callout.Gives access to the title text of the default callout.Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltip
Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
Properties inherited from class javafx.scene.Parent
needsLayout
Properties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Indicates the side of a callout on which the leader is drawn. -
Field Summary
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
Method Summary
Modifier and TypeMethodDescriptionGives access to the auto-adjust-width of the default callout.Gives access to the background color of the callout.Gives access to the border color of the callout.Gives access to the callout's border width.Gives access to the corner radius of the callout.protected Skin
<?> Gives access to the custom view property.Gives access to the detail text color of the default callout.Gives access to the detail text of the default callout.void
dismiss()
Hides the callout.boolean
Gets whether the width of the callout is auto-adjusted based on its content.Gets the background color.Gets the border color.int
Gets the border width.static List
<CssMetaData<? extends Styleable, ?>> Gets the class CSS meta data.List
<CssMetaData<? extends Styleable, ?>> int
Gets the corner curve radius.Gets the custom content of the callout.Gets the detail text of the default callout.Gets the detail text color.Returns the geoview this callout belongs to.getImage()
Gets the image displayed on the default callout.int
Gets the leader length.Gets the position of the leader relative to the body of the callout.int
Gets the leader width where it joins the body of the callout.Gets the location of the callout as a Point in map coordinates.Gets the local location.Returns the map view of this callout.int
Gets the size of the margin around the callout's content.getTitle()
Gets the title text of the default callout.Gets the title color.Gives access to the image displayed on the default callout.Gives access to the leader length.Gives access to the leader position property.Gives access to the leader width.Gives access to the read only location property.Gives access to the margin between the callout's border and its content.void
setAutoAdjustWidth
(boolean autoAdjustWidth) Sets whether to auto-adjust the width of the callout based on its content.void
setBackgroundColor
(Paint backgroundColor) Sets the background color.void
setBorderColor
(Color borderColor) Sets the border color.void
setBorderWidth
(int borderWidth) Sets the border width.void
setCornerRadius
(int cornerRadius) Sets the corner curve radius.void
setCustomView
(Region customView) Sets the custom content of the callout.void
Sets the detail text of the default callout.void
setDetailColor
(Paint detailColor) Sets the detail text color.void
Sets the image displayed on the default callout.void
setLeaderLength
(int leaderLength) Sets the leader length.void
setLeaderPosition
(Callout.LeaderPosition leaderPosition) Sets the position of the leader relative to the body of the callout.void
setLeaderWidth
(int leaderWidth) Sets the leader width where it joins the body of the callout.void
setMargin
(int margin) Sets the size of the margin around the callout's content.void
Sets the title text of the default callout.void
setTitleColor
(Paint titleColor) Sets the title color.void
showCalloutAt
(Point location) Shows the callout at the given map location with no offset.void
showCalloutAt
(Point locationOnMap, Point2D screenOffset, Duration animateDuration) Shows the callout at the given map location with the given offset in device-independent pixels (dp).void
showCalloutAt
(Point location, Duration animateDuration) Shows the callout at the given map location with no offset.void
showCalloutAt
(GeoElement geoElement, Point interactionLocation) Shows the callout at a computed location based on a geo element.void
showCalloutAt
(GeoElement geoElement, Point interactionLocation, Duration animateDuration) Shows the callout at a computed location based on a geo element.Gives access to the title color property of the default callout.Gives access to the title text of the default callout.void
update()
Updates the callout.Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
autoAdjustWidth
Gives access to the auto-adjust-width of the default callout.If set to true, the callout's width will change dynamically, within the range of
Region.minWidthProperty()
andRegion.maxWidthProperty()
.If set to false, the callout's width will be kept constant at
Region.prefWidthProperty()
.This can be set in CSS with the auto-adjust-width property.
- Since:
- 100.1.0
- See Also:
-
title
Gives access to the title text of the default callout.The text can be styled via the .mapview .callout .title CSS class and supports all the properties of
Label
.- Since:
- 100.0.0
- See Also:
-
detail
Gives access to the detail text of the default callout.The text can be styled via the .mapview .callout .detail CSS class and supports all the properties of
Label
.- Since:
- 100.0.0
- See Also:
-
image
Gives access to the image displayed on the default callout.The image can be set in CSS using the image-uri property.
- Since:
- 100.0.0
- See Also:
-
backgroundColor
Gives access to the background color of the callout.This can be set in CSS with the background property.
- Since:
- 100.0.0
- See Also:
-
borderColor
Gives access to the border color of the callout.This can be set in CSS with the border property.
- Since:
- 100.0.0
- See Also:
-
titleColor
Gives access to the title color property of the default callout.This can be set in CSS with the title-color property
- Since:
- 100.0.0
- See Also:
-
detailColor
Gives access to the detail text color of the default callout.This can be set in CSS with the detail-color property.
- Since:
- 100.0.0
- See Also:
-
borderWidth
Gives access to the callout's border width.This can be set in CSS with the border-size property.
- Since:
- 100.0.0
- See Also:
-
margin
Gives access to the margin between the callout's border and its content.This can be set in CSS with the margin property.
- Since:
- 100.0.0
- See Also:
-
cornerRadius
Gives access to the corner radius of the callout.This can be set in CSS with the corner-radius property.
- Since:
- 100.0.0
- See Also:
-
leaderLength
Gives access to the leader length.This can be set in CSS with the leader-length property.
- Since:
- 100.0.0
- See Also:
-
leaderWidth
Gives access to the leader width.This can be set in CSS with the leader-width property.
- Since:
- 100.0.0
- See Also:
-
leaderPosition
Gives access to the leader position property.This can be set in CSS with the leader-position property.
- Since:
- 100.0.0
- See Also:
-
customView
Gives access to the custom view property.- Since:
- 100.0.0
- See Also:
-
location
Gives access to the read only location property.- Since:
- 100.0.0
- See Also:
-
-
Method Details
-
getControlCssMetaData
- Overrides:
getControlCssMetaData
in classControl
-
autoAdjustWidthProperty
Gives access to the auto-adjust-width of the default callout.If set to true, the callout's width will change dynamically, within the range of
Region.minWidthProperty()
andRegion.maxWidthProperty()
.If set to false, the callout's width will be kept constant at
Region.prefWidthProperty()
.This can be set in CSS with the auto-adjust-width property.
- Returns:
- the auto-adjust-width property
- Since:
- 100.1.0
- See Also:
-
getAutoAdjustWidth
public boolean getAutoAdjustWidth()Gets whether the width of the callout is auto-adjusted based on its content.- Returns:
- true if the width of the callout is auto-adjusted based on its content
- Since:
- 100.1.0
-
setAutoAdjustWidth
public void setAutoAdjustWidth(boolean autoAdjustWidth) Sets whether to auto-adjust the width of the callout based on its content.If set to true, the callout's width will change dynamically, within the range of
Region.minWidthProperty()
andRegion.maxWidthProperty()
.If set to false, the callout's width will be kept constant at
Region.prefWidthProperty()
.- Parameters:
autoAdjustWidth
- true to auto-adjust the width of the callout based on its content- Since:
- 100.1.0
-
titleProperty
Gives access to the title text of the default callout.The text can be styled via the .mapview .callout .title CSS class and supports all the properties of
Label
.- Returns:
- the title text property
- Since:
- 100.0.0
- See Also:
-
getTitle
Gets the title text of the default callout.- Returns:
- the title of the default callout
- Since:
- 100.0.0
-
setTitle
Sets the title text of the default callout. The default is 'Title'.- Parameters:
title
- the new title- Since:
- 100.0.0
-
detailProperty
Gives access to the detail text of the default callout.The text can be styled via the .mapview .callout .detail CSS class and supports all the properties of
Label
.- Returns:
- the detail text property
- Since:
- 100.0.0
- See Also:
-
getDetail
Gets the detail text of the default callout.- Returns:
- the detail text of the default callout
- Since:
- 100.0.0
-
setDetail
Sets the detail text of the default callout. The default is 'Detail'.- Parameters:
detail
- the new detail text of the default callout- Since:
- 100.0.0
-
imageProperty
Gives access to the image displayed on the default callout.The image can be set in CSS using the image-uri property.
- Returns:
- the image property of the default callout
- Since:
- 100.0.0
- See Also:
-
getImage
Gets the image displayed on the default callout.- Returns:
- the image displayed on the default callout
- Since:
- 100.0.0
-
setImage
Sets the image displayed on the default callout.- Parameters:
image
- the new image to display on the default callout- Since:
- 100.0.0
-
backgroundColorProperty
Gives access to the background color of the callout.This can be set in CSS with the background property.
- Returns:
- the background color property
- Since:
- 100.0.0
- See Also:
-
getBackgroundColor
Gets the background color.- Returns:
- the background color
- Since:
- 100.0.0
-
setBackgroundColor
Sets the background color. By default this isColor.WHITE
with an alpha of 0.9.- Parameters:
backgroundColor
- the background color- Throws:
IllegalArgumentException
- if backgroundColor is null- Since:
- 100.0.0
-
borderColorProperty
Gives access to the border color of the callout.This can be set in CSS with the border property.
- Returns:
- the border color property
- Since:
- 100.0.0
- See Also:
-
getBorderColor
Gets the border color.- Returns:
- the border color
- Since:
- 100.0.0
-
setBorderColor
Sets the border color. By default this isColor.BLACK
.- Parameters:
borderColor
- the border color- Throws:
IllegalArgumentException
- if borderColor is null- Since:
- 100.0.0
-
titleColorProperty
Gives access to the title color property of the default callout.This can be set in CSS with the title-color property
- Returns:
- the title color property
- Since:
- 100.0.0
- See Also:
-
getTitleColor
Gets the title color. Note that this only applies to the default callout content: it won't affect any custom content.- Returns:
- the title color
- Since:
- 100.0.0
-
setTitleColor
Sets the title color. Note that this only applies to the default callout content: it won't affect any custom content. By default this isColor.BLACK
.- Parameters:
titleColor
- the new title color- Since:
- 100.0.0
-
detailColorProperty
Gives access to the detail text color of the default callout.This can be set in CSS with the detail-color property.
- Returns:
- the title color property
- Since:
- 100.0.0
- See Also:
-
getDetailColor
Gets the detail text color. Note that this only applies to the default callout content: it won't affect any custom content.- Returns:
- the detail text color
- Since:
- 100.0.0
-
setDetailColor
Sets the detail text color. Note that this only applies to the default callout content: it won't affect any custom content. By default this isColor.BLACK
.- Parameters:
detailColor
- the new detail color- Since:
- 100.0.0
-
borderWidthProperty
Gives access to the callout's border width.This can be set in CSS with the border-size property.
- Returns:
- the border width property
- Since:
- 100.0.0
- See Also:
-
getBorderWidth
public int getBorderWidth()Gets the border width.- Returns:
- the border width in device-independent pixels (dp)
- Since:
- 100.0.0
-
setBorderWidth
public void setBorderWidth(int borderWidth) Sets the border width. By default this is 0 pixels. In other words the default is to have no visible border.- Parameters:
borderWidth
- the border width in device-independent pixels (dp)- Since:
- 100.0.0
-
marginProperty
Gives access to the margin between the callout's border and its content.This can be set in CSS with the margin property.
- Returns:
- the margin size property
- Since:
- 100.0.0
- See Also:
-
getMargin
public int getMargin()Gets the size of the margin around the callout's content. This size applies to all four sides.- Returns:
- the margin currently set
- Since:
- 100.0.0
-
setMargin
public void setMargin(int margin) Sets the size of the margin around the callout's content. This size will be applied to all four sides of the content. This defaults to five device-independent pixels (dp).- Parameters:
margin
- the new margin- Since:
- 100.0.0
-
cornerRadiusProperty
Gives access to the corner radius of the callout.This can be set in CSS with the corner-radius property.
- Returns:
- the corner radius property
- Since:
- 100.0.0
- See Also:
-
getCornerRadius
public int getCornerRadius()Gets the corner curve radius.- Returns:
- the corner curve radius in device-independent pixels (dp)
- Since:
- 100.0.0
-
setCornerRadius
public void setCornerRadius(int cornerRadius) Sets the corner curve radius. By default this is 10 device-independent pixels (dp). A value of zero will give square corners.- Parameters:
cornerRadius
- the corner curve radius in pixels- Since:
- 100.0.0
-
leaderLengthProperty
Gives access to the leader length.This can be set in CSS with the leader-length property.
- Returns:
- the leader length property
- Since:
- 100.0.0
- See Also:
-
getLeaderLength
public int getLeaderLength()Gets the leader length.- Returns:
- the leader length in device-independent pixels (dp)
- Since:
- 100.0.0
-
setLeaderLength
public void setLeaderLength(int leaderLength) Sets the leader length. By default this is 15 device-independent pixels (dp).- Parameters:
leaderLength
- the leader length in device-independent pixels (dp)- Since:
- 100.0.0
-
leaderWidthProperty
Gives access to the leader width.This can be set in CSS with the leader-width property.
- Returns:
- the leader width property
- Since:
- 100.0.0
- See Also:
-
getLeaderWidth
public int getLeaderWidth()Gets the leader width where it joins the body of the callout.- Returns:
- the leader width in device-independent pixels (dp)
- Since:
- 100.0.0
-
setLeaderWidth
public void setLeaderWidth(int leaderWidth) Sets the leader width where it joins the body of the callout. By default this is 30 device-independent pixels (dp).- Parameters:
leaderWidth
- the leader width in pixels- Since:
- 100.0.0
-
leaderPositionProperty
Gives access to the leader position property.This can be set in CSS with the leader-position property.
- Returns:
- the leader position property
- Since:
- 100.0.0
- See Also:
-
getLeaderPosition
Gets the position of the leader relative to the body of the callout.- Returns:
- the position of the leader
- Since:
- 100.0.0
-
setLeaderPosition
Sets the position of the leader relative to the body of the callout. By default this isCallout.LeaderPosition.LEFT
.- Parameters:
leaderPosition
- the position of the leader- Since:
- 100.0.0
-
customViewProperty
Gives access to the custom view property.- Returns:
- the custom view property
- Since:
- 100.0.0
- See Also:
-
getCustomView
Gets the custom content of the callout.- Returns:
- the content content of the callout. If none was a set, a default is returned.
- Since:
- 100.0.0
-
setCustomView
Sets the custom content of the callout. This is null by default which will result in the default content being used.- Parameters:
customView
- the view to display in the callout- Since:
- 100.0.0
-
locationProperty
Gives access to the read only location property.- Returns:
- the location property
- Since:
- 100.0.0
- See Also:
-
getMapView
Returns the map view of this callout.- Returns:
- the map view
- Since:
- 100.0.0
-
getGeoView
Returns the geoview this callout belongs to.- Returns:
- the geoview this callout belongs to
- Since:
- 100.1.0
-
getLocation
Gets the location of the callout as a Point in map coordinates. This is the Point the callout leader points to.- Returns:
- a Point that specifies the location of the callout in map coordinates, or null if no location has been specified
- Since:
- 100.0.0
-
getLocationOnScreen
Gets the local location. This is the top-left point of the bounds in device-independent pixels (dp).- Returns:
- the local location in device-independent pixels (dp), null if the location is not visible (for example, hidden by a mountain)
- Since:
- 100.0.0
-
getClassCssMetaData
Gets the class CSS meta data.- Returns:
- the class CSS meta data
-
showCalloutAt
Shows the callout at the given map location with no offset.- Parameters:
location
- the Point at which to display the callout. This is in the map's coordinates.- Throws:
IllegalArgumentException
- if location is null or if the location's spatial reference is null- Since:
- 100.0.0
-
showCalloutAt
Shows the callout at the given map location with no offset.- Parameters:
location
- the Point at which to display the callout. This is in the map's coordinatesanimateDuration
- duration of animation. If theNode.opacityProperty()
is bounded, then the animation is disabled- Throws:
IllegalArgumentException
- if any input is null or if the location's spatial reference is nullRuntimeException
- if opacity property is bounded- Since:
- 100.0.0
-
showCalloutAt
Shows the callout at a computed location based on a geo element.- Parameters:
geoElement
- geo element to calculate the callout locationinteractionLocation
- if specified, the computed location will be the geometry's nearest point of this target location; can be null in which case the computed location will be based on geometry alone- Throws:
IllegalArgumentException
- if geoElement is null or if the geoElement geometry's spatial reference is null- Since:
- 100.0.0
-
showCalloutAt
public void showCalloutAt(GeoElement geoElement, Point interactionLocation, Duration animateDuration) Shows the callout at a computed location based on a geo element.- Parameters:
geoElement
- geo element to calculate the callout locationinteractionLocation
- if specified, the computed location will be the geometry's nearest point of this target location; can be null in which case the computed location will be based on geometry aloneanimateDuration
- duration of animation. If theNode.opacityProperty()
is bounded, then the animation is disabled- Throws:
IllegalArgumentException
- if geoElement is null or if the geoElement geometry's spatial reference is nullRuntimeException
- if opacity property is bounded- Since:
- 100.0.0
-
showCalloutAt
Shows the callout at the given map location with the given offset in device-independent pixels (dp).- Parameters:
locationOnMap
- the Point at which to display the callout. This is in the map's coordinates.screenOffset
- an offset in device-independent pixels (dp) to apply to the calloutanimateDuration
- duration of animation. If theNode.opacityProperty()
is bounded, then the animation is disabled- Throws:
IllegalArgumentException
- if any input is null or if the spatial reference of locationOnMap is nullRuntimeException
- if opacity property is bounded- Since:
- 100.0.0
-
dismiss
public void dismiss()Hides the callout.Call this method for the callout to cleanup any internal resources.
- Since:
- 100.0.0
-
createDefaultSkin
- Overrides:
createDefaultSkin
in classControl
-
getStyleableParent
- Specified by:
getStyleableParent
in interfaceStyleable
- Overrides:
getStyleableParent
in classNode
-
update
public void update()Updates the callout.- Since:
- 100.0.0
-