NetCharts Pro

netcharts.pro.charts.bubble
Class NFBubbleSet

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.common.NFVector
          extended by netcharts.pro.common.NFBaseSet
              extended by netcharts.pro.common.NFSet
                  extended by netcharts.pro.common.rectangular.NFDataSet
                      extended by netcharts.pro.common.lineset.NFLineSet
                          extended by netcharts.pro.charts.bubble.NFBubbleSet
All Implemented Interfaces:
java.lang.Cloneable, NFValueLabelConstants

public class NFBubbleSet
extends NFLineSet
implements NFValueLabelConstants

The NFBubbleSet object contains information for lines, bubble symbols, or both. An example of using a bubbleset for a simple bubblechart is shown here:

 NFBubblechart bc = new NFBubblechart();
 bc.setSize(500,500);

 Object datao[][] = makeData();

 NFDataModel3D foo= new NFDataModel3D(datao){
                public  Object getX(int row){
                        Object o[][] = (Object[][])dataObject;
                        return o[row][1];
                }
                public  Object getY(int row){
                        Object o[][] = (Object[][])dataObject;
                        return o[row][2];
                }
                public  Object getZ(int row){
                        Object o[][] = (Object[][])dataObject;
                        return o[row][3];
                }
                public int getNumPoints(){
                        return ((Object[])dataObject).length;
                }
 };

 NFBubbleSet bs = new NFBubbleSet();
 bs.setZScale(0,1.0);
 bs.loadDataModel(foo);
 bc.addBubbleSet(bs);
 


Field Summary
static java.util.Hashtable lineValueLabelStyleMap
          Contains the set of allowed line value style types.
 
Fields inherited from interface netcharts.pro.common.lineset.NFValueLabelConstants
BOTTOM, BOTTOMLEFT, BOTTOMRIGHT, CENTER, LEFT, NONE, RIGHT, TOP, TOPLEFT, TOPRIGHT
 
Constructor Summary
NFBubbleSet()
          Constructs a default bubble set.
NFBubbleSet(java.awt.Color bubbleColor)
          Constructs a set with the given bubble color.
NFBubbleSet(int symbolType, java.awt.Color symbolColor, int maxSymbolSize)
          Constructs a set with the given symbol type, color, and size
NFBubbleSet(java.lang.String legendName, java.awt.Color bubbleColor)
          Constructs a set with the given bubble color and legend name.
 
Method Summary
 void addElement(java.lang.Object xval, java.lang.Object yval)
          Adds the given x and y value to the set.
 void addElement(java.lang.Object xval, java.lang.Object yval, java.lang.Object zval)
          Adds the given x, y, and z value to the set.
 java.lang.Object clone()
          Does a deep copy of this bubbleset object
 int getBubbleMaxSize()
          Gets the maximum size, in pixels, that the bubble can be.
 java.lang.String getCDL()
          Generate CDL parameters representing this data
 java.lang.String getCDLLineValueLabelStyle()
          Get the line value label style for the set from a CDL string.
 int getLineValueLabelStyle()
          Gets the type of text labeling for lines in this set
 boolean getModifiedValueLabel()
          Returns if the positioning of value labels has changed in this set.
 java.awt.Color getPointColor()
          Get the point color
 NFBubbleScale getZScale()
          Gets the minimum and maximum values that will be used to determine the bubble size.
 void setBubbleMaxSize(int maxSize)
          Sets the maximum size, in pixels, that the bubble can be.
 void setCDLLineValueLabelStyle(java.lang.String cdl)
          Set the line value label style for the set from a CDL string.
 void setLineValueLabelStyle(int lineValueLabelStyle)
          Sets the type of text labeling for lines in this set.
 void setPointColor(java.awt.Color pointColor)
          Set the point color.
 void setZScale(double minScale, double maxScale)
          Sets the minimum and maximum values that will be used to determine the bubble size.
 void setZScale(NFBubbleScale zScale)
          Sets the minimum and maximum values that will be used to determine the bubble size.
 
Methods inherited from class netcharts.pro.common.lineset.NFLineSet
addElement, addElement, addElement, addElement, getCDLAppearance, getCDLAs2D, getCDLDefault, getCDLTuples, getColor, getColorTable, getFillColor, getFillPattern, getLegendName, getLine, getModifiedAppearance, getSymbol, setCDLAppearance, setColor, setColorTable, setFillColor, setFillPattern, setLegendName, setLine, setSymbol
 
Methods inherited from class netcharts.pro.common.rectangular.NFDataSet
setXAxis, setYAxis
 
Methods inherited from class netcharts.pro.common.NFSet
getAxisMap, setAxisMap
 
Methods inherited from class netcharts.pro.common.NFBaseSet
addActiveLabel, getActiveLabels, getSetName, setActiveLabels, setSetName
 
Methods inherited from class netcharts.pro.common.NFVector
addElement, addElement, elementAt, elementAt, getCDL, getCDL, getCDLHasTuples, getCDLKeyValues, getCDLKeyValuesHasPoints, getMaxDimensions, getQuoteStrings, getSize, isEmptyStringAsNull, loadDataModel, loadDataModel, loadDataModel, removeElementAt, reset, setCDL, setCDLHasTuples, setCDLNullString, setElementAt, setEmptyStringAsNull, setQuoteStrings, setSize, size, skipNulls, toArray, toString
 
Methods inherited from class netcharts.pro.common.NFBaseClass
getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lineValueLabelStyleMap

public static java.util.Hashtable lineValueLabelStyleMap
Contains the set of allowed line value style types. Consists of NONE, RIGHT, LEFT, TOP, BOTTOM, TOPLEFT, TOPRIGHT, BOTTOMLEFT, BOTTOMRIGHT, CENTER.

Constructor Detail

NFBubbleSet

public NFBubbleSet()
Constructs a default bubble set. The default bubbles are 40 pixel wide circle symbols using the default color table color.


NFBubbleSet

public NFBubbleSet(java.awt.Color bubbleColor)
Constructs a set with the given bubble color. The default bubbles are 40 pixel wide circle symbols

Parameters:
bubbleColor - The bubble color.

NFBubbleSet

public NFBubbleSet(java.lang.String legendName,
                   java.awt.Color bubbleColor)
Constructs a set with the given bubble color and legend name. The default bubbles are 40 pixel wide circle symbols

Parameters:
legendName - The name that will appear in the legend for this set.
bubbleColor - The bubble color.

NFBubbleSet

public NFBubbleSet(int symbolType,
                   java.awt.Color symbolColor,
                   int maxSymbolSize)
Constructs a set with the given symbol type, color, and size

Parameters:
symbolType - A NFLineSetSymbol type. One of CIRCLE, SQUARE, DIAMOND, TRIANGLEUP, TRIANGLEDOWN, CROSS, VRECTANGLE, HRECTANGLE, IMAGE.
symbolColor - Color of the symbol (ignored for IMAGE types).
maxSymbolSize - Size of symbol (ignored for IMAGE types)
Method Detail

clone

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

Overrides:
clone in class NFLineSet
Returns:
Object
Throws:
java.lang.CloneNotSupportedException

setBubbleMaxSize

public void setBubbleMaxSize(int maxSize)
Sets the maximum size, in pixels, that the bubble can be. The actual rendered size of the symbol is dependant on the 'z' coordinates value relative to the Z scale.

Parameters:
maxSize - Maximum size in pixels that the bubble can be.

getBubbleMaxSize

public int getBubbleMaxSize()
Gets the maximum size, in pixels, that the bubble can be. The actual rendered size of the symbol is dependant on the 'z' coordinates value relative to the Z scale.


setZScale

public void setZScale(double minScale,
                      double maxScale)
Sets the minimum and maximum values that will be used to determine the bubble size.

Parameters:
minScale - If the 'z' coordinate is less than or equal to the minScale, the bubble will be drawn at a 1 pixel size.
maxScale - If the 'z' coordinate is greater than or equal to the maxScale the bubble will be drawn at the full symbol size.

setZScale

public void setZScale(NFBubbleScale zScale)
Sets the minimum and maximum values that will be used to determine the bubble size.

Parameters:
zScale - Scale information for the bubble set.

getZScale

public NFBubbleScale getZScale()
Gets the minimum and maximum values that will be used to determine the bubble size.


setPointColor

public void setPointColor(java.awt.Color pointColor)
Set the point color. This is useful to determine the actual location of the data point.

Parameters:
pointColor; -

getPointColor

public java.awt.Color getPointColor()
Get the point color

Returns:
pointColor used to determine the location of the data point or null if not set.

addElement

public void addElement(java.lang.Object xval,
                       java.lang.Object yval)
Adds the given x and y value to the set. Uses "100" for Z. Data may be null or of type Number or Date.

If the value passed is not a valid data item an IllegalArgumentException will be thrown.

Overrides:
addElement in class NFLineSet
Parameters:
xval - Number or Date value.
yval - Number or Date value.

addElement

public void addElement(java.lang.Object xval,
                       java.lang.Object yval,
                       java.lang.Object zval)
Adds the given x, y, and z value to the set. Data may be null or of type Number or Date.

If the value passed is not a valid data item an IllegalArgumentException will be thrown.

Parameters:
xval - Number or Date value.
yval - Number or Date value.
zval - Number or Date value.

setLineValueLabelStyle

public void setLineValueLabelStyle(int lineValueLabelStyle)
Sets the type of text labeling for lines in this set.

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

Overrides:
setLineValueLabelStyle in class NFLineSet
Parameters:
lineValueLabelStyle - One of NONE, EXTERNAL, RIGHT, LEFT, BOTTOM, TOPLEFT, TOPRIGHT, BOTTOMRIGHT, BOTTOMLEFT, CENTER.

getLineValueLabelStyle

public int getLineValueLabelStyle()
Gets the type of text labeling for lines in this set

Overrides:
getLineValueLabelStyle in class NFLineSet
Returns:
lineValueLabelStyle One of NONE, EXTERNAL, RIGHT, LEFT, BOTTOM, TOPLEFT, TOPRIGHT, BOTTOMRIGHT, BOTTOMLEFT, CENTER or NONE if not set.

getModifiedValueLabel

public boolean getModifiedValueLabel()
Returns if the positioning of value labels has changed in this set.

Overrides:
getModifiedValueLabel in class NFLineSet
Returns:
true if the value labels have changed.

getCDL

public java.lang.String getCDL()
Generate CDL parameters representing this data

Overrides:
getCDL in class NFLineSet
Returns:
CDL data in the form: (x1,y1,z1),(x2,y2,z2),...,(xN,yN,zN)

getCDLLineValueLabelStyle

public java.lang.String getCDLLineValueLabelStyle()
Get the line value label style for the set from a CDL string.

Overrides:
getCDLLineValueLabelStyle in class NFLineSet
Returns:
cdl

setCDLLineValueLabelStyle

public void setCDLLineValueLabelStyle(java.lang.String cdl)
Set the line value label style for the set from a CDL string.

Overrides:
setCDLLineValueLabelStyle in class NFLineSet
Parameters:
cdl -

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