public class TLcdMS2525bObjectIconProvider extends Object implements ILcdObjectIconProvider
ILcdMS2525bCoded
objects. When an object also implements
ILcdMS2525bStyled
, its style will be associated with the icon. Otherwise, a default
style will be used. This default style can be customized using the methods
getDefaultStyle()
and setDefaultStyle(ILcdMS2525bStyle)
.
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 and Description |
---|
TLcdMS2525bObjectIconProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
canGetIcon(Object aObject)
Returns whether an icon can be returned for a given object.
|
ILcdMS2525bStyle |
getDefaultStyle()
Returns the default
ILcdMS2525bStyle instance that is used for objects which don't
implement ILcdMS2525bStyled . |
ILcdIcon |
getIcon(Object aObject)
Returns an icon for
ILcdMS2525bCoded objects. |
int |
getIconSize()
Deprecated.
Replaced by the more general method
getDefaultStyle() . |
boolean |
getOutlined()
Deprecated.
Replaced by the more general method
getDefaultStyle() . |
void |
setDefaultStyle(ILcdMS2525bStyle aDefaultStyle)
Sets a default
ILcdMS2525bStyle instance that is used for objects which don't
implement ILcdMS2525bStyled . |
void |
setIconSize(int aSize)
Deprecated.
Replaced by the more general method
setDefaultStyle(ILcdMS2525bStyle) . |
void |
setOutlined(boolean aIsOutlined)
Deprecated.
Replaced by the more general method
setDefaultStyle(ILcdMS2525bStyle) . |
public void setDefaultStyle(ILcdMS2525bStyle aDefaultStyle)
ILcdMS2525bStyle
instance that is used for objects which don't
implement ILcdMS2525bStyled
.aDefaultStyle
- A ILcdMS2525bStyle
instance.public ILcdMS2525bStyle getDefaultStyle()
ILcdMS2525bStyle
instance that is used for objects which don't
implement ILcdMS2525bStyled
.ILcdMS2525bStyle
instance that is used for objects which don't
implement ILcdMS2525bStyled
.public void setIconSize(int aSize)
setDefaultStyle(ILcdMS2525bStyle)
.ILcdMS2525bStyled
..aSize
- the default icon size.public int getIconSize()
getDefaultStyle()
.public void setOutlined(boolean aIsOutlined)
setDefaultStyle(ILcdMS2525bStyle)
.ILcdMS2525bStyled
.aIsOutlined
- the default outline property.public boolean getOutlined()
getDefaultStyle()
.public ILcdIcon getIcon(Object aObject) throws IllegalArgumentException
ILcdMS2525bCoded
objects. If the given object also implements
the ILcdMS2525bStyled
interface, 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 methods getDefaultStyle()
and setDefaultStyle(ILcdMS2525bStyle)
.getIcon
in interface ILcdObjectIconProvider
aObject
- Should be an instance of ILcdMS2525bCoded
and optionally also an
instance of ILcdMS2525bStyled
.ILcdIcon
that also implements ILcdAnchoredIcon
.IllegalArgumentException
- if the given object isn't an instance of ILcdMS2525bCoded
.public boolean canGetIcon(Object aObject)
ILcdObjectIconProvider
canGetIcon
in interface ILcdObjectIconProvider
aObject
- to object to check whether an icon can be provided for it.