|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Panel
|
+--com.elj.chart.chart2d.Chart2D
This class implements the 2 dimensional series charting that allows the data to be displayed in a line, bar or a pie shape. Visual tools like these allow the data to be piped in through other tools like SQL Result Set or a user defined data set.
| Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
static java.lang.String |
BAR_CHART
Chart type for the Chart2D |
static java.lang.String |
CENTERED_LINE
Line style for the Chart2D |
static java.lang.String |
DASHED_LINE
Line style for the Chart2D |
static java.lang.String |
LINE_CHART
Chart type for the Chart2D |
static java.lang.String |
PIE_CHART
Chart type for the Chart2D |
static java.lang.String |
STRAIGHT_LINE
Line style for the Chart2D |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Chart2D()
Constructs the Chart2D |
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds the property change listener |
void |
doLayout()
|
void |
firePropertyChange(java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires the property change |
java.awt.Color |
getAxisColor()
Returns the axis color of the chart |
java.awt.Font |
getAxisLabelFont()
Returns the axis label font |
java.awt.Color |
getBackground()
Returns the background |
java.lang.String |
getChartType()
Returns the chart type |
java.awt.Font |
getFont()
Returns the font of the chart |
java.awt.Color |
getForeground()
Returns the foreground |
int |
getGapBetweenBars()
Returns the gap between bars |
java.awt.Color |
getGraphBackground()
Returns the graph background |
java.awt.Color |
getGridColor()
Returns the grid color of the chart |
java.lang.String |
getInputValues()
Returns the input values |
java.lang.String |
getLineStyle()
Returns the line style |
java.util.Locale |
getLocale()
Method which returns the locale of the Chart2D |
java.awt.Dimension |
getMinimumSize()
Returns the minimum size |
java.util.Vector |
getPieColors()
Returns the pie colors |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size |
int |
getSelectedPie()
Gets the current selected pie slice. |
java.util.Vector |
getSQLData()
Returns the SQL data |
java.awt.Color |
getTextColor()
Returns the text color of the chart |
java.lang.String |
getTitle()
Returns the title of the Chart2D |
java.awt.Color |
getTitleColor()
Returns the title color of the chart |
java.awt.Font |
getTitleFont()
Returns the title font of the chart |
java.lang.String |
getXAxisLabel()
Returns the label of the x axis |
java.lang.String |
getXLabel()
Gets the text labels for the data items to be displayed |
java.lang.String |
getYAxisLabel()
Returns the label of the y axis |
java.util.Vector |
parseString(java.lang.String string,
java.lang.String delimiter)
Parses the string |
void |
readExternal(java.io.ObjectInput in)
Implementation of the Externalizable |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the property change listener |
void |
setAxisColor(java.awt.Color axisColor)
Sets the axis color of the chart |
void |
setAxisLabelFont(java.awt.Font font)
Sets the axis label font |
void |
setBackground(java.awt.Color background)
Sets the background |
void |
setBounds(int x,
int y,
int width,
int height)
Method which sets the bounds of the Chart2D |
void |
setChartType(java.lang.String chartType)
Sets the chart type |
void |
setCursor(java.awt.Cursor cursor)
Method which sets the cursor for the Chart2D |
void |
setEnabled(boolean bEnabled)
Method which sets the enability of the Chart2D |
void |
setFont(java.awt.Font font)
Sets the font for the chart |
void |
setForeground(java.awt.Color foreground)
Sets the foreground |
void |
setGapBetweenBars(int gap)
Sets the gap between the bars of the bar chart |
void |
setGraphBackground(java.awt.Color background)
Sets the graph background |
void |
setGridColor(java.awt.Color gridColor)
Sets the grid color of the chart |
void |
setInputValues(java.lang.String inputValues)
Sets the input values specified by the string |
void |
setLineStyle(java.lang.String lineStyle)
Sets the LineStyle of the Line chart Three Line styles are supported straight, dashed and centered |
void |
setLocale(java.util.Locale locale)
Method which sets the locale for the Chart2D |
void |
setPieColors(java.lang.String[] pieColors)
Sets the pie colors |
void |
setPieColors(java.util.Vector pieColors)
Sets the PieColors from Vector, All the elements of the Vector must be of type Color |
void |
setSelectedPie(int i)
Sets the SelectedPie index of the Pie chart. |
void |
setSQLData(java.lang.String[][] data)
Sets the SQL data |
void |
setSQLData(java.util.Vector data)
Sets the SQL data |
void |
setTextColor(java.awt.Color textColor)
Sets the text color for the chart |
void |
setTitle(java.lang.String title)
Sets the title of the Chart2D |
void |
setTitleColor(java.awt.Color color)
Sets the title color for the chart |
void |
setTitleFont(java.awt.Font font)
Sets the title font for the chart |
void |
setVisible(boolean bVisible)
Method which sets the visibility for the Chart2D |
void |
setXAxisLabel(java.lang.String label)
Sets the x axis label |
void |
setXLabel(java.lang.String XLabels)
Sets the XLabels for the data items to be displayed |
void |
setYAxisLabel(java.lang.String label)
Sets the y axis label |
void |
writeExternal(java.io.ObjectOutput out)
Implementation of the Externalizable |
| Methods inherited from class java.awt.Panel |
addNotify, getAccessibleContext |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setLayout, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFontMetrics, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBounds, setComponentOrientation, setDropTarget, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static java.lang.String LINE_CHART
public static java.lang.String PIE_CHART
public static java.lang.String BAR_CHART
public static java.lang.String STRAIGHT_LINE
public static java.lang.String DASHED_LINE
public static java.lang.String CENTERED_LINE
| Constructor Detail |
public Chart2D()
| Method Detail |
public void setTitle(java.lang.String title)
title - The title of the Chart2Dpublic java.lang.String getTitle()
public void setChartType(java.lang.String chartType)
chartType - The chart typepublic java.lang.String getChartType()
public void setInputValues(java.lang.String inputValues)
inputValues - The input values specified by the stringpublic java.lang.String getInputValues()
public void setXLabel(java.lang.String XLabels)
XLabels - The specified stringpublic java.lang.String getXLabel()
public void setGapBetweenBars(int gap)
gap - The gap between the barspublic int getGapBetweenBars()
public java.util.Vector parseString(java.lang.String string,
java.lang.String delimiter)
string - The specified stringdelimiter - The delimiter charpublic void setSQLData(java.util.Vector data)
data - The SQL data
the format of the data vector is --- for adding the single record to the data vector
Vector data = new Vector();
Vector temp = new Vector(); --- contains the first record
temp.addElement("AAA");
temp.addElement("1");
data.addElement(temp);public void setSQLData(java.lang.String[][] data)
data - The two dimensional array containing the SQL datapublic java.util.Vector getSQLData()
public void setBackground(java.awt.Color background)
setBackground in class java.awt.Componentbackground - The specified backgroundpublic java.awt.Color getBackground()
getBackground in class java.awt.Componentpublic void setForeground(java.awt.Color foreground)
setForeground in class java.awt.ComponentThe - specified foregroundpublic java.awt.Color getForeground()
getForeground in class java.awt.Componentpublic void setPieColors(java.util.Vector pieColors)
pieColors - Vector value specified in the Vectorpublic void setPieColors(java.lang.String[] pieColors)
pieColors - The array contains the pie colorspublic java.util.Vector getPieColors()
public void setGraphBackground(java.awt.Color background)
background - The graph backgroundpublic java.awt.Color getGraphBackground()
public void setLineStyle(java.lang.String lineStyle)
lineStyle - The specified line stylepublic java.lang.String getLineStyle()
public void setSelectedPie(int i)
int - value specifies the Pie slice.public int getSelectedPie()
public void setTextColor(java.awt.Color textColor)
textColor - The text color for the chartpublic java.awt.Color getTextColor()
public void setGridColor(java.awt.Color gridColor)
gridColor - The grid color of the chartpublic java.awt.Color getGridColor()
public void setAxisColor(java.awt.Color axisColor)
axisColor - The axis color of the chartpublic java.awt.Color getAxisColor()
public void setFont(java.awt.Font font)
setFont in class java.awt.Containerfont - The specified font for the chartpublic java.awt.Font getFont()
getFont in class java.awt.Componentpublic void setTitleFont(java.awt.Font font)
font - The title font for the chartpublic java.awt.Font getTitleFont()
public void setAxisLabelFont(java.awt.Font font)
font - The axis label fontpublic java.awt.Font getAxisLabelFont()
public void setTitleColor(java.awt.Color color)
font - The title color for the chartpublic java.awt.Color getTitleColor()
public void setXAxisLabel(java.lang.String label)
label - The x axis labelpublic java.lang.String getXAxisLabel()
public void setYAxisLabel(java.lang.String label)
label - The y axis labelpublic java.lang.String getYAxisLabel()
public void setLocale(java.util.Locale locale)
setLocale in class java.awt.Componentlocale - The locale for the Chart2Dpublic java.util.Locale getLocale()
getLocale in class java.awt.Componentpublic void setCursor(java.awt.Cursor cursor)
setCursor in class java.awt.Componentcursor - The cursor for the Chart2Dpublic void setVisible(boolean bVisible)
setVisible in class java.awt.ComponentbVisible - the visibility for the Chart2Dpublic void setEnabled(boolean bEnabled)
setEnabled in class java.awt.ComponentbEnabled - the enability of the Chart2D
public void setBounds(int x,
int y,
int width,
int height)
setBounds in class java.awt.Componentx - The x coordinate of the Chart2Dy - The y coordinate of the Chart2Dwidth - The width of the of the Chart2Dheight - The height of the Chart2Dpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Containerpublic java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Containerpublic void doLayout()
doLayout in class java.awt.Containerpublic void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener in class java.awt.Componentl - The property change listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener in class java.awt.Componentl - The property change listener
public void firePropertyChange(java.lang.String property,
java.lang.Object oldValue,
java.lang.Object newValue)
firePropertyChange in class java.awt.Componentproperty - The name of the propertyoldValue - The old valuenewValue - The new value
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException,
java.awt.IllegalComponentStateException
writeExternal in interface java.io.Externalizable
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizable
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||