|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetcharts.pro.common.NFBaseClass
netcharts.pro.charts.dial.NFDial
public class NFDial
Represents a dial chart. Contains circle or semicircle that may contain multiple sectors or hands. The dial area is generated by specifying a start and stop angle. These values are relative to the top of the chart. For example, a dial with a start angle of 0 and a stop angle of 180 would display a vertically oriented semicircle. A dial with a start angle of -180 and stop angle of 180 would draw a circle with the data orientation starting at the bottom of the circle. Data is mapped onto the dial by using the dial's scale. The scale, which consists of min, max, and step, allows the developer to map non circular coordinates into the dial. So, for example, a speedometer may have a dial that has a start/stop angle of -160,160, but the scale ranges from 0 to 120. This means that if a hand's value is set to 60, the hand will appear to be pointing at the top of the semicircle.
Field Summary | |
---|---|
static int |
INSIDE
Tics on inside of dial |
static int |
NONE
No Tics |
static int |
OUTSIDE
Tics on outside of dial |
static java.util.Hashtable |
ticPositionMap
The set of allowed tic positions. |
Constructor Summary | |
---|---|
NFDial()
Constructs a default dial. |
|
NFDial(java.lang.String dialName)
Constructs a dial with the given name. |
Method Summary | |
---|---|
void |
addHand(NFDialHand hand)
Adds a new hand to this dial. |
void |
addSector(NFDialSector sector)
Adds a new sector to this dial. |
void |
addTicLabel(java.lang.String ticLabel)
Add a new tic label. |
java.lang.Object |
clone()
Does a deep copy of this dial object |
NFActiveLabel |
getActiveLabel()
Gets the active label for this dial. |
boolean |
getActiveLabelModified()
Gets if the dial active label has been modified |
NFLine |
getBorderLine()
Gets the style of the border line |
boolean |
getBorderModified()
Gets if the dial border has been modified |
java.lang.String |
getCDLDial()
Generate CDL parameters representing this dial |
java.lang.String |
getCDLDialActiveLabel()
Generate CDL parameters representing the dial active label |
java.lang.String |
getCDLDialBorder()
Generate CDL parameters representing the dial border |
java.lang.String |
getCDLDialFill()
Generate CDL parameters representing the dial fill |
java.lang.String |
getCDLDialFillPattern()
Generate CDL parameters representing this dial's fill pattern |
java.lang.String |
getCDLDialFormat()
Generate CDL parameters representing the dial format |
java.lang.String |
getCDLDialScale()
Generate CDL parameters representing the dial scale |
java.lang.String |
getCDLDialTicLabels()
Generate CDL parameters representing the dial tic labels |
java.lang.String |
getCDLDialTics()
Generate CDL parameters representing the dial tics |
java.lang.String |
getCDLDialTicStyle()
Generate CDL parameters representing the dial tic styles |
boolean |
getConnectBorderEnds()
Gets if the line/fill should be drawn to connect the points of the border. |
boolean |
getDialModified()
Gets if the dial has been modified |
java.lang.String |
getDialName()
Get this dial's name. |
boolean |
getDrawBorderToCenter()
Gets if the line/fill should be drawn so that end point connect at the center of the chart. |
java.awt.Color |
getFillColor()
Gets the dial fill color |
boolean |
getFillModified()
Gets if the dial fill has been modified |
NFFillPattern |
getFillPattern()
Gets the fill pattern this dial should use. |
boolean |
getFillPatternModified()
Gets if the dial fill pattern has been modified |
NFFormat |
getFormat()
Gets the format of the tic labels |
boolean |
getFormatModified()
Gets if the dial format has been modified |
NFVector |
getHands()
Gets the list of NFDialHand objects for this dial |
double |
getRadiusPercent()
Gets the percentage of the available space the dial should use. |
NFAxisRange |
getScale()
Gets the dial scale. |
boolean |
getScaleModified()
Gets if the dial scale has been modified |
NFVector |
getSectors()
Gets the list of NFDialSector objects for this dial |
boolean |
getShowTicLabels()
Gets whether or not the tic labels should be displayed. |
double |
getStartAngle()
Gets the angle that the dial starts from. |
double |
getStopAngle()
Gets the angle that the dial stops. |
java.awt.Color |
getTicColor()
Gets the tic line color |
double |
getTicLabelPosition()
Gets the position of a tic label relative to the width of the dial. |
NFVector |
getTicLabels()
Gets the tic labels. |
NFTextStyle |
getTicLabelStyle()
Gets text style of the tic labels. |
double |
getTicLength()
Gets the tic line length |
int |
getTicPosition()
Gets the location of the tics relative to the dial. |
boolean |
getTicsModified()
Gets if the dial tics have been modified |
int |
getTicWidth()
Gets the tic line width |
void |
setActiveLabel(NFActiveLabel activeLabel)
Sets the active label for this dial. |
void |
setBorderLine(NFLine borderLine)
Sets the style of the border line |
void |
setCDLDial(java.lang.String cdl)
Configures this object from a CDL parameter representation. |
void |
setCDLDialActiveLabel(java.lang.String cdl)
Configures the dial active label from a CDL parameter representation. |
void |
setCDLDialBorder(java.lang.String cdl)
Configures the dial border from a CDL parameter representation. |
void |
setCDLDialFill(java.lang.String cdl)
Configures the dial fill from a CDL parameter representation. |
void |
setCDLDialFillPattern(java.lang.String cdl)
Configures this object from a CDL parameter representation. |
void |
setCDLDialFormat(java.lang.String cdl)
Configures the dial format from a CDL parameter representation. |
void |
setCDLDialScale(java.lang.String cdl)
Configures the dial scale from a CDL parameter representation. |
void |
setCDLDialTicLabels(java.lang.String cdl)
Configures the dial tic labels from a CDL parameter representation. |
void |
setCDLDialTics(java.lang.String cdl)
Configures the dial tics from a CDL parameter representation. |
void |
setCDLDialTicStyle(java.lang.String cdl)
Configures the dial tic style from a CDL parameter representation. |
void |
setConnectBorderEnds(boolean connectBorderEnds)
Sets if the line/fill should be drawn to connect the points of the border. |
void |
setDialName(java.lang.String dialName)
Set this dial's name. |
void |
setDrawBorderToCenter(boolean drawBorderToCenter)
Sets if the line/fill should be drawn so that end point connect at the center of the chart. |
void |
setFillColor(java.awt.Color fillColor)
Sets the dial fill color |
void |
setFillPattern(NFFillPattern fillPattern)
Sets the fill pattern this dial should use. |
void |
setFormat(NFFormat format)
Sets the format of the tic labels |
void |
setHands(NFVector hands)
Sets the list of NFDialHand objects for this dial |
void |
setRadiusPercent(double radiusPercent)
Sets the percentage of the available space the dial should use. |
void |
setScale(double min,
double max,
double step)
Sets the dial scale. |
void |
setScale(NFAxisRange scale)
Sets the dial scale. |
void |
setSectors(NFVector sectors)
Sets the list of NFDialSector objects for this dial |
void |
setShowTicLabels(boolean showTicLabels)
Sets whether or not the tic labels should be displayed. |
void |
setStartAngle(double startAngle)
Sets the angle that the dial starts from. |
void |
setStopAngle(double stopAngle)
Sets the angle that the dial stops. |
void |
setTicColor(java.awt.Color ticColor)
Sets the tic line color |
void |
setTicLabelPosition(double ticLabelPosition)
Sets the position of a tic label relative to the width of the dial. |
void |
setTicLabels(NFVector ticLabels)
Sets the tic labels. |
void |
setTicLabelStyle(java.awt.Color color,
java.awt.Font font,
int angle)
Sets text style of the tic labels. |
void |
setTicLabelStyle(NFTextStyle ticLabelStyle)
Sets text style of the tic labels. |
void |
setTicLength(double ticLength)
Sets the tic line length |
void |
setTicLine(java.awt.Color ticColor,
int ticWidth,
int ticLength)
Sets the characteristics of the tic lines. |
void |
setTicPosition(int ticPosition)
Sets the location of the tics relative to the dial. |
void |
setTicWidth(int ticWidth)
Sets the tic line width |
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 |
---|
public static final int NONE
public static final int INSIDE
public static final int OUTSIDE
public static java.util.Hashtable ticPositionMap
NONE, INSIDE, OUTSIDE
.
Constructor Detail |
---|
public NFDial()
public NFDial(java.lang.String dialName)
dialName
- Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class NFBaseClass
java.lang.CloneNotSupportedException
public void setDialName(java.lang.String dialName)
dialName
- The name of the dial.public java.lang.String getDialName()
public void setStartAngle(double startAngle)
startAngle
- The start angle.public double getStartAngle()
public void setStopAngle(double stopAngle)
stopAngle
- The stop angle.public double getStopAngle()
public void setRadiusPercent(double radiusPercent)
radiusPercent
- A value between 0 and 100.public double getRadiusPercent()
public void setTicPosition(int ticPosition)
NONE - no tics INSIDE - inside the dial OUTSIDE - outside the dial
ticPosition
- One of NONE, INSIDE, OUTSIDE
public int getTicPosition()
NONE, INSIDE, OUTSIDE
or
NONE
if not defined.public void setScale(double min, double max, double step)
min
- The scale minimum valuemax
- The scale maximum valuestep
- Tic spacingpublic void setScale(NFAxisRange scale)
scale
- the dial scale value.public NFAxisRange getScale()
public void addTicLabel(java.lang.String ticLabel)
ticLabel
- The new tic label.public void setTicLabels(NFVector ticLabels)
ticLabels
- vector of String values.public NFVector getTicLabels()
public void setTicLine(java.awt.Color ticColor, int ticWidth, int ticLength)
ticColor
- Color of the tic lineticWidth
- Width of the tic line (in pixels)ticLength
- Length of the tic line (in pixels)public void setTicColor(java.awt.Color ticColor)
ticColor
- Color of the tic linepublic java.awt.Color getTicColor()
public void setTicWidth(int ticWidth)
ticWidth
- Width of the tic line (in pixels)public int getTicWidth()
public void setTicLength(double ticLength)
ticLength
- Length of the tic line (in pixels)public double getTicLength()
public void setShowTicLabels(boolean showTicLabels)
showTicLabels
- If true, show the tic labels (if defined)public boolean getShowTicLabels()
public void setTicLabelPosition(double ticLabelPosition)
ticLabelPosition
- Tic label position.public double getTicLabelPosition()
public void setTicLabelStyle(java.awt.Color color, java.awt.Font font, int angle)
color
- Text colorfont
- Text fontangle
- Text rotationpublic void setTicLabelStyle(NFTextStyle ticLabelStyle)
ticLabelStyle
- Style object.public NFTextStyle getTicLabelStyle()
public void setConnectBorderEnds(boolean connectBorderEnds)
connectBorderEnds
- true or false.public boolean getConnectBorderEnds()
public void setDrawBorderToCenter(boolean drawBorderToCenter)
drawBorderToCenter
- true or false.public boolean getDrawBorderToCenter()
public void setFormat(NFFormat format)
format
- NFFormat format.public NFFormat getFormat()
public void setBorderLine(NFLine borderLine)
borderLine
- NFLine style.public NFLine getBorderLine()
public void setFillColor(java.awt.Color fillColor)
fillColor
- Dial's fill color.public java.awt.Color getFillColor()
public void setActiveLabel(NFActiveLabel activeLabel)
activeLabel
- Active label object for the dial.public NFActiveLabel getActiveLabel()
public void setFillPattern(NFFillPattern fillPattern)
fillPattern
- Fill pattern for this dial.public NFFillPattern getFillPattern()
public void addHand(NFDialHand hand)
hand
- NFDialHand object to add.public void setHands(NFVector hands)
If the vector contains elements that are not NFDialHand objects, an IllegalArgumentException will be thrown.
hands
- NFVector of NFDialHand objects.public NFVector getHands()
public void addSector(NFDialSector sector)
sector
- NFDialSector object to add.public void setSectors(NFVector sectors)
If the vector contains elements that are not NFDialSector objects, an IllegalArgumentException will be thrown.
sectors
- public NFVector getSectors()
public java.lang.String getCDLDial()
("dialName", startAngle, stopAngle, radiusPercent, ticPosition)
public void setCDLDial(java.lang.String cdl)
cdl
- CDL in the form: ("dialName", startAngle, stopAngle, radiusPercent, ticPosition)
public java.lang.String getCDLDialTics()
("dialName", ticColor, ticWidth, ticLength)
public void setCDLDialTics(java.lang.String cdl)
cdl
- CDL in the form: ("dialName", ticColor, ticWidth, ticLength)
public java.lang.String getCDLDialTicStyle()
("dialName", showLabels, labelPosition, "font", fontSize, textAngle)
public void setCDLDialTicStyle(java.lang.String cdl)
cdl
- CDL in the form: ("dialName", showLabels, labelPosition, "font", fontSize, textAngle)
public java.lang.String getCDLDialFillPattern()
("dialName", type, fgcolor, bgcolor, imageurl)
public void setCDLDialFillPattern(java.lang.String cdl)
cdl
- CDL in the form: ("dialName", type, fgcolor, bgcolor, imageurl)
public java.lang.String getCDLDialTicLabels()
"label1","label2",...,"labelN"
public void setCDLDialTicLabels(java.lang.String cdl)
cdl
- CDL in the form: "label1","label2",...,"labelN"
public java.lang.String getCDLDialScale()
("dialName", min, max, step)
public void setCDLDialScale(java.lang.String cdl)
cdl
- CDL in the form: ("dialName", min, max, step)
public java.lang.String getCDLDialFormat()
("dialName", formatType, formatStr)
public java.lang.String getCDLDialBorder()
("dialName", lineStyle, lineThickness, lineColor, endType)
public void setCDLDialFormat(java.lang.String cdl)
cdl
- CDL in the form: ("dialName", formatType, formatStr)
public void setCDLDialBorder(java.lang.String cdl)
cdl
- CDL in the form: ("dialName", lineStyle, lineThickness, lineColor, endType)
public java.lang.String getCDLDialFill()
("dialName", fillColor, endType)
public void setCDLDialFill(java.lang.String cdl)
cdl
- CDL in the form: ("dialName", fillColor, endType)
public java.lang.String getCDLDialActiveLabel()
("dialName", "label","url","target")
public void setCDLDialActiveLabel(java.lang.String cdl)
cdl
- CDL in the form: ("dialName", "label","url","target")
public boolean getDialModified()
public boolean getTicsModified()
public boolean getFillModified()
public boolean getActiveLabelModified()
public boolean getScaleModified()
public boolean getFormatModified()
public boolean getBorderModified()
public boolean getFillPatternModified()
|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2011 |
Last Modified: Jun 28, 2011 |