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.
|
-
ChartRegion()
- Default constructor for chart region
-
ChartRegion(ChartCanvas)
- Constructor that connects the ChartRegion to a
parent ChartCanvas.
-
draw(Graphics)
- Draws the chart region.
-
getBackground()
- Gets the value of the Background property.
-
getBorderType()
- Gets the BorderType property of the ChartRegion.
-
getBorderWidth()
- Gets the BorderWidth property of the ChartRegion.
-
getFont()
- Gets the value of the Font property.
-
getForeground()
- Gets the value of the Foreground property.
-
getHeight()
- Gets the value of the Height property.
-
getHeightIsDefault()
- Gets the value of the HeightIsDefault property.
-
getIsShowing()
- Gets the value of the IsShowing property
The IsShowing property determines whether the associated ChartRegion
is currently visible.
-
getLeft()
- Gets the value of the Left property.
-
getLeftIsDefault()
- Gets the value of the LeftIsDefault property.
-
getName()
- Gets the value of the Name property.
-
getTop()
- Gets the value of the Top property.
-
getTopIsDefault()
- Gets the value of the TopIsDefault property.
-
getWidth()
- Gets the value of the Width property.
-
getWidthIsDefault()
- Gets the value of the WidthIsDefault property.
-
move(int, int)
- Moves the chart region to the provided position relative to
the chart canvas.
-
recalc()
- Recalculates the contents of the chart region.
-
reshape(int, int, int, int)
- Reshapes (ie resizes and moves) the chart region according
to the provided parameters.
-
resize(int, int)
- Resizes the chart region to the provided width and height.
-
setBackground(Color)
- Sets the value of the Background property.
-
setBorderType(int)
- Sets the BorderType property of the ChartRegion.
-
setBorderWidth(int)
- Sets the BorderWidth property of the ChartRegion.
-
setChanged(boolean)
- Sets the value of the Changed property and updates the
parent object.
-
setFont(Font)
- Sets the value of the Font property.
-
setForeground(Color)
- Sets the value of the Foreground property.
-
setHeight(int)
- Sets the value of the Height property.
-
setHeightIsDefault(boolean)
- Sets the value of the HeightIsDefault property.
-
setIsShowing(boolean)
- Sets the value of the IsShowing property
The IsShowing property determines whether the associated ChartRegion
is currently visible.
-
setLeft(int)
- Sets the value of the Left property.
-
setLeftIsDefault(boolean)
- Sets the value of the LeftIsDefault property.
-
setName(String)
- Sets the value of the Name property.
-
setParent(ChartCanvas)
- Connects the chart region to a ChartCanvas.
-
setTop(int)
- Sets the value of the Top property.
-
setTopIsDefault(boolean)
- Sets the value of the TopIsDefault property.
-
setWidth(int)
- Sets the value of the Width property.
-
setWidthIsDefault(boolean)
- Sets the value of the WidthIsDefault property.
ChartRegion
public ChartRegion()
- Default constructor for chart region
ChartRegion
public ChartRegion(ChartCanvas p)
- Constructor that connects the ChartRegion to a
parent ChartCanvas.
- Parameters:
- p - Parent chart canvas.
setParent
public synchronized void setParent(ChartCanvas p)
- Connects the chart region to a ChartCanvas.
- Parameters:
- p - Parent chart canvas.
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.
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.
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
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
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.
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.
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.
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.
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
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
recalc
public void recalc()
- Recalculates the contents of the chart region. Not used
in the base class.
- Overrides:
- recalc in class TrackChange
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
draw
public void draw(Graphics gc)
- Draws the chart region.
- Parameters:
- gc - Graphics context to use for drawing.
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