net.sf.doolin.gui.service.icon
Class PropertyIconService

java.lang.Object
  extended by net.sf.doolin.gui.service.icon.AbstractIconService
      extended by net.sf.doolin.gui.service.icon.DefaultIconService
          extended by net.sf.doolin.gui.service.icon.PropertyIconService
All Implemented Interfaces:
IconService

public class PropertyIconService
extends DefaultIconService

This icon manager loads icon definitions from a property file. This property file is configured as a tree of properties, with following nodes:

For example, we can consider the following property file:
 prefix =
 /my/application/
 
 icon.Frame.small=Main16.gif icon.Frame.medium=Main32.gif
 
 icon.Button.small=Button16.gif icon.Button.medium=Button32.gif
 
 icon.Logo.big=Logo.gif 

Author:
Damien Coraboeuf

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.doolin.gui.service.icon.AbstractIconService
AbstractIconService.IconItem
 
Constructor Summary
PropertyIconService()
           
 
Method Summary
 void doInit()
          Loads all definitions from the property file.
 Properties getProperties()
           
 void setProperties(Properties properties)
           
 
Methods inherited from class net.sf.doolin.gui.service.icon.DefaultIconService
loadIconObject, toURL
 
Methods inherited from class net.sf.doolin.gui.service.icon.AbstractIconService
getIcon, getIconDefinitions, getIconURL, init, load, setIconDefinitions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyIconService

public PropertyIconService()
Method Detail

getProperties

public Properties getProperties()
Returns:
Returns the properties.

setProperties

public void setProperties(Properties properties)
Parameters:
properties - The properties to set.

doInit

@PostConstruct
public void doInit()
            throws Exception
Loads all definitions from the property file.

Throws:
Exception - If there is problem at initialisation


Copyright © 2011. All Rights Reserved.