nu.zoom.swing.desktop.component.stringmenu.impl
Class StringMenuFactoryImpl

java.lang.Object
  extended by nu.zoom.swing.desktop.component.stringmenu.impl.StringMenuFactoryImpl
All Implemented Interfaces:
StringMenuFactory

public class StringMenuFactoryImpl
extends Object
implements StringMenuFactory


Constructor Summary
StringMenuFactoryImpl(Preferences preferences, Workbench workbench)
           
 
Method Summary
<T extends Comparable<T> & Serializable>
StringMenu<T>
getMenu(Class<T> clazz, String preferenceKey)
          Get a menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringMenuFactoryImpl

public StringMenuFactoryImpl(Preferences preferences,
                             Workbench workbench)
Method Detail

getMenu

public <T extends Comparable<T> & Serializable> StringMenu<T> getMenu(Class<T> clazz,
                                                                     String preferenceKey)
Description copied from interface: StringMenuFactory
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.

Specified by:
getMenu in interface StringMenuFactory
Parameters:
clazz - The that is the value of the menu items.
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.
Returns:
A StringMenu


Copyright © 2011. All Rights Reserved.