be.ac.ulg.montefiore.run.totem.visualtopo.graph
Class DefaultLinkLoadLegend

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.visualtopo.graph.DefaultLinkLoadLegend
All Implemented Interfaces:
ColorLegend

public class DefaultLinkLoadLegend
extends java.lang.Object
implements ColorLegend

Legend representing a percentage of load in 12 colors.

Creation date: 16 mars 2006

Author:
Ga�l Monfort (monfort@run.montefiore.ulg.ac.be)

Constructor Summary
DefaultLinkLoadLegend()
           
 
Method Summary
 java.awt.Color getColor(float value)
          Returns the color for the given float value.
 java.awt.Color getColor(int index)
          Returns the color at specified index.
 java.awt.Color getErrorColor()
           
 java.lang.String getName(int index)
          Returns the legend associated with the color at specified index.
 int getNbColors()
          Returns the number of colors.
 void setColor(int index, java.awt.Color color)
          Sets the color color at index index
 void setErrorColor(java.awt.Color color)
           
 void setName(int index, java.lang.String name)
          Sets the name of the color at index index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLinkLoadLegend

public DefaultLinkLoadLegend()
Method Detail

getColor

public java.awt.Color getColor(float value)
Description copied from interface: ColorLegend
Returns the color for the given float value.

Specified by:
getColor in interface ColorLegend
Returns:

getColor

public java.awt.Color getColor(int index)
Description copied from interface: ColorLegend
Returns the color at specified index.

Specified by:
getColor in interface ColorLegend
Returns:

getErrorColor

public java.awt.Color getErrorColor()

setErrorColor

public void setErrorColor(java.awt.Color color)

getNbColors

public int getNbColors()
Description copied from interface: ColorLegend
Returns the number of colors.

Specified by:
getNbColors in interface ColorLegend
Returns:

getName

public java.lang.String getName(int index)
Description copied from interface: ColorLegend
Returns the legend associated with the color at specified index. The name of the color should reflect its use (ex: "10-20%")

Specified by:
getName in interface ColorLegend
Returns:

setColor

public void setColor(int index,
                     java.awt.Color color)
Description copied from interface: ColorLegend
Sets the color color at index index

Specified by:
setColor in interface ColorLegend

setName

public void setName(int index,
                    java.lang.String name)
Description copied from interface: ColorLegend
Sets the name of the color at index index

Specified by:
setName in interface ColorLegend


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.