org.openbp.guiclient.model.item
Class ItemEditorRegistry

java.lang.Object
  extended by org.openbp.guiclient.model.item.ItemEditorRegistry

public final class ItemEditorRegistry
extends java.lang.Object

Registry that maps item types (see ItemTypes) to instances of item editors (ItemEditor) that can be used to edit the items. This class is a singleton.

Author:
Heiko Erhardt

Method Summary
static ItemEditorRegistry getInstance()
          Gets the singleton instance of this class.
 ItemEditor lookupItemEditor(java.lang.String itemType)
          Looks up an item editor.
 void registerItemEditor(java.lang.String itemType, ItemEditor editor)
          Registers an item editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ItemEditorRegistry getInstance()
Gets the singleton instance of this class.


lookupItemEditor

public ItemEditor lookupItemEditor(java.lang.String itemType)
Looks up an item editor.

Parameters:
itemType - Item type
Returns:
Editor to use for this type of item or null

registerItemEditor

public void registerItemEditor(java.lang.String itemType,
                               ItemEditor editor)
Registers an item editor.

Parameters:
itemType - Item type
editor - Editor to use for this type of item


Copyright © 2011. All Rights Reserved.