Class PanelGroupManager

java.lang.Object
org.gvsig.gui.beans.panelGroup.PanelGroupManager
All Implemented Interfaces:
Serializable

public class PanelGroupManager extends Object implements Serializable

Implemented to use the AbstractPanelGroup type desired.

This class allows having different implementations of AbstractPanelGroup and only load in memory the class of some of them, whom have previously been imported to future use. Then, when a graphical interface would need use a AbstractPanelGroup instance, will instance an object of the class selected (set previously as default) of the registered types in this manager.

Version:
18/10/2007
Author:
Pablo Piqueras Bartolomé (pablo.piqueras@iver.es)
See Also:
  • Constructor Details

    • PanelGroupManager

      protected PanelGroupManager()

      Default constructor.

  • Method Details

    • getManager

      public static PanelGroupManager getManager()

      The singleton PanelGroupManager instance.

      Returns:
      current manager used, or if didn't exist any, a new one
    • registerPanelGroup

      public void registerPanelGroup(Class panelGroup)

      Registers a new AbstractPanelGroup class type if it wasn't already done.

      Parameters:
      panelGroup - the new AbstractPanelGroup class type to register
      See Also:
    • deregisterPanelGroup

      public void deregisterPanelGroup(Class panelGroup)

      Unregisters a AbstractPanelGroup class type if it was previously registered.

      If the type to unregister is the default, sets default to null.

      Parameters:
      panelGroup - the AbstractPanelGroup class type to unregister
      See Also:
    • setDefaultType

      public void setDefaultType(Class panelGroup)

      Sets as default one of the AbstractPanelGroup class type previously registered.

      Parameters:
      panelGroup - a AbstractPanelGroup class type
      See Also:
      • invalid reference
        #getPanelGroup()
    • getPanelGroup

      public AbstractPanelGroup getPanelGroup(Object reference) throws Exception

      Gets the default AbstractPanelGroup class type.

      return the default AbstractPanelGroup class type or null if isn't any
      Throws:
      Exception - any exception produced loading the AbstractPanel
      See Also: