mascoptLib.gui
Class GLayer

java.lang.Object
  |
  +--mascoptLib.gui.views.Layer
        |
        +--mascoptLib.gui.GLayer

public class GLayer
extends Layer

This class represent a layer returned by MasctoptViewer.

Version:
Thu Mar 21 18:38:16 2002
Author:
bbongiov@bing.inria.fr

Method Summary
 int addShift(mascoptLib.gui.GVertex n0, mascoptLib.gui.GVertex n1)
          Increase the distance between arcs (not sure).
 String[] getArcLabel(mascoptLib.abstractGraph.AbstractGraph graph)
          Give the labels of arcs in a table for a graph.
 int getInitialShift()
          Gives the distance of the first arc from the line between two arcs.
 String getName()
          Returns the name of the layer.
 String[] getNodeLabel(mascoptLib.abstractGraph.AbstractGraph graph)
          Give the labels of nodes in a table for a graph.
 int getStepShift()
          Gives the distance between two arcs.
 void hideLabels(boolean hide)
          Hide the labels for all graphs.
 void removeShift(mascoptLib.gui.GVertex n0, mascoptLib.gui.GVertex n1, int h)
          Remove some distance between arcs.
 void setArcLabel(mascoptLib.abstractGraph.AbstractGraph graph, String value)
           
 void setArcLabel(mascoptLib.abstractGraph.AbstractGraph graph, String[] value)
          Change the labels of arcs for a Graph in this layer.
 void setInitialShift(int i)
          Sets the distance of the first arc from the line between two arcs.
 void setNodeLabel(mascoptLib.abstractGraph.AbstractGraph graph, String value)
           
 void setNodeLabel(mascoptLib.abstractGraph.AbstractGraph graph, String[] value)
          Change the labels of nodes for a Graph in this layer.
 void setStepShift(int i)
          Sets the distance between two arcs.
 void setVisibleLabels(mascoptLib.abstractGraph.AbstractGraph graph, boolean visible)
          Change the visibility of labels on a graph.
 void setVisibleLabels(boolean visible)
          Change the visibility of labels on all graphs in this layer.
 void updateLabelsWhenValuesChange(boolean update)
          Updates the labels when the values are changed.
 
Methods inherited from class mascoptLib.gui.views.Layer
add, add, addView, contains, getComponentAt, paint, remove, remove, removeView, repaint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
Returns the name of the layer.

Returns:
a String.

updateLabelsWhenValuesChange

public void updateLabelsWhenValuesChange(boolean update)
Updates the labels when the values are changed. All the layer is repaint when a value is changed and that a label is concerned. The default avlue is false: it may slow down algorithms

Parameters:
update - the boolean saying if the label must be updated.

setNodeLabel

public void setNodeLabel(mascoptLib.abstractGraph.AbstractGraph graph,
                         String value)

setArcLabel

public void setArcLabel(mascoptLib.abstractGraph.AbstractGraph graph,
                        String value)

setNodeLabel

public void setNodeLabel(mascoptLib.abstractGraph.AbstractGraph graph,
                         String[] value)
Change the labels of nodes for a Graph in this layer.

Parameters:
graph - the graph to consider for the labels.
value - a table of Strings (one per line) to set to nodes.

setArcLabel

public void setArcLabel(mascoptLib.abstractGraph.AbstractGraph graph,
                        String[] value)
Change the labels of arcs for a Graph in this layer.

Parameters:
graph - the graph to consider for the labels.
value - a table of Strings (one per line) to set to arcs.

getNodeLabel

public String[] getNodeLabel(mascoptLib.abstractGraph.AbstractGraph graph)
Give the labels of nodes in a table for a graph.

Returns:
a String[] which contains the labels.

getArcLabel

public String[] getArcLabel(mascoptLib.abstractGraph.AbstractGraph graph)
Give the labels of arcs in a table for a graph.

Returns:
a String[] which contains the labels.

setVisibleLabels

public void setVisibleLabels(mascoptLib.abstractGraph.AbstractGraph graph,
                             boolean visible)
Change the visibility of labels on a graph.

Parameters:
graph - the graph to consider
visible - the boolean representing the visibility

hideLabels

public void hideLabels(boolean hide)
Hide the labels for all graphs.

Parameters:
hide - is true if labels are hidden.

setVisibleLabels

public void setVisibleLabels(boolean visible)
Change the visibility of labels on all graphs in this layer.

Parameters:
visible - the boolean representing the visibility

getInitialShift

public int getInitialShift()
Gives the distance of the first arc from the line between two arcs.


setInitialShift

public void setInitialShift(int i)
Sets the distance of the first arc from the line between two arcs.


getStepShift

public int getStepShift()
Gives the distance between two arcs.


setStepShift

public void setStepShift(int i)
Sets the distance between two arcs.


addShift

public int addShift(mascoptLib.gui.GVertex n0,
                    mascoptLib.gui.GVertex n1)
Increase the distance between arcs (not sure). Not sure of the description of this method...

Parameters:
n0 - the first node
n1 - the second node
Returns:
the old distance

removeShift

public void removeShift(mascoptLib.gui.GVertex n0,
                        mascoptLib.gui.GVertex n1,
                        int h)
Remove some distance between arcs.

Parameters:
n0 - the first node
n1 - the second node
h - the distance to remove