NetCharts Pro

netcharts.pro.common.lineset
Class NFLineSetLine

java.lang.Object
  |
  +--netcharts.pro.common.NFBaseClass
        |
        +--netcharts.pro.common.NFLine
              |
              +--netcharts.pro.common.lineset.NFLineSetLine
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFLineSetLine
extends NFLine
implements NFCDLGenerator

The NFLineSetLine object is throughout several different chart types to define data lines. In addition to the features found in it's parent, NFLine, NFLineSetLine also provides the ability to specify a fill color and spline functions.

For most applications, the developer will not need to explicitly manipulate the NFLineSetLine object. Data line attributes can usually be modified via the NFLineSet and other, similar, compound objects that provide convenience methods. However, an example of NFLineSetLine's use within an NFLinechart is provided here:


  ...

  NFLinechart chart = new NFLinechart();



 	NFLineSet lineSet = new NFLineSet();



 	// configure a dotted blue line appearance

 	NFLineSetLine line = new NFLineSetLine(Color.blue);

 	line.setStyle(NFLineSetLine.DOTTED);



 	// set the configuration information into the line set object.

 	lineSet.setLine(line);



 	// load dummy data into the line set object

 	for (int j=0; j < 20; j++)

 		lineSet.addElement(new Double(Math.random()*100));



 	chart.addLineSet(lineSet); // add this lineset.

	...

 


Field Summary
 boolean includeCDLSplineAttribute
           
 
Fields inherited from class netcharts.pro.common.NFLine
DASHED, DOTDASH, DOTTED, lineTypeMap, NONE, SOLID
 
Constructor Summary
NFLineSetLine()
          Constructs a default line object
NFLineSetLine(java.awt.Color color)
          Constructs a SOLID 1-pixel-thick line with the given color
NFLineSetLine(int style, java.awt.Color lineColor, java.awt.Color fillColor, int thickness)
          Constructs a line with the given line style, color, fill color, and thickness
NFLineSetLine(int style, java.awt.Color color, int thickness)
          Constructs a line with the given style, color, and thickness.
 
Method Summary
 void getCDL(java.lang.StringBuffer sb, boolean includeParens)
          Append CDL parameters representing this line to the given StringBuffer.
 boolean getDrawSplineCurve()
          Gets whether or not spline curves should be drawn.
 boolean getDrawSplineCurveAndLine()
          Gets whether or not spline curves and default line/symbol should be drawn.
 java.awt.Color getFillColor()
          Gets the fill color
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setDrawSplineCurve(boolean drawSpline)
          Sets whether or not spline curves should be drawn.
 void setDrawSplineCurveAndLine(boolean drawSplineAndLine)
          Sets whether or not spline curves and default line/symbol should be drawn.
 void setFillColor(java.awt.Color fillColor)
          Sets the fill color.
 
Methods inherited from class netcharts.pro.common.NFLine
getCDL, getColor, getStyle, getThickness, setCDL, setCDL, setColor, setStyle, setThickness, toString
 
Methods inherited from class netcharts.pro.common.NFBaseClass
clone, getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface netcharts.pro.common.NFCDLGenerator
getCDL, toString
 

Field Detail

includeCDLSplineAttribute

public boolean includeCDLSplineAttribute
Constructor Detail

NFLineSetLine

public NFLineSetLine()
Constructs a default line object

NFLineSetLine

public NFLineSetLine(java.awt.Color color)
Constructs a SOLID 1-pixel-thick line with the given color
Parameters:
color -  

NFLineSetLine

public NFLineSetLine(int style,
                     java.awt.Color color,
                     int thickness)
Constructs a line with the given style, color, and thickness.
Parameters:
style - One of NONE, SOLID, DOTTED, DASHED, DOTDASH
color - Line color.
thickness - Line thickness in pixels.

NFLineSetLine

public NFLineSetLine(int style,
                     java.awt.Color lineColor,
                     java.awt.Color fillColor,
                     int thickness)
Constructs a line with the given line style, color, fill color, and thickness
Parameters:
style - One of NONE, SOLID, DOTTED, DASHED, DOTDASH
color - Line Color
fillColor - Fill Color.
thickness - Line thickness in pixels.
Method Detail

setFillColor

public void setFillColor(java.awt.Color fillColor)
Sets the fill color.
Parameters:
fillColor - The fill color.

getFillColor

public java.awt.Color getFillColor()
Gets the fill color
Returns:
fillColor or null if not defined.

setDrawSplineCurve

public void setDrawSplineCurve(boolean drawSpline)
Sets whether or not spline curves should be drawn.
Parameters:
drawSpline - When true, spline curve is shown.

getDrawSplineCurve

public boolean getDrawSplineCurve()
Gets whether or not spline curves should be drawn.
Returns:
true if spline curve is to be shown.

setDrawSplineCurveAndLine

public void setDrawSplineCurveAndLine(boolean drawSplineAndLine)
Sets whether or not spline curves and default line/symbol should be drawn.
Parameters:
drawSplineAndLine - When true spline curve and line/symbol will be drawn

getDrawSplineCurveAndLine

public boolean getDrawSplineCurveAndLine()
Gets whether or not spline curves and default line/symbol should be drawn.
Returns:
true if spline curve and line/symbol will be drawn

getCDL

public void getCDL(java.lang.StringBuffer sb,
                   boolean includeParens)
Append CDL parameters representing this line to the given StringBuffer.
Overrides:
getCDL in class NFLine
Parameters:
sb - Target buffer to append the CDL parameters
includeParens - If true, this will cause the parameters to be delimited with parenthesis.

setCDL

public void setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation.
Specified by:
setCDL in interface NFCDLGenerator
Overrides:
setCDL in class NFLine
Parameters:
cdl - CDL in the form: (style, thickness, color, fillColor, spline)

NetCharts Pro


Visual Mining, Inc.
15825 Shady Grove Rd.
Suite 20
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2004
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Apr 1, 2004