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, HTMLHandler
ChartRegion is a utility class used inside JCChart to
represent a drawable region on a JCChart. It is
used for all axis annotations as a lightweight component
or gadget.
Properties
Name |
Description |
Background
|
The Background property determines the background color used to draw
inside the chart region. Note that the Background property is inherited
from the parent JCChart.
|
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.
|
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 JCChart.
|
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 JCChart.
|
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).
|
IsShowing
|
The IsShowing property determines whether the associated ChartRegion
is currently visible.
|
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).
|
Name
|
The Name property specifies a string identifier for
the ChartRegion object.
|
Parent
|
The Parent property assures the connection to the chart on which the
ChartRegion appears. Default value is null.
|
ParentRegion
|
The ParentRegion property is the ChartRegion parent. Default value is null.
|
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).
|
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).
|
-
border_strings
-
-
border_values
-
-
ChartRegion()
- Default constructor for chart region
-
ChartRegion(ChartRegion)
-
-
ChartRegion(JCChart)
- Constructor that connects the ChartRegion to a
parent JCChart.
-
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.
-
getDrawingArea()
- Gets the bounding rectangle of the component's drawing area,
(its area minus the shadows and insets).
-
getDrawingArea(Rectangle)
- Gets the bounding rectangle of the component's drawing area,
(its area minus the shadows and insets).
-
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.
-
getInsets()
- Returns the previously set insets.
-
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.
-
getParent()
-
-
getParentRegion()
-
-
getRegionLock()
-
-
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.
-
hide()
-
-
insets()
- Returns the previously set insets.
-
inside(int, int)
-
-
loadParams(String, JCChart)
- Load JCChart parameters from HTML file
-
location()
-
-
move(int, int)
- Moves the chart region to the provided position relative to
the chart.
-
preferredSize()
- Returns the preferred size for the JCTitle instance.
-
recalc()
- Recalculates the contents of the chart region.
-
repaint()
-
-
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.
-
saveParams(String, JCChart)
- Save JCChart parameters as HTML tags
-
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, int)
- Sets the value of the Changed property and updates the
parent object.
-
setChanged(boolean, int, boolean)
- Sets the value of the Changed property.
-
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.
-
setInsets(Insets)
- Sets the component's margins (default: 0).
HTML param name/value: "Insets"/Insets
-
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(JCChart)
- Connects the chart region to a JCChart.
-
setParentRegion(ChartRegion)
-
-
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.
-
show()
-
-
size()
-
-
sizeChanged()
-
-
updateParent(int)
-
border_strings
public static final String border_strings[]
border_values
public static final int border_values[]
ChartRegion
public ChartRegion()
- Default constructor for chart region
ChartRegion
public ChartRegion(JCChart p)
- Constructor that connects the ChartRegion to a
parent JCChart.
- Parameters:
- p - Parent chart.
ChartRegion
public ChartRegion(ChartRegion r)
setParent
public void setParent(JCChart p)
- Connects the chart region to a JCChart.
- Parameters:
- p - Parent chart.
getParent
public JCChart getParent()
getRegionLock
public Object getRegionLock()
setParentRegion
public void setParentRegion(ChartRegion r)
getParentRegion
public ChartRegion getParentRegion()
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 JCChart.
- Returns:
- Font used to render text in the chart region.
setFont
public 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 JCChart.
- 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 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 JCChart.
- Returns:
- Foreground color used to draw the chart region.
setForeground
public 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 JCChart.
- 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 JCChart.
- Returns:
- Background color used to draw the chart region.
setBackground
public 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 JCChart.
- 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 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.
- newy - New y position relative to the parent chart.
- 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.
- Parameters:
- newx - New x position relative to the parent chart.
- newy - New y position relative to the parent chart.
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 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 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 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 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 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 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 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 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 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 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,
int cf)
- 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
setChanged
public void setChanged(boolean n,
int cf,
boolean updateParent)
- Sets the value of the Changed property.
- Overrides:
- setChanged in class TrackChange
repaint
public void repaint()
preferredSize
public Dimension preferredSize()
- Returns the preferred size for the JCTitle instance.
- Returns:
- preferred size
location
public Point location()
size
public Dimension size()
getDrawingArea
public Rectangle getDrawingArea()
- Gets the bounding rectangle of the component's drawing area,
(its area minus the shadows and insets).
- See Also:
- setInsets
getDrawingArea
public void getDrawingArea(Rectangle rect)
- Gets the bounding rectangle of the component's drawing area,
(its area minus the shadows and insets).
- See Also:
- setInsets
inside
public boolean inside(int x,
int y)
show
public void show()
hide
public void hide()
setInsets
public void setInsets(Insets insets)
- Sets the component's margins (default: 0).
HTML param name/value: "Insets"/Insets
- See Also:
- toInsets
insets
public Insets insets()
- Returns the previously set insets.
- See Also:
- setInsets
getInsets
public Insets getInsets()
- Returns the previously set insets.
- See Also:
- setInsets
sizeChanged
public boolean sizeChanged()
updateParent
public void updateParent(int cf)
saveParams
public void saveParams(String name,
JCChart comp)
- Save JCChart parameters as HTML tags
- Parameters:
- name - the PARAM NAME
- chart - the JCChart component
loadParams
public void loadParams(String name,
JCChart comp)
- Load JCChart parameters from HTML file
- Parameters:
- name - the PARAM NAME
- chart - the JCChart component
All Packages Class Hierarchy This Package Previous Next Index