All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class MSBChart.LineStyle

java.lang.Object
   |
   +----MSBChart.LineStyle

public class LineStyle
extends Object

This class draws lines. It contains the description of how a line looks like. If you are using jdk 1.1 some features may not be available (width and style).

The following code creates the line style for the grid of this chart:

 

XAxis.gridStyle=new LineStyle(0.2f,java.awt.Color.darkGray,LineStyle.LINE_DASHED);

 


Variable Index

 o LINE_DASHED
 o LINE_DOTS
 o LINE_NORMAL

Constructor Index

 o LineStyle(float, Color, int)

Method Index

 o draw(Graphics, int, int, int, int)
 o drawArc(Graphics, int, int, int, int, int, int)
 o drawPolygon(Graphics, int[], int[], int)
 o drawRect(Graphics, int, int, int, int)
 o getColor()
 o getType()
 o getWidth()

Variables

 o LINE_NORMAL
 public static final int LINE_NORMAL
 o LINE_DASHED
 public static final int LINE_DASHED
 o LINE_DOTS
 public static final int LINE_DOTS

Constructors

 o LineStyle
 public LineStyle(float w,
                  Color c,
                  int t)
Creates a line style with the given width, color and style(line, dashed...).

Methods

 o draw
 public void draw(Graphics g,
                  int x1,
                  int y1,
                  int x2,
                  int y2)
draws a line between two points.
 
 o drawArc
 public void drawArc(Graphics g,
                     int x,
                     int y,
                     int w,
                     int h,
                     int a1,
                     int a2)
draws an arc.
 
 o drawPolygon
 public void drawPolygon(Graphics g,
                         int x[],
                         int y[],
                         int c)
draws a polygon. X and Y contains the points and c the number of points.
 o drawRect
 public void drawRect(Graphics g,
                      int x1,
                      int y1,
                      int x2,
                      int y2)
draws a rectangle.
 o getColor
 public Color getColor()
 
returns the color of the line.
 o getType
 public int getType()
 returns the style of the line.
 o getWidth
 public float getWidth()
returns the width of the line.

All Packages  Class Hierarchy  This Package  Previous  Next  Index