1 25 package org.jrobin.graph; 26 27 import java.awt.Color ; 28 29 import org.jrobin.core.RrdException; 30 31 37 class Legend extends Comment 38 { 39 private Color color = Color.WHITE; 43 private int refPlotDef = -1; 44 45 54 Legend( String text ) throws RrdException 55 { 56 super(text); 57 this.commentType = Comment.CMT_LEGEND; 58 } 59 60 66 Legend( String text, Color color ) throws RrdException 67 { 68 super(text); 69 if ( text == null ) 70 this.commentType = Comment.CMT_NOLEGEND; 71 else 72 this.commentType = Comment.CMT_LEGEND; 73 this.color = color; 74 } 75 76 83 Legend( String text, Color color, int referredPlotDef ) throws RrdException 84 { 85 this( text, color ); 86 87 refPlotDef = referredPlotDef; 88 } 89 90 91 Color getColor() { 95 return color; 96 } 97 98 int getPlofDefIndex() { 99 return refPlotDef; 100 } 101 } 102 | Popular Tags |