NetCharts Pro

netcharts.pro.common.lineset
Class NFLineSetLine

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.common.NFLine
          extended by 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
static int FILL_CONDITIONAL
          Fill is enabled if there is a non null fill color specified.
static int FILL_DISABLED
          Fill is disabled
static int FILL_ENABLED
          Fill is enabled
 boolean includeCDLFillConditionalAttribute
          Whether or not the conditional fill attribute should be included.
 boolean includeCDLSplineAttribute
          Whether or not the spline function should be included.
static int LINE_AND_SPLINE
          Draw the line and spline curve
static int LINE_ONLY
          Draw only the line
static int SPLINE_ONLY
          Draw only the spline curve
 
Fields inherited from class netcharts.pro.common.NFLine
DASHED, DOTDASH, DOTTED, 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()
          Deprecated. Use getLineType
 boolean getDrawSplineCurveAndLine()
          Deprecated. Use getLineType
 java.awt.Color getFillColor()
          Gets the fill color
 int getFillStatus()
          Get the line type.
 int getLineType()
          Get the line type.
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setDrawSplineCurve(boolean drawSpline)
          Deprecated. Use setLineType
 void setDrawSplineCurveAndLine(boolean drawSplineAndLine)
          Deprecated. Use setLineType
 void setFillColor(java.awt.Color fillColor)
          Sets the fill color.
 void setFillStatus(int fillStatus)
          Set the fill status.
 void setLineType(int lineType)
          Set the line type.
 
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

LINE_ONLY

public static final int LINE_ONLY
Draw only the line


LINE_AND_SPLINE

public static final int LINE_AND_SPLINE
Draw the line and spline curve


SPLINE_ONLY

public static final int SPLINE_ONLY
Draw only the spline curve


FILL_ENABLED

public static final int FILL_ENABLED
Fill is enabled


FILL_DISABLED

public static final int FILL_DISABLED
Fill is disabled


FILL_CONDITIONAL

public static final int FILL_CONDITIONAL
Fill is enabled if there is a non null fill color specified.


includeCDLSplineAttribute

public boolean includeCDLSplineAttribute
Whether or not the spline function should be included. Some chart types (radar) do not allow the spline function.


includeCDLFillConditionalAttribute

public boolean includeCDLFillConditionalAttribute
Whether or not the conditional fill attribute should be included. Some chart types (radar) do not allow the conditional fill attribute.

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)
Deprecated. Use setLineType

Sets whether or not spline curves should be drawn.

Parameters:
drawSpline - When true, spline curve is shown.

getDrawSplineCurve

public boolean getDrawSplineCurve()
Deprecated. Use getLineType

Gets whether or not spline curves should be drawn.

Returns:
true if spline curve is to be shown.

setDrawSplineCurveAndLine

public void setDrawSplineCurveAndLine(boolean drawSplineAndLine)
Deprecated. Use setLineType

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()
Deprecated. Use getLineType

Gets whether or not spline curves and default line/symbol should be drawn.

Returns:
true if spline curve and line/symbol will be drawn

setLineType

public void setLineType(int lineType)
Set the line type.


getLineType

public int getLineType()
Get the line type.


setFillStatus

public void setFillStatus(int fillStatus)
Set the fill status.


getFillStatus

public int getFillStatus()
Get the line type.


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.
2099 Gaither Rd.
Suite 220
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2011
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: Jun 28, 2011