public class WorkspaceInformationImpl extends Object implements WorkspaceInformation
Modifier and Type | Class and Description |
---|---|
static class |
WorkspaceInformationImpl.Status |
Modifier and Type | Field and Description |
---|---|
private List<PropertyChangeListener> |
listeners |
private String |
name |
private String |
source |
private WorkspaceInformationImpl.Status |
status |
EVENT_CLOSE, EVENT_OPEN, EVENT_RENAME, EVENT_SET_SOURCE
Constructor and Description |
---|
WorkspaceInformationImpl(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(PropertyChangeListener listener)
Add change listener.
|
void |
close() |
void |
fireChangeEvent(String eventName,
Object oldValue,
Object newValue) |
String |
getName()
Returns the name of the workspace.
|
String |
getSource()
Returns the workspace's source or null if missing.
|
WorkspaceInformationImpl.Status |
getStatus() |
boolean |
hasSource()
Returns true if the workspace has a source.
|
void |
invalid() |
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.
|
void |
open() |
void |
removeChangeListener(PropertyChangeListener listener)
Remove change listener.
|
void |
setName(String name) |
void |
setSource(String source) |
String |
toString() |
private String name
private WorkspaceInformationImpl.Status status
private String source
private final transient List<PropertyChangeListener> listeners
public WorkspaceInformationImpl(String name)
public String getName()
WorkspaceInformation
The name can't be null and has a default value (e.g. Workspace 1).
getName
in interface WorkspaceInformation
public WorkspaceInformationImpl.Status getStatus()
public void setName(String name)
public void setSource(String source)
public String getSource()
WorkspaceInformation
getSource
in interface WorkspaceInformation
public boolean hasSource()
WorkspaceInformation
hasSource
in interface WorkspaceInformation
public void open()
public void close()
public void invalid()
public boolean isOpen()
WorkspaceInformation
isOpen
in interface WorkspaceInformation
public boolean isClosed()
WorkspaceInformation
isClosed
in interface WorkspaceInformation
public boolean isInvalid()
WorkspaceInformation
isInvalid
in interface WorkspaceInformation
public void addChangeListener(PropertyChangeListener listener)
WorkspaceInformation
addChangeListener
in interface WorkspaceInformation
listener
- change listenerpublic void removeChangeListener(PropertyChangeListener listener)
WorkspaceInformation
removeChangeListener
in interface WorkspaceInformation
listener
- change listenerCopyright © 2007–2016 Gephi Consortium. All rights reserved.