NetCharts Pro

netcharts.pro.charts.pie
Class NFSliceLabel

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.charts.pie.NFSliceLabel
All Implemented Interfaces:
java.lang.Cloneable

public class NFSliceLabel
extends NFBaseClass

The NFSliceLabel property describes the appearance of piechart labels,to include the lines, text, and the background region


Field Summary
static java.util.Hashtable contentTypeMap
          contentTypeMap hashtable
static int DATA
          Slice data content.
static int EXTERIOR
          Exterior labels.
static int LABEL
          Slice label content.
static int NONE
          None
static int PERCENTAGE
          Slice percentage content.
static int PERCENTAGE_FLOAT
          Slice percentage content.
static int PERCENTAGE_INT
          Slice percentage content.
static int RADIAL
          Radial labels.
static java.util.Hashtable styleMap
          styleMap hashtable
 
Constructor Summary
NFSliceLabel()
          Constructs a default slice label object
NFSliceLabel(java.util.Hashtable state)
          Constructs a slice label object using CDL parameters
 
Method Summary
 java.lang.Object clone()
          Clone this object.
 java.util.Vector getCDLVector()
          NFSliceLabel is a compound object representing multiple CDL parameters.
 int[] getContent()
          Get the data content of the label.
 java.lang.String getContentDelimiter()
          Get the delimiter that will be put in between content items.
 NFFormat getFormat()
          Get the numerical formatting of data items.
 NFModalLabel getLabel()
          Get the text style.
 NFLine getLine()
          Get the line style.
 double getRadialPosition()
          Get the location of radial labels.
 NFRegion getRegion()
          Get background style
 boolean getSliceLabelEnabled()
          Returns the state of slice label display.
 int getStyle()
          Get the label display style.
 void setContent(int contentType)
          Set the data content of the label to be only the contentType described here.
 void setContent(int[] content)
          Set the data content of the label.
 void setContent(int firstContent, int secondContent)
          Set the data content of the label to the firstContent type followed by the secondContent type.
 void setContent(int firstContent, int secondContent, int thirdContent)
          Set the data content of the label to the firstContent type followed by the secondContent type, followed by theh thirdContent type.
 void setContentDelimiter(java.lang.String contentDelimiter)
          Set the delimiter that will be put in between content items.
 void setFormat(NFFormat format)
          Set the numerical formatting of data items.
 void setLabel(NFModalLabel label)
          Set text style.
 void setLine(NFLine line)
          Set the line style for lines connecting the slice to the label.
 void setRadialPosition(double radialPosition)
          Set the location of radial labels.
 void setRegion(NFRegion region)
          Set background style
 void setSliceLabelEnabled(boolean enabled)
          Enables or disables the slice label display
 void setStyle(int style)
          Set the label display style.
 
Methods inherited from class netcharts.pro.common.NFBaseClass
getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
None

See Also:
Constant Field Values

PERCENTAGE

public static final int PERCENTAGE
Slice percentage content. Shows the percentage of the whole that this slice represents.

See Also:
Constant Field Values

DATA

public static final int DATA
Slice data content. Displays the actual data value.

See Also:
Constant Field Values

LABEL

public static final int LABEL
Slice label content. Displays the given text label for this slice.

See Also:
Constant Field Values

PERCENTAGE_FLOAT

public static final int PERCENTAGE_FLOAT
Slice percentage content. Shows the percentage of the whole that this slice represents as an Integer.

See Also:
Constant Field Values

PERCENTAGE_INT

public static final int PERCENTAGE_INT
Slice percentage content. Shows the percentage of the whole that this slice represents as a Float.

See Also:
Constant Field Values

EXTERIOR

public static final int EXTERIOR
Exterior labels. Labels are positioned at the left and right of the chart with lines drawn to the appropriate slice.

See Also:
Constant Field Values

RADIAL

public static final int RADIAL
Radial labels. Labels are put in radial center of the slice.

See Also:
Constant Field Values

contentTypeMap

public static java.util.Hashtable contentTypeMap
contentTypeMap hashtable


styleMap

public static java.util.Hashtable styleMap
styleMap hashtable

Constructor Detail

NFSliceLabel

public NFSliceLabel()
Constructs a default slice label object


NFSliceLabel

public NFSliceLabel(java.util.Hashtable state)
Constructs a slice label object using CDL parameters

Parameters:
state - Hashtable containing CDL parameters.
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone this object. Performs a deep copy of this object.

Overrides:
clone in class NFBaseClass
Returns:
copy of this object
Throws:
java.lang.CloneNotSupportedException

setSliceLabelEnabled

public void setSliceLabelEnabled(boolean enabled)
Enables or disables the slice label display

Parameters:
enabled. - If true, slice labels will be shown.

getSliceLabelEnabled

public boolean getSliceLabelEnabled()
Returns the state of slice label display.

Returns:
enabled. If true, slice labels will be shown.

setLabel

public void setLabel(NFModalLabel label)
Set text style.

Parameters:
label - NFModalLabel object.

getLabel

public NFModalLabel getLabel()
Get the text style.

Returns:
label or null if not set

setRegion

public void setRegion(NFRegion region)
Set background style

Parameters:
region -

getRegion

public NFRegion getRegion()
Get background style

Returns:
region or null if not set

setContent

public void setContent(int contentType)
Set the data content of the label to be only the contentType described here.

If the value passed is not a valid content type an IllegalArgumentException will be thrown.

Parameters:
borderType - One of
contentType - One of NONE, DATA, PERCENTAGE, LABEL, PERCENTAGE_FLOAT, PERCENTAGE_INT

setContent

public void setContent(int firstContent,
                       int secondContent)
Set the data content of the label to the firstContent type followed by the secondContent type. The two contents are separated by the content delimiter.

If the values passed are not valid content types an IllegalArgumentException will be thrown.

Parameters:
firstContent - One of NONE, DATA, PERCENTAGE, LABEL, PERCENTAGE_FLOAT, PERCENTAGE_INT
secondContent - One of NONE, DATA, PERCENTAGE, LABEL, PERCENTAGE_FLOAT, PERCENTAGE_INT

setContent

public void setContent(int firstContent,
                       int secondContent,
                       int thirdContent)
Set the data content of the label to the firstContent type followed by the secondContent type, followed by theh thirdContent type. The three contents are separated by the content delimiter.

If the values passed are not valid content types an IllegalArgumentException will be thrown.

Parameters:
firstContent - One of NONE, DATA, PERCENTAGE, LABEL, PERCENTAGE_FLOAT, PERCENTAGE_INT
secondContent - One of NONE, DATA, PERCENTAGE, LABEL, PERCENTAGE_FLOAT, PERCENTAGE_INT

setContent

public void setContent(int[] content)
Set the data content of the label.

If the values passed are not valid content types an IllegalArgumentException will be thrown.

Parameters:
content - An array of content types, up to three elements in size. Each content item one of NONE, DATA, PERCENTAGE, LABEL, PERCENTAGE_FLOAT, PERCENTAGE_INT

getContent

public int[] getContent()
Get the data content of the label.

Returns:
an array of content types, up to three elements in size. Each content item one of NONE, DATA, PERCENTAGE, LABEL

setContentDelimiter

public void setContentDelimiter(java.lang.String contentDelimiter)
Set the delimiter that will be put in between content items.

Parameters:
contentDelimiter - Text element to put in between multiple content items.

getContentDelimiter

public java.lang.String getContentDelimiter()
Get the delimiter that will be put in between content items.

Returns:
text element to put in between multiple content items or '\n' if not defined.

setRadialPosition

public void setRadialPosition(double radialPosition)
Set the location of radial labels. This method only has effect if the style is set to RADIAL.

Parameters:
radialPosition - A value of 1.1 puts the labels just outside the pie border.

getRadialPosition

public double getRadialPosition()
Get the location of radial labels.

Parameters:
the - location of radial labels or 1.1 if not defined.

setStyle

public void setStyle(int style)
Set the label display style.

If the value passed is not a valid label style type an IllegalArgumentException will be thrown.

Parameters:
style - One of NONE, EXTERIOR, RADIAL

getStyle

public int getStyle()
Get the label display style.

If the value passed is not a valid label style type an IllegalArgumentException will be thrown.

Returns:
style. One of NONE, EXTERIOR (default), RADIAL

setFormat

public void setFormat(NFFormat format)
Set the numerical formatting of data items.

Parameters:
format - Object containing numerical format information.

getFormat

public NFFormat getFormat()
Get the numerical formatting of data items.

Returns:
object containing numerical format information.

setLine

public void setLine(NFLine line)
Set the line style for lines connecting the slice to the label.

Parameters:
line - Line style object.

getLine

public NFLine getLine()
Get the line style.

Returns:
the line style object.

getCDLVector

public java.util.Vector getCDLVector()
NFSliceLabel is a compound object representing multiple CDL parameters. This method returns a vector containing CDL representations for all attributes described in this NFSliceLabel

Returns:
Vector of NFKeyValue objects

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