Package org.gephi.project.impl
Class WorkspaceImpl
- java.lang.Object
-
- org.gephi.project.impl.WorkspaceImpl
-
-
Field Summary
Fields Modifier and Type Field Description private intidprivate org.openide.util.lookup.InstanceContentinstanceContentprivate org.openide.util.Lookuplookupprivate ProjectImplprojectprivate WorkspaceInformationImplworkspaceInformationprivate WorkspaceMetaDataImplworkspaceMetaData
-
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 voidadd(Object instance)Adds an instance to this workspaces lookup.protected voidclose()intgetId()Returns the workspace unique identifierorg.openide.util.LookupgetLookup()Get any instance in the current lookup.StringgetName()Returns the name of the workspace.ProjectImplgetProject()Returns the project this workspace belong toStringgetSource()Returns the workspace's source or null if missing.WorkspaceMetaDatagetWorkspaceMetadata()Returns the workspace's metadata.booleanhasSource()Returns true if the workspace has a source.booleanisClosed()Returns true if the workspace is closed.booleanisInvalid()Returns true if the workspace is invalid.booleanisOpen()Returns true if the workspace is open.protected voidopen()voidremove(Object instance)Removes an instance from this workspaces lookup.StringtoString()
-
-
-
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:WorkspaceAdds an instance to this workspaces lookup.
-
remove
public void remove(Object instance)
Description copied from interface:WorkspaceRemoves an instance from this workspaces lookup.
-
getLookup
public org.openide.util.Lookup getLookup()
Description copied from interface:WorkspaceGet any instance in the current lookup. All important API in Gephi are storing models in this lookup.May contains:
GraphModelLayoutModelStatisticsModelFiltersModelPreviewModel- ...
-
getProject
public ProjectImpl getProject()
Description copied from interface:WorkspaceReturns the project this workspace belong to- Specified by:
getProjectin interfaceWorkspace- Returns:
- the workspace's project
-
getId
public int getId()
Description copied from interface:WorkspaceReturns the workspace unique identifier
-
isOpen
public boolean isOpen()
Description copied from interface:WorkspaceReturns true if the workspace is open.
-
isClosed
public boolean isClosed()
Description copied from interface:WorkspaceReturns true if the workspace is closed.
-
isInvalid
public boolean isInvalid()
Description copied from interface:WorkspaceReturns true if the workspace is invalid.
-
close
protected void close()
-
open
protected void open()
-
getName
public String getName()
Description copied from interface:WorkspaceReturns 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:WorkspaceReturns true if the workspace has a source.
-
getSource
public String getSource()
Description copied from interface:WorkspaceReturns the workspace's source or null if missing.
-
getWorkspaceMetadata
public WorkspaceMetaData getWorkspaceMetadata()
Description copied from interface:WorkspaceReturns the workspace's metadata.- Specified by:
getWorkspaceMetadatain interfaceWorkspace- Returns:
- workspace metadata
-
-