All Packages Class Hierarchy This Package Previous Next Index
Class jclass.chart.ChartCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----jclass.bwt.JCComponent
|
+----jclass.chart.ChartCanvas
- public class ChartCanvas
- extends JCComponent
- implements Changeable
Generic Canvas class used by Chart.
All renderable Chart components inherit
from ChartCanvas, primarily because it
is able to draw borders. ChartCanvas
provides all the functionality of a basic
AWT component, without the overhead
of a peer. This is accomplished by
overriding addNotify and disabling the
peer.
Properties
Name |
Method |
IsShowing
|
If true, the ChartCanvas will appear on the screen. If false, it
will not appear on the screen. (Note that legend, header, footer and
chart area are all ChartCanvas instances).
|
BorderType
|
Determines the style of border drawn around the ChartCanvas. 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. (Note that legend, header, footer and chart area are all
ChartCanvas instances).
|
BorderWidth
|
The BorderWidth property determines the width of the border drawn
around the canvas. (Note that legend, header, footer and chart area are
all ChartCanvas instances).
|
Top
|
The Top property determines the location of the
top of the ChartCanvas.
|
TopIsDefault
|
The TopIsDefault property determines whether the top
position of the chart canvas is calculated by Chart (true) or
taken from the Top property (false).
|
Left
|
The Left property determines the location of the
left of the ChartCanvas.
|
LeftIsDefault
|
The LeftIsDefault property determines whether the left
position of the chart canvas is calculated by Chart (true) or
taken from the Left property (false).
|
Width
|
The Width property determines the width of the
ChartCanvas.
|
WidthIsDefault
|
The WidthIsDefault property determines whether the width
of the chart canvas is calculated by Chart (true) or
taken from the Width property (false).
|
Height
|
The Height property determines the height of the
ChartCanvas.
|
HeightIsDefault
|
The HeightIsDefault property determines whether the height
of the chart canvas is calculated by Chart (true) or
taken from the Height property (false).
|
-
getBorderType()
- Gets the BorderType property of the ChartCanvas.
-
getBorderWidth()
- Gets the BorderWidth property of the ChartCanvas.
-
getChanged()
- Gets the value of the Changed 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, which determines
whether the ChartCanvas will appear on screen.
-
getLeft()
- Gets the value of the Left property.
-
getLeftIsDefault()
- Gets the value of the LeftIsDefault property.
-
getParameters()
-
-
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.
-
isChanged()
- Gets the value of the Changed property.
-
minimumSize()
- Returns the minimum size for this object.
-
paintComponent(Graphics)
- Rendering method for ChartCanvas
-
preferredHeight()
-
-
preferredSize()
- Returns the preferred size for this object.
-
preferredWidth()
-
-
recalc()
-
-
repaint()
- Overridden repaint() method.
-
reshape(int, int, int, int)
-
-
setBorderType(int)
- Sets the BorderType property of the ChartCanvas.
-
setBorderWidth(int)
- Sets the BorderWidth property of the ChartCanvas.
-
setChanged(boolean)
- Sets the value of the Changed property.
-
setChanged(boolean, boolean)
- Sets the value of the Changed 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, which determines
whether the ChartCanvas will appear on screen.
-
setLeft(int)
- Sets the value of the Left property.
-
setLeftIsDefault(boolean)
- Sets the value of the LeftIsDefault property.
-
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.
-
updateParent()
- Internal method used to invalidate and repaint the parent of
the ChartCanvas object.
paintComponent
public void paintComponent(Graphics gc)
- Rendering method for ChartCanvas
- Parameters:
- gr - graphics context for drawing
- Overrides:
- paintComponent in class JCComponent
getIsShowing
public boolean getIsShowing()
- Gets the value of the IsShowing property, which determines
whether the ChartCanvas will appear on screen.
- Returns:
- true if the ChartCanvas will appear, false otherwise.
setIsShowing
public synchronized void setIsShowing(boolean vis)
- Sets the value of the IsShowing property, which determines
whether the ChartCanvas will appear on screen.
- Parameters:
- vis - true if the ChartCanvas will appear, false otherwise
setBorderType
public synchronized void setBorderType(int bt)
- Sets the BorderType property of the ChartCanvas. The
BorderType property determines the style of border
drawn around the ChartCanvas. 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 ChartCanvas. The
BorderType property determines the style of border
drawn around the ChartCanvas. 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 ChartCanvas.
The BorderWidth property determines the width of
the border drawn around the canvas
- 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 ChartCanvas.
The BorderWidth property determines the width of
the border drawn around the canvas
- Returns:
- Border width in pixels.
preferredSize
public Dimension preferredSize()
- Returns the preferred size for this object.
- Overrides:
- preferredSize in class JCComponent
minimumSize
public Dimension minimumSize()
- Returns the minimum size for this object. Simply makes a
call to preferredSize().
- Overrides:
- minimumSize in class JCComponent
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 ChartCanvas.
- 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 ChartCanvas.
- 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 canvas 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 canvas 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 ChartCanvas.
- 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 ChartCanvas.
- 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 canvas 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 canvas 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
ChartCanvas.
- 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 ChartCanvas.
- 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 canvas 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 canvas 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
ChartCanvas.
- 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 ChartCanvas.
- 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 canvas 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 canvas is calculated by Chart (true) or
taken from the Height property (false).
- Returns:
- true if the height is to be calculated, false
otherwise.
getChanged
public boolean getChanged()
- Gets the value of the Changed property. The Changed
property determines whether the chart area requires
to be recalculated.
isChanged
public final boolean isChanged()
- Gets the value of the Changed property. The Changed
property determines whether the chart area requires
to be recalculated.
setChanged
public void setChanged(boolean nc)
- Sets the value of the Changed property. The Changed
property determines whether the chart area requires
a recalculation. Note that this setChanged method
forces its parent to update itself if the value of
n is true.
setChanged
public void setChanged(boolean n,
boolean updateParent)
- Sets the value of the Changed property. The Changed
property determines whether the chart area requires
to be recalculated.
- Parameters:
- n - new boolean value for the Changed property
- updateParent - if true, forces the parent to
update itself. If false, it simply changes the value of
the Changed property.
repaint
public synchronized void repaint()
- Overridden repaint() method. Works around delayed repaint
problems by calling paint directly.
- Overrides:
- repaint in class JCComponent
updateParent
public void updateParent()
- Internal method used to invalidate and repaint the parent of
the ChartCanvas object.
- Overrides:
- updateParent in class JCComponent
preferredWidth
public int preferredWidth()
- Overrides:
- preferredWidth in class JCComponent
preferredHeight
public int preferredHeight()
- Overrides:
- preferredHeight in class JCComponent
getParameters
protected void getParameters()
- Overrides:
- getParameters in class JCComponent
reshape
public synchronized void reshape(int x,
int y,
int width,
int height)
- Overrides:
- reshape in class JCComponent
recalc
public void recalc()
All Packages Class Hierarchy This Package Previous Next Index