Package org.gephi.project.api
Interface ProjectInformation
-
public interface ProjectInformation
Hosts various information about a project.Clients can subscribe to changes by using the
addChangeListener(java.beans.PropertyChangeListener)
method. It triggers the following events:- EVENT_OPEN: Project opened
- EVENT_CLOSE: Project closed
- EVENT_RENAME: Project renamed
- EVENT_SET_FILE: Project file set
- Author:
- Mathieu Bastian
- See Also:
Project
-
-
Field Summary
Fields Modifier and Type Field Description static String
EVENT_CLOSE
static String
EVENT_OPEN
static String
EVENT_RENAME
static String
EVENT_SET_FILE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChangeListener(PropertyChangeListener listener)
Add change listener.File
getFile()
Returns the file associated with this project.String
getFileName()
Returns the filename associated with this project.String
getName()
Returns the name of the project.Project
getProject()
Returns the project this information class belongs to.boolean
hasFile()
Returns true if the project is associated with a file.boolean
isClosed()
Returns true if the project is closed.boolean
isInvalid()
Returns true if the project is invalid.boolean
isOpen()
Returns true if the project 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_FILE
static final String EVENT_SET_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isOpen
boolean isOpen()
Returns true if the project is open.- Returns:
- true if open, false otherwise
-
isClosed
boolean isClosed()
Returns true if the project is closed.- Returns:
- true if closed, false otherwise
-
isInvalid
boolean isInvalid()
Returns true if the project is invalid.- Returns:
- true if invalid, false otherwise
-
getName
String getName()
Returns the name of the project.The name can't be null and has a default value (e.g. Project 1).
- Returns:
- the project's name
-
hasFile
boolean hasFile()
Returns true if the project is associated with a file.A project is associated with a file if it has been saved/loaded to/from a file.
- Returns:
- true if associated with a file, false otherwise
-
getFileName
String getFileName()
Returns the filename associated with this project.Returns an empty string if the project isn't associated with a file.
- Returns:
- file name
- See Also:
hasFile()
-
getFile
File getFile()
Returns the file associated with this project.Returns null if the project isn't associated with a file.
- Returns:
- file or null if none
- See Also:
hasFile()
-
getProject
Project getProject()
Returns the project this information class belongs to.- Returns:
- project reference
-
addChangeListener
void addChangeListener(PropertyChangeListener listener)
Add change listener.- Parameters:
listener
- change listener
-
removeChangeListener
void removeChangeListener(PropertyChangeListener listener)
Remove change listener.- Parameters:
listener
- change listener
-
-