net.sf.doolin.gui.service.icon
Class PropertyIconService
java.lang.Object
net.sf.doolin.gui.service.icon.AbstractIconService
net.sf.doolin.gui.service.icon.DefaultIconService
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:
- prefix - (optional) defines a classpath prefix used to load all
other classpaths defined in the property file
- icon - defines an icon
- <id> - id of the icon
- mini - path suffix for the mini size icon
- small - path suffix for the small size icon
- medium - path suffix for the medium size icon
- large - path suffix for the large size icon
- big - path suffix for the big size icon
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyIconService
public PropertyIconService()
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.