Class BasicBalloonAttributes
- java.lang.Object
-
- gov.nasa.worldwind.render.BasicShapeAttributes
-
- gov.nasa.worldwind.render.BasicBalloonAttributes
-
- All Implemented Interfaces:
Exportable,BalloonAttributes,ShapeAttributes
public class BasicBalloonAttributes extends BasicShapeAttributes implements BalloonAttributes
Basic implementation of theBalloonAttributesinterface. ExtendsBasicShapeAttributesto include attributes for WorldWindBalloonshapes.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringballoonShapeIndicates the shape of the balloon's frame.protected intcornerRadiusIndicates the radius of each rounded corner on the balloon's rectangular frame, in pixels.protected java.awt.FontfontIndicates the font used to display the balloon's text.protected java.awt.PointimageOffsetIndicates the location of the image source in pixels.protected doubleimageOpacityIndicates the balloon texture's opacity as a floating-point value from 0.0 to 1.0.protected java.lang.StringimageRepeatSpecifies the balloon texture's horizontal and vertical repeat mode.protected java.awt.InsetsinsetsIndicates the padding between the balloon's content and its frame, in pixels.protected java.lang.StringleaderShapeIndicates the shape of the balloon's leader.protected intleaderWidthIndicates the width of the balloon's leader, in pixels.protected SizemaxSizeIndicates the maximum width and height of the balloon's shape in the viewport.protected OffsetoffsetIndicates the location at which the balloon's lower left corner is aligned.protected SizesizeIndicates the width and height of the balloon's shape in the viewport.protected java.awt.ColortextColorIndicates the color used to display the balloon's text.-
Fields inherited from class gov.nasa.worldwind.render.BasicShapeAttributes
drawInterior, drawOutline, enableAntialiasing, enableLighting, imageScale, imageSource, interiorMaterial, interiorOpacity, outlineMaterial, outlineOpacity, outlineStippleFactor, outlineStipplePattern, outlineWidth, unresolved
-
Fields inherited from interface gov.nasa.worldwind.Exportable
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED
-
-
Constructor Summary
Constructors Constructor Description BasicBalloonAttributes()Creates a newBasicBalloonAttributeswith the default attributes.BasicBalloonAttributes(BalloonAttributes attributes)Creates a newBasicBalloonAttributesconfigured with the specifiedattributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ShapeAttributescopy()Returns a new ShapeAttributes instance of the same type as this ShapeAttributes who's properties are configured exactly as this ShapeAttributes.voidcopy(ShapeAttributes attributes)Copies the specified ShapeAttributes' properties into this object's properties.booleanequals(java.lang.Object o)java.lang.StringgetBalloonShape()Indicates the shape of the balloon's frame.intgetCornerRadius()Indicates the radius of each rounded corner on the balloon's rectangular frame, in pixels.java.awt.FontgetFont()Indicates the font used to display the balloon's text.java.awt.PointgetImageOffset()Indicates the location of the balloon's texture (in pixels) relative to the balloon's upper left corner.doublegetImageOpacity()Indicates the opacity of the balloon's texture as a floating-point value in the range 0.0 to 1.0.java.lang.StringgetImageRepeat()Indicates the balloon texture's horizontal and vertical repeat mode.java.awt.InsetsgetInsets()Indicates the amount of space between the balloon's content and its frame, in pixels.java.lang.StringgetLeaderShape()Indicates the shape of the balloon's leader.intgetLeaderWidth()Indicates the width of the balloon's leader, in pixels.SizegetMaximumSize()Indicates the maximum width and height of the balloon's shape in the viewport.OffsetgetOffset()Indicates the location relative to the balloon's screen reference point at which the balloon's frame shape is aligned.voidgetRestorableState(RestorableSupport restorableSupport, RestorableSupport.StateObject context)Saves the attributes' current state in the specifiedRestorableSupport.SizegetSize()Indicates the width and height of the balloon's shape in the viewport.java.awt.ColorgetTextColor()Indicates the color used to display the balloon's text.inthashCode()voidrestoreState(RestorableSupport restorableSupport, RestorableSupport.StateObject context)Restores the state of any attributes contained in the specifiedRestorableSupport.voidsetBalloonShape(java.lang.String shape)Specifies the shape of the balloon's frame.voidsetCornerRadius(int radius)Specifies the radius of the rounded corner's on the balloon's rectangular frame in pixels.voidsetFont(java.awt.Font font)Specifies the font in which to display the balloon's text.voidsetImageOffset(java.awt.Point offset)Specifies the location of the balloon's texture (in pixels) relative to the balloon's upper left corner.voidsetImageOpacity(double opacity)Specifies the opacity of the balloon's texture as a floating-point value in the range 0.0 to 1.0.voidsetImageRepeat(java.lang.String repeat)Specifies the balloon texture's horizontal and vertical repeat mode.voidsetInsets(java.awt.Insets insets)Specifies the amount of space (in pixels) between the balloon's content and the edges of the balloon's frame.voidsetLeaderShape(java.lang.String shape)Specifies the shape of the balloon's leader.voidsetLeaderWidth(int width)Specifies the width of the balloon's leader, in pixels.voidsetMaximumSize(Size maxSize)Specifies the maximum width and height of the balloon's shape in the viewport.voidsetOffset(Offset offset)Specifies a location relative to the balloon's screen reference point at which to align the balloon's frame shape.voidsetSize(Size size)Specifies the width and height of the balloon's shape in the viewport.voidsetTextColor(java.awt.Color color)Specifies the color in which to display the balloon's text.-
Methods inherited from class gov.nasa.worldwind.render.BasicShapeAttributes
export, exportAsKML, getImageScale, getImageSource, getInteriorMaterial, getInteriorOpacity, getOutlineMaterial, getOutlineOpacity, getOutlineStippleFactor, getOutlineStipplePattern, getOutlineWidth, isDrawInterior, isDrawOutline, isEnableAntialiasing, isEnableLighting, isExportFormatSupported, isUnresolved, setDrawInterior, setDrawOutline, setEnableAntialiasing, setEnableLighting, setImageScale, setImageSource, setInteriorMaterial, setInteriorOpacity, setOutlineMaterial, setOutlineOpacity, setOutlineStippleFactor, setOutlineStipplePattern, setOutlineWidth, setUnresolved
-
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nasa.worldwind.Exportable
export, isExportFormatSupported
-
Methods inherited from interface gov.nasa.worldwind.render.ShapeAttributes
getImageScale, getImageSource, getInteriorMaterial, getInteriorOpacity, getOutlineMaterial, getOutlineOpacity, getOutlineStippleFactor, getOutlineStipplePattern, getOutlineWidth, isDrawInterior, isDrawOutline, isEnableAntialiasing, isEnableLighting, isUnresolved, setDrawInterior, setDrawOutline, setEnableAntialiasing, setEnableLighting, setImageScale, setImageSource, setInteriorMaterial, setInteriorOpacity, setOutlineMaterial, setOutlineOpacity, setOutlineStippleFactor, setOutlineStipplePattern, setOutlineWidth, setUnresolved
-
-
-
-
Field Detail
-
size
protected Size size
Indicates the width and height of the balloon's shape in the viewport. Initiallynull.
-
maxSize
protected Size maxSize
Indicates the maximum width and height of the balloon's shape in the viewport. Initiallynull.
-
offset
protected Offset offset
Indicates the location at which the balloon's lower left corner is aligned. Initiallynull.
-
insets
protected java.awt.Insets insets
Indicates the padding between the balloon's content and its frame, in pixels. Initiallynull.
-
balloonShape
protected java.lang.String balloonShape
Indicates the shape of the balloon's frame. Initiallynull.
-
leaderShape
protected java.lang.String leaderShape
Indicates the shape of the balloon's leader. Initiallynull.
-
leaderWidth
protected int leaderWidth
Indicates the width of the balloon's leader, in pixels. Initially 0.
-
cornerRadius
protected int cornerRadius
Indicates the radius of each rounded corner on the balloon's rectangular frame, in pixels. Initially 0.
-
font
protected java.awt.Font font
Indicates the font used to display the balloon's text. Initiallynull.
-
textColor
protected java.awt.Color textColor
Indicates the color used to display the balloon's text. Initiallynull.
-
imageOffset
protected java.awt.Point imageOffset
Indicates the location of the image source in pixels. Initiallynull.
-
imageOpacity
protected double imageOpacity
Indicates the balloon texture's opacity as a floating-point value from 0.0 to 1.0. Initially 0.0.
-
imageRepeat
protected java.lang.String imageRepeat
Specifies the balloon texture's horizontal and vertical repeat mode. Initiallynull.
-
-
Constructor Detail
-
BasicBalloonAttributes
public BasicBalloonAttributes()
Creates a newBasicBalloonAttributeswith the default attributes. The default attributes are as follows:Attributes Attribute Default Value unresolved truedrawInterior truedrawOutline trueenableAntialiasing trueenableLighting falseinteriorMaterial Material.WHITEoutlineMaterial 171, 171, 171 (red, green, blue)interiorOpacity 1.0 outlineOpacity 1.0 outlineWidth 1.0 outlineStippleFactor 0 outlineStipplePattern 0xF0F0 interiorImageSource nullinteriorImageScale 1.0 size 350x350 pixels (width x height) maximumSize nulloffset 40,60 pixels (x, y)insets 30,15,15,15 (top, left, bottom, right) balloonShape AVKey.SHAPE_RECTANGLEleaderShape AVKey.SHAPE_TRIANGLEleaderWidth 40.0 cornerRadius 20.0 font Arial Plain 12 textColor Color.BLACKimageOffset 0,0 (x, y)imageOpacity 1 imageRepeat AVKey.REPEAT_XY
-
BasicBalloonAttributes
public BasicBalloonAttributes(BalloonAttributes attributes)
Creates a newBasicBalloonAttributesconfigured with the specifiedattributes.- Parameters:
attributes- the attributes to configure the newBasicBalloonAttributeswith.- Throws:
java.lang.IllegalArgumentException- ifattributesisnull.
-
-
Method Detail
-
copy
public ShapeAttributes copy()
Returns a new ShapeAttributes instance of the same type as this ShapeAttributes who's properties are configured exactly as this ShapeAttributes.Overrides the superclass' behavior to return a new
BasicBalloonAttributes.- Specified by:
copyin interfaceShapeAttributes- Overrides:
copyin classBasicShapeAttributes- Returns:
- a copy of this ShapeAttributes.
-
copy
public void copy(ShapeAttributes attributes)
Copies the specified ShapeAttributes' properties into this object's properties. This does nothing if the specified attributes isnull.Extends the superclass' behavior to copy
BalloonAttributesif the specifiedattributesis an instance ofBalloonAttributes.- Specified by:
copyin interfaceShapeAttributes- Overrides:
copyin classBasicShapeAttributes- Parameters:
attributes- the attributes to copy.
-
getBalloonShape
public java.lang.String getBalloonShape()
Indicates the shape of the balloon's frame.- Specified by:
getBalloonShapein interfaceBalloonAttributes- Returns:
- the balloon frame's shape, either
AVKey.SHAPE_NONE,AVKey.SHAPE_RECTANGLE, orAVKey.SHAPE_ELLIPSE. - See Also:
BalloonAttributes.setBalloonShape(String)
-
setBalloonShape
public void setBalloonShape(java.lang.String shape)
Specifies the shape of the balloon's frame. Theshapemay be one of the following:If the
shapeisAVKey.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 callingBalloonAttributes.setSize(Size).If the
shapeisAVKey.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 callingBalloonAttributes.setSize(Size). The rectangle's corner radius in pixels is specified by callingBalloonAttributes.setCornerRadius(int).If the
shapeisAVKey.SHAPE_ELLIPSE, the balloon is displayed as an ellipse in the viewport. The ellipse's x- and y-radii are specified by callingBalloonAttributes.setSize(Size). The balloon's corner radius attribute is ignored.- Specified by:
setBalloonShapein interfaceBalloonAttributes- Parameters:
shape- the frame shape to use, eitherAVKey.SHAPE_NONEAVKey.SHAPE_RECTANGLEorAVKey.SHAPE_ELLIPSE.- See Also:
BalloonAttributes.getBalloonShape()
-
getSize
public Size getSize()
Indicates the width and height of the balloon's shape in the viewport. If the balloon's shape isAVKey.SHAPE_RECTANGLE, then the returnedSizeindicates the rectangle's width and height. If the balloon's shape isAVKey.SHAPE_ELLIPSE, then the returnedSizeindicates the ellipse's x- and y-radii.- Specified by:
getSizein interfaceBalloonAttributes- Returns:
- the width and height of the balloon's shape in the viewport
-
setSize
public void setSize(Size size)
Specifies the width and height of the balloon's shape in the viewport. If the balloon's shape isAVKey.SHAPE_RECTANGLE, thensizespecifies the rectangle's width and height. If the balloon's shape isAVKey.SHAPE_ELLIPSE, thensizespecifies the ellipse's x- and y-radii.The balloon's content area is the rectangle obtained by taking the balloon's
sizeand shrinking it by the balloon's insets.- Specified by:
setSizein interfaceBalloonAttributes- Parameters:
size- the desired width and height of the balloon's shape in the viewport.- See Also:
BalloonAttributes.getSize(),BalloonAttributes.getMaximumSize(),BalloonAttributes.setInsets(java.awt.Insets)
-
getMaximumSize
public Size getMaximumSize()
Indicates the maximum width and height of the balloon's shape in the viewport. If the balloon's shape isAVKey.SHAPE_RECTANGLE, then the returnedSizeindicates the rectangle's maximum width and height. If the balloon's shape isAVKey.SHAPE_ELLIPSE, then the returnedSizeindicates the ellipse's maximum x- and y-radii. This returnsnullif the balloon has no maximum size.- Specified by:
getMaximumSizein interfaceBalloonAttributes- Returns:
- the maximum width and height of the balloon's shape in the viewport, or
nullif the balloon has no maximum size.
-
setMaximumSize
public void setMaximumSize(Size maxSize)
Specifies the maximum width and height of the balloon's shape in the viewport. If the balloon's shape isAVKey.SHAPE_RECTANGLE, thensizespecifies the rectangle's maximum width and height. If the balloon's shape isAVKey.SHAPE_ELLIPSE, thensizespecifies the ellipse's maximum x- and y-radii. Specifying anullsize causes the balloon to have no maximum size.- Specified by:
setMaximumSizein interfaceBalloonAttributes- Parameters:
maxSize- the desired maximum width and height of the balloon's shape in the viewport, ornullif the balloon should have no maximum size.
-
getLeaderShape
public java.lang.String getLeaderShape()
Indicates the shape of the balloon's leader.- Specified by:
getLeaderShapein interfaceBalloonAttributes- Returns:
- the balloon leader's shape, either
AVKey.SHAPE_NONEorAVKey.SHAPE_TRIANGLE. - See Also:
BalloonAttributes.setLeaderShape(String)
-
setLeaderShape
public void setLeaderShape(java.lang.String shape)
Specifies the shape of the balloon's leader. Theshapemay be one of the following:If the
shapeisAVKey.SHAPE_NONE, the leader is disabled and does not display.If the
shapeisAVKey.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 callingBalloonAttributes.setLeaderWidth(int).- Specified by:
setLeaderShapein interfaceBalloonAttributes- Parameters:
shape- the leader shape to use, eitherAVKey.SHAPE_NONEorAVKey.SHAPE_TRIANGLE.- See Also:
BalloonAttributes.getLeaderShape(),BalloonAttributes.setLeaderWidth(int)
-
getLeaderWidth
public int getLeaderWidth()
Indicates the width of the balloon's leader, in pixels. The returned value is either zero or a positive integer.- Specified by:
getLeaderWidthin interfaceBalloonAttributes- Returns:
- the width of the balloon's leader (in pixels) where it intersects the balloon's frame.
- See Also:
BalloonAttributes.setLeaderWidth(int)
-
setLeaderWidth
public void setLeaderWidth(int width)
Specifies the width of the balloon's leader, in pixels. The specifiedwidthmust be zero or a positive integer. Specifying awidthof 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.- Specified by:
setLeaderWidthin interfaceBalloonAttributes- Parameters:
width- the desired leader width, in pixels.- See Also:
BalloonAttributes.getLeaderWidth()
-
getCornerRadius
public int getCornerRadius()
Indicates the radius of each rounded corner on the balloon's rectangular frame, in pixels. The returned value is either zero or a positive integer. If the returned value is zero the balloon's rectangular frame has sharp corners. This value is ignored if the balloon's shape isAVKey.SHAPE_ELLIPSE.- Specified by:
getCornerRadiusin interfaceBalloonAttributes- Returns:
- the radius of the rounded corner's on the balloon's on the balloon's rectangular frame, in pixels.
- See Also:
BalloonAttributes.setCornerRadius(int)
-
setCornerRadius
public void setCornerRadius(int radius)
Specifies the radius of the rounded corner's on the balloon's rectangular frame in pixels. The specifiedradiusmust be zero or a positive integer. Specifying aradiusof zero causes the shape's rectangular frame to have sharp corners. This does nothing if the balloon's shape isAVKey.SHAPE_ELLIPSE.- Specified by:
setCornerRadiusin interfaceBalloonAttributes- Parameters:
radius- the desired radius, in pixels.- See Also:
BalloonAttributes.getCornerRadius()
-
getOffset
public Offset getOffset()
Indicates the location relative to the balloon's screen reference point at which the balloon's frame shape is aligned. The balloon's lower left corner begins at the returnedoffset.- Specified by:
getOffsetin interfaceBalloonAttributes- Returns:
- the location at which the balloon's lower left corner is aligned.
- See Also:
BalloonAttributes.setOffset(Offset)
-
setOffset
public void setOffset(Offset offset)
Specifies a location relative to the balloon's screen reference point at which to align the balloon's frame shape. The balloon's frame shape begins at the point indicated by theoffset. Anoffsetof (0, 0) pixels causes the balloon's lower left corner to be placed at the screen reference point. Anoffsetof (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.
- Specified by:
setOffsetin interfaceBalloonAttributes- Parameters:
offset- a location at which to align the balloon's lower left corner.- See Also:
BalloonAttributes.getOffset()
-
getInsets
public java.awt.Insets getInsets()
Indicates the amount of space between the balloon's content and its frame, in pixels. The balloon's content area decreases to account for the returned space.- Specified by:
getInsetsin interfaceBalloonAttributes- Returns:
- the padding between the balloon's content and its frame, in pixels.
- See Also:
BalloonAttributes.setInsets(java.awt.Insets)
-
setInsets
public void setInsets(java.awt.Insets insets)
Specifies the amount of space (in pixels) between the balloon's content and the edges of the balloon's frame. The balloon's content area decreases to account for the specifiedinsets. 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,insetsspecifies 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,insetsspecifies the padding between the balloon's content area and the ellipse's top, left, bottom, and right apexes.- Specified by:
setInsetsin interfaceBalloonAttributes- Parameters:
insets- the desired padding between the balloon's content and its frame, in pixels.- See Also:
BalloonAttributes.getInsets()
-
getFont
public java.awt.Font getFont()
Indicates the font used to display the balloon's text. This value may be ignored if the balloon's text contains HTML.- Specified by:
getFontin interfaceBalloonAttributes- Returns:
- the balloon's text font.
- See Also:
BalloonAttributes.setFont(java.awt.Font)
-
setFont
public void setFont(java.awt.Font font)
Specifies the font in which to display the balloon's text. The specifiedfontmay be ignored if the balloon's text contains HTML.- Specified by:
setFontin interfaceBalloonAttributes- Parameters:
font- the font to use for the balloon's text.- See Also:
BalloonAttributes.getFont()
-
getTextColor
public java.awt.Color getTextColor()
Indicates the color used to display the balloon's text. This value may be ignored if the balloon's text contains HTML.- Specified by:
getTextColorin interfaceBalloonAttributes- Returns:
- the balloon's text color.
- See Also:
BalloonAttributes.setTextColor(java.awt.Color)
-
setTextColor
public void setTextColor(java.awt.Color color)
Specifies the color in which to display the balloon's text. The specifiedcolormay be ignored if the balloon's text contains HTML.- Specified by:
setTextColorin interfaceBalloonAttributes- Parameters:
color- the color to use for the balloon's text.- See Also:
BalloonAttributes.getTextColor()
-
getImageOffset
public java.awt.Point getImageOffset()
Indicates the location of the balloon's texture (in pixels) relative to the balloon's upper left corner.- Specified by:
getImageOffsetin interfaceBalloonAttributes- Returns:
- the location of the balloon's texture in pixels.
- See Also:
BalloonAttributes.setImageOffset(java.awt.Point)
-
setImageOffset
public void setImageOffset(java.awt.Point offset)
Specifies the location of the balloon's texture (in pixels) relative to the balloon's upper left corner. The location is applied to the balloon's texture before the balloon's texture scale is applied.- Specified by:
setImageOffsetin interfaceBalloonAttributes- Parameters:
offset- the location of the balloon's texture source in pixels.- See Also:
BalloonAttributes.getImageOffset()
-
getImageOpacity
public double getImageOpacity()
Indicates the opacity of the balloon's texture as a floating-point value in the range 0.0 to 1.0.- Specified by:
getImageOpacityin interfaceBalloonAttributes- Returns:
- the balloon texture's opacity as a floating-point value from 0.0 to 1.0.
- See Also:
BalloonAttributes.setImageOpacity(double)
-
setImageOpacity
public 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. The specifiedopacityis 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.- Specified by:
setImageOpacityin interfaceBalloonAttributes- Parameters:
opacity- the balloon texture's opacity as a floating-point value from 0.0 to 1.0.- See Also:
BalloonAttributes.getImageOpacity()
-
getImageRepeat
public java.lang.String getImageRepeat()
Indicates the balloon texture's horizontal and vertical repeat mode.- Specified by:
getImageRepeatin interfaceBalloonAttributes- Returns:
- the balloon texture's repeat mode, one of
AVKey.REPEAT_NONE,AVKey.REPEAT_X,AVKey.REPEAT_Y, orAVKey.REPEAT_XY - See Also:
BalloonAttributes.setImageRepeat(String)
-
setImageRepeat
public void setImageRepeat(java.lang.String repeat)
Specifies the balloon texture's horizontal and vertical repeat mode. Therepeatmay be one of the following:If
repeatisAVKey.REPEAT_NONE, the balloon's texture is displayed according to its offset and scale without any repeating pattern.If
repeatisAVKey.REPEAT_X,AVKey.REPEAT_Y, orAVKey.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.- Specified by:
setImageRepeatin interfaceBalloonAttributes- Parameters:
repeat- the texture's repeat mode to use, one ofAVKey.REPEAT_NONE,AVKey.REPEAT_X,AVKey.REPEAT_Y, orAVKey.REPEAT_XY.- See Also:
BalloonAttributes.getImageRepeat()
-
getRestorableState
public void getRestorableState(RestorableSupport restorableSupport, RestorableSupport.StateObject context)
Saves the attributes' current state in the specifiedRestorableSupport. If theStateObjectis notnullthe state is appended to it. Otherwise the state is added to theRestorableSupportroot. This state can be restored later by callingShapeAttributes.restoreState(gov.nasa.worldwind.util.RestorableSupport, gov.nasa.worldwind.util.RestorableSupport.StateObject).- Specified by:
getRestorableStatein interfaceShapeAttributes- Overrides:
getRestorableStatein classBasicShapeAttributes- Parameters:
restorableSupport- theRestorableSupportthat receives the attributes' state.context- theStateObjectthe state is appended to, if notnull.
-
restoreState
public void restoreState(RestorableSupport restorableSupport, RestorableSupport.StateObject context)
Restores the state of any attributes contained in the specifiedRestorableSupport. If theStateObjectis notnullit's searched for attribute state values, otherwise theRestorableSupportroot is searched.- Specified by:
restoreStatein interfaceShapeAttributes- Overrides:
restoreStatein classBasicShapeAttributes- Parameters:
restorableSupport- theRestorableSupportthat contains the attributes' state.context- theStateObjectto search for state values, if notnull.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classBasicShapeAttributes
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBasicShapeAttributes
-
-