Package org.apache.jmeter.gui
Class GUIFactory
java.lang.Object
org.apache.jmeter.gui.GUIFactory
Provides a way to register and retrieve GUI classes and icons.
- 
Method SummaryModifier and TypeMethodDescriptionstatic JComponentGet a component instance which has previously been registered for this class object.static ImageIconGet an icon which has previously been registered for this class object.static ImageIconGet icon/disabledicon which has previously been registered for this class object.static voidregisterDisabledIcon(String key, ImageIcon icon) Register an icon so that it can later be retrieved viagetIcon(Class).static voidregisterGUI(String key, Class<?> guiClass, Class<?> testClass) Register a GUI class so that it can later be retrieved viagetGUI(Class).static voidregisterIcon(String key, ImageIcon icon) Register an icon so that it can later be retrieved viagetIcon(Class).
- 
Method Details- 
getIconGet an icon which has previously been registered for this class object.- Parameters:
- elementClass- the class object which we want to get an icon for
- Returns:
- the associated icon, or null if this class or its superclass has not been registered
 
- 
getIconGet icon/disabledicon which has previously been registered for this class object.- Parameters:
- elementClass- the class object which we want to get an icon for
- enabled- - is icon enabled
- Returns:
- the associated icon, or null if this class or its superclass has not been registered
 
- 
getGUIGet a component instance which has previously been registered for this class object.- Parameters:
- elementClass- the class object which we want to get an instance of
- Returns:
- an instance of the class, or null if this class or its superclass has not been registered
 
- 
registerIconRegister an icon so that it can later be retrieved viagetIcon(Class). The key should match the fully-qualified class name for the class used as the parameter when retrieving the icon.- Parameters:
- key- the name which can be used to retrieve this icon later
- icon- the icon to store
 
- 
registerDisabledIconRegister an icon so that it can later be retrieved viagetIcon(Class). The key should match the fully-qualified class name for the class used as the parameter when retrieving the icon.- Parameters:
- key- the name which can be used to retrieve this icon later
- icon- the icon to store
 
- 
registerGUIpublic static void registerGUI(String key, Class<?> guiClass, Class<?> testClass) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException Register a GUI class so that it can later be retrieved viagetGUI(Class). The key should match the fully-qualified class name for the class used as the parameter when retrieving the GUI.- Parameters:
- key- the name which can be used to retrieve this GUI later
- guiClass- the class object for the GUI component
- testClass- the class of the objects edited by this GUI
- Throws:
- InstantiationException- if an instance of the GUI class can not be instantiated
- IllegalAccessException- if access rights do not permit an instance of the GUI class to be created
- NoSuchMethodException- when no constructor can be found on the given- guiClass
- InvocationTargetException- when the called constructor throws an exception
 
 
-