|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcreme.swing.workspace.WorkspaceFactory
This factory class enables to ensure that the identifiers chosen for workspaces are unique. It also provide a factory method to create workspaces and a method to retrieve previously built workspaces.
Constructor Summary | |
WorkspaceFactory()
|
Method Summary | |
void |
addWorkspaceFactoryListener(WorkspaceFactoryListener l)
|
protected abstract Workspace |
build(java.lang.Object id)
This is the factory method that will create the actual Workspace instances. |
Workspace |
buildWorkspace(java.lang.Object id)
This method enables to build a Workspace with the given id. |
protected void |
fireWorkspaceAddedEvent(java.lang.Object id)
|
protected void |
fireWorkspaceRemovedEvent(java.lang.Object id)
|
Workspace |
getWorkspace(java.lang.Object id)
This method gives access to existing Workspaces created by this factory. |
java.lang.Object[] |
getWorkspaceIdentifiers()
This method provides a list of the identifiers used by Workspace in this factory. |
Workspace[] |
getWorkspaces()
This method provides a list of the Workspaces available in this factory. |
void |
registerWorkspace(Workspace ws)
This method enables to register a Workspace instance in this factory even if it was not created by it. |
void |
removeWorkspaceFactoryListener(WorkspaceFactoryListener l)
|
void |
unregisterWorkspace(java.lang.Object id)
This method enables to remove the Workspace identified by id from this factory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WorkspaceFactory()
Method Detail |
public Workspace buildWorkspace(java.lang.Object id) throws java.lang.IllegalArgumentException
id
- the identifier for the new Workspace.
java.lang.IllegalArgumentException
- if id is null or another Workspace already uses it.protected abstract Workspace build(java.lang.Object id)
id
- the identifier for the new Workspace.
public Workspace getWorkspace(java.lang.Object id)
id
- the identifier of the Workspace to retrieve.
public Workspace[] getWorkspaces()
public java.lang.Object[] getWorkspaceIdentifiers()
public void unregisterWorkspace(java.lang.Object id)
id
- the identifier of the Workspace to remove.public void registerWorkspace(Workspace ws) throws java.lang.IllegalArgumentException
ws
- the Workspace to register.
java.lang.IllegalArgumentException
- if ws is null, its id is null or a Workspace with the same id
already exists.public void addWorkspaceFactoryListener(WorkspaceFactoryListener l)
l
- public void removeWorkspaceFactoryListener(WorkspaceFactoryListener l)
l
- protected void fireWorkspaceAddedEvent(java.lang.Object id)
protected void fireWorkspaceRemovedEvent(java.lang.Object id)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |