Gephi Toolkit Javadoc

org.gephi.layout
Class LayoutModelImpl

java.lang.Object
  extended by org.gephi.layout.LayoutModelImpl
All Implemented Interfaces:
LayoutModel

public class LayoutModelImpl
extends java.lang.Object
implements LayoutModel

Author:
Mathieu Bastian

Field Summary
 
Fields inherited from interface org.gephi.layout.api.LayoutModel
RUNNING, SELECTED_LAYOUT
 
Constructor Summary
LayoutModelImpl()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a property change listener for this model.
 LongTaskExecutor getExecutor()
           
 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 loadProperties(Layout layout)
           
 void readXML(javax.xml.stream.XMLStreamReader reader)
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove listerner.
 void saveProperties(Layout layout)
           
protected  void setRunning(boolean running)
           
protected  void setSelectedLayout(Layout selectedLayout)
           
 void writeXML(javax.xml.stream.XMLStreamWriter writer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutModelImpl

public LayoutModelImpl()
Method Detail

getSelectedLayout

public Layout getSelectedLayout()
Description copied from interface: LayoutModel
Returns the currently selected layout or null if no layout is selected.

Specified by:
getSelectedLayout in interface LayoutModel

getSelectedBuilder

public LayoutBuilder getSelectedBuilder()
Description copied from interface: LayoutModel
Returns the builder used for building the currently selected layout or null if no layout is selected.

Specified by:
getSelectedBuilder in interface LayoutModel

getLayout

public Layout getLayout(LayoutBuilder layoutBuilder)
Description copied from interface: LayoutModel
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.

Specified by:
getLayout in interface LayoutModel
Parameters:
layoutBuilder - the layout builder
Returns:
the layout build from layoutBuilder with formely saved properties.

setSelectedLayout

protected void setSelectedLayout(Layout selectedLayout)

isRunning

public boolean isRunning()
Description copied from interface: LayoutModel
Returns true if a layout is currently running, false otherwise.

Specified by:
isRunning in interface LayoutModel

setRunning

protected void setRunning(boolean running)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: LayoutModel
Add a property change listener for this model. The listener is notified when layout is selected and when running flag change.

Specified by:
addPropertyChangeListener in interface LayoutModel
Parameters:
listener - a property change listener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Description copied from interface: LayoutModel
Remove listerner.

Specified by:
removePropertyChangeListener in interface LayoutModel
Parameters:
listener - a property change listener.

getExecutor

public LongTaskExecutor getExecutor()

saveProperties

public void saveProperties(Layout layout)

loadProperties

public void loadProperties(Layout layout)

writeXML

public void writeXML(javax.xml.stream.XMLStreamWriter writer)
              throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

readXML

public void readXML(javax.xml.stream.XMLStreamReader reader)
             throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

Gephi Toolkit Javadoc