NetCharts Pro

netcharts.pro.charts.dial
Class NFDialOuterBorder

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.charts.dial.NFDialOuterBorder
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFDialOuterBorder
extends NFBaseClass
implements NFCDLGenerator

The NFDialOuterBorder class describes the appearance of the dial outer border.


Field Summary
static double DEFAULT_WIDTH
          Default for the border width value if not specified.
 
Constructor Summary
NFDialOuterBorder()
          Constructs a default dial outer border object
NFDialOuterBorder(java.awt.Color color1, java.awt.Color color2)
          Constructs a dial outer border object with the specified border colors
NFDialOuterBorder(java.awt.Color color1, java.awt.Color color2, double width)
          Constructs a dial outer border object with the specified border colors and border width
NFDialOuterBorder(double width)
          Constructs a dial outer border object with the specified border width
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing the dial outer border
 void getCDL(java.lang.StringBuffer sb, boolean includeParens)
          Append CDL parameters representing the dial outer border to the given StringBuffer.
 java.awt.Color getColor1()
          Returns the first color for the border
 java.awt.Color getColor2()
          Returns the second color for the border
 double getWidth()
          Returns the border width (percentage or number of pixels).
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 int setCDL(java.lang.String[] elements, int offset)
          Configures this object from a CDL parameter representation.
 void setColor1(java.awt.Color color1)
          Sets the first color for the border
 void setColor2(java.awt.Color color2)
          Sets the second color for the border
 void setWidth(double width)
          Sets the border width.
 java.lang.String toString()
          Returns a String object representing the dial outer border
 
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
 

Field Detail

DEFAULT_WIDTH

public static final double DEFAULT_WIDTH
Default for the border width value if not specified.

See Also:
Constant Field Values
Constructor Detail

NFDialOuterBorder

public NFDialOuterBorder()
Constructs a default dial outer border object


NFDialOuterBorder

public NFDialOuterBorder(java.awt.Color color1,
                         java.awt.Color color2)
Constructs a dial outer border object with the specified border colors


NFDialOuterBorder

public NFDialOuterBorder(java.awt.Color color1,
                         java.awt.Color color2,
                         double width)
Constructs a dial outer border object with the specified border colors and border width


NFDialOuterBorder

public NFDialOuterBorder(double width)
Constructs a dial outer border object with the specified border width

Method Detail

setColor1

public void setColor1(java.awt.Color color1)
Sets the first color for the border

Parameters:
color1 - first border color

getColor1

public java.awt.Color getColor1()
Returns the first color for the border

Returns:
color or null if not set.

setColor2

public void setColor2(java.awt.Color color2)
Sets the second color for the border

Parameters:
color2 - second border color

getColor2

public java.awt.Color getColor2()
Returns the second color for the border

Returns:
color or null if not set.

setWidth

public void setWidth(double width)
Sets the border width. The width may be specified as a percentage value (of the chart size) if in the range from 0 to 1 or as number of pixels if greater than 1. If the border width is less than zero, the default value DEFAULT_WIDTH is used.

Parameters:
width - border width

getWidth

public double getWidth()
Returns the border width (percentage or number of pixels).

Returns:
the border width or DEFAULT_WIDTH if not set

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing the dial outer border

Specified by:
getCDL in interface NFCDLGenerator
Returns:
CDL in the form: (color1, color2, width)

getCDL

public void getCDL(java.lang.StringBuffer sb,
                   boolean includeParens)
Append CDL parameters representing the dial outer border to the given StringBuffer.

Parameters:
sb - Target buffer to append the CDL parameters
includeParens - If true, this will cause the parameters to be delimited with parenthesis.

toString

public java.lang.String toString()
Returns a String object representing the dial outer border

Specified by:
toString in interface NFCDLGenerator
Overrides:
toString in class java.lang.Object
Returns:
String object in the same form as that given by getCDL().

setCDL

public void setCDL(java.lang.String cdl)
Configures this object from a CDL parameter representation.

Specified by:
setCDL in interface NFCDLGenerator
Parameters:
cdl - CDL in the form: (color1, color2, width)

setCDL

public int setCDL(java.lang.String[] elements,
                  int offset)
Configures this object from a CDL parameter representation.

Parameters:
elements - Array of parameter elements. This array is expected to contain consecutive elements containing color1, color2, and width.
offset - Offset into the elements array.

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 - 2018
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: Jan 7, 2018