NetCharts Pro

netcharts.pro.charts.dial
Class NFDialSector

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

public class NFDialSector
extends NFBaseClass

Dial sector object. Represents a segment of the parent dial. A sector's area is defined by it's start and stop value and inner and outer radius.


Constructor Summary
NFDialSector()
          Constructs a default dial sector.
NFDialSector(java.lang.String sectorName)
          Constructs a dial sector with the given name.
 
Method Summary
 java.lang.Object clone()
          Does a deep copy of this dial object
 NFActiveLabel getActiveLabel()
          Get the sector's active label.
 boolean getActiveLabelModified()
          Gets if the sector's active label has been modified
 NFLine getBorderLine()
          Get the border line style
 boolean getBorderModified()
          Gets if the sector's border has been modified
 java.lang.String getCDLSector(java.lang.String dialName)
          Generate CDL parameters representing this sector
 java.lang.String getCDLSectorActiveLabel()
          Generate CDL parameters representing this sector's active label
 java.lang.String getCDLSectorBorder()
          Generate CDL parameters representing this sector's border style
 java.lang.String getCDLSectorColor()
          Generate CDL parameters representing this sector's color
 java.lang.String getCDLSectorData()
          Generate CDL parameters representing this sector's data
 java.lang.String getCDLSectorFillPattern()
          Generate CDL parameters representing this sector's fill pattern
 java.lang.String getCDLSectorTicStyle()
          Generate CDL parameters representing this sector's tic style
 boolean getDataModified()
          Gets if the sector's data has been modified
 java.awt.Color getFillColor()
          Get the sector fill color
 boolean getFillColorModified()
          Gets if the sector's fill pattern has been modified
 NFFillPattern getFillPattern()
          Gets the fill pattern this dial should use.
 boolean getFillPatternModified()
          Gets if the sector's fill pattern has been modified
 double getInnerRadius()
          Get the sector inner radius.
 boolean getLabelModified()
          Gets if the sector's label style has been modified
 double getOuterRadius()
          Get the sector outer radius.
 java.lang.String getSectorLabel()
          Get this dial sector's label.
 double getSectorLabelPosition()
          Deprecated.  
 NFTextStyle getSectorLabelStyle()
          Get the text style of the label.
 boolean getSectorModified()
          Gets if the sector definition has been modified
 java.lang.String getSectorName()
          Get this dial sector's name.
 boolean getShowSectorLabel()
          Get whether or not the label should be shown in the sector.
 boolean getShowTicLabels()
          Deprecated. Replaced by getShowSectorLabel()
 double getStartValue()
          Get the sector start value.
 double getStopValue()
          Get the sector stop value.
 double getTicLabelPosition()
          Deprecated. Replaced by getSectorLabelPosition()
 NFTextStyle getTicLabelStyle()
          Deprecated. Replaced by getSectorLabelStyle()
 boolean getTicsModified()
          Deprecated. Replaced by getLabelModified()
 void setActiveLabel(NFActiveLabel activeLabel)
          Set the sector's active label.
 void setBorderLine(NFLine borderLine)
          Set the border line style
 void setCDLSector(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDLSectorActiveLabel(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDLSectorBorder(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDLSectorColors(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDLSectorData(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDLSectorFillPattern(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDLSectorTicStyle(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setFillColor(java.awt.Color fillColor)
          Set the sector fill color
 void setFillPattern(NFFillPattern fillPattern)
          Sets the fill pattern this dial should use.
 void setInnerRadius(double innerRadius)
          Set the sector inner radius.
 void setOuterRadius(double outerRadius)
          Set the sector outer radius.
 void setSectorLabel(java.lang.String sectorLabel)
          GSt this dial sector's label.
 void setSectorLabelPosition(double sectorLabelPosition)
          Set the position of the sector label relative to the radius of the dial.
 void setSectorLabelStyle(NFTextStyle sectorLabelStyle)
          Set the text style of the label.
 void setSectorName(java.lang.String sectorName)
          Set this sector's name.
 void setShowSectorLabel(boolean showSectorLabels)
          Set whether or not the label should be shown in the sector.
 void setShowTicLabels(boolean showTicLabels)
          Deprecated. Replaced by setShowSectorLabel(boolean)
 void setStartValue(double startValue)
          Set the sector start value.
 void setStopValue(double stopValue)
          Set the sector stop value.
 void setTicLabelPosition(double ticLabelPosition)
          Deprecated. Replaced by setSectorLabelPosition(double)
 void setTicLabelStyle(NFTextStyle ticLabelStyle)
          Deprecated. Replaced by setSectorLabelStyle(NFTextStyle)
 
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
 

Constructor Detail

NFDialSector

public NFDialSector()
Constructs a default dial sector. Sets the default name to SectorN where N is a random number


NFDialSector

public NFDialSector(java.lang.String sectorName)
Constructs a dial sector with the given name.

Parameters:
sectorName -
Method Detail

clone

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

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

setSectorName

public void setSectorName(java.lang.String sectorName)
Set this sector's name. The dial sector's name is used mostly when reading or generating a CDL representation of the chart.

Parameters:
sectorName - The name of the sector.

getSectorName

public java.lang.String getSectorName()
Get this dial sector's name. The dial sector name is used mostly when reading or generating a CDL representation of the chart.

Returns:
the name of this dial sector. If a name has not been set, an automatically generated name will be provided.

setSectorLabel

public void setSectorLabel(java.lang.String sectorLabel)
GSt this dial sector's label. The dial sector label is only used when displaying the label (vs the name which identifies the sector)

Parameters:
sectorLabel - Text to use for this dial sector.

getSectorLabel

public java.lang.String getSectorLabel()
Get this dial sector's label. The dial sector label is only used when displaying the label (vs the name which identifies the sector)

Returns:
the sectorlabel for this dial sector.

setStartValue

public void setStartValue(double startValue)
Set the sector start value. This is the value, relative to the dial's range, that the sector starts from.

Parameters:
startValue - The sector start value.

getStartValue

public double getStartValue()
Get the sector start value.

Returns:
the sector start value or 0.0 if not defined.

setStopValue

public void setStopValue(double stopValue)
Set the sector stop value. This is the value, relative to the dial's range, that the sector stops at.

Parameters:
stopValue - The sector stop value.

getStopValue

public double getStopValue()
Get the sector stop value.

Returns:
the sector stop value or 359.0 if not defined.

setInnerRadius

public void setInnerRadius(double innerRadius)
Set the sector inner radius. This is the inner radius of the sector as a percentage of the dial's radius.

Parameters:
innerRadius - The sector's inner radius.

getInnerRadius

public double getInnerRadius()
Get the sector inner radius.

Returns:
innerRadius The sector's inner radius or 0.0 if not defined.

setOuterRadius

public void setOuterRadius(double outerRadius)
Set the sector outer radius. This is the outer radius of the sector as a percentage of the dial's radius.

Parameters:
outerRadius - The sector's outer radius.

getOuterRadius

public double getOuterRadius()
Get the sector outer radius.

Returns:
outerRadius The sector's outer radius or 100.0 if not defined.

setFillColor

public void setFillColor(java.awt.Color fillColor)
Set the sector fill color

Parameters:
fillColor - The sector fill color.

getFillColor

public java.awt.Color getFillColor()
Get the sector fill color

Returns:
the sector fill color or null if not defined.

setShowSectorLabel

public void setShowSectorLabel(boolean showSectorLabels)
Set whether or not the label should be shown in the sector.

Parameters:
showSectorLabels - If true, show the label.

setShowTicLabels

public void setShowTicLabels(boolean showTicLabels)
Deprecated. Replaced by setShowSectorLabel(boolean)

Set whether or not tic labels should be shown in the sector.

Parameters:
showTicLabels - If true, show tic labels.

getShowSectorLabel

public boolean getShowSectorLabel()
Get whether or not the label should be shown in the sector.

Returns:
true (default) if the label is to be shown.

getShowTicLabels

public boolean getShowTicLabels()
Deprecated. Replaced by getShowSectorLabel()

Get whether or not tic labels should be shown in the sector.

Returns:
true (default) if tic labels are to be shown.

setSectorLabelPosition

public void setSectorLabelPosition(double sectorLabelPosition)
Set the position of the sector label relative to the radius of the dial. A value of 1.1 will place the label just outside the dial.

Parameters:
sectorLabelPosition - The radial position of the label.

setTicLabelPosition

public void setTicLabelPosition(double ticLabelPosition)
Deprecated. Replaced by setSectorLabelPosition(double)

Set the position of a sector label relative to the radius of the dial. A value of 1.1 will place each label just outside the dial.

Parameters:
ticLabelPosition - The radial position of tic labels.

getSectorLabelPosition

public double getSectorLabelPosition()
Deprecated. 

Get the position of the sector label relative to the radius of the dial.

Returns:
the radial position of the label or 0.6 if not defined.

getTicLabelPosition

public double getTicLabelPosition()
Deprecated. Replaced by getSectorLabelPosition()

Get the position of a sector label relative to the radius of the dial.

Returns:
the radial position of tic labels or 0.6 if not defined.

setSectorLabelStyle

public void setSectorLabelStyle(NFTextStyle sectorLabelStyle)
Set the text style of the label.

Parameters:
sectorLabelStyle - The text style object for the label.

setTicLabelStyle

public void setTicLabelStyle(NFTextStyle ticLabelStyle)
Deprecated. Replaced by setSectorLabelStyle(NFTextStyle)

Set the text style of the tic labels.

Parameters:
ticLabelStyle - The text style object for tic labels.

getSectorLabelStyle

public NFTextStyle getSectorLabelStyle()
Get the text style of the label.

Returns:
the text style object for the label or null if not defined.

getTicLabelStyle

public NFTextStyle getTicLabelStyle()
Deprecated. Replaced by getSectorLabelStyle()

Get the text style of the tic labels.

Returns:
the text style object for tic labels or null if not defined.

setBorderLine

public void setBorderLine(NFLine borderLine)
Set the border line style

Parameters:
borderLine - The NFLine object describing the sector border.

getBorderLine

public NFLine getBorderLine()
Get the border line style

Returns:
the NFLine object describing the sector border or null if not defined.

setActiveLabel

public void setActiveLabel(NFActiveLabel activeLabel)
Set the sector's active label.

Parameters:
activeLabel - The sector active label object.

getActiveLabel

public NFActiveLabel getActiveLabel()
Get the sector's active label.

Returns:
the sector active label object.

setFillPattern

public void setFillPattern(NFFillPattern fillPattern)
Sets the fill pattern this dial should use.

Parameters:
fillPattern - Fill pattern for this dial.

getFillPattern

public NFFillPattern getFillPattern()
Gets the fill pattern this dial should use.

Returns:
fill pattern for this dial or null if not defined.

getCDLSector

public java.lang.String getCDLSector(java.lang.String dialName)
Generate CDL parameters representing this sector

Parameters:
dialName - The dial that this sector is associated with.
Returns:
CDL in the form: ("sectorName", fillColor, "dialName", outerRadius, innerRadius)

setCDLSector

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

Parameters:
cdl - CDL in the form: ("sectorName", fillColor, "dialName", outerRadius, innerRadius)

getCDLSectorData

public java.lang.String getCDLSectorData()
Generate CDL parameters representing this sector's data

Returns:
CDL in the form: ("sectorName", startValue, stopValue)

getCDLSectorColor

public java.lang.String getCDLSectorColor()
Generate CDL parameters representing this sector's color

Returns:
CDL in the form: ("sectorName", color)

setCDLSectorData

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

Parameters:
cdl - CDL in the form: ("sectorName", startValue, stopValue)

setCDLSectorColors

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

Parameters:
cdl - CDL in the form: ("sectorName", color)

getCDLSectorTicStyle

public java.lang.String getCDLSectorTicStyle()
Generate CDL parameters representing this sector's tic style

Returns:
CDL in the form: ("sectorName", showTicLabels, ticPosition, textColor, font, fontsize, angle)

setCDLSectorTicStyle

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

Parameters:
cdl - CDL in the form: ("sectorName", showTicLabels, ticPosition, textColor, font, fontsize, angle)

getCDLSectorFillPattern

public java.lang.String getCDLSectorFillPattern()
Generate CDL parameters representing this sector's fill pattern

Returns:
CDL in the form: ("sectorName", type, fgcolor, bgcolor, imageurl)

setCDLSectorFillPattern

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

Parameters:
cdl - CDL in the form: ("sectorName", type, fgcolor, bgcolor, imageurl)

getCDLSectorBorder

public java.lang.String getCDLSectorBorder()
Generate CDL parameters representing this sector's border style

Returns:
CDL in the form: ("sectorName", lineStyle, lineWidth, lineColor)

setCDLSectorBorder

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

Parameters:
cdl - CDL in the form: ("sectorName", lineStyle, lineWidth, lineColor)

getCDLSectorActiveLabel

public java.lang.String getCDLSectorActiveLabel()
Generate CDL parameters representing this sector's active label

Returns:
CDL in the form: ("sectorName", "label", "url", "target")

setCDLSectorActiveLabel

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

Parameters:
cdl - CDL in the form: ("sectorName", "label", "url", "target")

getSectorModified

public boolean getSectorModified()
Gets if the sector definition has been modified

Returns:
modified

getDataModified

public boolean getDataModified()
Gets if the sector's data has been modified

Returns:
modified

getLabelModified

public boolean getLabelModified()
Gets if the sector's label style has been modified

Returns:
modified

getTicsModified

public boolean getTicsModified()
Deprecated. Replaced by getLabelModified()

Gets if the sector's tic style has been modified

Returns:
modified

getActiveLabelModified

public boolean getActiveLabelModified()
Gets if the sector's active label has been modified

Returns:
modified

getBorderModified

public boolean getBorderModified()
Gets if the sector's border has been modified

Returns:
modified

getFillColorModified

public boolean getFillColorModified()
Gets if the sector's fill pattern has been modified

Returns:
modified

getFillPatternModified

public boolean getFillPatternModified()
Gets if the sector's fill pattern has been modified

Returns:
modified

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