Package org.gephi.project.api
Interface WorkspaceInformation
-
public interface WorkspaceInformation
Hosts various information about a workspace.Clients can subscribe to changes by using the
addChangeListener(java.beans.PropertyChangeListener)
method. It triggers the following events:- EVENT_OPEN: Workspace opened
- EVENT_CLOSE: Workspace closed
- EVENT_RENAME: Workspace renamed
- EVENT_SET_SOURCE: Workspace source set
- Author:
- Mathieu Bastian
- See Also:
Workspace
-
-
Field Summary
Fields Modifier and Type Field Description static String
EVENT_CLOSE
static String
EVENT_OPEN
static String
EVENT_RENAME
static String
EVENT_SET_SOURCE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChangeListener(PropertyChangeListener listener)
Add change listener.String
getName()
Returns the name of the workspace.String
getSource()
Returns the workspace's source or null if missing.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.void
removeChangeListener(PropertyChangeListener listener)
Remove change listener.
-
-
-
Field Detail
-
EVENT_OPEN
static final String EVENT_OPEN
- See Also:
- Constant Field Values
-
EVENT_CLOSE
static final String EVENT_CLOSE
- See Also:
- Constant Field Values
-
EVENT_RENAME
static final String EVENT_RENAME
- See Also:
- Constant Field Values
-
EVENT_SET_SOURCE
static final String EVENT_SET_SOURCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isOpen
boolean isOpen()
Returns true if the workspace is open.- Returns:
- true if open, false otherwise
-
isClosed
boolean isClosed()
Returns true if the workspace is closed.- Returns:
- true if closed, false otherwise
-
isInvalid
boolean isInvalid()
Returns true if the workspace is invalid.- Returns:
- true if invalid, false otherwise
-
getName
String getName()
Returns the name of the workspace.The name can't be null and has a default value (e.g. Workspace 1).
- Returns:
- the workspace's name
-
hasSource
boolean hasSource()
Returns true if the workspace has a source.- Returns:
- true if has a source, false otherwise
-
getSource
String getSource()
Returns the workspace's source or null if missing.- Returns:
- workspace's source or null if missing
-
addChangeListener
void addChangeListener(PropertyChangeListener listener)
Add change listener.- Parameters:
listener
- change listener
-
removeChangeListener
void removeChangeListener(PropertyChangeListener listener)
Remove change listener.- Parameters:
listener
- change listener
-
-