|
|||||||||
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 | +--java.awt.Panel | +--java.applet.Applet | +--com.objectplanet.chart.ChartApplet
This is the superclass for all the chart applets, and reads the default parameters.
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 | |
protected java.lang.String |
labelDelimiter
Used as the label delimiter for label string "arrays". |
protected int |
sampleCountRead
This is set after loadParameters() has been called in this class. |
protected int |
seriesCountRead
This is set after loadParameters() has been called in this class. |
com.objectplanet.chart.Chart |
theChart
The chart component of the applet.Use this reference to access the charts methods directly via JavaScript or subclasses. |
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 | |
ChartApplet()
Creates the chart applet. |
Method Summary | |
void |
callJavaScript(java.lang.String javascript)
Calls a javascript function in the applet page. |
protected abstract com.objectplanet.chart.Chart |
createChart(java.lang.String className)
This is called by the constructor and creates the chart used for the applet. |
static java.awt.Color |
createColor(java.lang.String color)
Creates a color based on the string. |
java.awt.Font |
createFont(java.lang.String value,
java.lang.String name,
int type,
int size)
Creates a font based on the information in the specified string. |
void |
destroy()
Releases all the resources claimed by the applet. |
java.applet.AppletContext |
getAppletContext()
Gets the applet context. |
protected java.awt.Color[] |
getColorValues(java.lang.String string)
Converts a comma seperated string to a color array. |
java.net.URL |
getDocumentBase()
Gets the document base. |
protected static java.lang.Double[] |
getDoubleValues(java.lang.String string)
Convers a string parameter to an array of double values. |
java.lang.String |
getParameter(java.lang.String parameter)
Gets the value of the specified applet parameter. |
java.lang.String |
getParameterPrefix()
Gets the prefix used when reading applet parameters. |
protected java.lang.String[] |
getStringValues(java.lang.String string,
java.lang.String delimiter)
Converts a comma seperated string to an array of strings. |
void |
init()
Initializes the default applet parameters. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Called when a sample is selected. |
void |
loadParameters(java.util.Hashtable parameters)
Loads the parameters into the specified hashtable. |
void |
loadURLParameters(java.lang.String url,
java.util.Hashtable parameters)
Loads the parameters from the specified url. |
void |
mouseDragged(java.awt.event.MouseEvent event)
Required by the MouseMotionListener, does nothing. |
void |
mouseMoved(java.awt.event.MouseEvent event)
Checks of the mouse is over a sample with a URL. |
void |
print(java.awt.Graphics g)
Called when a print request is issued. |
void |
reset()
Resets the chart data and features. |
void |
run()
The automatic refresh thread. |
void |
setParameter(java.lang.String name,
java.lang.String value)
Sets a parameter in the chart. |
void |
setParameterPrefix(java.lang.String prefix)
Sets the parameter prefix for this chart. |
void |
setParameters(java.util.Hashtable parameters)
Sets the applet parameters. |
void |
setParentApplet(java.applet.Applet parent)
Sets the parent applet. |
void |
start()
Starts the automatic refresh thread. |
void |
stop()
Stops the automatic refresh thread. |
java.lang.String |
toString()
Returns the title of the chart. |
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 |
protected java.lang.String labelDelimiter
protected int sampleCountRead
protected int seriesCountRead
public com.objectplanet.chart.Chart theChart
Constructor Detail |
public ChartApplet()
Method Detail |
public void callJavaScript(java.lang.String javascript)
javascript
- The javascript URL.protected abstract com.objectplanet.chart.Chart createChart(java.lang.String className)
className
- The class name of the chart.public static java.awt.Color createColor(java.lang.String color)
public java.awt.Font createFont(java.lang.String value, java.lang.String name, int type, int size)
value
- The font string value.name
- The name of the default font.type
- The default type (Font.PLAIN, Font.BOLD, Font.ITALIC).size
- The default size.public void destroy()
destroy
in class java.applet.Applet
public java.applet.AppletContext getAppletContext()
getAppletContext
in class java.applet.Applet
protected java.awt.Color[] getColorValues(java.lang.String string)
string
- The comma seperated string.
public java.net.URL getDocumentBase()
getDocumentBase
in class java.applet.Applet
protected static java.lang.Double[] getDoubleValues(java.lang.String string)
string
- The array of string numbers.
public java.lang.String getParameter(java.lang.String parameter)
getParameter
in class java.applet.Applet
parameter
- The name of the parameter.
public java.lang.String getParameterPrefix()
protected java.lang.String[] getStringValues(java.lang.String string, java.lang.String delimiter)
string
- The string parameter to return the values from.delimiter
- The field delimiter.
public void init()
init
in class java.applet.Applet
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
public void loadParameters(java.util.Hashtable parameters)
parameters
- The hashtable where the parameters should be loaded.public void loadURLParameters(java.lang.String url, java.util.Hashtable parameters)
url
- The url to load the data from.parameters
- Read the parameters into this hashtable.public void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent event)
mouseMoved
in interface java.awt.event.MouseMotionListener
event
- The mouse event.public void print(java.awt.Graphics g)
print
in class java.awt.Container
public void reset()
public void run()
run
in interface java.lang.Runnable
public void setParameter(java.lang.String name, java.lang.String value)
name
- The name of the parameter.value
- The value of the parameter as a string.public void setParameterPrefix(java.lang.String prefix)
prefix
- The prefix to use when reading applet parameters.public void setParameters(java.util.Hashtable parameters)
parameters
- The parameters to be set.public void setParentApplet(java.applet.Applet parent)
parent
- The parent applet, use null for ourselves.public void start()
start
in class java.applet.Applet
public void stop()
stop
in class java.applet.Applet
public java.lang.String toString()
toString
in class java.awt.Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |