|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
edu.davidson.tools.SApplet
data.Data
public class Data
Data is an applet that serves two roles:
It acts as a relay between an SDataSource and JavaScript in a Web Page
It stores data, which can be retrieved via other Applets or JavaScript
APPLET PARAMETERS
IsReady : JavaScript variable that is set true when this applet has been initialized
ShowLabel : if true the label is used
LabelWidth : width of the label in pixels
LabelHeight : height of the label in pixels
LabelID : ID of the data set whose x or y value is displayed in the label
ShowY : if true the y value is displayed in the label, if false the x value is displayed
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.BaselineResizeBehavior |
| Field Summary |
|---|
| Fields inherited from class edu.davidson.tools.SApplet |
|---|
clock, dataConnections, dataListeners, dataSources, lock |
| 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 | |
|---|---|
Data()
|
|
| Method Summary | |
|---|---|
void |
addData(edu.davidson.tools.SDataSource ds,
int id,
double[] x,
double[] y)
SDataListener Method: Use to submit an array of data points Calls the JavaScript method addData |
int |
addDataSet(java.lang.String func,
int id)
Adds a new Data Set with identification id. |
void |
addDatum(edu.davidson.tools.SDataSource ds,
int id,
double x,
double y)
SDataListener Method: Use to submit a single data point Calls JavaScript method addDatum |
void |
callJavaScript(boolean val)
Determines whether JavaScript addData and addDatum functions are automatically called. |
void |
clearSeries(int id)
SDataListener Method: Clears the specified data set. |
void |
deleteSeries(int id)
SDataListener Method: Deletes the specified data set. |
void |
destroy()
|
java.lang.String |
getAppletInfo()
|
int |
getNumberPoints(int id)
Gets number of points in a set |
edu.davidson.tools.SApplet |
getOwner()
SDataListener Method: Returns the owner of this SDataListener |
java.lang.String |
getParameter(java.lang.String key,
java.lang.String def)
|
java.lang.String[][] |
getParameterInfo()
|
void |
init()
|
void |
setBackgroundColor(java.lang.String rgb)
Sets the background color of the applet |
void |
setLabelFont(java.awt.Font fnt)
Sets the font for the label. |
void |
setLabelFormat(int nbrLength,
int nbrDecimal)
Sets the format for the values displayed in the label |
void |
setLabelSize(int wid,
int ht)
Sets the size of the label. |
void |
setLabelText(java.lang.String val)
Sets the text in the label. |
void |
setOwner(edu.davidson.tools.SApplet owner)
SDataListener Method: Sets the owner of this SDataListener |
void |
start()
|
void |
stop()
|
| Methods inherited from class edu.davidson.tools.SApplet |
|---|
addDataListener, addDataSource, cleanupDataConnections, clearAllData, clearData, deleteDataConnection, deleteDataConnections, forward, getClockID, getClockTime, getDataConnectionFromDL, getDataConnectionFromDS, getDataFromDS, getDataListener, getDataListener, getDataSource, getDataSource, getID, getRunningID, getSourceData, getSourceVariables, isAutoRefresh, isClockRunning, makeDataConnection, pause, removeDataListener, removeDataSource, reset, reverse, setAutoRefresh, setClockContinous, setClockCycle, setClockOneShot, setClockTime, setConnectionBlock, setConnectionListener, setConnectionSmoothing, setConnectionSource, setConnectionStride, setDefault, setDt, setExternalClock, setFPS, setRunningID, setRunningID, setTimeContinuous, setTimeCycle, setTimeOneShot, startClock, stepClock, stepTime, stepTimeBack, stepTimeForward, stopClock, updateDataConnection, updateDataConnections |
| Methods inherited from class java.applet.Applet |
|---|
getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, 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, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, 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, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.davidson.tools.SDataListener |
|---|
getID |
| Constructor Detail |
|---|
public Data()
| Method Detail |
|---|
public java.lang.String getParameter(java.lang.String key,
java.lang.String def)
public void init()
init in class java.applet.Appletpublic void start()
start in class java.applet.Appletpublic void stop()
stop in class java.applet.Appletpublic void destroy()
destroy in class edu.davidson.tools.SAppletpublic java.lang.String getAppletInfo()
getAppletInfo in class java.applet.Appletpublic java.lang.String[][] getParameterInfo()
getParameterInfo in class java.applet.Applet
public void addData(edu.davidson.tools.SDataSource ds,
int id,
double[] x,
double[] y)
addData in interface edu.davidson.tools.SDataListenerds - SDataSource (obtained from the source getID functionid - data set idx[] - array of x valuesy[] - array of y valuesSApplet.getID()
public void addDatum(edu.davidson.tools.SDataSource ds,
int id,
double x,
double y)
addDatum in interface edu.davidson.tools.SDataListenerds - SDataSource (obtained from the source getID functionid - data set idx - x value of data pointy - y value of data pointSApplet.getID()
public int addDataSet(java.lang.String func,
int id)
func - string containing name of the JavaScript functionid - identification of data set associated with this function
public void callJavaScript(boolean val)
public void clearSeries(int id)
clearSeries in interface edu.davidson.tools.SDataListenerid - identification of the data set to be clearedpublic void deleteSeries(int id)
deleteSeries in interface edu.davidson.tools.SDataListenerid - identification of the data set to be clearedpublic int getNumberPoints(int id)
id - data set identificationpublic edu.davidson.tools.SApplet getOwner()
getOwner in interface edu.davidson.tools.SDataListenerpublic void setBackgroundColor(java.lang.String rgb)
rgb - this string is converted into a 24-bit integer that defines the colorpublic void setLabelFont(java.awt.Font fnt)
public void setLabelFormat(int nbrLength,
int nbrDecimal)
nbrLength - total number of characters in number including sign and decimal pointnbrDecimal - total number of decimal places displayed
public void setLabelSize(int wid,
int ht)
wid - width in pixelsht - height in pixelspublic void setLabelText(java.lang.String val)
public void setOwner(edu.davidson.tools.SApplet owner)
setOwner in interface edu.davidson.tools.SDataListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||