|
|||||||||||
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
uk.ac.cam.cl.whb21.iworkbook.ServerClientTranslationApplet
An applet which can be used to control a Content Applet and an Interaction Area Applet. Essentially, this applet contains "convenience methods" -- common operations that a server for the Intelligent Book project is likely to want to perform. That server can call simple methods on this applet rather than having to separately call lower-level APIs on the Content Applet and the Interaction Area Applet.
This applet implements AppletXmlRpcCaller only as a "pass-through". It will accept the XML-RPC call, display a text representation of the call as having been "said" by the student, append the same text to the log, and then pass the call on to the "real" AppletXmlRpcCaller
The following applet parameters are accepted:
Field Summary |
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 | |
ServerClientTranslationApplet()
|
Method Summary | |
void |
actionCall(java.lang.String s,
java.util.Vector v)
Implements an XML-RPC call to the server where the server's return object is expected to be a set of XML-RPC calls. |
void |
prompt()
Show a generic prompt |
void |
prompt(java.lang.String s)
Show a particular piece of system text (and clear html area) |
void |
prompt(java.lang.String s,
java.lang.String html)
Show a particular piece of system text and some html |
void |
retractionPrompt(java.lang.String[] path,
java.lang.String[] description)
Prompt the user with a selection of properties and descriptions to retract |
java.lang.Object |
returnCall(java.lang.String s,
java.util.Vector v)
Implements an ordinary XML-RPC call to the server, expecting a return object back. |
void |
showList(java.lang.String s,
java.lang.String[] item)
Prompt the user with some text and a list |
void |
showUrlList(java.lang.String s,
java.lang.String[] url,
java.lang.String[] description)
Prompt the user with some text and a list of links |
void |
start()
Called by the browser at applet start time |
void |
studentInput(java.lang.String s)
Accepts student input from the "command line" edit box (or from generated commands). |
void |
testResponseCall(java.lang.String s)
Does not perform an XMLRPC, but behaves as if it has just received the response from an actionCall. |
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, stop |
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, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, remove, removeAll, removeContainerListener, removeNotify, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, 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, 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, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ServerClientTranslationApplet()
Method Detail |
public void start()
public void retractionPrompt(java.lang.String[] path, java.lang.String[] description)
path
- The XPath to the property to retractdescription
- The description of the property to show by the radio buttonpublic void prompt()
public void prompt(java.lang.String s)
s
- text to showpublic void prompt(java.lang.String s, java.lang.String html)
s
- text to showhtml
- html to showpublic void showList(java.lang.String s, java.lang.String[] item)
s
- text to showitem
- array of items in listpublic void showUrlList(java.lang.String s, java.lang.String[] url, java.lang.String[] description)
s
- url
- description
- public void studentInput(java.lang.String s)
If the function-name is one the Content Applet is known to support, the function will also be called on the Content Applet. (At present, Content Applets are expected to support setValue and setAttribute).
This input will be passed as an XML-RPC to the server (unless an attempt at calling the Content Applet has just failed)
s
- the input stringpublic void actionCall(java.lang.String s, java.util.Vector v)
AppletXmlRpcCaller
actionCall
in interface AppletXmlRpcCaller
s
- - the name of the server function to call.v
- - the arguments to call the function with.public java.lang.Object returnCall(java.lang.String s, java.util.Vector v)
AppletXmlRpcCaller
returnCall
in interface AppletXmlRpcCaller
s
- - the name of the server function to call.v
- - the arguments to call the function with.
public void testResponseCall(java.lang.String s)
AppletXmlRpcCaller
testResponseCall
in interface AppletXmlRpcCaller
s
- - the faked up response
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |