Package org.gephi.project.impl
Class WorkspaceImpl
- java.lang.Object
-
- org.gephi.project.impl.WorkspaceImpl
-
-
Field Summary
Fields Modifier and Type Field Description private int
id
private org.openide.util.lookup.InstanceContent
instanceContent
private org.openide.util.Lookup
lookup
private ProjectImpl
project
private WorkspaceInformationImpl
workspaceInformation
private WorkspaceMetaDataImpl
workspaceMetaData
-
Constructor Summary
Constructors Constructor Description WorkspaceImpl(ProjectImpl project, int id)
WorkspaceImpl(ProjectImpl project, int id, String name, Object... objectsForLookup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Object instance)
Adds an instance to this workspaces lookup.protected void
close()
int
getId()
Returns the workspace unique identifierorg.openide.util.Lookup
getLookup()
Get any instance in the current lookup.String
getName()
Returns the name of the workspace.ProjectImpl
getProject()
Returns the project this workspace belong toString
getSource()
Returns the workspace's source or null if missing.WorkspaceMetaData
getWorkspaceMetadata()
Returns the workspace's metadata.boolean
hasSource()
Returns true if the workspace has a source.boolean
isClosed()
Returns true if the workspace is closed.boolean
isInvalid()
Returns true if the workspace is invalid.boolean
isOpen()
Returns true if the workspace is open.protected void
open()
void
remove(Object instance)
Removes an instance from this workspaces lookup.String
toString()
-
-
-
Field Detail
-
instanceContent
private final transient org.openide.util.lookup.InstanceContent instanceContent
-
lookup
private final transient org.openide.util.Lookup lookup
-
id
private final int id
-
project
private final ProjectImpl project
-
workspaceInformation
private final WorkspaceInformationImpl workspaceInformation
-
workspaceMetaData
private final WorkspaceMetaDataImpl workspaceMetaData
-
-
Constructor Detail
-
WorkspaceImpl
public WorkspaceImpl(ProjectImpl project, int id)
-
WorkspaceImpl
public WorkspaceImpl(ProjectImpl project, int id, String name, Object... objectsForLookup)
-
-
Method Detail
-
add
public void add(Object instance)
Description copied from interface:Workspace
Adds an instance to this workspaces lookup.
-
remove
public void remove(Object instance)
Description copied from interface:Workspace
Removes an instance from this workspaces lookup.
-
getLookup
public org.openide.util.Lookup getLookup()
Description copied from interface:Workspace
Get any instance in the current lookup. All important API in Gephi are storing models in this lookup.May contains:
GraphModel
LayoutModel
StatisticsModel
FiltersModel
PreviewModel
- ...
-
getProject
public ProjectImpl getProject()
Description copied from interface:Workspace
Returns the project this workspace belong to- Specified by:
getProject
in interfaceWorkspace
- Returns:
- the workspace's project
-
getId
public int getId()
Description copied from interface:Workspace
Returns the workspace unique identifier
-
isOpen
public boolean isOpen()
Description copied from interface:Workspace
Returns true if the workspace is open.
-
isClosed
public boolean isClosed()
Description copied from interface:Workspace
Returns true if the workspace is closed.
-
isInvalid
public boolean isInvalid()
Description copied from interface:Workspace
Returns true if the workspace is invalid.
-
close
protected void close()
-
open
protected void open()
-
getName
public String getName()
Description copied from interface:Workspace
Returns the name of the workspace.The name can't be null and has a default value (e.g. Workspace 1).
-
hasSource
public boolean hasSource()
Description copied from interface:Workspace
Returns true if the workspace has a source.
-
getSource
public String getSource()
Description copied from interface:Workspace
Returns the workspace's source or null if missing.
-
getWorkspaceMetadata
public WorkspaceMetaData getWorkspaceMetadata()
Description copied from interface:Workspace
Returns the workspace's metadata.- Specified by:
getWorkspaceMetadata
in interfaceWorkspace
- Returns:
- workspace metadata
-
-