Package org.gephi.project.impl
Class WorkspaceInformationImpl
- java.lang.Object
-
- org.gephi.project.impl.WorkspaceInformationImpl
-
- All Implemented Interfaces:
WorkspaceInformation
public class WorkspaceInformationImpl extends Object implements WorkspaceInformation
- Author:
- Mathieu Bastian
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWorkspaceInformationImpl.Status
-
Field Summary
Fields Modifier and Type Field Description private List<PropertyChangeListener>listenersprivate Stringnameprivate Stringsourceprivate WorkspaceInformationImpl.Statusstatus-
Fields inherited from interface org.gephi.project.api.WorkspaceInformation
EVENT_CLOSE, EVENT_OPEN, EVENT_RENAME, EVENT_SET_SOURCE
-
-
Constructor Summary
Constructors Constructor Description WorkspaceInformationImpl(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChangeListener(PropertyChangeListener listener)Add change listener.voidclose()voidfireChangeEvent(String eventName, Object oldValue, Object newValue)StringgetName()Returns the name of the workspace.StringgetSource()Returns the workspace's source or null if missing.WorkspaceInformationImpl.StatusgetStatus()booleanhasSource()Returns true if the workspace has a source.voidinvalid()booleanisClosed()Returns true if the workspace is closed.booleanisInvalid()Returns true if the workspace is invalid.booleanisOpen()Returns true if the workspace is open.voidopen()voidremoveChangeListener(PropertyChangeListener listener)Remove change listener.voidsetName(String name)voidsetSource(String source)StringtoString()
-
-
-
Field Detail
-
listeners
private final transient List<PropertyChangeListener> listeners
-
name
private String name
-
status
private WorkspaceInformationImpl.Status status
-
source
private String source
-
-
Constructor Detail
-
WorkspaceInformationImpl
public WorkspaceInformationImpl(String name)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:WorkspaceInformationReturns the name of the workspace.The name can't be null and has a default value (e.g. Workspace 1).
- Specified by:
getNamein interfaceWorkspaceInformation- Returns:
- the workspace's name
-
setName
public void setName(String name)
-
getStatus
public WorkspaceInformationImpl.Status getStatus()
-
getSource
public String getSource()
Description copied from interface:WorkspaceInformationReturns the workspace's source or null if missing.- Specified by:
getSourcein interfaceWorkspaceInformation- Returns:
- workspace's source or null if missing
-
setSource
public void setSource(String source)
-
hasSource
public boolean hasSource()
Description copied from interface:WorkspaceInformationReturns true if the workspace has a source.- Specified by:
hasSourcein interfaceWorkspaceInformation- Returns:
- true if has a source, false otherwise
-
open
public void open()
-
close
public void close()
-
invalid
public void invalid()
-
isOpen
public boolean isOpen()
Description copied from interface:WorkspaceInformationReturns true if the workspace is open.- Specified by:
isOpenin interfaceWorkspaceInformation- Returns:
- true if open, false otherwise
-
isClosed
public boolean isClosed()
Description copied from interface:WorkspaceInformationReturns true if the workspace is closed.- Specified by:
isClosedin interfaceWorkspaceInformation- Returns:
- true if closed, false otherwise
-
isInvalid
public boolean isInvalid()
Description copied from interface:WorkspaceInformationReturns true if the workspace is invalid.- Specified by:
isInvalidin interfaceWorkspaceInformation- Returns:
- true if invalid, false otherwise
-
addChangeListener
public void addChangeListener(PropertyChangeListener listener)
Description copied from interface:WorkspaceInformationAdd change listener.- Specified by:
addChangeListenerin interfaceWorkspaceInformation- Parameters:
listener- change listener
-
removeChangeListener
public void removeChangeListener(PropertyChangeListener listener)
Description copied from interface:WorkspaceInformationRemove change listener.- Specified by:
removeChangeListenerin interfaceWorkspaceInformation- Parameters:
listener- change listener
-
-