NetCharts Pro

netcharts.pro.charts.dial
Class NFDialSector

java.lang.Object
  |
  +--netcharts.pro.common.NFBaseClass
        |
        +--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 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
 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.
 double getOuterRadius()
          Get the sector outer radius.
 java.lang.String getSectorLabel()
          Get this dial sector's label.
 boolean getSectorModified()
          Gets if the sector definition has been modified
 java.lang.String getSectorName()
          Get this dial sector's name.
 boolean getShowTicLabels()
          Get whether or not tic labels should be shown in the sector.
 double getStartValue()
          Get the sector start value.
 double getStopValue()
          Get the sector stop value.
 double getTicLabelPosition()
          Get the position of a sector label relative to the radius of the dial.
 NFTextStyle getTicLabelStyle()
          Get the text style of the tic labels.
 boolean getTicsModified()
          Gets if the sector's tic style has been modified
 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 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 setSectorName(java.lang.String sectorName)
          Set this sector's name.
 void setShowTicLabels(boolean showTicLabels)
          Set whether or not tic labels should be shown in the sector.
 void setStartValue(double startValue)
          Set the sector start value.
 void setStopValue(double stopValue)
          Set the sector stop value.
 void setTicLabelPosition(double ticLabelPosition)
          Set the position of a sector label relative to the radius of the dial.
 void setTicLabelStyle(NFTextStyle ticLabelStyle)
          Set the text style of the tic labels.
 
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

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.

setShowTicLabels

public void setShowTicLabels(boolean showTicLabels)
Set whether or not tic labels should be shown in the sector.
Parameters:
showTicLabels - If true, show tic labels.

getShowTicLabels

public boolean getShowTicLabels()
Get whether or not tic labels should be shown in the sector.
Returns:
true (default) if tic labels are to be shown.

setTicLabelPosition

public void setTicLabelPosition(double ticLabelPosition)
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.

getTicLabelPosition

public double getTicLabelPosition()
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.

setTicLabelStyle

public void setTicLabelStyle(NFTextStyle ticLabelStyle)
Set the text style of the tic labels.
Parameters:
ticLabelStyle - The text style object for tic labels.

getTicLabelStyle

public NFTextStyle getTicLabelStyle()
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)

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)

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

getTicsModified

public boolean getTicsModified()
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

getFillPatternModified

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

NetCharts Pro


Visual Mining, Inc.
15825 Shady Grove Rd.
Suite 20
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2004
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: Apr 1, 2004