org.pietschy.command
Class AbstractReflectionIconFactory
java.lang.Object
org.pietschy.command.AbstractReflectionIconFactory
- IconFactory
public abstract class AbstractReflectionIconFactory
extends java.lang.Object
This implementation provides the basic infrastructure for translating the icon
values to method calls. Subclasses must implement a method for every method type
specified by the configuration files.
For example, a configuration of
<icon type="icon-factory">createColoredIcon(200,127,127)<icon>
will result in a reflective call to the method
public Icon createColoredIcon(String s1, String s2, String s3)
on the subclass.
Icon | createIcon(String iconValue) - Converts the the iconValue into a method call on this class.
|
createIcon
public Icon createIcon(String iconValue)
throws Exception
Converts the the iconValue into a method call on this class.
For example, a configuration of
<icon type="icon-factory">createColoredIcon(200,127,127)<icon>
will result in a reflective call to the method
public Icon createColoredIcon(String s1, String s2, String s3)
on the subclass.
- createIcon in interface IconFactory
iconValue
- the icon text specified in the configuration file which will be interpreted as a
method call on the subclass.
- an Icon created by the method specified in iconValue.