|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.chart.TrackChange | +--com.klg.jclass.chart.ChartInteriorRegion
A utility class used inside JClass Chart to represent a drawable region on a chart. It is used for all axis annotations as a lightweight component or gadget.
Field Summary | |
protected Color |
background
Background color used in the chart region. |
protected boolean |
dimIsDefaultChangedToTrue
|
protected Font |
font
Font used to draw text in the chart region. |
protected Color |
foreground
Foreground color used in the chart region. |
protected boolean |
groupingUsed
|
protected com.klg.jclass.chart.DerivedInt |
height
|
protected Insets |
insets
|
protected boolean |
inUpdate
|
protected com.klg.jclass.chart.DerivedInt |
left
|
protected String |
name
Name of the ChartInteriorRegion object. |
protected boolean |
needsRepaint
|
protected boolean |
numberLocalization
|
protected com.klg.jclass.chart.JCChart |
parentChart
Connection to the chart on which the ChartInteriorRegion appears. |
protected com.klg.jclass.chart.ChartRegion |
parentRegion
|
protected com.klg.jclass.chart.DerivedInt |
top
|
protected boolean |
transparent
|
protected boolean |
updateParent
Used to turn off updates to parent in certain cases. |
protected boolean |
visible
Determines whether the chart region is visible. |
protected com.klg.jclass.chart.DerivedInt |
width
|
Fields inherited from class com.klg.jclass.chart.TrackChange |
changed, changedFlag |
Fields inherited from interface com.klg.jclass.chart.Changeable |
BASIC_CHANGE_MASK, NOTIFY_AXES_RECALC, NOTIFY_AXES_REDRAW, NOTIFY_CA_RECALC, NOTIFY_CA_REDRAW, NOTIFY_LEGEND_RECALC, NOTIFY_LEGEND_REDRAW |
Fields inherited from interface com.klg.jclass.util.Changeable |
LAYOUT, NO_CHANGE, NOTIFY_PARENT_LAYOUT, RECALC, REDRAW |
Constructor Summary | |
ChartInteriorRegion()
Default constructor for chart region. |
|
ChartInteriorRegion(com.klg.jclass.chart.ChartRegion r)
|
|
ChartInteriorRegion(com.klg.jclass.chart.JCChart p)
Constructor that connects the ChartInteriorRegion to a
parent JCChart . |
Method Summary | |
void |
draw(Graphics gc)
Draws the chart region. |
Color |
getBackground()
Gets the value of the Background property. |
Rectangle |
getDrawingArea()
Gets the bounding rectangle of the component's drawing area, (its area minus the shadows and insets). |
void |
getDrawingArea(Rectangle rect)
Gets the bounding rectangle of the component's drawing area, (its area minus the shadows and insets). |
Font |
getFont()
Gets the value of the Font property. |
Color |
getForeground()
Gets the value of the Foreground property. |
Graphics |
getGraphics()
Gets the current graphics object used. |
boolean |
getGroupingUsed()
Gets the value of the GroupingUsed property. |
int |
getHeight()
Gets the value of the Height property. |
boolean |
getHeightIsDefault()
Gets the value of the HeightIsDefault property. |
Insets |
getInsets()
Returns the previously set insets. |
int |
getLeft()
Gets the value of the Left property. |
boolean |
getLeftIsDefault()
Gets the value of the LeftIsDefault property. |
String |
getName()
Gets the value of the Name property. |
com.klg.jclass.chart.JCChartNumberFormat |
getNumberFormatter()
Gets the number formatter (used for number localization). |
boolean |
getNumberLocalization()
Gets the value of the NumberLocalization property. |
com.klg.jclass.chart.JCChart |
getParentChart()
|
com.klg.jclass.chart.ChartRegion |
getParentRegion()
|
Dimension |
getSize()
Returns the size of the region. |
int |
getTop()
Gets the value of the Top property. |
boolean |
getTopIsDefault()
Gets the value of the TopIsDefault property. |
int |
getWidth()
Gets the value of the Width property. |
boolean |
getWidthIsDefault()
Gets the value of the WidthIsDefault property. |
void |
hide()
Hides the region and repaints the parent. |
Insets |
insets()
Returns the previously set insets. |
boolean |
inside(int x,
int y)
Is the point (x,y) within the drawing area?. |
boolean |
isVisible()
Gets the value of the Visible property. |
Point |
location()
Gets the location of the drawing region based on the margins. |
Dimension |
preferredSize()
Returns the preferred size for the ChartInteriorRegion instance. |
void |
recalc()
Recalculates the contents of the chart region. |
void |
repaint()
Repaints, taking into account the parent region. |
void |
setBackground(Color c)
Sets the value of the Background property. |
void |
setBounds(int newx,
int newy,
int neww,
int newh)
Reshapes (in ohter words, resizes and moves) the chart region according to the provided parameters. |
void |
setChanged(boolean c,
int cf)
Sets the value of the Changed property and updates the parent
object. |
void |
setChanged(boolean n,
int cf,
boolean updateParent)
Sets the value of the Changed property. |
void |
setFont(Font f)
Sets the value of the Font property. |
void |
setForeground(Color c)
Sets the value of the Foreground property. |
void |
setGroupingUsed(boolean groupingUsed)
Sets the value of the GroupingUsed property. |
void |
setHeight(int t)
Sets the value of the Height property. |
void |
setHeightIsDefault(boolean d)
Sets the value of the HeightIsDefault property. |
void |
setInsets(Insets insets)
Sets the component's margins (default is 0 ). |
void |
setLeft(int t)
Sets the value of the Left property. |
void |
setLeftIsDefault(boolean d)
Sets the value of the LeftIsDefault property. |
void |
setLocation(int newx,
int newy)
Moves the chart region to the provided position relative to the chart. |
void |
setName(String s)
Sets the value of the Name property. |
void |
setNumberFormatterLocale(Locale l)
Sets the value of the number formatting locale. |
void |
setNumberLocalization(boolean numberLocalization)
Sets whether to localize numbers. |
void |
setParentChart(com.klg.jclass.chart.JCChart p)
Connects the chart region to a JCChart . |
void |
setParentRegion(com.klg.jclass.chart.ChartRegion r)
|
void |
setSize(int neww,
int newh)
Resizes the chart region to the provided width and height. |
void |
setTop(int t)
Sets the value of the Top property. |
void |
setTopIsDefault(boolean d)
Sets the value of the TopIsDefault property. |
void |
setVisible(boolean is)
Sets the value of the Visible property. |
void |
setWidth(int t)
Sets the value of the Width property. |
void |
setWidthIsDefault(boolean d)
Sets the value of the WidthIsDefault property. |
void |
show()
Makes the region visible and repaints the parent. |
Dimension |
size()
Gets the size of the region. |
boolean |
sizeChanged()
Checks if the size has changed. |
void |
updateParent(int cf)
Updates the parent based on the passed in flag. |
Methods inherited from class com.klg.jclass.chart.TrackChange |
getChanged, getChanged, isBatched, isChanged, isChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Insets insets
protected com.klg.jclass.chart.DerivedInt left
protected com.klg.jclass.chart.DerivedInt top
protected com.klg.jclass.chart.DerivedInt width
protected com.klg.jclass.chart.DerivedInt height
protected Font font
protected String name
ChartInteriorRegion
object.
protected Color foreground
protected Color background
protected com.klg.jclass.chart.JCChart parentChart
ChartInteriorRegion
appears.
protected com.klg.jclass.chart.ChartRegion parentRegion
protected boolean visible
JCAxis
.
protected boolean updateParent
protected boolean dimIsDefaultChangedToTrue
protected boolean inUpdate
protected boolean needsRepaint
protected boolean transparent
protected boolean numberLocalization
protected boolean groupingUsed
Constructor Detail |
public ChartInteriorRegion()
public ChartInteriorRegion(com.klg.jclass.chart.JCChart p)
ChartInteriorRegion
to a
parent JCChart
.
p
- parent chartpublic ChartInteriorRegion(com.klg.jclass.chart.ChartRegion r)
Method Detail |
public void setParentChart(com.klg.jclass.chart.JCChart p)
JCChart
.
p
- parent chartpublic com.klg.jclass.chart.JCChart getParentChart()
public void setParentRegion(com.klg.jclass.chart.ChartRegion r)
public com.klg.jclass.chart.ChartRegion getParentRegion()
public Font getFont()
Font
property. The Font
property determines what font is used to render text inside the
chart region. Font
property is inherited
from the parent JCChart
.
public void setFont(Font f)
Font
property. The Font
property determines what font is used to render text inside the
chart region. Font
property is inherited
from the parent JCChart
.
f
- font to use to render text in the chart regionpublic String getName()
Name
property.
The Name
property specifies a String identifier for
the ChartInteriorRegion
object.
getName
in interface com.klg.jclass.util.JCName
object.n
public void setName(String s)
Name
property.
The Name
property specifies a String identifier for
the ChartInteriorRegion
object.
setName
in interface com.klg.jclass.util.JCName
s
- new name for the object.n
public Color getForeground()
Foreground
property. The
Foreground
property determines the foreground color used to
draw inside the chart region. Foreground
property is inherited from the parent JCChart
.
public void setForeground(Color c)
Foreground
property. The
Foreground
property determines the foreground color used to
draw inside the chart region. Foreground
property is inherited from the parent JCChart
.
c
- foreground color used to draw the chart regionpublic Color getBackground()
Background
property. The
Background
property determines the foreground color used to
draw inside the chart region. Background
property is inherited from the parent JCChart
.
public void setBackground(Color c)
Background
property. The
Background
property determines the foreground color used to
draw inside the chart region. Background
property is inherited from the parent JCChart
.
c
- background color used to draw the chart regionpublic boolean isVisible()
Visible
property.
The Visible
property determines whether the associated
ChartInteriorRegion
is currently visible.
true
if the chart region is showing;
false
otherwisepublic void setVisible(boolean is)
Visible
property.
The Visible
property determines whether the associated
ChartInteriorRegion
is currently visible.
is
- true
if the chart region is showing;
false
otherwisepublic void recalc()
recalc
in class TrackChange
public void setBounds(int newx, int newy, int neww, int newh)
newx
- new x position relative to the parent chartnewy
- new y position relative to the parent chartneww
- new widthnewh
- new heightpublic void setLocation(int newx, int newy)
newx
- new x position relative to the parent chartnewy
- new y position relative to the parent chartpublic void setSize(int neww, int newh)
neww
- new widthnewh
- new heightpublic Dimension getSize()
ChartInteriorRegion
public void setTop(int t)
Top
property.
The Top
property determines the location of the
top of the ChartInteriorRegion
.
t
- top value in pixelspublic int getTop()
Top
property.
The Top
property determines the location of the
top of the ChartInteriorRegion
.
public void setTopIsDefault(boolean d)
TopIsDefault
property.
The TopIsDefault
property determines whether the top
position of the chart region is calculated by Chart (true
) or
is taken from the Top
property (false
).
d
- true
if the position is to be calculated;
false
otherwisepublic boolean getTopIsDefault()
TopIsDefault
property.
The TopIsDefault
property determines whether the top
position of the chart region is calculated by Chart (true
) or
is taken from the Top property (false
).
true
if the position is to be calculated;
false
otherwisepublic void setLeft(int t)
Left
property.
The Left
property determines the location of the
left of the ChartInteriorRegion
.
t
- left value in pixelspublic int getLeft()
Left
property.
The Left
property determines the location of the
left of the ChartInteriorRegion
.
public void setLeftIsDefault(boolean d)
LeftIsDefault
property.
The LeftIsDefault
property determines whether the left
position of the chart region is calculated by Chart (true
) or
is taken from the Left
property (false
).
d
- true
if the position is to be calculated;
false
otherwisepublic boolean getLeftIsDefault()
LeftIsDefault
property.
The LeftIsDefault
property determines whether the left
position of the chart region is calculated by Chart (true
) or
is taken from the Left
property (false
).
true
if the position is to be calculated;
false
otherwisepublic void setWidth(int t)
Width
property.
The Width
property determines the width of the
ChartInteriorRegion
.
t
- width value in pixelspublic int getWidth()
Width
property.
The Width property determines the location of the
width of the ChartInteriorRegion
.
- Returns:
- width value in pixels
public void setWidthIsDefault(boolean d)
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
).
d
- true
if the width is to be calculated; false
otherwisepublic boolean getWidthIsDefault()
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
).
true
if the width is to be calculated; false
otherwisepublic void setHeight(int t)
Height
property.
The Height
property determines the height of the
ChartInteriorRegion
.
t
- height value in pixelspublic int getHeight()
Height
property.
The Height
property determines the location of the
height of the ChartInteriorRegion
.
public void setHeightIsDefault(boolean d)
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
).
d
- true
if the height is to be calculated;
false
otherwisepublic boolean getHeightIsDefault()
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
).
true
if the height is to be calculated;
false
otherwisepublic com.klg.jclass.chart.JCChartNumberFormat getNumberFormatter()
JCChartNumberFormat
object used for
localizing numberspublic void setNumberLocalization(boolean numberLocalization)
numberLocalization
- the new value of the
NumberLocalization
propertypublic boolean getNumberLocalization()
NumberLocalization
property.
true
if number localization is being usedpublic boolean getGroupingUsed()
GroupingUsed
property.
The GroupingUsed
property determines whether or not grouping
will be used in formatting numbers.
public void setGroupingUsed(boolean groupingUsed)
GroupingUsed
property.
The GroupingUsed
property determines whether or not grouping
will be used in formatting numbers. Default value is false
.
groupingUsed
- the new value of the GroupingUsed
propertypublic void setNumberFormatterLocale(Locale l)
l
- the new number formatting localepublic void draw(Graphics gc)
draw
in interface com.klg.jclass.chart.Drawable
gc
- graphics context to use for drawingpublic void setChanged(boolean c, int cf)
Changed
property and updates the parent
object. The Changed
property determines whether the object needs
to be recalculated.
setChanged
in interface Changeable
setChanged
in class TrackChange
c
- new value for Changed
cf
- the value with which to update the changed flagpublic void setChanged(boolean n, int cf, boolean updateParent)
Changed
property. The Changed
property determines whether the object needs to be recalculated.
setChanged
in interface Changeable
setChanged
in class TrackChange
n
- new value for Changed
cf
- the value with which to update the changed flagupdateParent
- if true
, the parent is updated; otherwise,
the parent is not updated (the "update" semantics are up to the implementor)public void updateParent(int cf)
cf
- the flag which determines the kind of updatepublic Graphics getGraphics()
public void repaint()
public Dimension preferredSize()
ChartInteriorRegion
instance.
public Point location()
public Dimension size()
public Rectangle getDrawingArea()
setInsets(java.awt.Insets)
public void getDrawingArea(Rectangle rect)
rect
- an object in which the bounding rectangle of the component's
drawing area is returnedsetInsets(java.awt.Insets)
public boolean inside(int x, int y)
x
- the x value of the pointy
- the y value of the point
true
, if the point is within the drawing areapublic void show()
public void hide()
public void setInsets(Insets insets)
0
).HTML param name/value: "Insets"/Insets
insets
- the new component marginsJCSwingTypeConverter.toInsets(java.lang.String, java.awt.Insets)
public Insets insets()
setInsets(java.awt.Insets)
public Insets getInsets()
setInsets(java.awt.Insets)
public boolean sizeChanged()
true
, if the size has changed
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |