Package org.gephi.layout.api
Interface LayoutModel
-
public interface LayoutModel
Layout model contains data and flags relative to the layout execution and user interface. There is one model perWorkspace
PropertyChangeListener
can be used to receive events about a change in the model.- Author:
- Mathieu Bastian
-
-
Field Summary
Fields Modifier and Type Field Description static String
RUNNING
static String
SELECTED_LAYOUT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener for this model.Layout
getLayout(LayoutBuilder layoutBuilder)
Return a layout instance for the givenlayoutBuilder
.LayoutBuilder
getSelectedBuilder()
Returns the builder used for building the currently selected layout ornull
if no layout is selected.Layout
getSelectedLayout()
Returns the currently selected layout ornull
if no layout is selected.boolean
isRunning()
Returnstrue
if a layout is currently running,false
otherwise.void
removePropertyChangeListener(PropertyChangeListener listener)
Remove listerner.
-
-
-
Field Detail
-
SELECTED_LAYOUT
static final String SELECTED_LAYOUT
- See Also:
- Constant Field Values
-
RUNNING
static final String RUNNING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSelectedLayout
Layout getSelectedLayout()
Returns the currently selected layout ornull
if no layout is selected.
-
getLayout
Layout getLayout(LayoutBuilder layoutBuilder)
Return a layout instance for the givenlayoutBuilder
. If saved properties exists, the layout properties values are set. Values are default if it is the first time this layout is built.Use this method instead of
LayoutBuilder.buildLayout()
directly.- Parameters:
layoutBuilder
- the layout builder- Returns:
- the layout build from
layoutBuilder
with formely saved properties.
-
getSelectedBuilder
LayoutBuilder getSelectedBuilder()
Returns the builder used for building the currently selected layout ornull
if no layout is selected.
-
isRunning
boolean isRunning()
Returnstrue
if a layout is currently running,false
otherwise.
-
addPropertyChangeListener
void addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener for this model. Thelistener
is notified when layout is selected and when running flag change.- Parameters:
listener
- a property change listener
-
removePropertyChangeListener
void removePropertyChangeListener(PropertyChangeListener listener)
Remove listerner.- Parameters:
listener
- a property change listener.
-
-