Gephi Toolkit Javadoc

org.gephi.layout.api
Interface LayoutModel

All Known Implementing Classes:
LayoutModelImpl

public interface LayoutModel

Layout model contains data and flags relative to the layout execution and user interface. There is one model per Workspace

PropertyChangeListener can be used to receive events about a change in the model.

Author:
Mathieu Bastian

Field Summary
static java.lang.String RUNNING
           
static java.lang.String SELECTED_LAYOUT
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a property change listener for this model.
 Layout getLayout(LayoutBuilder layoutBuilder)
          Return a layout instance for the given layoutBuilder.
 LayoutBuilder getSelectedBuilder()
          Returns the builder used for building the currently selected layout or null if no layout is selected.
 Layout getSelectedLayout()
          Returns the currently selected layout or null if no layout is selected.
 boolean isRunning()
          Returns true if a layout is currently running, false otherwise.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove listerner.
 

Field Detail

SELECTED_LAYOUT

static final java.lang.String SELECTED_LAYOUT
See Also:
Constant Field Values

RUNNING

static final java.lang.String RUNNING
See Also:
Constant Field Values
Method Detail

getSelectedLayout

Layout getSelectedLayout()
Returns the currently selected layout or null if no layout is selected.


getLayout

Layout getLayout(LayoutBuilder layoutBuilder)
Return a layout instance for the given layoutBuilder. 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 or null if no layout is selected.


isRunning

boolean isRunning()
Returns true if a layout is currently running, false otherwise.


addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a property change listener for this model. The listener is notified when layout is selected and when running flag change.

Parameters:
listener - a property change listener

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove listerner.

Parameters:
listener - a property change listener.

Gephi Toolkit Javadoc