NetCharts Pro

netcharts.pro.charts.dial
Class NFDialHand

java.lang.Object
  |
  +--netcharts.pro.common.NFBaseClass
        |
        +--netcharts.pro.charts.dial.NFDialHand
All Implemented Interfaces:
java.lang.Cloneable

public class NFDialHand
extends NFBaseClass

Dial hand object. A dial hand is represented by a line drawn to the given value with the given length. The value of a hand is mapped according the the scale of the dial. The length of the hand is a percentage where 100 will draw to the dial's border.


Field Summary
static int BLOCK
           
static java.util.Hashtable handStyle
          handStyle hashtable
static int LINE
           
static int NONE
           
static int ROUND
           
static int SHARP
           
 
Constructor Summary
NFDialHand()
          Constructs a default dial hand.
NFDialHand(java.lang.String handName)
          Constructs a dial hand with the given name.
 
Method Summary
 java.lang.Object clone()
          Does a deep copy of this dial hand object
 NFActiveLabel getActiveLabel()
          Get the active label for this hand.
 boolean getActiveLabelModified()
          Gets if the hand active label has been modified
 java.lang.String getCDLHand(java.lang.String dialName)
          Generate CDL parameters representing this hand
 java.lang.String getCDLHandActiveLabel()
          Generate CDL parameters representing this hand's active label
 java.lang.String getCDLHandData()
          Generate CDL parameters representing this hand's data
 java.lang.String getCDLHandStyle()
          Generate CDL parameters representing this hand's display style
 boolean getDataModified()
          Gets if the hand data has been modified
 int getEndStyle()
          Get how the end of the hand is to be drawn.
 boolean getHandModified()
          Gets if the hand definition has been modified
 java.lang.String getHandName()
          Get this dial hand's name.
 double getLength()
          Get the hand length.
 java.awt.Color getShaftColor()
          Set the hand shaft (line) color.
 double getShaftWidth()
          Get the width of the hand's shaft (line)
 boolean getStyleModified()
          Gets if the hand style has been modified
 java.awt.Color getTipColor()
          Get the color of the end of the hand.
 double getTipWidth()
          Get the width of the hand end.
 double getValue()
          Get the hand value.
 void setActiveLabel(NFActiveLabel activeLabel)
          Set the active label for this hand.
 void setCDLHand(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDLHandActiveLabel(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDLHandData(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setCDLHandStyle(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 void setEndStyle(int endStyle)
          Set how the end of the hand is to be drawn.
 void setHandName(java.lang.String handName)
          Set this hand's name.
 void setLength(double length)
          Set the hand length.
 void setShaftColor(java.awt.Color shaftColor)
          Set the hand shaft (line) color.
 void setShaftWidth(double shaftWidth)
          Set the width of the hand's shaft (line)
 void setTipColor(java.awt.Color tipColor)
          Set the color of the end of the hand.
 void setTipWidth(double tipWidth)
          Set the width of the hand end.
 void setValue(double value)
          Set the hand value.
 
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

handStyle

public static java.util.Hashtable handStyle
handStyle hashtable

NONE

public static final int NONE

LINE

public static final int LINE

BLOCK

public static final int BLOCK

SHARP

public static final int SHARP

ROUND

public static final int ROUND
Constructor Detail

NFDialHand

public NFDialHand()
Constructs a default dial hand. Sets the default name to HandN where N is a random number

NFDialHand

public NFDialHand(java.lang.String handName)
Constructs a dial hand with the given name.
Parameters:
handName -  
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Does a deep copy of this dial hand object
Overrides:
clone in class NFBaseClass
Returns:
Object

setHandName

public void setHandName(java.lang.String handName)
Set this hand's name. The dial hand's name is used mostly when reading or generating a CDL representation of the chart.
Parameters:
handName - The name of the hand.

getHandName

public java.lang.String getHandName()
Get this dial hand's name. The dial hand name is used mostly when reading or generating a CDL representation of the chart.
Returns:
the name of this dial hand. If a name has not been set, an automatically generated name will be provided.

setTipColor

public void setTipColor(java.awt.Color tipColor)
Set the color of the end of the hand. Has no effect if the end style has been set to None
Parameters:
tipColor - Color of the end of the hand.

getTipColor

public java.awt.Color getTipColor()
Get the color of the end of the hand.
Returns:
color of the end of the hand or null if not defined.

setShaftColor

public void setShaftColor(java.awt.Color shaftColor)
Set the hand shaft (line) color.
Parameters:
shaftColor - The line color

getShaftColor

public java.awt.Color getShaftColor()
Set the hand shaft (line) color.
Returns:
the shaft (line) color or null if not defined.

setValue

public void setValue(double value)
Set the hand value. This is mapped to a dial scale in order to determine hand angle.
Parameters:
value - The value of this hand.

getValue

public double getValue()
Get the hand value.
Returns:
the value of this hand or 0.0 if not defined.

setLength

public void setLength(double length)
Set the hand length. This is the length of the hand as a percentage of the dial's radius.
Parameters:
length - The length of the hand.

getLength

public double getLength()
Get the hand length.
Returns:
the length of the hand or 100.0 if not defined.

setEndStyle

public void setEndStyle(int endStyle)
Set how the end of the hand is to be drawn.

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

Parameters:
endStyle. - One of NONE, LINE, BLOCK, SHARP, ROUND

getEndStyle

public int getEndStyle()
Get how the end of the hand is to be drawn.
Returns:
endStyle or SHARP if not defined.

setTipWidth

public void setTipWidth(double tipWidth)
Set the width of the hand end.
Parameters:
tipWidth - Width in pixels of the hand end.

getTipWidth

public double getTipWidth()
Get the width of the hand end.
Returns:
width in pixels of the hand end or 5 if not defined.

setShaftWidth

public void setShaftWidth(double shaftWidth)
Set the width of the hand's shaft (line)
Parameters:
shaftWidth - Width in pixels of the shaft.

getShaftWidth

public double getShaftWidth()
Get the width of the hand's shaft (line)
Returns:
width in pixels of the shaft or 1.0 if not defined.

setActiveLabel

public void setActiveLabel(NFActiveLabel activeLabel)
Set the active label for this hand.
Parameters:
activeLabel - The hand's active label.

getActiveLabel

public NFActiveLabel getActiveLabel()
Get the active label for this hand.
Returns:
the hand's active label.

getCDLHand

public java.lang.String getCDLHand(java.lang.String dialName)
Generate CDL parameters representing this hand
Parameters:
dialName - The dial that this hand is associated with.
Returns:
CDL in the form: ("handName", tipColor, shaftColor, "dialName")

setCDLHand

public void setCDLHand(java.lang.String cdl)
Configures this object from a CDL parameter representation.
Parameters:
cdl - CDL in the form: ("handName", tipColor, shaftColor, "dialName")

getCDLHandData

public java.lang.String getCDLHandData()
Generate CDL parameters representing this hand's data
Returns:
CDL in the form: ("handName", value, length)

setCDLHandData

public void setCDLHandData(java.lang.String cdl)
Configures this object from a CDL parameter representation.
Parameters:
cdl - CDL in the form: ("handName", value, length)

getCDLHandStyle

public java.lang.String getCDLHandStyle()
Generate CDL parameters representing this hand's display style
Returns:
CDL in the form: ("handName", handStyle, tipWidth, shaftWidth)

setCDLHandStyle

public void setCDLHandStyle(java.lang.String cdl)
Configures this object from a CDL parameter representation.
Parameters:
cdl - CDL in the form: ("handName", handStyle, tipWidth, shaftWidth)

getCDLHandActiveLabel

public java.lang.String getCDLHandActiveLabel()
Generate CDL parameters representing this hand's active label
Returns:
CDL in the form: ("handName", "label", "url", "target")

setCDLHandActiveLabel

public void setCDLHandActiveLabel(java.lang.String cdl)
Configures this object from a CDL parameter representation.
Parameters:
cdl - CDL in the form: ("handName", "label", "url", "target")

getHandModified

public boolean getHandModified()
Gets if the hand definition has been modified
Returns:
modified

getDataModified

public boolean getDataModified()
Gets if the hand data has been modified
Returns:
modified

getStyleModified

public boolean getStyleModified()
Gets if the hand style has been modified
Returns:
modified

getActiveLabelModified

public boolean getActiveLabelModified()
Gets if the hand active label 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