JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart
Class JCChartStyle

java.lang.Object
  |
  +--com.klg.jclass.chart.JCChartStyle
All Implemented Interfaces:
Serializable

public class JCChartStyle
extends Object
implements Serializable

Represents a style for rendering a data series. It controls fill styles, symbol styles, and line styles.

Properties

Name Description
FillColor The FillColor property determines the color used to fill regions in chart. Default value is generated.
FillImage The FillImage property determines the image used to paint the fill region of bar charts. Default value is null.
FillPattern The FillPattern property determines the fill pattern used to fill regions in chart. Default value is JCFillStyle.SOLID.
FillStyle The FillStyle property controls the appearance of filled areas in chart. See JCFillStyle for additional properties.
Note: All JCChartStyle properties of the format Fill* are virtual properties that map to properties of JCFillStyle.
LineColor The LineColor property determines the color used to draw a line. Default value is generated.
LinePattern The LinePattern property dictates the pattern used to draw a line. Valid values include JCLineStyle.NONE, JCLineStyle.SOLID, JCLineStyle.LONG_DASH, JCLineStyle.SHORT_DASH, JCLineStyle.LSL_DASH, and JCLineStyle.DASH_DOT. Default value is JCLineStyle.SOLID.
LineStyle The LineStyle property controls the appearance of lines in chart. See JCLineStyle for additional properties.
LineWidth The LineWidth property controls the line width. Default value is 1.
SymbolColor The SymbolColor property determines the color used to paint the symbol. Default value is generated.
SymbolCustomShape The SymbolCustomShape property contains an object derived from JCShape that is used to draw points. See JCShape for details. Default value is null.
SymbolShape The SymbolShape property determines the type 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. Default value is generated.
SymbolSize The SymbolSize property determines the size of the symbol. Default value is 6.
SymbolStyle The SymbolStyle property controls the symbol that represents an individual point. See JCSymbolStyle for additional properties.
Note: all JCChartStyle properties of the format Symbol* are virtual properties that map to properties of JCSymbolStyle.

See Also:
JCFillStyle, JCLineStyle, JCSymbolStyle, Serialized Form

Field Summary
protected  com.klg.jclass.chart.JCFillStyle fillStyle
           
protected  com.klg.jclass.chart.JCLineStyle lineStyle
           
protected  Vector parents
           
protected  com.klg.jclass.chart.JCSymbolStyle symbolStyle
           
 
Constructor Summary
JCChartStyle()
          Default constructor for chart style objects.
JCChartStyle(com.klg.jclass.chart.JCLineStyle ls, com.klg.jclass.chart.JCFillStyle fs, com.klg.jclass.chart.JCSymbolStyle ps)
          Constructor for chart style objects.
 
Method Summary
 void addParent(com.klg.jclass.chart.Changeable parent)
          Adds a parent to the list of parents for the JCChartStyle object.
 void clearParents()
          Clears the list of parents of this JCChartStyle object.
 Color getFillBackground()
          Gets the value of the FillBackground property.
 Color getFillColor()
          Gets the value of the FillColor property.
 Image getFillImage()
          Gets the value of the FillImage property.
 int getFillPattern()
          Gets the value of the FillPattern property.
 com.klg.jclass.chart.JCFillStyle getFillStyle()
          Gets the JCFillStyle property, which controls how fills are drawn.
 int getLineCap()
          Gets the value of the LineCap property.
 Color getLineColor()
          Gets the value of the LineColor property.
 int getLineJoin()
          Gets the value of the LineJoin property.
 int getLinePattern()
          Gets the value of the LinePattern property.
 com.klg.jclass.chart.JCLineStyle getLineStyle()
          Gets the JCLineStyle property, which controls how lines are drawn.
 int getLineWidth()
          Gets the value of the LineWidth property.
 Color getSymbolColor()
          Gets the value of the SymbolColor property.
 com.klg.jclass.chart.JCShape getSymbolCustomShape()
          Gets the value of the SymbolCustomShape property.
 int getSymbolShape()
          Gets the value of the SymbolShape property.
 int getSymbolSize()
          Gets the value of the SymbolSize property.
 com.klg.jclass.chart.JCSymbolStyle getSymbolStyle()
          Gets the SymbolStyle property.
static com.klg.jclass.chart.JCChartStyle makeDefault(com.klg.jclass.chart.JCChart c)
          Creates a default chart style.
static com.klg.jclass.chart.JCChartStyle makeDefault(com.klg.jclass.chart.JCChart c, com.klg.jclass.chart.Changeable parent)
          Creates a default chart style.
static com.klg.jclass.chart.JCChartStyle makeDefault(com.klg.jclass.chart.JCChart c, com.klg.jclass.chart.Changeable parent, boolean other)
          Creates a default chart style.
 void removeParent(com.klg.jclass.chart.Changeable parent)
          Removes a parent from the list of parents for the JCChartStyle object.
 void setFillBackground(Color fc)
          Sets the value of the FillBackground property.
 void setFillColor(Color fc)
          Sets the value of the FillColor property.
 void setFillImage(Image fi)
          Sets the value of the FillImage property.
 void setFillPattern(int fp)
          Sets the value of the FillPattern property.
 void setFillStyle(com.klg.jclass.chart.JCFillStyle fs)
          Sets the JCFillStyle property, which controls how fills are drawn.
 void setLineCap(int c)
          Sets the value of the LineCap property.
 void setLineColor(Color lc)
          Sets the value of the LineColor property.
 void setLineJoin(int j)
          Sets the value of the LineJoin property.
 void setLinePattern(int p)
          Sets the value of the LinePattern property.
 void setLineStyle(com.klg.jclass.chart.JCLineStyle ls)
          Sets the JCLineStyle property, which controls how lines are drawn.
 void setLineWidth(int lw)
          Sets the value of the LineWidth property.
 void setSymbolColor(Color sc)
          Sets the value of the SymbolColor property.
 void setSymbolCustomShape(com.klg.jclass.chart.JCShape cs)
          Sets the value of the SymbolCustomShape property.
 void setSymbolShape(int st)
          Sets the value of the SymbolShape property.
 void setSymbolSize(int sz)
          Sets the value of the SymbolSize property.
 void setSymbolStyle(com.klg.jclass.chart.JCSymbolStyle ps)
          Gets the SymbolStyle property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineStyle

protected com.klg.jclass.chart.JCLineStyle lineStyle

fillStyle

protected com.klg.jclass.chart.JCFillStyle fillStyle

symbolStyle

protected com.klg.jclass.chart.JCSymbolStyle symbolStyle

parents

protected Vector parents
Constructor Detail

JCChartStyle

public JCChartStyle(com.klg.jclass.chart.JCLineStyle ls,
                    com.klg.jclass.chart.JCFillStyle fs,
                    com.klg.jclass.chart.JCSymbolStyle ps)
Constructor for chart style objects.

Parameters:
ls - JCLineStyle instance representing the line style for this chart style object
fs - JCFillStyle instance representing the fill style for this chart style object
ps - JCSymbolStyle instance representing the symbol style for this chart style object

JCChartStyle

public JCChartStyle()
Default constructor for chart style objects. Creates default line style, fill style, and symbol style objects.

Method Detail

makeDefault

public static com.klg.jclass.chart.JCChartStyle makeDefault(com.klg.jclass.chart.JCChart c)
Creates a default chart style.

Parameters:
c - JCChart instance that is the parent of the created JCChartStyle object
Returns:
JCChartStyle object with default line, fill, and symbol styles. The defaults are cycled, so consecutive calls will return different chart styles.

makeDefault

public static com.klg.jclass.chart.JCChartStyle makeDefault(com.klg.jclass.chart.JCChart c,
                                                            com.klg.jclass.chart.Changeable parent)
Creates a default chart style.

Parameters:
c - JCChart instance that will use this JCChartStyle
parent - an instance of Changeable that will be the parent of the created JCChartStyle object
Returns:
JCChartStyle object with default line, fill, and symbol styles. The defaults are cycled, so consecutive calls will return different chart styles.

makeDefault

public static com.klg.jclass.chart.JCChartStyle makeDefault(com.klg.jclass.chart.JCChart c,
                                                            com.klg.jclass.chart.Changeable parent,
                                                            boolean other)
Creates a default chart style.

Parameters:
c - JCChart instance that will use this JCChartStyle
parent - an instance of Changeable that will be the parent of the created JCChartStyle object
other - true if creating from a pie chart another style; false otherwise
Returns:
JCChartStyle object with default line, fill, and symbol styles. The defaults are cycled, so consecutive calls will return different chart styles.

getLineStyle

public com.klg.jclass.chart.JCLineStyle getLineStyle()
Gets the JCLineStyle property, which controls how lines are drawn.

Returns:
JCLineStyle instance representing the line drawing style

setLineStyle

public void setLineStyle(com.klg.jclass.chart.JCLineStyle ls)
Sets the JCLineStyle property, which controls how lines are drawn.

Parameters:
ls - JCLineStyle instance representing the line drawing style

getLinePattern

public int getLinePattern()
Gets the value of the LinePattern property. The LinePattern property dictates the pattern used to draw a line. Valid values include JCLineStyle.NONE, JCLineStyle.SOLID, JCLineStyle.LONG_DASH, JCLineStyle.SHORT_DASH, JCLineStyle.LSL_DASH, and JCLineStyle.DASH_DOT.

Returns:
line pattern enum

setLinePattern

public void setLinePattern(int p)
Sets the value of the LinePattern property. The LinePattern property dictates the pattern used to draw a line. Valid values include JCLineStyle.NONE, JCLineStyle.SOLID, JCLineStyle.LONG_DASH, JCLineStyle.SHORT_DASH, JCLineStyle.LSL_DASH, and JCLineStyle.DASH_DOT.

Parameters:
p - pattern enum

getLineJoin

public int getLineJoin()
Gets the value of the LineJoin property. The LineJoin property dictates the join style used to join two lines. Valid values include BasicStroke.JOIN_MITER, BasicStroke.JOIN_BEVEL, and BasicStroke.JOIN_ROUND. This feature is supported only in JDK 1.2 and higher.

Returns:
line pattern enum

setLineJoin

public void setLineJoin(int j)
Sets the value of the LineJoin property. The LineJoin property dictates the join style used to join two lines. Valid values include BasicStroke.JOIN_MITER, BasicStroke.JOIN_BEVEL, and BasicStroke.JOIN_ROUND. This feature is supported only in JDK 1.2 and higher.

Parameters:
j - join enum

getLineCap

public int getLineCap()
Gets the value of the LineCap property. The LineCap property dictates the cap style used to end a line. Valid values include BasicStroke.CAP_BUTT, BasicStroke.CAP_ROUND, and BasicStroke.CAP_SQUARE. This feature is supported only in JDK 1.2 and higher.

Returns:
line pattern enum

setLineCap

public void setLineCap(int c)
Sets the value of the LineCap property. The LineCap property dictates the cap style used to end a line. Valid values include BasicStroke.CAP_BUTT, BasicStroke.CAP_ROUND, and BasicStroke.CAP_SQUARE. This feature is supported only in JDK 1.2 and higher.

Parameters:
c - cap enum

getLineWidth

public int getLineWidth()
Gets the value of the LineWidth property. The LineWidth property controls the line width.

Returns:
line width

setLineWidth

public void setLineWidth(int lw)
Sets the value of the LineWidth property. The LineWidth property controls the line width.

Parameters:
lw - line width

getLineColor

public Color getLineColor()
Gets the value of the LineColor property. The LineColor property determines the color used to draw a line.

Returns:
line color

setLineColor

public void setLineColor(Color lc)
Sets the value of the LineColor property. The LineColor property determines the color used to draw a line.

Parameters:
lc - line color

getSymbolStyle

public com.klg.jclass.chart.JCSymbolStyle getSymbolStyle()
Gets the SymbolStyle property. The SymbolStyle property controls the symbol that represents an individual point.

Returns:
JCSymbolStyle instance representing the symbol drawing style

setSymbolStyle

public void setSymbolStyle(com.klg.jclass.chart.JCSymbolStyle ps)
Gets the SymbolStyle property. The SymbolStyle property controls the symbol that represents an individual point.

Parameters:
ps - JCSymbolStyle instance representing the symbol drawing style

getSymbolShape

public int getSymbolShape()
Gets the value of the SymbolShape property. The SymbolShape property determines the type 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.

Returns:
symbol shape

setSymbolShape

public void setSymbolShape(int st)
Sets the value of the SymbolShape property. The SymbolShape property determines the type 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.

Parameters:
st - symbol shape

getSymbolColor

public Color getSymbolColor()
Gets the value of the SymbolColor property. The SymbolColor property determines color used to paint the symbol.

Returns:
symbol color

setSymbolColor

public void setSymbolColor(Color sc)
Sets the value of the SymbolColor property. The SymbolColor property determines color used to paint the symbol.

Parameters:
sc - symbol color

getSymbolSize

public int getSymbolSize()
Gets the value of the SymbolSize property. The SymbolSize property determines the size of the symbols.

Returns:
positive integer representing symbol size

setSymbolSize

public void setSymbolSize(int sz)
Sets the value of the SymbolSize property. The SymbolSize property determines the size of the symbols. When set to 0, no symbol is drawn.

Parameters:
sz - symbol size

getSymbolCustomShape

public com.klg.jclass.chart.JCShape getSymbolCustomShape()
Gets the value of the SymbolCustomShape property. The SymbolCustomShape property contains an object derived from JCShape that is used to draw points. See JCShape for details.

Returns:
custom shape object

setSymbolCustomShape

public void setSymbolCustomShape(com.klg.jclass.chart.JCShape cs)
Sets the value of the SymbolCustomShape property. The SymbolCustomShape property contains an object derived from JCShape that is used to draw points. See JCShape for details.

Parameters:
cs - custom shape object

getFillStyle

public com.klg.jclass.chart.JCFillStyle getFillStyle()
Gets the JCFillStyle property, which controls how fills are drawn.

Returns:
JCFillStyle instance representing the fill drawing style

setFillStyle

public void setFillStyle(com.klg.jclass.chart.JCFillStyle fs)
Sets the JCFillStyle property, which controls how fills are drawn.

Parameters:
fs - JCFillStyle instance representing the fill drawing style

getFillColor

public Color getFillColor()
Gets the value of the FillColor property. The FillColor property determines the color used to fill regions in a chart.

Returns:
fill color

setFillColor

public void setFillColor(Color fc)
Sets the value of the FillColor property. The FillColor property determines the color used to fill regions in a chart.

Parameters:
fc - fill color

getFillBackground

public Color getFillBackground()
Gets the value of the FillBackground property. The FillBackground property determines the color used for the background when doing patterned fills in chart.

Returns:
fill background color

setFillBackground

public void setFillBackground(Color fc)
Sets the value of the FillBackground property. The FillBackground property determines the color used for the background when doing patterned fills in chart.

Parameters:
fc - fill background color

getFillPattern

public int getFillPattern()
Gets the value of the FillPattern property. The FillPattern property determines the fill pattern used to fill regions in chart.

Returns:
fill pattern

setFillPattern

public void setFillPattern(int fp)
Sets the value of the FillPattern property. The FillPattern property determines the fill pattern used to fill regions in chart.

Parameters:
fp - fill pattern

getFillImage

public Image getFillImage()
Gets the value of the FillImage property. The FillImage property determines the image used to paint the fill region of bar charts.

Returns:
fill image

setFillImage

public void setFillImage(Image fi)
Sets the value of the FillImage property. The FillImage property determines the image used to paint the fill region of bar charts.

Parameters:
fi - fill image

addParent

public void addParent(com.klg.jclass.chart.Changeable parent)
Adds a parent to the list of parents for the JCChartStyle object.

Parameters:
parent - the Changeable object to add to the parent list

removeParent

public void removeParent(com.klg.jclass.chart.Changeable parent)
Removes a parent from the list of parents for the JCChartStyle object.

Parameters:
parent - the Changeable object to remove from the parent list.

clearParents

public void clearParents()
Clears the list of parents of this JCChartStyle object.


Copyright © 2004 Quest Software Inc..
All rights reserved.