Class TLcdMS2525bObjectIconProvider
java.lang.Object
com.luciad.symbology.milstd2525b.view.TLcdMS2525bObjectIconProvider
- All Implemented Interfaces:
ILcdObjectIconProvider
Icon provider for
ILcdMS2525bCoded objects. When an object also implements
ILcdStyledMilitarySymbol, its style will be associated with the icon. Otherwise, a default
style will be used. This default style can be customized using the methods
getDefaultMilitarySymbolStyle() and setDefaultMilitarySymbolStyle(TLcdMilitarySymbolStyle).
The icons generated by this ILcdObjectIconProvider are cached using a simple LRU cache.
The default maximum cache size is 5000 icons.
If you wish to adjust the max cache size, you can do this using the following property:
com.luciad.symbology.iconsymbols.MAX_CACHE_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanGetIcon(Object aObject) Returns whether an icon can be returned for a given object.Returns the defaultTLcdMilitarySymbolStylethat is used for objects which don't implementILcdStyledMilitarySymbol.Deprecated.Returns an icon forILcdMS2525bCodedobjects.intDeprecated.Replaced by the more general methodgetDefaultStyle().booleanDeprecated.Replaced by the more general methodgetDefaultStyle().voidsetDefaultMilitarySymbolStyle(TLcdMilitarySymbolStyle aDefaultStyle) Sets a defaultTLcdMilitarySymbolStyleinstance that is used for objects which don't implementILcdStyledMilitarySymbol.voidsetDefaultStyle(ILcdMS2525bStyle aDefaultStyle) Deprecated.voidsetIconSize(int aSize) Deprecated.Replaced by the more general methodsetDefaultStyle(ILcdMS2525bStyle).voidsetOutlined(boolean aIsOutlined) Deprecated.Replaced by the more general methodsetDefaultStyle(ILcdMS2525bStyle).
-
Constructor Details
-
TLcdMS2525bObjectIconProvider
public TLcdMS2525bObjectIconProvider()
-
-
Method Details
-
setDefaultStyle
Deprecated.Sets a defaultILcdMS2525bStyleinstance that is used for objects which don't implementILcdMS2525bStyle.- Parameters:
aDefaultStyle- AILcdMS2525bStyleinstance.
-
getDefaultStyle
Deprecated.usegetDefaultMilitarySymbolStyle()instead.Returns the defaultILcdMS2525bStyleinstance that is used for objects which don't implementILcdMS2525bStyle.- Returns:
- the default
ILcdMS2525bStyleinstance that is used for objects which don't implementILcdMS2525bStyle.
-
setDefaultMilitarySymbolStyle
Sets a defaultTLcdMilitarySymbolStyleinstance that is used for objects which don't implementILcdStyledMilitarySymbol.- Parameters:
aDefaultStyle- ATLcdMilitarySymbolStyleinstance. Nevernull.- Throws:
NullPointerException- If the givenTLcdMilitarySymbolStyleisnull.- Since:
- 2024.0
-
getDefaultMilitarySymbolStyle
Returns the defaultTLcdMilitarySymbolStylethat is used for objects which don't implementILcdStyledMilitarySymbol.- Returns:
- the default
TLcdMilitarySymbolStylethat is used for objects which don't implementILcdStyledMilitarySymbol. - Since:
- 2024.0
-
setIconSize
Deprecated.Replaced by the more general methodsetDefaultStyle(ILcdMS2525bStyle).Sets the default icon size that is used for objects that don't implementILcdMS2525bStyled..- Parameters:
aSize- the default icon size.
-
getIconSize
Deprecated.Replaced by the more general methodgetDefaultStyle().Returns the default icon size.- Returns:
- the default icon size.
-
setOutlined
Deprecated.Replaced by the more general methodsetDefaultStyle(ILcdMS2525bStyle).Sets the default outline property that is used for objects that don't implementILcdMS2525bStyled.- Parameters:
aIsOutlined- the default outline property.
-
getOutlined
Deprecated.Replaced by the more general methodgetDefaultStyle().Returns the default outline property.- Returns:
- The default outline property.
-
getIcon
Returns an icon forILcdMS2525bCodedobjects. If the given object also implements theILcdMS2525bStyledinterface, its style will be associated with the icon. When this is not the case, a default style will be used. This default style can be customized using the methodsgetDefaultStyle()andsetDefaultStyle(ILcdMS2525bStyle).- Specified by:
getIconin interfaceILcdObjectIconProvider- Parameters:
aObject- Should be an instance ofILcdMS2525bCodedand optionally also an instance ofILcdMS2525bStyled.- Returns:
- An
ILcdIconthat also implementsILcdAnchoredIcon. - Throws:
IllegalArgumentException- if the given object isn't an instance ofILcdMS2525bCoded.
-
canGetIcon
Description copied from interface:ILcdObjectIconProviderReturns whether an icon can be returned for a given object.- Specified by:
canGetIconin interfaceILcdObjectIconProvider- Parameters:
aObject- to object to check whether an icon can be provided for it.- Returns:
- whether an icon can be returned for a given object.
-
getDefaultMilitarySymbolStyle()instead.