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.
|
-
BOX
-
-
CIRCLE
-
-
CROSS
-
-
DIAMOND
-
-
DOT
-
-
HORIZ_LINE
-
-
LAST
-
-
NONE
-
-
OTHER
-
-
SQUARE
-
-
STAR
-
-
TRIANGLE
-
-
VERT_LINE
-
-
JCSymbolStyle(int, Color, int)
- Constructor for symbol style objects
-
draw(Graphics, int, int)
- Draws a symbol at the specified location, using the properties
of the JCSymbolStyle instance.
-
draw(Graphics, int, int, int)
- Draws a symbol at the specified location, using the properties
of the JCSymbolStyle instance.
-
getColor()
- Gets the Color property of JCSymbolStyle, which determines the
color used to paint the symbols.
-
getCustomShape()
- Gets the value of the CustomShape property.
-
getShape()
- Gets the Shape property.
-
getSize()
- Gets the Size property.
-
makeDefault(JCChart)
- Creates a default symbol style
-
setColor(Color)
- Sets the Color property of JCSymbolStyle, which determines the
color used to paint the symbols.
-
setCustomShape(JCShape)
- Sets the value of the CustomShape property.
-
setShape(int)
- Sets the Shape property.
-
setSize(int)
- Sets the Size property of JCSymbolStyle, which determines the
size of the symbols.
NONE
public static final int NONE
DOT
public static final int DOT
BOX
public static final int BOX
TRIANGLE
public static final int TRIANGLE
DIAMOND
public static final int DIAMOND
STAR
public static final int STAR
VERT_LINE
public static final int VERT_LINE
HORIZ_LINE
public static final int HORIZ_LINE
CROSS
public static final int CROSS
CIRCLE
public static final int CIRCLE
SQUARE
public static final int SQUARE
OTHER
public static final int OTHER
LAST
public static int LAST
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
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.
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)
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
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
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.
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.
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.
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
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
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:
-
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