|
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.chart.JCChart
The core charting class. JCChart 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 JCChart.
| 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 int |
antiAliasing
|
static int |
AREA
|
static int |
AREA_RADAR
|
static int |
BAR
|
protected int |
cancelKey
|
static int |
CANDLE
|
protected Applet |
chartApplet
|
protected com.klg.jclass.chart.JCChartArea |
chartArea
|
protected Rectangle |
chartAreaLayoutHints
|
protected com.klg.jclass.chart.JCChartLabelManager |
chartLabelManager
|
com.klg.jclass.chart.JCCustomizerPage |
customizer
|
protected String |
customizerName
|
protected Vector |
data
|
static String |
ERRMSG_INVALID_TRIGGER_INDEX
Error message for invalid trigger index. |
protected int |
fillColorIndex
|
protected JComponent |
footer
|
protected com.klg.jclass.util.ImageMapInfo |
footerImageMapInfo
The image map information for the footer. |
protected Rectangle |
footerLayoutHints
|
protected JComponent |
header
|
protected com.klg.jclass.util.ImageMapInfo |
headerImageMapInfo
The image map information for the header. |
protected Rectangle |
headerLayoutHints
|
static int |
HILO
|
static int |
HILO_OPEN_CLOSE
|
protected com.klg.jclass.util.ImageMapInfo |
imageMapInfo
The image map information for the chart. |
static int |
LAST_PREDEFINED_CHART_TYPE
|
protected boolean |
layoutDone
|
protected com.klg.jclass.util.legend.JCLegend |
legend
|
protected Rectangle |
legendLayoutHints
|
protected com.klg.jclass.chart.JCChartLegendManager |
legendManager
|
protected int |
lineColorIndex
|
protected com.klg.jclass.util.JCListenerList |
listeners
|
protected Locale |
locale
|
static int |
NONE
Chart Types. |
protected com.klg.jclass.util.JCListenerList |
pickListeners
|
static int |
PIE
|
static int |
PLOT
|
static int |
POLAR
|
protected Graphics |
prevSetGraphics
Temporary Graphics object used to draw without showing to screen. |
protected Graphics |
queryGraphics
Temporary Graphics object created from current graphics object. |
static int |
RADAR
|
protected int |
resetKey
|
static int |
SCATTER_PLOT
|
static int |
STACKING_AREA
|
static int |
STACKING_BAR
|
protected int |
symbolColorIndex
|
protected int |
symbolShapeIndex
|
protected Vector |
triggers
|
protected Object |
userObject
|
protected boolean |
usingDoublePixels
|
| 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.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 |
| Fields inherited from interface com.klg.jclass.util.RenderProperties |
ANTI_ALIASING_DEFAULT, ANTI_ALIASING_OFF, ANTI_ALIASING_ON |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
JCChart()
Default constructor, required by Java Beans. |
|
JCChart(int tp)
Constructor that creates a JCChart of a particular type. |
|
JCChart(int type,
Locale locale)
Constructor that creates a JCChart for a specified type and
locale. |
|
JCChart(Locale locale)
Constructor that creates a JCChart for a specified locale and
of type PLOT. |
|
| Method Summary | |
void |
addChartListener(com.klg.jclass.chart.JCChartListener l)
Adds listener to changes in chart. |
com.klg.jclass.chart.ChartDataView |
addDataView(int index)
Creates a new ChartDataView 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 |
addPickListener(com.klg.jclass.chart.JCPickListener l)
Adds listener to chart pick events. |
com.klg.jclass.chart.EventTrigger |
addTrigger()
Adds a new event trigger to the Triggers property. |
com.klg.jclass.chart.EventTrigger |
addTrigger(int mod,
int act)
Adds a new event trigger to the Triggers property. |
void |
ancestorAdded(AncestorEvent e)
Ancestor Listener method. |
void |
ancestorMoved(AncestorEvent e)
Ancestor Listener method. |
void |
ancestorRemoved(AncestorEvent e)
Ancestor Listener method. |
void |
cancel()
Performs a cancel on the chart. |
protected void |
createChartArea()
Creates and adds legend to chart. |
protected void |
createFooter()
Creates and adds footer to chart. |
protected void |
createHeader()
Creates and adds header to chart. |
protected void |
createLegend()
Creates and adds legend to chart. |
protected Image |
createLocalImage(int width,
int height)
Creates image for use in drawing rotated text and other components. |
void |
createQueryGraphics()
Create a copy of the current graphics object that will be used for querying only. |
JToolTip |
createToolTip()
Override this method to add a dwell label to the tool tip. |
void |
disableChartEvents(long eventsToDisable)
Disables the events defined by the specified event mask parameter. |
void |
disposeQueryGraphics()
Dispose of the current query graphics object, which is a copy of the current graphics object that is used for querying only. |
void |
doLayout()
JCChart layout method. |
void |
enableChartEvents(long eventsToEnable)
Enables the events defined by the specified event mask parameter. |
protected com.klg.jclass.chart.ChartDataView |
findData(com.klg.jclass.chart.JCAxis ax)
Internal convenience method that finds the first visible ChartDataView object that references a particular axis. |
com.klg.jclass.chart.ChartDataView |
findDataView(String name)
Method used to find a data view, given its name. |
int |
findDataViewIndex(com.klg.jclass.chart.ChartDataView dv)
Find the index within the data view collection of the specified ChartDataView. |
com.klg.jclass.chart.EventTrigger |
findMatchingTrigger(int mods)
Searches through the list of event triggers looking for the one that has been attached to the specified modifier. |
void |
firePaint()
Fires a paint event to interested listeners. |
String |
getAbout()
Gets the value of the About property. |
boolean |
getAllowUserChanges()
Gets the value of the AllowUserChanges property, which
determines whether the user viewing the chart can modify chart values. |
int |
getAntiAliasing()
Gets the antiAliasing value. |
int |
getCancelKey()
Gets the value of the CancelKey property. |
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.chart.JCChartArea |
getChartArea()
Gets the value of the ChartArea property. |
com.klg.jclass.chart.JCChartLabelManager |
getChartLabelManager()
Gets the JCChartLabelManager interface for managing chart labels. |
JComponent |
getComponentArea()
Used to implement the LegendComponentLayoutUser interface. |
Component |
getComponentAt(int x,
int y)
Overrides the Container class's method to return only
components that are actually showing. |
String |
getCustomizerName()
Gets the value of the CustomizerName property. |
List |
getDataView()
Gets the value of the DataView property, which
is an indexed property that contains all the data to be
displayed in the chart. |
com.klg.jclass.chart.ChartDataView |
getDataView(int index)
Gets the value of the specified index within the Data 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 initial fill color index. |
JComponent |
getFooter()
Sets the Footer property. |
com.klg.jclass.util.ImageMapInfo |
getFooterImageMapInfo()
Retrieve the image map information for the footer. |
Graphics |
getGraphics()
Overrides parent getGraphics(). |
JComponent |
getHeader()
Gets the Header property. |
com.klg.jclass.util.ImageMapInfo |
getHeaderImageMapInfo()
Retrieve the image map information for the header. |
com.klg.jclass.util.ImageMapInfo |
getImageMapInfo()
Retrieve the image map information for this JCChart. |
Rectangle |
getLayoutHints(JComponent child)
Gets layout hints for the specified chart child. |
com.klg.jclass.util.legend.JCLegend |
getLegend()
Gets the Legend property. |
String |
getLicense()
|
int |
getLineColorIndex()
Gets the initial line color index. |
Locale |
getLocale()
Returns the chart locale. |
int |
getNumData()
Gets the value of the NumData property, which
indicates how many ChartDataView objects are stored
in JClass Chart. |
int |
getNumTriggers()
Gets the NumTriggers property, which indicates how many
event triggers have been specified. |
protected List |
getOriginalDataView()
Gets the actual data view collection. |
Graphics |
getQueryGraphics()
Return the current query graphics object, if one exists. |
int |
getResetKey()
Gets the value of the ResetKey property. |
Object |
getSource()
Returns this chart as an object. |
int |
getSymbolColorIndex()
Gets the initial symbol color index. |
int |
getSymbolShapeIndex()
Gets the initial symbol shape index. |
Point |
getToolTipLocation(MouseEvent event)
Override this method to return the location of the dwell label being brought up. |
String |
getToolTipText(MouseEvent event)
Override this method to provide blank tool tip text when you want to bring up a dwell label. |
com.klg.jclass.chart.EventTrigger |
getTrigger(int index)
Gets a single trigger from the Triggers property of JClass
Chart. |
com.klg.jclass.chart.JCChartUI |
getUI()
Returns the UI for JCChart. |
String |
getUIClassID()
Returns the UIClass ID for JCChart. |
Object |
getUserObject()
Get the user-specified object being stored on this instance of JClass Chart. |
boolean |
hasChartLabelManager()
Returns true if a chart label manager instance has
been created. |
protected void |
init()
Initializes assorted chart member variables. |
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 |
isUsingDoublePixels()
Internal use only. |
boolean |
isWarningDialog()
Gets the value of the WarningDialog property. |
void |
keyPressed(KeyEvent event)
Processes keyPressed events for the chart: reset chart or cancel
action as specified. |
void |
keyReleased(KeyEvent event)
Processes keyReleased events for the chart: do nothing. |
void |
keyTyped(KeyEvent event)
Processes keyTyped events for the chart: do nothing. |
protected void |
launchPropertyPage(Point p)
Launches customizer. |
static void |
main(String[] args)
Main method for running chart as an application. |
static com.klg.jclass.chart.JCChart |
makeChart(String fileName)
Static function to allow creation of a chart from a serialized file. |
protected void |
moreAddNotify()
Continues the add notify process. |
void |
mouseClicked(MouseEvent event)
Processes mouseClicked events for the chart: do nothing. |
void |
mouseDragged(MouseEvent event)
Processes mouseDragged events for the chart: perform associated
actions. |
void |
mouseEntered(MouseEvent event)
Processes mouseEntered events for the chart: do nothing. |
void |
mouseExited(MouseEvent event)
Processes mouseExited events for the chart: do nothing. |
void |
mouseMoved(MouseEvent event)
Processes mouseMoved events for the chart: do nothing. |
void |
mousePressed(MouseEvent event)
Processes mousePressed events for the chart: request focus and
perform associated actions. |
void |
mouseReleased(MouseEvent event)
Processes mouseReleased events for the chart: finish 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. |
protected void |
paintChildren(Graphics gc)
Overrides the superclass's method to draw chart label connectors in addition to chart children. |
void |
paintComponent(Graphics gc)
The top-level paint routine in JCChart. |
com.klg.jclass.chart.JCDataIndex |
pick(Point p,
com.klg.jclass.chart.ChartDataView data)
Given a screen position in pixels, returns a JCDataIndex
object that represents the closest point in a data series in the specified
ChartDataView instance. |
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 |
registerUI()
Tells the UIManager class which class to use for JCChart. |
void |
removeChartListener(com.klg.jclass.chart.JCChartListener l)
Removes listener to changes in chart from list of listeners. |
void |
removeDataView(int index)
Removes a ChartDataView from the index specified. |
void |
removePickListener(com.klg.jclass.chart.JCPickListener l)
Removes listener to chart pick events from list of listeners. |
void |
removeTrigger(int index)
Removes the event trigger at the specified index. |
protected void |
reorderDataViews()
Sets the order attribute of each attached ChartDataView
object to its index in the data array. |
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 |
rotate()
A call to rotate a graph to the specified locations. |
void |
rotateEnd()
A call to signify the end of a rotate event. |
void |
rotateStart()
A call to signify the beginning of a rotate event. |
void |
scale(double sc,
com.klg.jclass.chart.JCAxis axis,
boolean update)
Performs a scale operation. |
protected void |
sendEvent(com.klg.jclass.chart.JCAxis axis)
Send an event to each of the chart listeners. |
void |
sendPickEvent(com.klg.jclass.chart.JCDataIndex di)
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 |
setAntiAliasing(int antiAliasing)
Sets the antiAliasing value. |
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 |
setCancelKey(int k)
Sets the value of the CancelKey property. |
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 |
setChartArea(com.klg.jclass.chart.JCChartArea ca)
Sets the value of the ChartArea property. |
void |
setChartLabelManager(com.klg.jclass.chart.JCChartLabelManager clm)
Sets the ChartLabelManager property, a class that
implements the JCChartLabelManager interface. |
void |
setCustomizerName(String s)
Sets the value of the CustomizerName property. |
void |
setDataView(int index,
com.klg.jclass.chart.ChartDataView ndv)
Takes the specified ChartDataView and adds it to the chart
at the index indicated. |
void |
setDataView(List views)
Sets the value of the DataView property, which is an
indexed property that contains all the data to be
displayed in the 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 |
setFooterImageMapInfo(com.klg.jclass.util.ImageMapInfo footerImageMapInfo)
Set the image map information for the footer. |
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 |
setHeaderImageMapInfo(com.klg.jclass.util.ImageMapInfo headerImageMapInfo)
Set the image map information for the header. |
void |
setImageMapInfo(com.klg.jclass.util.ImageMapInfo imageMapInfo)
Set the image map information for this JChart. |
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 |
setLicense(String s)
|
void |
setLineColorIndex(int colorIndex)
Sets the initial line color index. |
void |
setLocale(Locale locale)
Sets the locale for chart. |
void |
setOpaque(boolean op)
Overrides the superclass's method so that changes will generate redraws. |
void |
setResetKey(int k)
Sets the value of the ResetKey property. |
void |
setSymbolColorIndex(int colorIndex)
Sets the initial symbol color index. |
void |
setSymbolShapeIndex(int shapeIndex)
Sets the initial symbol shape index. |
void |
setTrigger(int index,
com.klg.jclass.chart.EventTrigger trig)
Sets the value of the Trigger property at a specified
index. |
void |
setUI(ComponentUI newUI)
Sets the UI for JCChart. |
void |
setUserObject(Object userObject)
Store an object on this instance of JClass Chart. |
void |
setUsingDoublePixels(boolean usingDoubles)
Internal use only. |
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)
|
Image |
snapshot(int imagetype)
Takes a snapshot of the current chart and places it in an image of the specified type. |
void |
translate(double delta,
com.klg.jclass.chart.JCAxis axis,
boolean update)
A call to translate a specified amount along the specified axis. |
void |
translateStart(com.klg.jclass.chart.JCAxis axis)
A call to signify the start of a translate event. |
Point |
unpick(com.klg.jclass.chart.ChartDataView dv,
int pt,
int series)
Returns the position in screen pixels of a particular point in a particular data series. |
Point |
unpick(int pt,
com.klg.jclass.chart.ChartDataViewSeries series)
Returns the position in screen pixels of a particular point in a particular data series. |
void |
update()
Forces the chart to re-layout and recalculate. |
void |
updateUI()
Updates the UI for JCChart. |
void |
zoom(double start,
double end,
com.klg.jclass.chart.JCAxis axis,
boolean update)
Performs a zoom operation along the specified axis. |
| 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 |
| Methods inherited from interface com.klg.jclass.util.JCName |
getName, setName |
| Field Detail |
protected com.klg.jclass.chart.JCChartArea chartArea
protected com.klg.jclass.util.legend.JCLegend legend
protected com.klg.jclass.chart.JCChartLegendManager legendManager
protected JComponent footer
protected JComponent header
protected Vector data
protected Vector triggers
protected com.klg.jclass.util.JCListenerList listeners
protected com.klg.jclass.util.JCListenerList pickListeners
protected com.klg.jclass.chart.JCChartLabelManager chartLabelManager
protected Applet chartApplet
protected Object userObject
protected com.klg.jclass.util.ImageMapInfo imageMapInfo
protected com.klg.jclass.util.ImageMapInfo footerImageMapInfo
protected com.klg.jclass.util.ImageMapInfo headerImageMapInfo
public static final int NONE
public static final int PLOT
public static final int SCATTER_PLOT
public static final int POLAR
public static final int RADAR
public static final int AREA_RADAR
public static final int HILO
public static final int HILO_OPEN_CLOSE
public static final int CANDLE
public static final int AREA
public static final int BAR
public static final int STACKING_BAR
public static final int PIE
public static final int STACKING_AREA
public static final int LAST_PREDEFINED_CHART_TYPE
protected int antiAliasing
public static final String ERRMSG_INVALID_TRIGGER_INDEX
protected String customizerName
protected int lineColorIndex
protected int symbolColorIndex
protected int fillColorIndex
protected int symbolShapeIndex
protected Rectangle chartAreaLayoutHints
protected Rectangle legendLayoutHints
protected Rectangle headerLayoutHints
protected Rectangle footerLayoutHints
protected int resetKey
protected int cancelKey
protected transient Graphics prevSetGraphics
protected Graphics queryGraphics
protected Locale locale
protected boolean usingDoublePixels
protected boolean layoutDone
public transient com.klg.jclass.chart.JCCustomizerPage customizer
| Constructor Detail |
public JCChart(int tp)
JCChart of a particular type.
Note that the ChartType is actually a property of
ChartDataView. This constructor is provided as a convenience.
tp - the chart typeChartDataViewpublic JCChart()
public JCChart(Locale locale)
JCChart for a specified locale and
of type PLOT.
locale - the Locale object
public JCChart(int type,
Locale locale)
JCChart for a specified type and
locale.
type - the chart typelocale - the Locale object| Method Detail |
protected void init()
JCChart constructor.
protected void createHeader()
protected void createFooter()
protected void createLegend()
protected void createChartArea()
public void enableChartEvents(long eventsToEnable)
eventsToEnable - public void disableChartEvents(long eventsToDisable)
eventsToDisable - protected void processMouseEvent(MouseEvent e)
processMouseEvent in class Componente - the mouse event to processprotected void processMouseMotionEvent(MouseEvent e)
processMouseMotionEvent in class JComponente - the mouse motion event to processprotected void processKeyEvent(KeyEvent e)
processKeyEvent in class JComponente - the key events to processpublic void mousePressed(MouseEvent event)
mousePressed events for the chart: request focus and
perform associated actions.
mousePressed in interface MouseListenerevent - the MouseEvent instance that represents this mouse
clickpublic void mouseClicked(MouseEvent event)
mouseClicked events for the chart: do nothing.
mouseClicked in interface MouseListenerevent - the MouseEvent instance that represents this mouse
eventpublic void mouseReleased(MouseEvent event)
mouseReleased events for the chart: finish associated
actions.
mouseReleased in interface MouseListenerevent - the MouseEvent instance that represents this mouse
eventpublic void mouseEntered(MouseEvent event)
mouseEntered events for the chart: do nothing.
mouseEntered in interface MouseListenerevent - the MouseEvent instance that represents this mouse
eventpublic void mouseExited(MouseEvent event)
mouseExited events for the chart: do nothing.
mouseExited in interface MouseListenerevent - the MouseEvent instance that represents this mouse
eventpublic void mouseDragged(MouseEvent event)
mouseDragged events for the chart: perform associated
actions.
mouseDragged in interface MouseMotionListenerevent - the MouseEvent instance that represents this mouse
eventpublic void mouseMoved(MouseEvent event)
mouseMoved events for the chart: do nothing.
mouseMoved in interface MouseMotionListenerevent - the MouseEvent instance that represents this mouse
eventpublic void keyTyped(KeyEvent event)
keyTyped events for the chart: do nothing.
keyTyped in interface KeyListenerevent - the KeyEvent instance that represents this keyboard
eventpublic void keyPressed(KeyEvent event)
keyPressed events for the chart: reset chart or cancel
action as specified.
keyPressed in interface KeyListenerevent - the KeyEvent instance that represents this keyboard
eventpublic void keyReleased(KeyEvent event)
keyReleased events for the chart: do nothing.
keyReleased in interface KeyListenerevent - the KeyEvent instance that represents this keyboard
eventpublic void ancestorAdded(AncestorEvent e)
ancestorAdded in interface AncestorListenere - the ancestor eventpublic void ancestorMoved(AncestorEvent e)
ancestorMoved in interface AncestorListenere - the ancestor eventpublic void ancestorRemoved(AncestorEvent e)
ancestorRemoved in interface AncestorListenere - the ancestor eventprotected void launchPropertyPage(Point p)
p - the point at which to launch the customizerpublic static com.klg.jclass.chart.JCChart makeChart(String fileName)
fileName - the name of the serialization file
public final boolean isChanged()
Changed property, which determines
whether the chart requires a recalculation.
isChanged in interface Changeablepublic 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 Changeablemask - the mask
public boolean getChanged()
Changed property, which determines
whether the chart requires a recalculation.
getChanged in interface Changeablepublic 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 Changeablemask - the mask
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 Changeablen - boolean value of the Changed propertycf - the changed flag to add in
public 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. Note: This method is mandated by the
Changeable interface, but has no use in JCChart.
It is usually used for cases in which the Changed property must
be changed without forcing a recalculation.
setChanged in interface Changeablen - boolean value of the Changed propertycf - the changed flag to add inupdateParent - public void paint(Graphics gc)
paint() method so that the chart is
fully painted and flushed before the listeners are called.
paint in class JComponentgc - the graphics contextpublic void firePaint()
public Rectangle getDrawingArea()
public void getDrawingArea(Rectangle rect)
rect - Rectangle object to fill with drawing area coordinatespublic int getDrawingAreaHeight()
getDrawingAreaHeight in interface LegendComponentLayoutUserpublic int getDrawingAreaWidth()
getDrawingAreaWidth in interface LegendComponentLayoutUserpublic void paintComponent(Graphics gc)
JCChart.
paintComponent in class JComponentgc - the graphics contextprotected void paintChildren(Graphics gc)
paintChildren in class JComponentgc - the graphics contextpublic void printAll(Graphics g)
java.awt.Component, but should be used
in the same way.
printAll in class JComponentg - the graphics contextpublic void doLayout()
JCChart layout method. It lays out the header, footer, legend,
and chart area.
doLayout in class Container
public 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 chartArea, legend, header, or footerlayoutHints - Rectangle object containing the desired layout hintspublic Rectangle getLayoutHints(JComponent child)
getLayoutHints in interface LegendComponentLayoutUserchild - chart child -- either the chartArea, 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 Changeabletrue if updates are being accumulated;
false if updates are not accumulated.public void setUserObject(Object userObject)
userObject - user-specified object to store on this
instance of JClass Chart.public Object getUserObject()
public void update()
public void addNotify()
javax.swing.JComponent addNotify().
addNotify in class JComponentprotected void moreAddNotify()
public void setBackground(Color c)
setBackground in class JComponentc - the new background colorpublic void setForeground(Color c)
setForeground in class JComponentc - the new foreground colorpublic void setFont(Font f)
setFont in class JComponentf - the new fontpublic void setOpaque(boolean op)
setOpaque in class JComponentop - the new value of the opaque propertypublic 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 - true means the user is allowed to modify graph
values; false means 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 if 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, chart will not warn the user of anythingpublic boolean isWarningDialog()
WarningDialog property.
true (default) if the warning dialog is to appear;
false if chart is not to warn the user of anythingpublic JComponent getHeader()
Header property.
The Header property controls the object that controls the
display of the header.
getHeader in interface LegendComponentLayoutUserJComponent 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 LegendComponentLayoutUserJComponent 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 LegendComponentLayoutUserJCLegend object associated with the legend.public 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's default
legend populator and renderer.
jl - the JCLegend object associated with the legendpublic com.klg.jclass.chart.JCChartArea getChartArea()
ChartArea property.
The ChartArea property controls the object that controls the
display of the graph.
JCChartArea object associated with this
JCChart.public JComponent getComponentArea()
LegendComponentLayoutUser interface.
Returns the component used to draw the actual chart.
getComponentArea in interface LegendComponentLayoutUserpublic void setChartArea(com.klg.jclass.chart.JCChartArea ca)
ChartArea property.
Use of this method is an unsupported feature.
The ChartArea property controls
the object that controls the display
of the graph.
ca - the new JCChartArea objectpublic com.klg.jclass.chart.ChartDataView getDataView(int index)
Data property.
The Data
property is an indexed property of JCChart that contains
one or more ChartDataView objects. Each
ChartDataView object controls the display of data using a
particular chart type.
index - index of the data object to return
ChartDataView object.public com.klg.jclass.chart.ChartDataView addDataView(int index)
ChartDataView 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 - the index at which to set the new ChartDataView
ChartDataView.
public void setDataView(int index,
com.klg.jclass.chart.ChartDataView ndv)
ChartDataView and adds it to the chart
at the index indicated. The act of adding this new ChartDataView
will cause all existing ChartDataView objects to re-order
themselves. Also see addDataView.
index - position at which to add the new objectndv - new data view object
IllegalArgumentException - If the index does not address
a valid ChartDataView.public void setDataView(List views)
DataView property, which is an
indexed property that contains all the data to be
displayed in the chart.
views - array of data views to be included in the DataView
propertypublic com.klg.jclass.chart.ChartDataView findDataView(String name)
name - the name by which to find the data view
ChartDataView which matches the
name (null if none found).public List getDataView()
DataView property, which
is an indexed property that contains all the data to be
displayed in the chart.
DataView property.protected List getOriginalDataView()
getDataView() in order to avoid copying.
public int findDataViewIndex(com.klg.jclass.chart.ChartDataView dv)
dv - The ChartDataView whose index is required.
public void removeDataView(int index)
ChartDataView from the index specified.
The act of removing a ChartDataView to the chart will cause
all existing ChartDataView objects to re-order themselves.
index - position from which to remove the objectpublic int getNumData()
NumData property, which
indicates how many ChartDataView objects are stored
in JClass Chart. It is a read-only property.
ChartDataView objects inside
this JCChart instance.public com.klg.jclass.chart.EventTrigger getTrigger(int index)
Triggers property of JClass
Chart. The Triggers property is an indexed property that
contains a series of mappings, from AWT events to JClass Chart actions.
index - index of trigger
public int getNumTriggers()
NumTriggers property, which indicates how many
event triggers have been specified.
Triggers
property.public com.klg.jclass.chart.EventTrigger addTrigger()
Triggers property.
public com.klg.jclass.chart.EventTrigger addTrigger(int mod,
int act)
Triggers property.
mod - bitfield of modifiers from Event. Can include
Event.SHIFT_MASK, Event.CTRL_MASK,
Event.META_MASK, and Event.ALT_MASK. If not
including META_MASK (which is the same as the
third mouse button 3 mask), the bitfield is assumed to be intended to
be applied to the button 1 (the left mouse button).act - action enum, one of ROTATE, ZOOM,
TRANSLATE, EDIT, PICK,
DEPTH, or CUSTOMIZE.
null if error occurred.
public void setTrigger(int index,
com.klg.jclass.chart.EventTrigger trig)
Trigger property at a specified
index. The Trigger property is an indexed property and
it contains all the information necessary to map user events
into JClass Chart actions. The Trigger property comprises a
number of EventTrigger objects.
index - index within the Trigger propertytrig - EventTrigger object to be placed at the specified
index
IllegalArgumentException - If the index does not
address a valid event trigger.public void removeTrigger(int index)
index - index of the EventTrigger instance to
be removedpublic com.klg.jclass.chart.EventTrigger findMatchingTrigger(int mods)
mods - the modifier being searched for
EventTrigger object found or null if none matches.public void setResetKey(int k)
ResetKey property.
The ResetKey property specifies the key used to
perform a reset operation.
k - Key that will trigger a resetpublic int getResetKey()
ResetKey property.
The ResetKey property specifies the key used to
perform a reset operation.
public void setCancelKey(int k)
CancelKey property.
The CancelKey property specifies the key used to
perform a cancel operation.
k - Key that will trigger a cancelpublic int getCancelKey()
CancelKey property.
The CancelKey property specifies the key used to
perform a cancel operation.
public void rotateStart()
public void rotate()
public void rotateEnd()
public void zoom(double start,
double end,
com.klg.jclass.chart.JCAxis axis,
boolean update)
start - new axis minimum valueend - new axis maximum valueaxis - axis along which to perform zoomupdate - if true, a redisplay is forced; if
false, the redisplay does not occur. If translating along two
axes, the first translate() call should have
update=false, and the second should have
update=true.
public void scale(double sc,
com.klg.jclass.chart.JCAxis axis,
boolean update)
sc - scale percentage relative to the default appearance of
the graphaxis - the axis on which to perform the scale operationupdate - whether or not to set the changed flag on the chart areapublic void translateStart(com.klg.jclass.chart.JCAxis axis)
axis - axis along which to begin translating. Note that
it is possible to translate along multiple axes simultaneously
public void translate(double delta,
com.klg.jclass.chart.JCAxis axis,
boolean update)
delta - amount to translate along the axisaxis - axis along which to perform the translationupdate - if true, a redisplay is forced; if
false, the redisplay does not occur. If translating along two
axes,
the first translate() call should have
update=false, and the second should have
update=true.public void reset()
public void cancel()
protected void reorderDataViews()
ChartDataView
object to its index in the data array.
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 String (ignored)public String getLicense()
public void setLicense(String s)
protected com.klg.jclass.chart.ChartDataView findData(com.klg.jclass.chart.JCAxis ax)
ChartDataView object that references a particular axis.
ax - axis for which the corresponding data object is to be found
public com.klg.jclass.chart.JCDataIndex pick(Point p,
com.klg.jclass.chart.ChartDataView data)
JCDataIndex
object that represents the closest point in a data series in the specified
ChartDataView instance. If no data view is supplied, all data
views are considered when finding the closest point. 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 JCChart objectdata - data view on which to perform pick; if null,
all data views are used
JCDataIndex object representing the picked point.
public Point unpick(com.klg.jclass.chart.ChartDataView dv,
int pt,
int series)
dv - the data view containing the specified seriespt - point indexseries - data series index or JCPieChartFormat.OTHER_SLICE
if specifying the other slice of a pie chart
JCChart object or null if series or point does not
exist or is not showing.
public Point unpick(int pt,
com.klg.jclass.chart.ChartDataViewSeries series)
pt - point indexseries - data series
JCChart object or null if series or
point does not exist or is not showing.public void addChartListener(com.klg.jclass.chart.JCChartListener l)
l - the chart listener to be addedpublic void removeChartListener(com.klg.jclass.chart.JCChartListener l)
l - the chart listener to be removedprotected void sendEvent(com.klg.jclass.chart.JCAxis axis)
axis - the axis to which the event pertainspublic void addPickListener(com.klg.jclass.chart.JCPickListener l)
l - the pick listener to addpublic void removePickListener(com.klg.jclass.chart.JCPickListener l)
l - the pick listener to removepublic void sendPickEvent(com.klg.jclass.chart.JCDataIndex di)
di - the data index to which the event pertainspublic void requestFocus()
FocusEvent will be generated
to indicate that the focus has been gained.
requestFocus in class JComponentFocusEventpublic boolean isFocusTraversable()
isFocusTraversable method to always
return true, which is required to get keyPress events.
isFocusTraversable in class Componentpublic void resetDefaults()
JCStyle.
public void setLineColorIndex(int colorIndex)
colorIndex - the new 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 symbol shape indexpublic int getLineColorIndex()
public int getFillColorIndex()
public int getSymbolColorIndex()
public int getSymbolShapeIndex()
public String getToolTipText(MouseEvent event)
getToolTipText in class JComponentevent - the mouse event for the tool tip
public Point getToolTipLocation(MouseEvent event)
getToolTipLocation in class JComponentevent - the mouse event for the tool tip
public JToolTip createToolTip()
createToolTip in class JComponentpublic com.klg.jclass.chart.JCChartLabelManager getChartLabelManager()
JCChartLabelManager interface for managing chart labels. If
no manager has been set and the default manager has not yet been created,
calling this function will create an instance of the default manager.
public void setChartLabelManager(com.klg.jclass.chart.JCChartLabelManager clm)
ChartLabelManager property, a class that
implements the JCChartLabelManager interface. This method is
not often used; usually the user would use the default manager provided
with JClass Chart.
clm - a class the implements the JCChartLabelManager
interfacepublic boolean hasChartLabelManager()
true if a chart label manager instance has
been created.
JCChart component have a chart label manager?public String getCustomizerName()
CustomizerName property.
The CustomzierName property controls the name of the customizer
used by JClass Chart. It must be a full class name. The default
value is com.klg.jclass.chart.customizer.ChartCustomizer.
public void setCustomizerName(String s)
com.klg.jclass.chart.customizer.ChartCustomizer.
s - the new customizer namepublic com.klg.jclass.chart.JCChartUI getUI()
JCChart.
public void setUI(ComponentUI newUI)
JCChart.
setUI in class JComponentnewUI - the new UI objectpublic void updateUI()
JCChart.
updateUI in class JComponentpublic String getUIClassID()
JCChart.
getUIClassID in class JComponentpublic void registerUI()
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 Containerx - 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)
protected Image createLocalImage(int width,
int height)
width - the width of the new imageheight - the height of the new image
public Graphics getGraphics()
getGraphics(). If another Graphics object has
been set to be the current one, a copy of that will be returned. Otherwise,
call the superclass' getGraphics() method.
getGraphics in interface com.klg.jclass.util.ServerRenderablegetGraphics in class JComponentpublic void setGraphics(Graphics g)
Graphics
object. Call with a null to specify use of the default Graphics
object used to draw to the screen.
setGraphics in interface com.klg.jclass.util.ServerRenderableg - Graphics object to use for drawingpublic void createQueryGraphics()
public void disposeQueryGraphics()
public Graphics getQueryGraphics()
public Image serverSnapshot()
serverSnapshot in interface com.klg.jclass.util.ServerRenderablepublic void serverPaint(Graphics igc)
serverPaint in interface com.klg.jclass.util.ServerRenderablepublic void setUsingDoublePixels(boolean usingDoubles)
setUsingDoublePixels in interface RenderPropertiesusingDoubles - The new value of usingDoubles.public boolean isUsingDoublePixels()
isUsingDoublePixels in interface RenderPropertiespublic int getAntiAliasing()
ANTI_ALIASING_ON or ANTI_ALIASING_OFF, the anti
aliasing rendering hint will be explicity turned on or off on the graphics
object used by the chart to paint its children. If set to
ANTI_ALIASING_DEFAULT, the graphics object will be untouched
with respect to anti aliasing when the chart is painted.
getAntiAliasing in interface RenderPropertiespublic void setAntiAliasing(int antiAliasing)
ANTI_ALIASING_ON or ANTI_ALIASING_OFF, the anti
aliasing rendering hint will be explicity turned on or off on the graphics
object used by the chart to paint its children. If set to
ANTI_ALIASING_DEFAULT, the graphics object will be untouched
with respect to anti aliasing when the chart is painted.
setAntiAliasing in interface RenderPropertiesantiAliasing - The new antiAliasing value.public com.klg.jclass.util.ImageMapInfo getImageMapInfo()
JCChart.
public void setImageMapInfo(com.klg.jclass.util.ImageMapInfo imageMapInfo)
JChart.
imageMapInfo - The new image map information.public com.klg.jclass.util.ImageMapInfo getFooterImageMapInfo()
public void setFooterImageMapInfo(com.klg.jclass.util.ImageMapInfo footerImageMapInfo)
footerImageMapInfo - The new footer image map information.public com.klg.jclass.util.ImageMapInfo getHeaderImageMapInfo()
public void setHeaderImageMapInfo(com.klg.jclass.util.ImageMapInfo headerImageMapInfo)
headerImageMapInfo - The new header image map information.public void setLocale(Locale locale)
setLocale in class Componentlocale - the Locale objectLocalepublic Locale getLocale()
getLocale in class Componentpublic static void main(String[] args)
args - the command line arguments
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||