|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--java.applet.Applet | +--javax.swing.JApplet | +--Interpreter.AppletInterpreter.InterpreterApplet
Applet che implementa l'interfaccia grafica per gli interpreti.
Si può richiamare da un file html oppure utilizzare per costruire una applicazione standalone.
In questo ultimo caso è opportuno invocare il metodo setFrame(Frame) per permettere
all'applet di utilizzare le forme Dialog con i corretti parametri.
Gli interpreti lisp e prolog sono quelli di default. Se si vuole utilizzare una versione
estesa degli interpreti bisogna invocare i metodi setExtendedLisp(Class) e
setExtendedProlog(Class,Class). È possibile estendere anche solo uno dei due interpreti.
Se si vuole estendere anche l'help si possono utilizzare i metodi addLisp(String,String)
e addProlog(String,String).
setFrame(Frame)
,
setExtendedLisp(Class)
,
setExtendedProlog(Class,Class)
,
addLisp(String,String)
,
addProlog(String,String)
, Serialized FormInner classes inherited from class javax.swing.JApplet |
javax.swing.JApplet.AccessibleJApplet |
Fields inherited from class javax.swing.JApplet |
accessibleContext,
rootPane,
rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
InterpreterApplet()
Costruttore dell'applet. |
Method Summary | |
void |
addLisp(java.lang.String command,
java.lang.String comment)
Per aggiungere all'help del lisp i commenti dei nuovi comandi. |
void |
addProlog(java.lang.String command,
java.lang.String comment)
Per aggiungere all'help del prolog i commenti dei nuovi comandi. |
java.lang.String |
getAppletInfo()
Restituice le informazioni sugli autori. |
java.lang.String |
getParameter(java.lang.String key,
java.lang.String def)
Returns the value of the named parameter in the HTML tag. |
void |
init()
Called by the browser or applet viewer to inform this applet that it has been loaded into the system. |
void |
setExtendedLisp(java.lang.Class eval)
Per settare un interprete lisp diverso da quello di default. |
void |
setExtendedProlog(java.lang.Class engine,
java.lang.Class eval)
Per settare un interprete prolog diverso da quello di default. |
void |
setFrame(java.awt.Frame f)
Deve essere invocato dal main: serve per i dialoghi. |
void |
start()
Deve essere invocata dal browser o dal main per far partire l'applet. |
Methods inherited from class javax.swing.JApplet |
addImpl,
createRootPane,
getAccessibleContext,
getContentPane,
getGlassPane,
getJMenuBar,
getLayeredPane,
getRootPane,
isRootPaneCheckingEnabled,
paramString,
processKeyEvent,
setContentPane,
setGlassPane,
setJMenuBar,
setLayeredPane,
setLayout,
setRootPane,
setRootPaneCheckingEnabled,
update |
Methods inherited from class java.applet.Applet |
destroy,
getAppletContext,
getAudioClip,
getAudioClip,
getCodeBase,
getDocumentBase,
getImage,
getImage,
getLocale,
getParameter,
getParameterInfo,
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,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getPreferredSize,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paint,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setFont,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getTreeLock,
getWidth,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isFocusTraversable,
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,
processInputMethodEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setCursor,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public InterpreterApplet()
Method Detail |
public java.lang.String getParameter(java.lang.String key, java.lang.String def)
key
- the name of the property.def
- a default value.public void setFrame(java.awt.Frame f)
f
- il frame che lancia l'applet.public void setExtendedLisp(java.lang.Class eval) throws InterpreterException
eval
- la classe estesa da EvalSexpVisitor.EvalSexpVisitor
public void setExtendedProlog(java.lang.Class engine, java.lang.Class eval) throws InterpreterException
engine
- la classe estesa da EngineSexpVisitor.eval
- la classe estesa da EvalVisitor.EngineSexpVisitor
,
EvalVisitor
public void addLisp(java.lang.String command, java.lang.String comment)
command
- il nome del comando.comment
- la spiegazione del comando e del suo utilizzo.public void addProlog(java.lang.String command, java.lang.String comment)
command
- il nome del comando.comment
- la spiegazione del comando e del suo utilizzo.public void init()
public java.lang.String getAppletInfo()
public void start()
init()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |