pl.edu.agh.cast.backward.figure.icons
Class NodeIconProvider

java.lang.Object
  extended by pl.edu.agh.cast.backward.figure.icons.NodeIconProvider

public final class NodeIconProvider
extends Object

Provides uniform and centralized way of accessing NodeIcons. Manages icons provided by all extenders of pl.edu.agh.cast.nodeIcons extension point.

Author:
AGH CAST Team

Method Summary
 Collection<NodeIcon> getAllNodeIcons()
           
 NodeIcon getDefaultIcon()
          Returns the default NodeIcon.
 String getFriendlyName(String imageId)
          Returns localized display name for given icon image.
 Map<String,List<NodeIcon>> getGroupedNodeIcons()
          Returns a map of NodeIcons groups, with localized group names as keys.
 String getIconId(String nodeType)
          Returns Id of the icon image for given node type.
static NodeIconProvider getInstance()
          Returns single, shared instance of NodeIconProvider.
 NodeIcon getNodeIcon(String nodeType)
          Returns NodeIcon for given node type.
 String getSmallIconId(String nodeType)
          Returns Id of the small icon image for given node type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static NodeIconProvider getInstance()
Returns single, shared instance of NodeIconProvider.

Returns:
single, shared instance of NodeIconProvider

getNodeIcon

public NodeIcon getNodeIcon(String nodeType)
Returns NodeIcon for given node type.

Parameters:
nodeType - type of the node
Returns:
node icon for requested type

getIconId

public String getIconId(String nodeType)
Returns Id of the icon image for given node type.

Parameters:
nodeType - type of the node
Returns:
Id of the icon image for requested type

getSmallIconId

public String getSmallIconId(String nodeType)
Returns Id of the small icon image for given node type.

Parameters:
nodeType - type of the node
Returns:
Id of the small icon image for requested type

getFriendlyName

public String getFriendlyName(String imageId)
Returns localized display name for given icon image.

Parameters:
imageId - id of the icon image
Returns:
localized icon description

getAllNodeIcons

public Collection<NodeIcon> getAllNodeIcons()

getGroupedNodeIcons

public Map<String,List<NodeIcon>> getGroupedNodeIcons()
Returns a map of NodeIcons groups, with localized group names as keys.

Returns:
map of NodeIcons groups

getDefaultIcon

public NodeIcon getDefaultIcon()
Returns the default NodeIcon.

Returns:
the default NodeIcon


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.