|
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 | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--com.klg.jclass.chart3d.JCChart3d
The core charting class. JCChart3d
allows the
retrieval of related objects, such as the chart area, the
legend, the header, and the footer. Bean classes are represented
by a charting class derived from JCChart3d
.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
protected com.klg.jclass.chart3d.JCActionTable |
actionTable
The ActionTable object that associates key and mouse triggers with actions. |
static int |
BAR
Specifies that an array of bars should be drawn. |
protected com.klg.jclass.chart3d.JCChart3dArea |
chart3dArea
The component that manages the area where the chart is drawn. |
protected Rectangle |
chart3dAreaLayoutHints
Gives the layout manager info about the position and size of the chart area. |
com.klg.jclass.chart3d.JCChart3dCustomizer |
customizer
References the Customizer, if it exists. |
protected Vector |
dataViews
A list of dataViews for this chart. |
static String |
ERRMSG_CUSTOMIZER_FAILURE
Error message for customizer failure. |
protected int |
fillColorIndex
An index into the color list. |
protected JComponent |
footer
The footer for this chart. |
protected Rectangle |
footerLayoutHints
Give the layout manager info about the position and size of the footer. |
protected JComponent |
header
The header for this chart. |
protected Rectangle |
headerLayoutHints
Gives the layout manager info about the position and size of the header. |
protected boolean |
inKeyPress
Asks if a key press has been initiated without a corresponding release. |
static int |
LAST_PREDEFINED_CHART_TYPE
Specifies the end of array so more chart can possibly be added later. |
protected com.klg.jclass.util.legend.JCLegend |
legend
The legend for this chart. |
protected Rectangle |
legendLayoutHints
Gives the layout manager info about the position and size of the legend. |
protected com.klg.jclass.chart3d.JCChart3dLegendManager |
legendManager
The default implementation of the legend populator and renderer. |
protected int |
lineColorIndex
An index into the color list. |
protected com.klg.jclass.util.JCListenerList |
listeners
The current list of JCChart3dListener 's for this chart. |
protected Locale |
locale
The locale object for this chart3d . |
static int |
NONE
Invalid chart type used for error checking. |
protected com.klg.jclass.util.JCListenerList |
pickListeners
The current list of JCPick3dListener 's for this chart. |
static int |
SCATTER
Specifies that a scatter plot should be drawn. |
static int |
SURFACE
Specifes that a surface should be drawn. |
protected int |
symbolColorIndex
An index into the symbol list. |
protected int |
symbolShapeIndex
An index into the shape list. |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface com.klg.jclass.chart3d.Changeable |
ALL, CONTOURS, NOTIFY_CA_RECALC, NOTIFY_CA_REDRAW, NOTIFY_LEGEND_RECALC, NOTIFY_LEGEND_REDRAW |
Fields inherited from interface com.klg.jclass.util.Changeable |
BASIC_CHANGE_MASK, LAYOUT, NO_CHANGE, NOTIFY_PARENT_LAYOUT, RECALC, REDRAW |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JCChart3d()
Default constructor, required by JavaBeans. |
|
JCChart3d(int tp)
Constructor that creates a JCChart3d of a particular type. |
Method Summary | |
void |
addChart3dListener(com.klg.jclass.chart3d.event.JCChart3dListener l)
Adds a listener to changes in JClass Chart 3D. |
com.klg.jclass.chart3d.Chart3dDataView |
addDataView(int index,
int chartType)
Creates a new Chart3dDataView and adds it to the chart
at the specified index, replacing the existing
ChartDataView object at that specified index. |
void |
addNotify()
Overrides javax.swing.JComponent addNotify() . |
void |
addPick3dListener(com.klg.jclass.chart3d.event.JCPick3dListener l)
Adds listener to JClass Chart 3D pick events. |
void |
cancel()
Performs a cancel on the chart. |
int |
convertChartAreaXToX(int x)
|
int |
convertChartAreaYToY(int y)
|
int |
convertXToChartAreaX(int x)
|
int |
convertYToChartAreaY(int y)
|
protected abstract void |
createActionTable()
Creates the action table for the chart. |
protected void |
createChart3dArea()
Creates and adds a JCChart3dArea to chart. |
protected void |
createFooter()
Creates and adds a new JLabel footer to the chart. |
protected void |
createHeader()
Creates and adds a new JLabel header to the chart. |
static com.klg.jclass.chart3d.JCChart3d |
createJava2dChart()
Creates an instance of the Java 2d version of JClass Chart 3D, that is the subclass of JCChart3d that implements three-dimensional
chart functionality using the Java 2d API. |
static com.klg.jclass.chart3d.JCChart3d |
createJava3dChart()
Creates an instance of the Java 3d version of JClass Chart 3D, that is the subclass of JCChart3d that implements three-dimensional
chart functionality using the Java 3d API. |
static com.klg.jclass.chart3d.JCChart3d |
createJava3dChart(boolean fallback)
Creates an instance of the Java 3d version of JClass Chart 3D, that is the subclass of JCChart3d that implements three-dimensional
chart functionality using the Java 3d API. |
protected void |
createLegend()
Creates and adds a legend to the chart. |
void |
doLayout()
JCChart3d layout method. |
com.klg.jclass.chart3d.Chart3dDataView |
findDataView(String name)
Finds a data view, given its name. |
void |
firePaint()
Fires a paint event to interested listeners. |
String |
getAbout()
Gets the value of the About property. |
protected abstract com.klg.jclass.chart3d.JCAction |
getActionHandler(InputEvent event)
Retrieves the action handler that is associated with a given InputEvent . |
com.klg.jclass.chart3d.JCActionTable |
getActionTable()
The JCActionTable object that associates key and mouse triggers
with actions. |
boolean |
getAllowUserChanges()
Gets the value of the AllowUserChanges property, which
determines whether the user viewing the chart can modify chart values. |
boolean |
getChanged()
Gets the value of the Changed property, which determines
whether the chart requires a recalculation. |
boolean |
getChanged(int mask)
Checks the value of the ChangedFlag property for the specified
mask (see Changeable for a list of valid masks). |
com.klg.jclass.chart3d.JCChart3dArea |
getChart3dArea()
Gets the value of the Chart3dArea property. |
protected int |
getColorIndex(int style)
Gets the color index based on the style. |
JComponent |
getComponentArea()
Used to implement the
interface. |
Component |
getComponentAt(int x,
int y)
Overrides the Container class's method to return only
components that are actually showing. |
abstract String |
getCustomizerName()
Gets the value of the CustomizerName property. |
List |
getDataView()
Gets the value of the DataViews property, which is an indexed
property that contains all the data to be displayed in the chart. |
com.klg.jclass.chart3d.Chart3dDataView |
getDataView(int index)
Gets the value of the specified index within the dataViews
property. |
Rectangle |
getDrawingArea()
Gets the drawing area represented by this chart. |
void |
getDrawingArea(Rectangle rect)
Gets the drawing area represented by this chart and places it in the provided rectangle. |
int |
getDrawingAreaHeight()
Gets the height of the drawing area represented by this chart. |
int |
getDrawingAreaWidth()
Gets the width of the drawing area represented by this chart. |
int |
getFillColorIndex()
Gets the current fill color index. |
JComponent |
getFooter()
Sets the Footer property. |
Graphics |
getGraphics()
Overrides parent getGraphics() . |
JComponent |
getHeader()
Gets the Header property. |
Rectangle |
getLayoutHints(JComponent child)
Gets layout hints for the specified chart child. |
com.klg.jclass.util.legend.JCLegend |
getLegend()
Gets the Legend property. |
int |
getLineColorIndex()
Gets the current line color index. |
Locale |
getLocale()
Returns the chart3d locale. |
int |
getNumDataViews()
Gets the value of the NumDataViews property, which indicates
how many Chart3dDataView objects are stored in JClass Chart 3D. |
protected List |
getOriginalDataView()
Gets the actual data view collection. |
Point3d[][] |
getPoints()
Retrieves a list of points for a scatter plot. |
Object |
getSource()
Returns this chart as an object. |
int |
getSymbolColorIndex()
Gets the current symbol color index. |
int |
getSymbolShapeIndex()
Gets the current symbol shape index. |
com.klg.jclass.chart3d.JCChart3dUI |
getUI()
Returns the UI for JCChart3d . |
String |
getUIClassID()
Returns the UIClass ID for JCChart3d . |
double[] |
getXGrid()
Retrieves the x grid values. |
double[] |
getYGrid()
Retrieves the y grid values. |
double[][] |
getZValues()
Retrieves the z values - one for each (x,y) grid point. |
protected void |
init(int chartType)
Initializes assorted chart member variables. |
protected void |
initializeLayout()
Sets the initial layout. |
protected void |
initializeUI()
Registers the user interface. |
boolean |
isBatched()
Gets the value of the Batched property. |
boolean |
isChanged()
Gets the value of the Changed property, which determines whether
the chart requires a recalculation. |
boolean |
isChanged(int mask)
Checks the value of the ChangedFlag property for the specified
mask (see Changeable for a list of valid masks). |
boolean |
isFocusTraversable()
Overrides the superclass's isFocusTraversable method to always
return true , which is required to get keyPress
events. |
boolean |
isProjection()
Asks if the surface is represented by the first dataView is a
3d view or a 2d projection. |
boolean |
isWarningDialog()
Gets the value of the WarningDialog property. |
void |
keyPressed(KeyEvent event)
Processes keyPressed events for the chart; resets chart or
cancels action as specified. |
void |
keyReleased(KeyEvent event)
Processes keyReleased events for the chart; does nothing. |
void |
keyTyped(KeyEvent event)
Processes keyTyped events for the chart; does nothing. |
void |
launchPropertyPage(Point p)
Launches Customizer. |
static com.klg.jclass.chart3d.JCChart3d |
makeChart3d(String fileName)
Static function to allow creation of a chart from a serialized file. |
void |
mouseClicked(MouseEvent event)
Processes mouseClicked events for the chart; does nothing. |
void |
mouseDragged(MouseEvent event)
Processes mouseDragged events for the chart; performs
associated actions. |
void |
mouseEntered(MouseEvent event)
Processes mouseEntered events for the chart; does nothing. |
void |
mouseExited(MouseEvent event)
Processes mouseExited events for the chart; does nothing. |
void |
mouseMoved(MouseEvent event)
Processes mouseMoved events for the chart; does nothing. |
void |
mousePressed(MouseEvent event)
Processes mousePressed events for the chart; requests focus and
performs associated actions. |
void |
mouseReleased(MouseEvent event)
Processes mouseReleased events for the chart; finishes
associated actions. |
void |
paint(Graphics gc)
Overrides the superclass's paint() method so that the chart is
fully painted and flushed before the listeners are called. |
void |
paintComponent(Graphics gc)
The top-level paint routine in JCChart3d . |
com.klg.jclass.chart3d.JCData3dIndex |
pick(Point p,
com.klg.jclass.chart3d.Chart3dDataView dataView)
Given a screen position in pixels, returns a JCData3dIndex
object that represents the index of the closest point in the elevation data
set of the specified ChartData3dView instance. |
protected com.klg.jclass.chart3d.JCData3dIndex |
pickLegend(Point p,
com.klg.jclass.chart3d.Chart3dDataView dataView)
Internal pick method. |
void |
printAll(Graphics g)
Prints this component and all of its subcomponents. |
protected void |
processKeyEvent(KeyEvent e)
Processes key events on the chart. |
protected void |
processMouseEvent(MouseEvent e)
Processes mouse click events on the chart. |
protected void |
processMouseMotionEvent(MouseEvent e)
Processes mouse motion events on the chart. |
void |
recalc()
Recalculates the entire chart, if it has been marked for recalculation. |
void |
redraw()
For internal use only. |
void |
registerUI()
Tells the UIManager class which class to use for
JCChart3d . |
void |
removeChart3dListener(com.klg.jclass.chart3d.event.JCChart3dListener l)
Removes the listener for changes in JClass Chart 3D from a list of listeners. |
void |
removeDataView(int index)
Removes a Chart3dDataView from the index specified. |
void |
removePick3dListener(com.klg.jclass.chart3d.event.JCPick3dListener l)
Removes the listener for JClass Chart 3D pick events from a list of listeners. |
void |
requestFocus()
Requests the input focus. |
void |
reset()
Performs a reset on the chart. |
void |
resetDefaults()
Resets the line, symbol, and fill color and pattern to the default index values. |
void |
sendEvent()
Tells interested users that the chart is changed after an action is performed. |
void |
sendPick3dEvent(com.klg.jclass.chart3d.JCData3dIndex index)
Sends pick event to all objects listening for it. |
void |
serverPaint(Graphics igc)
Internal use only. |
Image |
serverSnapshot()
Internal use only. |
void |
setAbout(String s)
Sets the value of the About property. |
void |
setAllowUserChanges(boolean change)
Sets the value of the AllowUserChanges property, which
determines whether the user viewing the chart can modify chart values. |
void |
setBackground(Color c)
Overrides the superclass's method so that changes will generate redraws. |
void |
setBatched(boolean bt)
Sets the value of the Batched property, which controls whether
chart updates are accumulated. |
void |
setChanged(boolean n,
int cf)
Sets the value of the Changed property, which determines
whether the chart requires recalculation. |
void |
setChanged(boolean n,
int cf,
boolean updateParent)
Sets the value of the Changed property, which determines
whether the chart requires recalculation. |
void |
setChart3dArea(com.klg.jclass.chart3d.JCChart3dArea ca)
Sets the value of the Chart3dArea property. |
protected void |
setColorIndex(int colorIndex,
int style)
Sets the color index based on the style. |
protected abstract void |
setCustomizerName(String s)
Sets the value of the CustomizerName property. |
void |
setDataView(int index,
com.klg.jclass.chart3d.Chart3dDataView ndv)
Takes the specified Chart3dDataView and adds it to the chart
at the index indicated. |
void |
setDataView(List views)
Sets the value of the dataViews property, which is an indexed
property that contains all the data to be displayed in the 3d chart. |
void |
setFillColorIndex(int colorIndex)
Sets the initial fill color index. |
void |
setFont(Font f)
Overrides the superclass's method so that changes will generate redraws. |
void |
setFooter(JComponent foot)
Sets the Footer property. |
void |
setForeground(Color c)
Overrides the superclass's method so that changes will generate redraws. |
void |
setGraphics(Graphics g)
Provides a way for the chart to draw to a custom Graphics
object. |
void |
setHeader(JComponent head)
Sets the Header property. |
void |
setLayout(LayoutManager mgr)
Overrides java.awt.Component setLayout() . |
void |
setLayoutHints(JComponent child,
Rectangle layoutHints)
Sets layout hints for chart children. |
void |
setLegend(com.klg.jclass.util.legend.JCLegend jl)
Sets the Legend property. |
void |
setLineColorIndex(int colorIndex)
Sets the line color index. |
void |
setLocale(Locale locale)
Sets the locale for chart3d. |
void |
setOpaque(boolean op)
Overrides the superclass's method so that changes will generate redraws. |
void |
setSymbolColorIndex(int colorIndex)
Sets the initial symbol color index. |
void |
setSymbolShapeIndex(int shapeIndex)
Sets the initial symbol shape index. |
void |
setUI(ComponentUI newUI)
Sets the UI for JCChart3d . |
void |
setWarningDialog(boolean on)
Sets the value of the WarningDialog property, which controls
whether a dialog will appear when the chart has warning messages. |
Image |
snapshot()
Takes a snapshot of the current chart. |
void |
snapshot(Image img)
Takes a snapshot of the current chart and places it in the supplied image. |
Image |
snapshot(int imagetype)
Takes a snapshot of the current chart and places it in an image of the specified type. |
Point |
unpick(com.klg.jclass.chart3d.Chart3dDataView dataView,
com.klg.jclass.chart3d.JCData3dIndex index)
Returns the position in screen pixels of a particular point in a particular data set (grid data or point data). |
void |
update()
Forces the chart to re-layout and recalculate. |
void |
updateUI()
Updates the UI for JCChart3d . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.klg.jclass.util.legend.LegendComponentLayoutUser |
getPreferredSize |
Field Detail |
protected com.klg.jclass.chart3d.JCChart3dArea chart3dArea
protected Vector dataViews
dataViews
for this chart.
Currently only one dataView
is supported.
protected com.klg.jclass.util.legend.JCLegend legend
protected com.klg.jclass.chart3d.JCChart3dLegendManager legendManager
protected JComponent footer
JComponent
can be used.
protected JComponent header
JComponent
can be used.
protected com.klg.jclass.util.JCListenerList listeners
JCChart3dListener
's for this chart.
protected com.klg.jclass.util.JCListenerList pickListeners
JCPick3dListener
's for this chart.
protected boolean inKeyPress
public static final int NONE
public static final int SURFACE
public static final int BAR
public static final int SCATTER
public static final int LAST_PREDEFINED_CHART_TYPE
public static final String ERRMSG_CUSTOMIZER_FAILURE
protected int lineColorIndex
protected int symbolColorIndex
protected int fillColorIndex
protected int symbolShapeIndex
protected Rectangle chart3dAreaLayoutHints
protected Rectangle legendLayoutHints
protected Rectangle headerLayoutHints
protected Rectangle footerLayoutHints
protected com.klg.jclass.chart3d.JCActionTable actionTable
public transient com.klg.jclass.chart3d.JCChart3dCustomizer customizer
protected Locale locale
chart3d
.
Constructor Detail |
public JCChart3d(int tp)
JCChart3d
of a particular type.
ChartType
is actually a property of
Chart3dDataView
. This constructor is provided as a convenience.
tp
- the chart typeChart3dDataView
public JCChart3d()
SURFACE
.
Method Detail |
protected void init(int chartType)
JCChart3d
constructor.
chartType
- the initial chart type of the chartpublic static com.klg.jclass.chart3d.JCChart3d createJava2dChart()
JCChart3d
that implements three-dimensional
chart functionality using the Java 2d API.
public static com.klg.jclass.chart3d.JCChart3d createJava3dChart()
JCChart3d
that implements three-dimensional
chart functionality using the Java 3d API.
public static com.klg.jclass.chart3d.JCChart3d createJava3dChart(boolean fallback)
JCChart3d
that implements three-dimensional
chart functionality using the Java 3d API. If there are any problems
creating this class (for example, Java 3d is not available) and the fallback
parameter is set to true
, this method will revert to creating
an instance of the Java 2d version of JClass Chart 3d.
fallback
- if true
, fall back to using the Java 2d version
of JClass Chart 3D when there are problems using the Java 3d version.
protected abstract void createActionTable()
protected void initializeLayout()
protected void initializeUI()
protected void createHeader()
JLabel
header to the chart.
protected void createFooter()
JLabel
footer to the chart.
protected void createLegend()
protected void createChart3dArea()
JCChart3dArea
to chart.
public com.klg.jclass.chart3d.JCActionTable getActionTable()
JCActionTable
object that associates key and mouse triggers
with actions.
JCActionTable
JCActionTable
public boolean isProjection()
dataView
is a
3d view or a 2d projection.
protected void processMouseEvent(MouseEvent e)
processMouseEvent
in class Component
e
- the mouse event to be processedprotected void processMouseMotionEvent(MouseEvent e)
processMouseMotionEvent
in class JComponent
e
- the mouse motion event to be processedprotected void processKeyEvent(KeyEvent e)
processKeyEvent
in class JComponent
e
- the key event to be processedpublic int convertXToChartAreaX(int x)
public int convertYToChartAreaY(int y)
public int convertChartAreaXToX(int x)
public int convertChartAreaYToY(int y)
protected abstract com.klg.jclass.chart3d.JCAction getActionHandler(InputEvent event)
InputEvent
. This method must be overridden by subclasses.
event
- the InputEvent
public void mousePressed(MouseEvent event)
mousePressed
events for the chart; requests focus and
performs associated actions.
mousePressed
in interface MouseListener
event
- the MouseEvent
instance that represents this mouse
clickpublic void mouseClicked(MouseEvent event)
mouseClicked
events for the chart; does nothing.
mouseClicked
in interface MouseListener
event
- the MouseEvent
instance that represents this mouse
eventpublic void mouseReleased(MouseEvent event)
mouseReleased
events for the chart; finishes
associated actions.
mouseReleased
in interface MouseListener
event
- the MouseEvent
instance that represents this mouse
eventpublic void mouseEntered(MouseEvent event)
mouseEntered
events for the chart; does nothing.
mouseEntered
in interface MouseListener
event
- the MouseEvent
instance that represents this mouse
eventpublic void mouseExited(MouseEvent event)
mouseExited
events for the chart; does nothing.
mouseExited
in interface MouseListener
event
- the MouseEvent
instance that represents this mouse
eventpublic void mouseDragged(MouseEvent event)
mouseDragged
events for the chart; performs
associated actions.
mouseDragged
in interface MouseMotionListener
event
- the MouseEvent
instance that represents this mouse
eventpublic void mouseMoved(MouseEvent event)
mouseMoved
events for the chart; does nothing.
mouseMoved
in interface MouseMotionListener
event
- the MouseEvent
instance that represents this mouse
eventpublic void keyTyped(KeyEvent event)
keyTyped
events for the chart; does nothing.
keyTyped
in interface KeyListener
event
- the KeyEvent
instance that represents this
keyboard eventpublic void keyPressed(KeyEvent event)
keyPressed
events for the chart; resets chart or
cancels action as specified.
keyPressed
in interface KeyListener
event
- the KeyEvent
instance that represents this
keyboard eventpublic void keyReleased(KeyEvent event)
keyReleased
events for the chart; does nothing.
keyReleased
in interface KeyListener
event
- the KeyEvent
instance that represents this
keyboard eventpublic void launchPropertyPage(Point p)
p
- the point at which to launch the Customizerpublic static com.klg.jclass.chart3d.JCChart3d makeChart3d(String fileName)
fileName
- the name of the file from which to load
JCChart3d
instancepublic final boolean isChanged()
Changed
property, which determines whether
the chart requires a recalculation.
isChanged
in interface Changeable
Changed
propertypublic final boolean isChanged(int mask)
ChangedFlag
property for the specified
mask (see Changeable
for a list of valid masks). The
ChangedFlag
property determines the type of action that the
chart needs to take regarding the current change.
isChanged
in interface Changeable
mask
- the mask to check against
Changed
property, based on the
maskpublic boolean getChanged()
Changed
property, which determines
whether the chart requires a recalculation.
getChanged
in interface Changeable
public boolean getChanged(int mask)
ChangedFlag
property for the specified
mask (see Changeable
for a list of valid masks). The
ChangedFlag
property determines the type of action the chart
needs to take regarding the current change.
getChanged
in interface Changeable
mask
- the mask to check against
public void recalc()
public void setChanged(boolean n, int cf)
Changed
property, which determines
whether the chart requires recalculation. This value is propagated to all
child components.
setChanged
in interface Changeable
n
- boolean value of the Changed
propertycf
- the changed flag mask to check againstpublic void setChanged(boolean n, int cf, boolean updateParent)
Changed
property, which determines
whether the chart requires recalculation. This value is propagated to all
the child components. Changeable
interface, but has no use in JCChart3d
.
It is usually used for cases in which the Changed
property must
be changed without forcing a recalculation.
setChanged
in interface Changeable
n
- boolean value of the Changed
propertycf
- the changed flag mask to check againstupdateParent
- since this is the final parent, call
setChanged
if true
and store the fact that a
change is needed if false
public void redraw()
setChanged()
method of
JCChart3dArea
. The Java3D version of JCChart3d
overrides this method to call update()
.
public void paint(Graphics gc)
paint()
method so that the chart is
fully painted and flushed before the listeners are called.
paint
in class JComponent
gc
- the graphics used for paintingpublic void firePaint()
public Rectangle getDrawingArea()
public void getDrawingArea(Rectangle rect)
rect
- rectangle object to fill, with drawing area coordinatespublic int getDrawingAreaHeight()
getDrawingAreaHeight
in interface LegendComponentLayoutUser
public int getDrawingAreaWidth()
getDrawingAreaWidth
in interface LegendComponentLayoutUser
public void paintComponent(Graphics gc)
JCChart3d
.
paintComponent
in class JComponent
gc
- the graphics object used to paintpublic void printAll(Graphics g)
java.awt.Component
, but should be used
in the same way.
printAll
in class JComponent
g
- the graphics object used to paintpublic void doLayout()
JCChart3d
layout method. It lays out the header, footer, legend,
and chart area.
doLayout
in class Container
public void setLayout(LayoutManager mgr)
java.awt.Component setLayout()
.
setLayout
in class Container
mgr
- the layout manager to be used for doing the layoutpublic void setLayoutHints(JComponent child, Rectangle layoutHints)
Integer.MAX_VALUE
in the rectangle's members
indicates to calculate default values during layout. Other values
indicate to the layout to use that value. For example, a rectangle
with members x=5, y=10, width=MAX_VALUE, and
height=200, would indicate to the layout mechanism that the chart
child should be placed at (5,10), have a height of 200, and use the
default width.
Layout hints are only used by the DefaultChartLayout
layout manager.
child
- chart child - either the chart3dArea
, legend,
header, or footerlayoutHints
- rectangle object containing the desired layout hintspublic Rectangle getLayoutHints(JComponent child)
getLayoutHints
in interface LegendComponentLayoutUser
child
- chart child - either the chart3dArea
, legend,
header, or footer
public void setBatched(boolean bt)
Batched
property, which controls whether
chart updates are accumulated.
bt
- if true
, it will accumulate chart updates; if
false
, it forces the accumulated updates to be processedpublic boolean isBatched()
Batched
property.
isBatched
in interface Changeable
true
if updates are being accumulated; if
false
, updates are not accumulatedpublic void update()
public void addNotify()
javax.swing.JComponent addNotify()
.
addNotify
in class JComponent
public void setBackground(Color c)
setBackground
in class JComponent
c
- the new background colorpublic void setForeground(Color c)
setForeground
in class JComponent
c
- the new foreground colorpublic void setFont(Font f)
setFont
in class JComponent
f
- the new chart fontpublic void setOpaque(boolean op)
setOpaque
in class JComponent
op
- the new value of opaquepublic void setAllowUserChanges(boolean change)
AllowUserChanges
property, which
determines whether the user viewing the chart can modify chart values. Used
to allow edits to values and changes to parameters via the Customizer.
change
- if true
, the user is allowed to modify graph
values; if false
, the user is not allowed to modify graph
valuespublic boolean getAllowUserChanges()
AllowUserChanges
property, which
determines whether the user viewing the chart can modify chart values. Used
to allow edits to values and changes to parameters via the Customizer.
true
, the user is allowed to modify the graph values;
false
otherwisepublic void setWarningDialog(boolean on)
WarningDialog
property, which controls
whether a dialog will appear when the chart has warning messages.
on
- if true
(default), the warning dialog will appear; if
false
, the user will not be warned of anythingpublic boolean isWarningDialog()
WarningDialog
property.
true
(default), the warning dialog will appear;
if false
, the user will not be warned of anythingpublic JComponent getHeader()
Header
property.
The Header
property controls the object which controls the
display of the header.
getHeader
in interface LegendComponentLayoutUser
JComponent
object associated with the header. By
default it is an instance of JLabel
.public void setHeader(JComponent head)
Header
property.
The Header
property controls the object that controls the
display of the header.
head
- the JComponent
object associated with the headerpublic JComponent getFooter()
Footer
property.
The Footer
property controls the object that controls the
display of the footer.
getFooter
in interface LegendComponentLayoutUser
JComponent
object associated with the footer. By
default it is an instance of JLabel
.public void setFooter(JComponent foot)
Footer
property.
The Footer
property controls the object that controls the
display of the footer.
foot
- the JComponent
object associated with the footerpublic com.klg.jclass.util.legend.JCLegend getLegend()
Legend
property.
The Legend
property controls the object that controls
the display of the legend.
getLegend
in interface LegendComponentLayoutUser
JCLegend
object associated with the legendpublic void setLegend(com.klg.jclass.util.legend.JCLegend jl)
Legend
property.
The Legend
property controls the object that controls
the display of the legend. If the legend has no populator
or renderer set, they will be set with JClass Chart 3D's default
legend populator and renderer.
jl
- the JCLegend
object associated with the legendpublic com.klg.jclass.chart3d.JCChart3dArea getChart3dArea()
Chart3dArea
property.
The Chart3dArea
property controls the object that controls the
display of the graph.
JCChart3dArea
object associated with this
JCChart3d
public JComponent getComponentArea()
LegendComponentLayoutUser
interface. Returns the component used to draw the actual chart.
getComponentArea
in interface LegendComponentLayoutUser
public void setChart3dArea(com.klg.jclass.chart3d.JCChart3dArea ca)
Chart3dArea
property. The
Chart3dArea
property controls the object that controls the
display of the graph.
ca
- the new chart areapublic com.klg.jclass.chart3d.Chart3dDataView getDataView(int index)
dataViews
property. The dataviews
property is an indexed property of
JCChart3d
that contains one or more Chart3dDataView
objects. Each Chart3dDataView
object controls the display of
data using a particular chart type.
index
- index of the dataView
object to return
ChartDataView
objectpublic com.klg.jclass.chart3d.Chart3dDataView addDataView(int index, int chartType)
Chart3dDataView
and adds it to the chart
at the specified index, replacing the existing
ChartDataView
object at that specified index. If the index is
one past the final occupied index, the ChartDataView
will be
added to the end of the list. Also, see setDataView
.
index
- index of the dataView
object to addchartType
- the chartType
of the added
dataView
ChartDataView
public void setDataView(int index, com.klg.jclass.chart3d.Chart3dDataView ndv)
Chart3dDataView
and adds it to the chart
at the index indicated. The act of adding this new
Chart3dDataView
will cause all existing
Chart3dDataView
objects to re-order themselves. Also, see
addDataView
.
index
- position at which to add the new objectndv
- new data view objectpublic void setDataView(List views)
dataViews
property, which is an indexed
property that contains all the data to be displayed in the 3d chart.
views
- array of data views to be included in the
dataViews
propertypublic com.klg.jclass.chart3d.Chart3dDataView findDataView(String name)
name
- the name to use in the search
ChartDataView
; if not found, null is returnedpublic List getDataView()
DataViews
property, which is an indexed
property that contains all the data to be displayed in the chart.
dataViews
property (currently only one is supported)protected List getOriginalDataView()
getDataView()
in order to avoid copying.
dataViews
(currently only one is supported)public void removeDataView(int index)
Chart3dDataView
from the index specified. The act of
removing a Chart3dDataView
from the 3d chart will cause all
existing Chart3dDataView
objects to re-order themselves.
index
- position from which to remove the objectpublic int getNumDataViews()
NumDataViews
property, which indicates
how many Chart3dDataView
objects are stored in JClass Chart 3D.
It is a read-only property.
Chart3dDataView
objects inside this
JCChart3d
instance. Currently only one dataView
is supported.public void reset()
chart3d
.
public void cancel()
public String getAbout()
About
property.
The About
property displays contact information for
Quest Software in the BeanBox.
public void setAbout(String s)
About
property.
The About
property displays contact information for
Quest Software in the BeanBox.
s
- the new about Stringpublic com.klg.jclass.chart3d.JCData3dIndex pick(Point p, com.klg.jclass.chart3d.Chart3dDataView dataView)
JCData3dIndex
object that represents the index of the closest point in the elevation data
set of the specified ChartData3dView
instance. If no data view
is supplied, all data views are considered when finding the closest point
(only one dataView
is currently supported). If the data in a
data view is being updated when pick()
is called, the result may
be incorrect.
p
- pick point in pixels relative to the JCChart3d
objectdataView
- data view on which to perform pick; if null, all data views
are used (only one dataView
is currently supported)
JCData3dIndex
object representing the index of the
picked point. This is either a JCData3dGridIndex
representing the (x, y) index of grid data point, or a
JCData3dPointIndex
representing the (series, point)
index of a point in a point data set.protected com.klg.jclass.chart3d.JCData3dIndex pickLegend(Point p, com.klg.jclass.chart3d.Chart3dDataView dataView)
p
- pick point relative to legenddataView
- data view on which to perform pick; if null, all data views
are used (only one dataView
is currently supported)
JCData3dIndex
object representing the picked legend
item. This might be a JCData3dContourIndex
that represents
a contour range, or a JCData3dContourPointIndex
that
represents a Point Data series.public Point unpick(com.klg.jclass.chart3d.Chart3dDataView dataView, com.klg.jclass.chart3d.JCData3dIndex index)
dataView
- the data view containing the specified seriesindex
- The data index of the point. This is either a
JCData3dGridIndex
representing the (x, y) index of
grid data point, or a JCData3dPointIndex
representing the
(series, point) index of a point in a point data set.
AWT Point
object representing position in screen pixels
relative to the JCChart3d
object, or null if the point does
not existpublic void addChart3dListener(com.klg.jclass.chart3d.event.JCChart3dListener l)
l
- the listener to be addedpublic void removeChart3dListener(com.klg.jclass.chart3d.event.JCChart3dListener l)
l
- the listener to be removedpublic void sendEvent()
public void addPick3dListener(com.klg.jclass.chart3d.event.JCPick3dListener l)
l
- the new pick listener to be addedpublic void removePick3dListener(com.klg.jclass.chart3d.event.JCPick3dListener l)
l
- the pick listener to be deletedpublic void sendPick3dEvent(com.klg.jclass.chart3d.JCData3dIndex index)
index
- The data index to send to the pick listeners. This could be
a JCData3dGridIndex
, JCData3dPointIndex
, or
JCData3dContourIndex
, depending on the location and type of
picking that has happened.public void requestFocus()
FocusEvent
will be generated
to indicate that the focus has been gained.
requestFocus
in class JComponent
FocusEvent
public boolean isFocusTraversable()
isFocusTraversable
method to always
return true
, which is required to get keyPress
events.
isFocusTraversable
in class Component
public void resetDefaults()
JCStyle
.
public void setLineColorIndex(int colorIndex)
colorIndex
- the new line color indexprotected void setColorIndex(int colorIndex, int style)
colorIndex
- the new color indexstyle
- the fill style, line style, or symbol style color indexpublic void setFillColorIndex(int colorIndex)
colorIndex
- the new fill color indexpublic void setSymbolColorIndex(int colorIndex)
colorIndex
- the new symbol color indexpublic void setSymbolShapeIndex(int shapeIndex)
shapeIndex
- the new shape indexprotected int getColorIndex(int style)
style
- the fill style, line style, or symbol style color index
public int getLineColorIndex()
public int getFillColorIndex()
public int getSymbolColorIndex()
public int getSymbolShapeIndex()
public abstract String getCustomizerName()
CustomizerName
property.
The CustomzierName
property controls the name of the customizer
used by JClass Chart 3D. It must be a full class name. The default
value is com.klg.jclass.chart3d.customizer.Chart3dCustomizer
.
protected abstract void setCustomizerName(String s)
CustomizerName
property.
The CustomzierName
property controls the name of the customizer
used by JClass Chart 3D. It must be a full class name. The default
value is com.klg.jclass.chart3d.customizer.Chart3dCustomizer
.
s
- the new customizer namepublic com.klg.jclass.chart3d.JCChart3dUI getUI()
JCChart3d
.
JCChart3d
UI objectpublic void setUI(ComponentUI newUI)
JCChart3d
.
setUI
in class JComponent
newUI
- the new user interface objectpublic void updateUI()
JCChart3d
.
updateUI
in class JComponent
public String getUIClassID()
JCChart3d
.
getUIClassID
in class JComponent
public void registerUI()
UIManager
class which class to use for
JCChart3d
.
public Object getSource()
public Component getComponentAt(int x, int y)
Container
class's method to return only
components that are actually showing.
getComponentAt
in class Container
x
- the x position of the componenty
- the y position of the component
public Image snapshot()
public Image snapshot(int imagetype)
BufferedImage
class. BufferedImage.TYPE_INT_ARGB
is a good default for representing many possible colors. If using less than
256 colors, BufferedImage.TYPE_BYTE_INDEXED may prove to
generate faster and smaller images.
imagetype
- the type of image to write to, as defined in the
java.awt.image.BufferedImage
class
public void snapshot(Image img)
img
- the image to put the snapshot inpublic Graphics getGraphics()
getGraphics()
. If another
Graphics
object has been set to be the current one, that one is
returned. Otherwise, call the superclass' getGraphics()
method.
getGraphics
in interface com.klg.jclass.util.ServerRenderable
getGraphics
in class JComponent
Graphics
object to use to draw this chartpublic void setGraphics(Graphics g)
Graphics
object. A null call specifies that the default Graphics
object
is used to draw to the screen.
setGraphics
in interface com.klg.jclass.util.ServerRenderable
g
- Graphics
object to use for drawingpublic Image serverSnapshot()
serverSnapshot
in interface com.klg.jclass.util.ServerRenderable
public void serverPaint(Graphics igc)
serverPaint
in interface com.klg.jclass.util.ServerRenderable
public double[] getXGrid()
Chart3dGridDataModel
interface.
getXGrid
in interface Chart3dGridDataModel
public double[] getYGrid()
Chart3dGridDataModel
interface.
getYGrid
in interface Chart3dGridDataModel
public double[][] getZValues()
Chart3dGridDataModel
interface.
getZValues
in interface Chart3dGridDataModel
public Point3d[][] getPoints()
Chart3dPointDataModel
interface.
getPoints
in interface Chart3dPointDataModel
Point3d
arrays, each of which represents
the points in a seriespublic void setLocale(Locale locale)
setLocale
in class Component
locale
- the Locale
objectLocale
public Locale getLocale()
getLocale
in class Component
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |