nu.zoom.swing.desktop.component.stringmenu
Interface StringMenuFactory

All Known Implementing Classes:
StringMenuFactoryImpl

public interface StringMenuFactory

Creates string menues.


Method Summary
<T extends Comparable<T> & Serializable>
StringMenu<T>
getCachedMenu(Class<T> clazz, String preferenceKey)
          Retrieve a previously created menu.
<T extends Comparable<T> & Serializable>
StringMenu<T>
getMenu(Class<T> clazz, String preferenceKey, String menuPresentationName, Icon menuIcon)
          Get a menu.
 

Method Detail

getMenu

<T extends Comparable<T> & Serializable> StringMenu<T> getMenu(Class<T> clazz,
                                                              String preferenceKey,
                                                              String menuPresentationName,
                                                              Icon menuIcon)
Get a menu. The menu will be cached with the preferenceKey as the cache key, subsequent calls to this method with the same preference key will always return the same menu instance.

Parameters:
preferenceKey - The key to use to store the menu when the application shuts down. Will be used to restore the menu when it is created.
menuPresentationName - The menu will have this set as its name.
menuIcon - The icon to set on the menu. May be null.
Returns:
A StringMenu

getCachedMenu

<T extends Comparable<T> & Serializable> StringMenu<T> getCachedMenu(Class<T> clazz,
                                                                    String preferenceKey)
Retrieve a previously created menu.

Parameters:
preferencesKey - The key used to create the menu.
Returns:
The menu or null if not created.
See Also:
#getMenu(String, String, Icon)


Copyright © 2010. All Rights Reserved.