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