Package it.tidalwave.role.ui
Interface IconProvider
-
- All Known Subinterfaces:
MutableIconProvider
- All Known Implementing Classes:
MutableIconProviderSupport
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface IconProvider
The role of an object that can provide an icon for rendering.- Author:
- Fabrizio Giudici
- Status: draft API
- Stereotype:
- Role
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Class<IconProvider>
_IconProvider_
static IconProvider
DEFAULT
A defaultIconProvider
with a empty icon.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.swing.Icon
getIcon(int requestedSize)
Returns the icon for this object.
-
-
-
Field Detail
-
_IconProvider_
static final java.lang.Class<IconProvider> _IconProvider_
-
DEFAULT
static final IconProvider DEFAULT
A defaultIconProvider
with a empty icon.
-
-
Method Detail
-
getIcon
@Nonnull javax.swing.Icon getIcon(@Nonnegative int requestedSize)
Returns the icon for this object. Note that thesize
parameter is just a hint to allow implementations to pick the correctly sized icon in an optimized fashion. In particular, implementations should try to do their best for providing an icon whose size is equal or greater than the requested one, but this is not guaranteed. It's up to the client code to eventually resize the returned icon for its purposes.- Parameters:
requestedSize
- the requested icon size- Returns:
- the icon
-
-