NetCharts Pro

netcharts.pro.common.lineset
Class NFLineSetSymbol

java.lang.Object
  extended by netcharts.pro.common.NFBaseClass
      extended by netcharts.pro.common.NFSymbol
          extended by netcharts.pro.common.lineset.NFLineSetSymbol
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator, NFSetSymbol

public class NFLineSetSymbol
extends NFSymbol
implements NFCDLGenerator, NFSetSymbol

The NFLineSetSymbol object extends NFSymbol to provide support for symbol outline color and width attributes. Additionally, developers may use the NFLineSetSymbol object to specify an image URL to be used in place of the symbol.

This object is used extensively to represent symbols in the NFLinechart, NFCombochart, NFXYchart, and NFStripchart.


Field Summary
static int IMAGE
          Image Symbol type
 
Fields inherited from class netcharts.pro.common.NFSymbol
BOTH, CIRCLE, CROSS, DIAMOND, FILLED, HRECTANGLE, NONE, OUTLINED, SQUARE, styleMap, TARGET, TRIANGLEDOWN, TRIANGLEUP, typeMap, VRECTANGLE
 
Constructor Summary
NFLineSetSymbol()
          Constructs a default symbol object
NFLineSetSymbol(int type, int size)
          Constructs a symbol object with the specified symbol type, size, and FILLED style.
NFLineSetSymbol(int type, int size, int style)
          Constructs a symbol object with the specified symbol type, size, and style.
 
Method Summary
 java.lang.String getCDL()
          Generate CDL parameters representing this symbol
 java.lang.String getCDL(java.lang.StringBuffer sb, boolean includeParens)
          Append CDL parameters representing this symbol to the given StringBuffer.
 java.awt.Color getColor()
          Gets the symbol color.
 java.awt.Image getImage()
          Gets the data symbol image.
 java.lang.String getImageURL()
          Gets the data symbol image.
 java.awt.Color getOutlineColor()
          Gets the symbol outline color.
 int getOutlineWidth()
          Gets the symbol outline width.
 int getShadowWidth()
          Gets symbol's shadow width
 void setCDL(java.lang.String cdl)
          Configures this object from a CDL parameter representation.
 int setCDL(java.lang.String[] elements, int offset)
          Configures this object from a CDL parameter representation.
 void setColor(java.awt.Color color)
          Sets the symbol color.
 void setImage(java.awt.Image image)
          Sets the image to use for the data symbol.
 void setImageURL(java.lang.String imageURL)
          Sets the image to use for the data symbol.
 void setIncludesShadowWidth(boolean includesShadowWidth)
          Enables the line set symbol's shadow width property.
 void setOutlineColor(java.awt.Color outlineColor)
          Sets the symbol outline color.
 void setOutlineWidth(int outlineWidth)
          Sets the symbol outline width.
 void setShadowWidth(int shadowWidth)
          Sets the data symbol's shadow width.
 void setType(int type)
          Sets the symbol type to use for the data.
 void setUsesImage(boolean usesImage)
          Enables the usage of an image based symbol.
 java.lang.String toString()
          Returns a new String object representing this symbol.
 
Methods inherited from class netcharts.pro.common.NFSymbol
getSize, getStyle, getType, setCDL, setSize, setStyle
 
Methods inherited from class netcharts.pro.common.NFBaseClass
clone, getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IMAGE

public static final int IMAGE
Image Symbol type

Constructor Detail

NFLineSetSymbol

public NFLineSetSymbol()
Constructs a default symbol object


NFLineSetSymbol

public NFLineSetSymbol(int type,
                       int size)
Constructs a symbol object with the specified symbol type, size, and FILLED style.

Parameters:
type - One of CIRCLE, SQUARE, DIAMOND, TRIANGLEUP, TRIANGLEDOWN, CROSS, VRECTANGLE, HRECTANGLE, TARGET, IMAGE.
size - Symbol size in pixels

NFLineSetSymbol

public NFLineSetSymbol(int type,
                       int size,
                       int style)
Constructs a symbol object with the specified symbol type, size, and style.

Parameters:
type - One of CIRCLE, SQUARE, DIAMOND, TRIANGLEUP, TRIANGLEDOWN, CROSS, VRECTANGLE, HRECTANGLE, TARGET, IMAGE.
size - Symbol size in pixels
style - One of FILLED, OUTLINED, BOTH
Method Detail

setColor

public void setColor(java.awt.Color color)
Sets the symbol color. If null, the set color will be used.

Specified by:
setColor in interface NFSetSymbol
Parameters:
color - Color to use for the symbol.

getColor

public java.awt.Color getColor()
Gets the symbol color.

Specified by:
getColor in interface NFSetSymbol
Returns:
the color or null if not defined.

setOutlineColor

public void setOutlineColor(java.awt.Color outlineColor)
Sets the symbol outline color. If null, no outline will be shown.

Specified by:
setOutlineColor in interface NFSetSymbol
Parameters:
outlineColor - Color to use for symbol outline.

getOutlineColor

public java.awt.Color getOutlineColor()
Gets the symbol outline color.

Specified by:
getOutlineColor in interface NFSetSymbol
Returns:
the outline color or null if not defined.

setOutlineWidth

public void setOutlineWidth(int outlineWidth)
Sets the symbol outline width.

Specified by:
setOutlineWidth in interface NFSetSymbol
Parameters:
outlineWidth - Width, in pixels of the symbol outline.

getOutlineWidth

public int getOutlineWidth()
Gets the symbol outline width.

Specified by:
getOutlineWidth in interface NFSetSymbol
Returns:
the outline width or 1 if not defined.

setImageURL

public void setImageURL(java.lang.String imageURL)
Sets the image to use for the data symbol. If imageURL is non-null, the graph symbol type will be set to IMAGE.

Parameters:
image - A URL string representing the location of an appropriate image (.gif, .png, .jpg).

setImage

public void setImage(java.awt.Image image)
Sets the image to use for the data symbol.

Parameters:
image - A java.awt.Image representing the appropriate image (.gif, .png, .jpg).

getImageURL

public java.lang.String getImageURL()
Gets the data symbol image.

Returns:
the data symbol image

getImage

public java.awt.Image getImage()
Gets the data symbol image.

Returns:
the data symbol image

setType

public void setType(int type)
Sets the symbol type to use for the data. Note: if the imageURL has been set previously, and the type is set to something other than IMAGE, the imageURL will be set to null.

Specified by:
setType in interface NFSetSymbol
Overrides:
setType in class NFSymbol
Parameters:
type - One of CIRCLE, SQUARE, DIAMOND, TRIANGLEUP, TRIANGLEDOWN, CROSS, VRECTANGLE, HRECTANGLE, TARGET, IMAGE..

setShadowWidth

public void setShadowWidth(int shadowWidth)
Sets the data symbol's shadow width.

Parameters:
shadowWidth - symbol's shadow width in pixels

getShadowWidth

public int getShadowWidth()
Gets symbol's shadow width

Returns:
symbol's shadow width

toString

public java.lang.String toString()
Returns a new String object representing this symbol.

Specified by:
toString in interface NFCDLGenerator
Overrides:
toString in class NFSymbol
Returns:
A new String object in the same form as that given by getCDL().

getCDL

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

Specified by:
getCDL in interface NFCDLGenerator
Overrides:
getCDL in class NFSymbol
Returns:
CDL in the form: (symbolType, symbolSize, symbolStyle, outlineColor, outlineWidth, imageURL)

getCDL

public java.lang.String getCDL(java.lang.StringBuffer sb,
                               boolean includeParens)
Append CDL parameters representing this symbol to the given StringBuffer.

Overrides:
getCDL in class NFSymbol
Parameters:
sb - Target buffer to append the CDL parameters
includeParens - If true, this will cause the parameters to be delimited with parenthesis.

setCDL

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

Specified by:
setCDL in interface NFCDLGenerator
Overrides:
setCDL in class NFSymbol
Parameters:
cdl - CDL in the form: (symbolType, symbolSize, symbolStyle, outlineColor, outlineWidth, imageURL)

setCDL

public int setCDL(java.lang.String[] elements,
                  int offset)
Configures this object from a CDL parameter representation.

Overrides:
setCDL in class NFSymbol
Parameters:
elements - Array of parameter elements. This array is expected to contain consecutive elements containing symbolType, symbolSize, symbolStyle, outlineColor, outlineWidth, imageURL information.
offset - Offset into the elements array.

setUsesImage

public void setUsesImage(boolean usesImage)
Enables the usage of an image based symbol.

Parameters:
usesImage - true to use an image based symbol, false otherwise.

setIncludesShadowWidth

public void setIncludesShadowWidth(boolean includesShadowWidth)
Enables the line set symbol's shadow width property.

Parameters:
includeShadowWidth - true to enable the line set symbol's shadow width, false otherwise

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