jhplot
Class HGraph

java.lang.Object
  extended by jhplot.GHPanel
      extended by jhplot.GHFrame
          extended by jhplot.HGraph
All Implemented Interfaces:
ComponentListener, Serializable, EventListener

public class HGraph
extends GHFrame

Create a frame with interactive graphs.

See Also:
Serialized Form

Field Summary
 boolean set
           
 
Constructor Summary
HGraph()
          Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default"
HGraph(String title)
          Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global title
HGraph(String title, int xs, int ys)
          Construct a HPlot canvas with a single plot/graph
HGraph(String title, int xs, int ys, boolean set)
          Construct a HGraph canvas with a single plot/graph
HGraph(String title, int xs, int ys, int n1, int n2)
          Construct a HGraph canvas with plots/graphs
HGraph(String title, int xsize, int ysize, int n1, int n2, boolean set)
          Create HGraph canvas with several graphs.
 
Method Summary
 void addEdge(String vertex1, String vertex2)
          Add a connector between 2 vertexes
 void addVertex(String vertex)
          Add a new vertex
 void clear()
          Clear the current graph including graph settings.
 void clear(int i1, int i2)
          Clear the graph characterized by an index in X and Y.
 void clearAll()
          Clear all graphs from data and settings.
 void close()
          Close the canvas (and dispose all components) Note: a memory leak is found - no time to investgate it.
 void destroy()
          Destroy the canvas frame
 void doc()
          Show online documentation.
 org.jgraph.JGraph getGraph()
          Returns the current graph
 org.jgrapht.ListenableGraph getListenableGraph()
          Returns the current Listenable Graph
 void quit()
           
 void setPos(String vertex, int n1, int n2)
          Set vertex position
 void visible()
          Set the canvas frame visible
 void visible(boolean vs)
          Set the canvas frame visible or not
 
Methods inherited from class jhplot.GHFrame
addGraph, cd, componentHidden, componentMoved, componentShown, getCdX, getCdY, getFrame, getHTMLUrl, getNtotX, getNtotY, setPlotsNum, updateFrame
 
Methods inherited from class jhplot.GHPanel
addComp, componentResized, disableDoubleBuffering, enableDoubleBuffering, export, exportDialog, exportImage, getCanvasPanel, getMarginBackground, getMarginPanelBottom, getMarginPanelCenter, getMarginPanelLeft, getMarginPanelRight, getMarginPanelTop, getMarginSizeBottom, getMarginSizeLeft, getMarginSizeRight, getMarginSizeTop, getSizeX, getSizeY, getTextBottom, getTextBottomColor, getTextBottomColorBack, getTextBottomFont, getTextLeft, getTextLeftColor, getTextLeftColorBack, getTextLeftFont, getTextPosBottomX, getTextPosBottomY, getTextPosLeftX, getTextPosLeftY, getTextPosRightX, getTextPosRightY, getTextPosTopX, getTextPosTopY, getTextRight, getTextRightColor, getTextRightColorBack, getTextRightFont, getTextRotationBottom, getTextRotationLeft, getTextRotationRight, getTextRotationTop, getTextTop, getTextTopColor, getTextTopColorBack, getTextTopFont, isBorderShown, printGraph, resetMargins, setGTitle, setGTitle, setGTitle, setGTitle, setGTitle, setMarginBackground, setMarginSizeBottom, setMarginSizeLeft, setMarginSizeRight, setMarginSizeTop, setSizePanel, setTextBottom, setTextBottom, setTextBottom, setTextBottom, setTextBottomColorBack, setTextLeft, setTextLeft, setTextLeft, setTextLeft, setTextLeftColorBack, setTextPosBottomX, setTextPosBottomY, setTextPosLeftX, setTextPosLeftY, setTextPosRightX, setTextPosRightY, setTextPosTopX, setTextPosTopY, setTextRight, setTextRight, setTextRight, setTextRight, setTextRightColorBack, setTextRotationBottom, setTextRotationLeft, setTextRotationRight, setTextRotationTop, setTextTop, setTextTop, setTextTop, setTextTopColorBack, showBorders
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

set

public boolean set
Constructor Detail

HGraph

public HGraph(String title,
              int xsize,
              int ysize,
              int n1,
              int n2,
              boolean set)
Create HGraph canvas with several graphs.

Parameters:
title - Title
xsize - size in x direction
ysize - size in y direction
n1 - number of plots/graphs in x
n2 - number of plots/graphs in y
set - set or not the graph

HGraph

public HGraph(String title,
              int xs,
              int ys)
Construct a HPlot canvas with a single plot/graph

Parameters:
title - Title for the canvas
xs - size in x
ys - size in y

HGraph

public HGraph(String title,
              int xs,
              int ys,
              boolean set)
Construct a HGraph canvas with a single plot/graph

Parameters:
title - Title for the canvas
xs - size in x
ys - size in y
set - set or not the graph (boolean)

HGraph

public HGraph(String title,
              int xs,
              int ys,
              int n1,
              int n2)
Construct a HGraph canvas with plots/graphs

Parameters:
title - Title for the canvas
xs - size in x
ys - size in y
n1 - number of plots/graphs in x
n2 - number of plots/graphs in y

HGraph

public HGraph(String title)
Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global title

Parameters:
title - Title

HGraph

public HGraph()
Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default"

Method Detail

visible

public void visible(boolean vs)
Set the canvas frame visible or not

Parameters:
vs - (boolean) true: visible, false: not visible

visible

public void visible()
Set the canvas frame visible


destroy

public void destroy()
Destroy the canvas frame


setPos

public void setPos(String vertex,
                   int n1,
                   int n2)
Set vertex position

Parameters:
vertex - Vertex name
n1 - Position in X
n2 - Position in Y

clear

public void clear()
Clear the current graph including graph settings. Note: the current graph is set by the cd() method


clear

public void clear(int i1,
                  int i2)
Clear the graph characterized by an index in X and Y. This method cleans the data and all graph settings.

Parameters:
i1 - location of the graph in X
i2 - location of the graph in Y

clearAll

public void clearAll()
Clear all graphs from data and settings.


close

public void close()
Close the canvas (and dispose all components) Note: a memory leak is found - no time to investgate it. set to null all the stuff


addVertex

public void addVertex(String vertex)
Add a new vertex

Parameters:
vertex - added vertex

addEdge

public void addEdge(String vertex1,
                    String vertex2)
Add a connector between 2 vertexes

Parameters:
vertex1 - first vertex
vertex2 - second vertex

getGraph

public org.jgraph.JGraph getGraph()
Returns the current graph

Returns:
Current graph

getListenableGraph

public org.jgrapht.ListenableGraph getListenableGraph()
Returns the current Listenable Graph

Returns:
Current graph

quit

public void quit()

doc

public void doc()
Show online documentation.



jHepWork 3.0 ©