public interface BalloonAttributes extends ShapeAttributes
Balloon shapes. Changes made to the attributes are
applied to the balloon when the WorldWindow renders the next frame. Instances of
BalloonAttributes may be shared by many balloons, thereby reducing the memory normally required to store
attributes for each balloon.BalloonFORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED| Modifier and Type | Method and Description |
|---|---|
String |
getBalloonShape()
Indicates the shape of the balloon's frame.
|
int |
getCornerRadius()
Indicates the radius of each rounded corner on the balloon's rectangular frame, in pixels.
|
Font |
getFont()
Indicates the font used to display the balloon's text.
|
Point |
getImageOffset()
Indicates the location of the balloon's texture (in pixels) relative to the balloon's upper left corner.
|
double |
getImageOpacity()
Indicates the opacity of the balloon's texture as a floating-point value in the range 0.0 to 1.0.
|
String |
getImageRepeat()
Indicates the balloon texture's horizontal and vertical repeat mode.
|
Insets |
getInsets()
Indicates the amount of space between the balloon's content and its frame, in pixels.
|
String |
getLeaderShape()
Indicates the shape of the balloon's leader.
|
int |
getLeaderWidth()
Indicates the width of the balloon's leader, in pixels.
|
Size |
getMaximumSize()
Indicates the maximum width and height of the balloon's shape in the viewport.
|
Offset |
getOffset()
Indicates the location relative to the balloon's screen reference point at which the balloon's frame shape is
aligned.
|
Size |
getSize()
Indicates the width and height of the balloon's shape in the viewport.
|
Color |
getTextColor()
Indicates the color used to display the balloon's text.
|
void |
setBalloonShape(String shape)
Specifies the shape of the balloon's frame.
|
void |
setCornerRadius(int radius)
Specifies the radius of the rounded corner's on the balloon's rectangular frame in pixels.
|
void |
setFont(Font font)
Specifies the font in which to display the balloon's text.
|
void |
setImageOffset(Point offset)
Specifies the location of the balloon's texture (in pixels) relative to the balloon's upper left corner.
|
void |
setImageOpacity(double opacity)
Specifies the opacity of the balloon's texture as a floating-point value in the range 0.0 to 1.0.
|
void |
setImageRepeat(String repeat)
Specifies the balloon texture's horizontal and vertical repeat mode.
|
void |
setInsets(Insets insets)
Specifies the amount of space (in pixels) between the balloon's content and the edges of the balloon's frame.
|
void |
setLeaderShape(String shape)
Specifies the shape of the balloon's leader.
|
void |
setLeaderWidth(int width)
Specifies the width of the balloon's leader, in pixels.
|
void |
setMaximumSize(Size size)
Specifies the maximum width and height of the balloon's shape in the viewport.
|
void |
setOffset(Offset offset)
Specifies a location relative to the balloon's screen reference point at which to align the balloon's frame
shape.
|
void |
setSize(Size size)
Specifies the width and height of the balloon's shape in the viewport.
|
void |
setTextColor(Color color)
Specifies the color in which to display the balloon's text.
|
copy, copy, getImageScale, getImageSource, getInteriorMaterial, getInteriorOpacity, getOutlineMaterial, getOutlineOpacity, getOutlineStippleFactor, getOutlineStipplePattern, getOutlineWidth, getRestorableState, isDrawInterior, isDrawOutline, isEnableAntialiasing, isEnableLighting, isUnresolved, restoreState, setDrawInterior, setDrawOutline, setEnableAntialiasing, setEnableLighting, setImageScale, setImageSource, setInteriorMaterial, setInteriorOpacity, setOutlineMaterial, setOutlineOpacity, setOutlineStippleFactor, setOutlineStipplePattern, setOutlineWidth, setUnresolvedexport, isExportFormatSupportedString getBalloonShape()
AVKey.SHAPE_NONE, AVKey.SHAPE_RECTANGLE, or AVKey.SHAPE_ELLIPSE.setBalloonShape(String)int getCornerRadius()
AVKey.SHAPE_ELLIPSE.setCornerRadius(int)Font getFont()
setFont(java.awt.Font)Point getImageOffset()
setImageOffset(java.awt.Point)double getImageOpacity()
setImageOpacity(double)String getImageRepeat()
AVKey.REPEAT_NONE, AVKey.REPEAT_X, AVKey.REPEAT_Y, or AVKey.REPEAT_XYsetImageRepeat(String)Insets getInsets()
setInsets(java.awt.Insets)String getLeaderShape()
AVKey.SHAPE_NONE or AVKey.SHAPE_TRIANGLE.setLeaderShape(String)int getLeaderWidth()
setLeaderWidth(int)Size getMaximumSize()
AVKey.SHAPE_RECTANGLE, then the returned Size indicates the rectangle's maximum width
and height. If the balloon's shape is AVKey.SHAPE_ELLIPSE, then the returned Size
indicates the ellipse's maximum x- and y-radii. This returns null if the balloon has no maximum
size.null if the balloon
has no maximum size.Offset getOffset()
offset.setOffset(Offset)Size getSize()
AVKey.SHAPE_RECTANGLE, then the returned Size indicates the rectangle's width and
height. If the balloon's shape is AVKey.SHAPE_ELLIPSE, then the returned Size indicates
the ellipse's x- and y-radii.Color getTextColor()
setTextColor(java.awt.Color)void setBalloonShape(String shape)
shape may be one of the following:
If the shape is AVKey.SHAPE_NONE, the balloon's content is displayed in a rectangle in
the viewport without any decoration. The rectangle's dimension in the viewport are specified by calling setSize(Size).
If the shape is AVKey.SHAPE_RECTANGLE, the balloon is displayed as a rectangle in the
viewport with optionally rounded corners. The rectangle's dimension in the viewport are specified by calling
setSize(Size). The rectangle's corner radius in pixels is specified by calling setCornerRadius(int).
If the shape is AVKey.SHAPE_ELLIPSE, the balloon is displayed as an ellipse in the
viewport. The ellipse's x- and y-radii are specified by calling setSize(Size). The balloon's corner
radius attribute is ignored.shape - the frame shape to use, either AVKey.SHAPE_NONE AVKey.SHAPE_RECTANGLE or
AVKey.SHAPE_ELLIPSE.IllegalArgumentException - if shape is null.getBalloonShape()void setCornerRadius(int radius)
radius must be zero or a positive integer. Specifying a radius of zero causes the
shape's rectangular frame to have sharp corners. This does nothing if the balloon's shape is
AVKey.SHAPE_ELLIPSE.radius - the desired radius, in pixels.IllegalArgumentException - if radius is less than zero.getCornerRadius()void setFont(Font font)
font may be ignored if the
balloon's text contains HTML.font - the font to use for the balloon's text.IllegalArgumentException - if font is null.getFont()void setImageOffset(Point offset)
offset - the location of the balloon's texture source in pixels.IllegalArgumentException - if offset is null.getImageOffset()void setImageOpacity(double opacity)
opacity is multiplied by the shape's interior opacity to determine the texture's final opacity. A
value of 1.0 specifies a completely opaque texture, and 0.0 specifies a completely transparent texture. Values in
between specify a partially transparent texture.opacity - the balloon texture's opacity as a floating-point value from 0.0 to 1.0.IllegalArgumentException - if opacity is less than 0.0 or greater than 1.0.getImageOpacity()void setImageRepeat(String repeat)
repeat may be one of the
following:
If repeat is AVKey.REPEAT_NONE, the balloon's texture is displayed according to its
offset and scale without any repeating pattern.
If repeat is AVKey.REPEAT_X, AVKey.REPEAT_Y, or
AVKey.REPEAT_XY, the balloon's texture is repeated along the X axis, along the Y axis, or along both
the X and Y axes, respectively. The texture is repeated after its offset and scale are applied.repeat - the texture's repeat mode to use, one of AVKey.REPEAT_NONE,
AVKey.REPEAT_X, AVKey.REPEAT_Y, or AVKey.REPEAT_XY.IllegalArgumentException - if repeat is null.getImageRepeat()void setInsets(Insets insets)
insets. If the balloon's size and
insets cause the content width or height to become less than 1, then the balloon's content is not displayed.
If the balloon's shape is AVKey.SHAPE_RECTANGLE, insets specifies the padding between
the balloon's content area and the rectangle's top, left, bottom, and right.
If the balloon's shape is AVKey.SHAPE_ELLIPSE, insets specifies the padding between the
balloon's content area and the ellipse's top, left, bottom, and right apexes.insets - the desired padding between the balloon's content and its frame, in pixels.IllegalArgumentException - if insets is null.getInsets()void setLeaderShape(String shape)
shape may be one of the following:
If the shape is AVKey.SHAPE_NONE, the leader is disabled and does not display.
If the shape is AVKey.SHAPE_TRIANGLE, the leader extends from one side of the balloon's
frame and points to the balloon's screen reference point. The width of the leader (in pixels) where it intersects
the balloon's frame is specified by calling setLeaderWidth(int).shape - the leader shape to use, either AVKey.SHAPE_NONE or AVKey.SHAPE_TRIANGLE.IllegalArgumentException - if shape is null.getLeaderShape(),
setLeaderWidth(int)void setLeaderWidth(int width)
width must be zero or a
positive integer. Specifying a width of zero disables the balloon's leader.
This does nothing if the balloon's leader shape is AVKey.SHAPE_NONE.
If the balloon's leader shape is AVKey.SHAPE_TRIANGLE, this specifies the size of the leader where
it intersects the balloon's frame.width - the desired leader width, in pixels.IllegalArgumentException - if width is less than zero.getLeaderWidth()void setMaximumSize(Size size)
AVKey.SHAPE_RECTANGLE, then size specifies the rectangle's maximum width and height. If
the balloon's shape is AVKey.SHAPE_ELLIPSE, then size specifies the ellipse's maximum
x- and y-radii. Specifying a null size causes the balloon to have no maximum size.size - the desired maximum width and height of the balloon's shape in the viewport, or null if
the balloon should have no maximum size.void setOffset(Offset offset)
offset. An offset
of (0, 0) pixels causes the balloon's lower left corner to be placed at the screen reference point. An
offset of (1, 1) in fraction units causes the balloon's upper right corner to be placed at the
screen reference point.
If the balloon is attached to the globe, the screen reference point is the projection of its geographic position
into the viewport. If the balloon is attached to the screen, the screen reference point is the balloon's screen
point.
If the balloon has a leader shape, the leader extends from one side of the balloon's frame and points to the
screen reference point.offset - a location at which to align the balloon's lower left corner.IllegalArgumentException - if offset is null.getOffset()void setSize(Size size)
AVKey.SHAPE_RECTANGLE, then size specifies the rectangle's width and height. If the
balloon's shape is AVKey.SHAPE_ELLIPSE, then size specifies the ellipse's x- and
y-radii.
The balloon's content area is the rectangle obtained by taking the balloon's size and shrinking it
by the balloon's insets.size - the desired width and height of the balloon's shape in the viewport.IllegalArgumentException - if size is null.getSize(),
getMaximumSize(),
setInsets(java.awt.Insets)void setTextColor(Color color)
color may be ignored if
the balloon's text contains HTML.color - the color to use for the balloon's text.IllegalArgumentException - if color is null.getTextColor()