it.tidalwave.role
Interface IconProvider

Package class diagram package IconProvider
All Known Subinterfaces:
MutableIconProvider
All Known Implementing Classes:
MutableIconProviderSupport

public interface IconProvider

The role of an object that can provide an icon for rendering.

Version:
$Id$
Author:
Fabrizio Giudici
Status: draft API

Field Summary
static IconProvider DEFAULT
          A default IconProvider with a empty icon.
static Class<IconProvider> IconProvider
           
 
Method Summary
 Icon getIcon(int requestedSize)
          Returns the icon for this object.
 

Field Detail

IconProvider

static final Class<IconProvider> IconProvider

DEFAULT

static final IconProvider DEFAULT
A default IconProvider with a empty icon.

Method Detail

getIcon

@Nonnull
Icon getIcon(@Nonnegative
                     int requestedSize)
Returns the icon for this object. Note that the size 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


Copyright © 2009-2012 Tidalwave s.a.s.. All Rights Reserved.