|
||||||||
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
public class ChartApplet
This is the superclass for all the chart applets, and reads the default parameters.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.applet.Applet |
---|
java.applet.Applet.AccessibleApplet |
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
BarChart |
barChart
Reference to the BarChart component of the applet. |
Chart |
chart
The chart component of the applet. |
ChartDataLoader |
dataLoader
The ChartDataLoader is used to load data read by the ChartApplet to the Chart. |
java.awt.Component |
gaugeChart
Reference to the GaugeChart component of the applet. |
protected java.lang.String |
labelDelimiter
Used as the label delimiter for label string "arrays". |
LineChart |
lineChart
Reference to the LineChart component of the applet. |
PieChart |
pieChart
Reference to the PieChart component of the applet. |
GenericChart |
plotterChart
Reference to the PlotterChart component of the applet. |
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. |
Chart |
theChart
The chart component of the applet.Use this reference to access the charts methods directly via JavaScript or subclasses. |
protected java.util.Hashtable |
timePlots
The list of time plots in the TimeLineChart. |
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. |
|
ChartApplet(java.lang.String type)
Creates the chart applet. |
Method Summary | |
---|---|
void |
callJavaScript(java.lang.String javascript)
Calls a javascript function in the applet page. |
java.lang.String |
createArrayString(int[] array)
Creates a separated string from the array. |
protected Chart |
createChart(java.lang.String type,
java.lang.String className)
This is called by init() and creates the chart of the specified type 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. |
void |
doLayout()
Sets the proper size of the chart. |
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 static 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 |
loadOverlayParameters()
Loads the overlay parameters. |
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 |
mouseClicked(java.awt.event.MouseEvent event)
Checks if we clicked the URL label. |
void |
mouseDragged(java.awt.event.MouseEvent event)
Required by the MouseMotionListener, does nothing. |
void |
mouseEntered(java.awt.event.MouseEvent event)
Required by the MouseListener, does nothing. |
void |
mouseExited(java.awt.event.MouseEvent event)
Required by the MouseListener, does nothing. |
void |
mouseMoved(java.awt.event.MouseEvent event)
Checks of the mouse is over a sample with a URL. |
void |
mousePressed(java.awt.event.MouseEvent event)
Required by the MouseListener, does nothing. |
void |
mouseReleased(java.awt.event.MouseEvent event)
Required by the MouseListener, does nothing. |
void |
print(java.awt.Graphics g)
Called when a print request is issued. |
void |
reset()
Resets the chart data and features. |
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, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, setMaximumSize, setMinimumSize, setName, setPreferredSize, 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 |
---|
public BarChart barChart
public Chart chart
public ChartDataLoader dataLoader
public java.awt.Component gaugeChart
protected java.lang.String labelDelimiter
public LineChart lineChart
public PieChart pieChart
public GenericChart plotterChart
protected int sampleCountRead
protected int seriesCountRead
public Chart theChart
protected java.util.Hashtable timePlots
Constructor Detail |
---|
public ChartApplet()
public ChartApplet(java.lang.String type)
Method Detail |
---|
public void callJavaScript(java.lang.String javascript)
javascript
- The javascript URL.public java.lang.String createArrayString(int[] array)
In javascript you can use it like this:
visible = document.Chart1.getVisibleSamples();
visible = document.Table1.createArrayString(visible);
array = selected.split(',');
for (i = 0; i < array.length; i++) {
index = array[i];
//....
}
array
- The array to convert.
protected Chart createChart(java.lang.String type, java.lang.String className)
type
- The type of the chart.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 void doLayout()
doLayout
in class java.awt.Container
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 static 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 loadOverlayParameters()
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 mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface java.awt.event.MouseListener
event
- The mouse event.public void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseEntered(java.awt.event.MouseEvent event)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent event)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent event)
mouseMoved
in interface java.awt.event.MouseMotionListener
event
- The mouse event.public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased
in interface java.awt.event.MouseListener
public void print(java.awt.Graphics g)
print
in class java.awt.Container
public void reset()
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 |