All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.chart.JCSymbolStyle

java.lang.Object
   |
   +----jclass.chart.JCStyle
           |
           +----jclass.chart.JCSymbolStyle

public class JCSymbolStyle
extends JCStyle
JCSymbolStyle controls the appearance of points in a plot graph by allowing the modification of the symbol shape, symbol color and symbol size.

Properties

Name Method
Shape The Shape property determines the shape of symbol that will be drawn. Valid values include JCSymbolStyle.NONE, JCSymbolStyle.DOT, JCSymbolStyle.BOX, JCSymbolStyle.TRIANGLE, JCSymbolStyle.DIAMOND, JCSymbolStyle.STAR, JCSymbolStyle.VERT_LINE, JCSymbolStyle.HORIZ_LINE, JCSymbolStyle.CROSS, JCSymbolStyle.CIRCLE and JCSymbolStyle.SQUARE. The default value is generated.
Color The Color property determines color used to paint the symbol. The default value is generated.
Size The Size property determines color used to paint the symbol. The default value is 6.
CustomShape The CustomShape property contains an object derived from JCShape that is used to draw points. See JCShape for details. The default value is null.


Variable Index

 o BOX
 o CIRCLE
 o CROSS
 o DIAMOND
 o DOT
 o HORIZ_LINE
 o LAST
 o NONE
 o OTHER
 o SQUARE
 o STAR
 o TRIANGLE
 o VERT_LINE

Constructor Index

 o JCSymbolStyle(int, Color, int)
Constructor for symbol style objects

Method Index

 o draw(Graphics, int, int)
Draws a symbol at the specified location, using the properties of the JCSymbolStyle instance.
 o draw(Graphics, int, int, int)
Draws a symbol at the specified location, using the properties of the JCSymbolStyle instance.
 o getColor()
Gets the Color property of JCSymbolStyle, which determines the color used to paint the symbols.
 o getCustomShape()
Gets the value of the CustomShape property.
 o getShape()
Gets the Shape property.
 o getSize()
Gets the Size property.
 o makeDefault(JCChart)
Creates a default symbol style
 o setColor(Color)
Sets the Color property of JCSymbolStyle, which determines the color used to paint the symbols.
 o setCustomShape(JCShape)
Sets the value of the CustomShape property.
 o setShape(int)
Sets the Shape property.
 o setSize(int)
Sets the Size property of JCSymbolStyle, which determines the size of the symbols.

Variables

 o NONE
  public final static int NONE
 o DOT
  public final static int DOT
 o BOX
  public final static int BOX
 o TRIANGLE
  public final static int TRIANGLE
 o DIAMOND
  public final static int DIAMOND
 o STAR
  public final static int STAR
 o VERT_LINE
  public final static int VERT_LINE
 o HORIZ_LINE
  public final static int HORIZ_LINE
 o CROSS
  public final static int CROSS
 o CIRCLE
  public final static int CIRCLE
 o SQUARE
  public final static int SQUARE
 o OTHER
  public final static int OTHER
 o LAST
  public static int LAST

Constructors

 o JCSymbolStyle
  public JCSymbolStyle(int tp,
                       Color c,
                       int sz)
Constructor for symbol style objects

Parameters:
tp - symbol shape. One of NONE, DOT, BOX, TRIANGLE, DIAMOND, STAR, VERT_LINE, HORIZ_LINE, CROSS, CIRCLE, SQUARE.
c - symbol color
sz - symbol size

Methods

 o makeDefault
  public static JCSymbolStyle makeDefault(JCChart c)
Creates a default symbol style

Returns:
JCFillStyle object with default color and symbol style. The defaults are cycled, so consecutive calls will return different symbol styles.
 o draw
  public void draw(Graphics gc,
                   int x,
                   int y)
Draws a symbol at the specified location, using the properties of the JCSymbolStyle instance.

Parameters:
gr - graphics context to use for drawing
x - x position of symbol (in pixels)
y - y position of symbol (in pixels)
 o draw
  public void draw(Graphics gc,
                   int x,
                   int y,
                   int sz)
Draws a symbol at the specified location, using the properties of the JCSymbolStyle instance.

Parameters:
gr - graphics context to use for drawing
x - x position of symbol (in pixels)
y - y position of symbol (in pixels)
sz - size of the symbol
 o getShape
  public int getShape()
Gets the Shape property. The Shape property determines the shape of symbol that will be drawn. of symbol that will be drawn.

Returns:
one of NONE, DOT, BOX, TRIANGLE, DIAMOND, STAR, VERT_LINE, HORIZ_LINE, CROSS, CIRCLE or SQUARE
 o setShape
  public synchronized void setShape(int tp)
Sets the Shape property. The Shape property determines the shape of symbol that will be drawn.

Parameters:
tp - one of NONE, DOT, BOX, TRIANGLE, DIAMOND, STAR, VERT_LINE, HORIZ_LINE, CROSS, CIRCLE or SQUARE
Throws: IllegalArgumentException
If the shape value is not one of NONE, DOT, BOX, TRIANGLE, DIAMOND, STAR, VERT_LINE, HORIZ_LINE, CROSS, CIRCLE or SQUARE.
 o getColor
  public Color getColor()
Gets the Color property of JCSymbolStyle, which determines the color used to paint the symbols.

Returns:
AWT Color class representing the color to be used to paint the symbols. If null, the current color of the Graphics object is used.
 o setColor
  public synchronized void setColor(Color clr)
Sets the Color property of JCSymbolStyle, which determines the color used to paint the symbols.

Parameters:
clr - AWT Color class representing the color to be used to paint the symbols. If null, the current color of the Graphics object is used.
 o getSize
  public int getSize()
Gets the Size property. The Size property determines the size of the symbols. Note that a value of zero size means the symbol will not be drawn.

Returns:
positive integer representing size
 o setSize
  public void setSize(int sz)
Sets the Size property of JCSymbolStyle, which determines the size of the symbols. Note that a value of zero size means the symbol will not be drawn.

Parameters:
sz - positive integer representing size
 o getCustomShape
  public JCShape getCustomShape()
Gets the value of the CustomShape property. The CustomShape property contains an object derived from JCShape that is used to draw symbols.

Returns:
Object derived from JCShape that defined the shape to be drawn for the symbols.
See Also:
 o setCustomShape
  public synchronized void setCustomShape(JCShape.  ns)
Sets the value of the CustomShape property. The CustomShape property contains an object derived from JCShape that is used to draw symbols.

Parameters:
ns - Object derived from JCShape that defined the shape to be drawn for the symbols.
See Also:

All Packages  Class Hierarchy  This Package  Previous  Next  Index