com.objectplanet.chart
Class PieChartApplet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--com.objectplanet.chart.ChartApplet
                                |
                                +--com.objectplanet.chart.PieChartApplet
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.MenuContainer, java.awt.event.MouseMotionListener, java.lang.Runnable, java.io.Serializable

public class PieChartApplet
extends ChartApplet

The pie chart applet enables you to plug a pie chart directly into your html page and customize it by setting parameters in the applet tag.

A simple piechart applet can be created with the following tag:

 <applet com.objectplanet.chart.PieChartApplet width=300 height=200 archive=chart.jar>
 <param name="sampleValues" value="100,200,300,400,500">
 <applet>
To set a chart value or feature, use the following tag

<param name="parameterName" value="valueToUse">

See here for the list of applet parameters.

Author:
Bjorn J. Kvande.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 com.objectplanet.chart.PieChart chart
          The chart component of the applet.Use this reference to access the charts methods directly via JavaScript or subclasses.
 
Fields inherited from class com.objectplanet.chart.ChartApplet
labelDelimiter, sampleCountRead, seriesCountRead, theChart
 
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
PieChartApplet()
           
 
Method Summary
protected  com.objectplanet.chart.Chart createChart(java.lang.String className)
          This is called by the constructor and init() methods and creates the chart used for the applet.
 void loadParameters(java.util.Hashtable parameters)
          Loads the pie chart applet specific parameters into the specified hashtable.
 void setParameter(java.lang.String name, java.lang.String value)
          Sets a parameter in the chart.
 void setParameters(java.util.Hashtable parameters)
          Sets the pie applet parameters.
 
Methods inherited from class com.objectplanet.chart.ChartApplet
callJavaScript, createColor, createFont, destroy, getAppletContext, getColorValues, getDocumentBase, getDoubleValues, getParameter, getParameterPrefix, getStringValues, init, itemStateChanged, loadURLParameters, mouseDragged, mouseMoved, print, reset, run, setParameterPrefix, setParentApplet, start, stop, toString
 
Methods inherited from class java.applet.Applet
getAccessibleContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getImage, getImage, getLocale, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

chart

public com.objectplanet.chart.PieChart chart
The chart component of the applet.Use this reference to access the charts methods directly via JavaScript or subclasses.

Constructor Detail

PieChartApplet

public PieChartApplet()
Method Detail

createChart

protected com.objectplanet.chart.Chart createChart(java.lang.String className)
This is called by the constructor and init() methods and creates the chart used for the applet. It can be overridden by a subclass to use a specialized class for the chart applet. This method also sets the PieChartApplet.chart reference to the created chart.

Specified by:
createChart in class ChartApplet
Parameters:
className - The class name of the chart.

loadParameters

public void loadParameters(java.util.Hashtable parameters)
Loads the pie chart applet specific parameters into the specified hashtable. This method is called by ChartApplet and calls super.loadParameters().

Overrides:
loadParameters in class ChartApplet
Parameters:
parameters - The hashtable where the parameters should be loaded.

setParameter

public void setParameter(java.lang.String name,
                         java.lang.String value)
Sets a parameter in the chart.

Overrides:
setParameter in class ChartApplet
Parameters:
name - The name of the parameter.
value - The value of the parameter as a string.

setParameters

public void setParameters(java.util.Hashtable parameters)
Sets the pie applet parameters.

Overrides:
setParameters in class ChartApplet
Parameters:
parameters - The applet parameters.