Gephi Toolkit Javadoc

org.gephi.io.generator.plugin
Class RandomGraph

java.lang.Object
  extended by org.gephi.io.generator.plugin.RandomGraph
All Implemented Interfaces:
Generator, LongTask

public class RandomGraph
extends java.lang.Object
implements Generator

Author:
Mathieu Bastian

Field Summary
protected  boolean cancel
           
protected  int numberOfNodes
           
protected  ProgressTicket progress
           
protected  double wiringProbability
           
 
Constructor Summary
RandomGraph()
           
 
Method Summary
 boolean cancel()
          Cancel the task.
 void generate(ContainerLoader container)
          Main method that generates the graph and put it in the container.
 java.lang.String getName()
          Returns the generator display name.
 int getNumberOfNodes()
           
 GeneratorUI getUI()
          Returns the UI that belongs to this generator, or null if UI is not needed.
 double getWiringProbability()
           
 void setNumberOfNodes(int numberOfNodes)
           
 void setProgressTicket(ProgressTicket progressTicket)
          Set the progress ticket for the long task.
 void setWiringProbability(double wiringProbability)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberOfNodes

protected int numberOfNodes

wiringProbability

protected double wiringProbability

progress

protected ProgressTicket progress

cancel

protected boolean cancel
Constructor Detail

RandomGraph

public RandomGraph()
Method Detail

generate

public void generate(ContainerLoader container)
Description copied from interface: Generator
Main method that generates the graph and put it in the container.

From the container content, the controller makes verification and append the graph to GraphAPI.

Specified by:
generate in interface Generator
Parameters:
container - the container the graph is to be pushed

getName

public java.lang.String getName()
Description copied from interface: Generator
Returns the generator display name.

Specified by:
getName in interface Generator
Returns:
returns the generator name

getUI

public GeneratorUI getUI()
Description copied from interface: Generator
Returns the UI that belongs to this generator, or null if UI is not needed.

Specified by:
getUI in interface Generator
Returns:
the UI thet belongs to this generator, or null

setNumberOfNodes

public void setNumberOfNodes(int numberOfNodes)

setWiringProbability

public void setWiringProbability(double wiringProbability)

getNumberOfNodes

public int getNumberOfNodes()

getWiringProbability

public double getWiringProbability()

cancel

public boolean cancel()
Description copied from interface: LongTask
Cancel the task. Returns true if the task has been sucessfully cancelled, false otherwise.

Specified by:
cancel in interface LongTask
Returns:
true if the task has been sucessfully cancelled, false otherwise

setProgressTicket

public void setProgressTicket(ProgressTicket progressTicket)
Description copied from interface: LongTask
Set the progress ticket for the long task. Can't be null.

Specified by:
setProgressTicket in interface LongTask
Parameters:
progressTicket - the progress ticket for this task

Gephi Toolkit Javadoc