|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DockableFactory
This interface is designed to provide an API for allowing the
DockingManager
to obtain Dockable
instances on the fly. It
has a single method, getDockableComponent(String dockableId)
,
responsible for returning Component
instances, possibly creating and
registering Dockables
in the process.
Implementations of this interface will be application-specific and may be
plugged into the DockingManager
via the call
DockingManager.setDockableFactory(myFactory)
. Throughout the
framework, FlexDock makes many calls to
DockingManager.getDockable(String id)
under the assumption that at
some point, the requested Dockable
instance has been registered via
DockingManager.registerDockable(Dockable dockable)
.
In the event that a Dockable
with the specified ID has never been
formally registered, the DockingManager
will check for a factory via
DockingManager.getDockableFactory()
. If a factory is present, its
getDockableComponent()
method is invoked. If a valid
Component
is returned from getDockableComponent()
, the
DockingManager will attempt to register it as a Dockable
and return
the Dockable
.
DockableFactory
implementations are especially useful for
applications with persisted layouts where the Dockables
required
during a layout restoration may be constructed automatically on demand by the
framework.
Nested Class Summary | |
---|---|
static class |
DockableFactory.Stub
An empty implementation of DockableFactory . |
Method Summary | |
---|---|
Dockable |
getDockable(String dockableId)
Returns a Dockable for the specified Dockable ID, possibly
creating and registering it in the process. |
Component |
getDockableComponent(String dockableId)
Returns a Component for the specified Dockable ID, possibly
creating and registering a Dockable in the process. |
Method Detail |
---|
Component getDockableComponent(String dockableId)
Component
for the specified Dockable ID, possibly
creating and registering a Dockable
in the process.
dockableId
- the ID for the requested dockable Component
Component
for the specified IDDockable getDockable(String dockableId)
Dockable
for the specified Dockable ID, possibly
creating and registering it in the process.
dockableId
- the ID for the requested Dockable
Dockable
for the specified ID
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |