public class PanelGroupManager
extends java.lang.Object
implements java.io.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.
Modifier | Constructor and Description |
---|---|
protected |
PanelGroupManager()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
deregisterPanelGroup(java.lang.Class panelGroup)
Unregisters a
AbstractPanelGroup class type if it
was previously registered. |
static PanelGroupManager |
getManager()
The singleton
PanelGroupManager instance. |
AbstractPanelGroup |
getPanelGroup(java.lang.Object reference)
Gets the default
AbstractPanelGroup class type. |
void |
registerPanelGroup(java.lang.Class panelGroup)
Registers a new
AbstractPanelGroup class type if it
wasn't already done. |
void |
setDefaultType(java.lang.Class panelGroup)
Sets as default one of the
AbstractPanelGroup class type
previously registered. |
public static PanelGroupManager getManager()
The singleton PanelGroupManager
instance.
public void registerPanelGroup(java.lang.Class panelGroup)
Registers a new AbstractPanelGroup
class type if it
wasn't already done.
panelGroup
- the new AbstractPanelGroup
class type to registerderegisterPanelGroup(Class)
public void deregisterPanelGroup(java.lang.Class panelGroup)
Unregisters a AbstractPanelGroup
class type if it
was previously registered.
If the type to unregister is the default, sets default to null
.
panelGroup
- the AbstractPanelGroup
class type to unregisterregisterPanelGroup(Class)
public void setDefaultType(java.lang.Class panelGroup)
Sets as default one of the AbstractPanelGroup
class type
previously registered.
panelGroup
- a AbstractPanelGroup
class type#getPanelGroup()
public AbstractPanelGroup getPanelGroup(java.lang.Object reference) throws java.lang.Exception
Gets the default AbstractPanelGroup
class type.
AbstractPanelGroup
class type or null
if isn't anyjava.lang.Exception
- any exception produced loading the AbstractPanel
setDefaultType(Class)