scg.ac.ni.pmf.newgraph.generator
Interface GraphGenerator


public interface GraphGenerator

Graph generators generate graphs of various types.

A graph generator should get an empty class Graph, and create a graph. Generators could be parametrized, and the most probable way that the graph generator will work is this way. For instance, a generator which creates a complete graph will ask for the number of vertices as a parameter, and then create a complete graph.

Graph generators are shown on bottom of the submenu "New".

Author:
Vladimir Brankov
See Also:
"Plug-in Developer Guide", Parametrizable

Method Summary
 java.lang.String getDescription()
          Retrieves the description of the generator.
 java.lang.String getName()
          Retrieves the name of the generator.
 void newGraph(Graph graph)
          Implementation of this method are supplied with a blank graph object, where they should create a desired graph.
 

Method Detail

getName

java.lang.String getName()
Retrieves the name of the generator. The name can be of the form <group_name>.<action_name>. Grouping of generators is done on the menues where they are shown, groups are separated by menu separators.

Returns:
String The name.

getDescription

java.lang.String getDescription()
Retrieves the description of the generator.

Returns:
String The description.

newGraph

void newGraph(Graph graph)
Implementation of this method are supplied with a blank graph object, where they should create a desired graph.

Parameters:
graph - The graph.


Copyright © 2004 Dragan Stevanovic, Vladimir Brankov.