All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.chart.ChartRegion

java.lang.Object
   |
   +----jclass.chart.TrackChange
           |
           +----jclass.chart.ChartRegion

public class ChartRegion
extends TrackChange
implements Drawable, JCSerializable
ChartRegion is a utility class used inside JCChart to represent a drawable region on a ChartCanvas. It is used for all axis annotations as a lightweight component or gadget.

Properties

Name Method
Font The Font property determines what font is used to render text inside the chart region. Note that the Font property is inherited from the parent ChartCanvas.
Foreground The Foreground property determines the foreground color used to draw inside the chart region. Note that the Foreground property is inherited from the parent ChartCanvas.
Background The Background property determines the foreground color used to draw inside the chart region. Note that the Background property is inherited from the parent ChartCanvas.
Top The Top property determines the location of the top of the ChartRegion.
TopIsDefault The TopIsDefault property determines whether the top position of the chart region is calculated by Chart (true) or taken from the Top property (false).
Left The Left property determines the location of the left of the ChartRegion
LeftIsDefault The LeftIsDefault property determines whether the left position of the chart region is calculated by Chart (true) or taken from the Left property (false).
Width The Width property determines the width of the ChartRegion.
WidthIsDefault The WidthIsDefault property determines whether the width of the chart region is calculated by Chart (true) or taken from the Width property (false).
Height The Height property determines the height of the ChartRegion.
HeightIsDefault The HeightIsDefault property determines whether the height of the chart region is calculated by Chart (true) or taken from the Height property (false).
BorderType Determines the style of border drawn around the ChartRegion. Valid values come from BWTEnum, and include SHADOW_NONE, SHADOW_ETCHED_IN, SHADOW_ETCHED_OUT, SHADOW_IN, SHADOW_OUT, SHADOW_PLAIN, SHADOW_FRAME_IN, SHADOW_FRAME_OUT.
BorderWidth The BorderWidth property determines the width of the border drawn around the region.
Name The Name property specifies a string identifier for the ChartRegion object.
IsShowing The IsShowing property determines whether the associated ChartRegion is currently visible.


Constructor Index

 o ChartRegion()
Default constructor for chart region
 o ChartRegion(ChartCanvas)
Constructor that connects the ChartRegion to a parent ChartCanvas.

Method Index

 o draw(Graphics)
Draws the chart region.
 o getBackground()
Gets the value of the Background property.
 o getBorderType()
Gets the BorderType property of the ChartRegion.
 o getBorderWidth()
Gets the BorderWidth property of the ChartRegion.
 o getFont()
Gets the value of the Font property.
 o getForeground()
Gets the value of the Foreground property.
 o getHeight()
Gets the value of the Height property.
 o getHeightIsDefault()
Gets the value of the HeightIsDefault property.
 o getIsShowing()
Gets the value of the IsShowing property The IsShowing property determines whether the associated ChartRegion is currently visible.
 o getLeft()
Gets the value of the Left property.
 o getLeftIsDefault()
Gets the value of the LeftIsDefault property.
 o getName()
Gets the value of the Name property.
 o getTop()
Gets the value of the Top property.
 o getTopIsDefault()
Gets the value of the TopIsDefault property.
 o getWidth()
Gets the value of the Width property.
 o getWidthIsDefault()
Gets the value of the WidthIsDefault property.
 o move(int, int)
Moves the chart region to the provided position relative to the chart canvas.
 o recalc()
Recalculates the contents of the chart region.
 o reshape(int, int, int, int)
Reshapes (ie resizes and moves) the chart region according to the provided parameters.
 o resize(int, int)
Resizes the chart region to the provided width and height.
 o setBackground(Color)
Sets the value of the Background property.
 o setBorderType(int)
Sets the BorderType property of the ChartRegion.
 o setBorderWidth(int)
Sets the BorderWidth property of the ChartRegion.
 o setChanged(boolean)
Sets the value of the Changed property and updates the parent object.
 o setFont(Font)
Sets the value of the Font property.
 o setForeground(Color)
Sets the value of the Foreground property.
 o setHeight(int)
Sets the value of the Height property.
 o setHeightIsDefault(boolean)
Sets the value of the HeightIsDefault property.
 o setIsShowing(boolean)
Sets the value of the IsShowing property The IsShowing property determines whether the associated ChartRegion is currently visible.
 o setLeft(int)
Sets the value of the Left property.
 o setLeftIsDefault(boolean)
Sets the value of the LeftIsDefault property.
 o setName(String)
Sets the value of the Name property.
 o setParent(ChartCanvas)
Connects the chart region to a ChartCanvas.
 o setTop(int)
Sets the value of the Top property.
 o setTopIsDefault(boolean)
Sets the value of the TopIsDefault property.
 o setWidth(int)
Sets the value of the Width property.
 o setWidthIsDefault(boolean)
Sets the value of the WidthIsDefault property.

Constructors

 o ChartRegion
  public ChartRegion()
Default constructor for chart region

 o ChartRegion
  public ChartRegion(ChartCanvas p)
Constructor that connects the ChartRegion to a parent ChartCanvas.

Parameters:
p - Parent chart canvas.

Methods

 o setParent
  public synchronized void setParent(ChartCanvas p)
Connects the chart region to a ChartCanvas.

Parameters:
p - Parent chart canvas.
 o getFont
  public Font getFont()
Gets the value of the Font property. The Font property determines what font is used to render text inside the chart region. Note that the Font property is inherited from the parent ChartCanvas.

Returns:
Font used to render text in the chart region.
 o setFont
  public synchronized void setFont(Font f)
Sets the value of the Font property. The Font property determines what font is used to render text inside the chart region. Note that the Font property is inherited from the parent ChartCanvas.

Parameters:
f - Font to use to render text in the chart region.
 o getName
  public String getName()
Gets the value of the Name property. The Name property specifies a string identifier for the ChartRegion object.

Returns:
New name for the object.n
 o setName
  public synchronized void setName(String s)
Sets the value of the Name property. The Name property specifies a string identifier for the ChartRegion object.

Parameters:
s - New name for the object.n
 o getForeground
  public Color getForeground()
Gets the value of the Foreground property. The Foreground property determines the foreground color used to draw inside the chart region. Note that the Foreground property is inherited from the parent ChartCanvas.

Returns:
Foreground color used to draw the chart region.
 o setForeground
  public synchronized void setForeground(Color c)
Sets the value of the Foreground property. The Foreground property determines the foreground color used to draw inside the chart region. Note that the Foreground property is inherited from the parent ChartCanvas.

Parameters:
c - Foreground color used to draw the chart region.
 o getBackground
  public Color getBackground()
Gets the value of the Background property. The Background property determines the foreground color used to draw inside the chart region. Note that the Background property is inherited from the parent ChartCanvas.

Returns:
Background color used to draw the chart region.
 o setBackground
  public synchronized void setBackground(Color c)
Sets the value of the Background property. The Background property determines the foreground color used to draw inside the chart region. Note that the Background property is inherited from the parent ChartCanvas.

Parameters:
c - Background color used to draw the chart region.
 o getIsShowing
  public boolean getIsShowing()
Gets the value of the IsShowing property The IsShowing property determines whether the associated ChartRegion is currently visible.

Returns:
true if the chart region is showing, false otherwise
 o setIsShowing
  public synchronized void setIsShowing(boolean is)
Sets the value of the IsShowing property The IsShowing property determines whether the associated ChartRegion is currently visible.

Parameters:
is - true if the chart region is showing, false otherwise
 o recalc
  public void recalc()
Recalculates the contents of the chart region. Not used in the base class.

Overrides:
recalc in class TrackChange
 o reshape
  public void reshape(int newx,
                      int newy,
                      int neww,
                      int newh)
Reshapes (ie resizes and moves) the chart region according to the provided parameters.

Parameters:
newx - New x position relative to the parent chart canvas.
newy - New y position relative to the parent chart canvas.
neww - New width.
newh - New height.
 o move
  public void move(int newx,
                   int newy)
Moves the chart region to the provided position relative to the chart canvas.

Parameters:
newx - New x position relative to the parent chart canvas.
newy - New y position relative to the parent chart canvas.
 o resize
  public void resize(int neww,
                     int newh)
Resizes the chart region to the provided width and height.

Parameters:
neww - New width.
newh - New height.
 o setTop
  public synchronized void setTop(int t)
Sets the value of the Top property. The Top property determines the location of the top of the ChartRegion.

Parameters:
t - top value in pixels.
 o getTop
  public int getTop()
Gets the value of the Top property. The Top property determines the location of the top of the ChartRegion.

Returns:
top value in pixels.
 o setTopIsDefault
  public synchronized void setTopIsDefault(boolean d)
Sets the value of the TopIsDefault property. The TopIsDefault property determines whether the top position of the chart region is calculated by Chart (true) or taken from the Top property (false).

Parameters:
d - true if the position is to be calculated, false otherwise.
 o getTopIsDefault
  public boolean getTopIsDefault()
Gets the value of the TopIsDefault property. The TopIsDefault property determines whether the top position of the chart region is calculated by Chart (true) or taken from the Top property (false).

Returns:
true if the position is to be calculated, false otherwise.
 o setLeft
  public synchronized void setLeft(int t)
Sets the value of the Left property. The Left property determines the location of the left of the ChartRegion.

Parameters:
t - left value in pixels.
 o getLeft
  public int getLeft()
Gets the value of the Left property. The Left property determines the location of the left of the ChartRegion.

Returns:
left value in pixels.
 o setLeftIsDefault
  public synchronized void setLeftIsDefault(boolean d)
Sets the value of the LeftIsDefault property. The LeftIsDefault property determines whether the left position of the chart region is calculated by Chart (true) or taken from the Left property (false).

Parameters:
d - true if the position is to be calculated, false otherwise.
 o getLeftIsDefault
  public boolean getLeftIsDefault()
Gets the value of the LeftIsDefault property. The LeftIsDefault property determines whether the left position of the chart region is calculated by Chart (true) or taken from the Left property (false).

Returns:
true if the position is to be calculated, false otherwise.
 o setWidth
  public synchronized void setWidth(int t)
Sets the value of the Width property. The Width property determines the width of the ChartRegion.

Parameters:
t - width value in pixels.
 o getWidth
  public int getWidth()
Gets the value of the Width property. The Width property determines the location of the width of the ChartRegion.

Returns:
width value in pixels.
 o setWidthIsDefault
  public synchronized void setWidthIsDefault(boolean d)
Sets the value of the WidthIsDefault property. The WidthIsDefault property determines whether the width of the chart region is calculated by Chart (true) or taken from the Width property (false).

Parameters:
d - true if the width is to be calculated, false otherwise.
 o getWidthIsDefault
  public boolean getWidthIsDefault()
Gets the value of the WidthIsDefault property. The WidthIsDefault property determines whether the width of the chart region is calculated by Chart (true) or taken from the Width property (false).

Returns:
true if the width is to be calculated, false otherwise.
 o setHeight
  public synchronized void setHeight(int t)
Sets the value of the Height property. The Height property determines the height of the ChartRegion.

Parameters:
t - height value in pixels.
 o getHeight
  public int getHeight()
Gets the value of the Height property. The Height property determines the location of the height of the ChartRegion.

Returns:
height value in pixels.
 o setHeightIsDefault
  public synchronized void setHeightIsDefault(boolean d)
Sets the value of the HeightIsDefault property. The HeightIsDefault property determines whether the height of the chart region is calculated by Chart (true) or taken from the Height property (false).

Parameters:
d - true if the height is to be calculated, false otherwise.
 o getHeightIsDefault
  public boolean getHeightIsDefault()
Gets the value of the HeightIsDefault property. The HeightIsDefault property determines whether the height of the chart region is calculated by Chart (true) or taken from the Height property (false).

Returns:
true if the height is to be calculated, false otherwise.
 o setBorderType
  public synchronized void setBorderType(int bt)
Sets the BorderType property of the ChartRegion. The BorderType property determines the style of border drawn around the ChartRegion. Valid values come from BWTEnum, and include SHADOW_NONE, SHADOW_ETCHED_IN, SHADOW_ETCHED_OUT, SHADOW_IN, SHADOW_OUT, SHADOW_PLAIN, SHADOW_FRAME_IN, SHADOW_FRAME_OUT.

Parameters:
bt - enum specifying border type
Throws: IllegalArgumentException
If the BorderType isn't a valid shadow type from BWTEnum.
 o getBorderType
  public int getBorderType()
Gets the BorderType property of the ChartRegion. The BorderType property determines the style of border drawn around the ChartRegion. Valid values come from BWTEnum, and include SHADOW_NONE, SHADOW_ETCHED_IN, SHADOW_ETCHED_OUT, SHADOW_IN, SHADOW_OUT, SHADOW_PLAIN, SHADOW_FRAME_IN, SHADOW_FRAME_OUT.

Returns:
enum specifying border type
 o setBorderWidth
  public synchronized void setBorderWidth(int thick)
Sets the BorderWidth property of the ChartRegion. The BorderWidth property determines the width of the border drawn around the region.

Parameters:
thick - border width in pixels
Throws: IllegalArgumentException
If the BorderWidth isn't positive, throw an error.
 o getBorderWidth
  public int getBorderWidth()
Gets the BorderWidth property of the ChartRegion. The BorderWidth property determines the width of the border drawn around the region.

Returns:
Border width in pixels.
 o draw
  public void draw(Graphics gc)
Draws the chart region.

Parameters:
gc - Graphics context to use for drawing.
 o setChanged
  public void setChanged(boolean c)
Sets the value of the Changed property and updates the parent object. The Changed property determines whether the object needs to be recalculated.

Parameters:
n - New value for Changed.
Overrides:
setChanged in class TrackChange

All Packages  Class Hierarchy  This Package  Previous  Next  Index