|
||||||
| 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
|
+--BaseApplet
|
+--BaseApplet2
|
+--TransGraph
Applet to produce graphs of transmission and reflection coefficient against energy, for a finite number of evenly spaced potential wells of identical width and depth.
| Inner classes inherited from class BaseApplet2 |
BaseApplet2.FixedButton,
BaseApplet2.FixedCheckbox,
BaseApplet2.GraphClickListener |
| Inner classes inherited from class BaseApplet |
BaseApplet.MozillaWorkaround,
BaseApplet.ResizeListener |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
| Field Summary | |
protected java.awt.event.MouseListener |
abortListener
Listens for clicks on the graph, which indicate that a calculation should be aborted. |
protected static java.awt.Color |
AXES_COL
|
protected java.awt.Checkbox |
both
|
protected java.awt.Panel |
bottomPanel
|
protected static int |
DEFAULT_NWELLS
|
protected static int |
DEFAULT_STEPS
|
protected java.awt.TextField |
depthField
|
protected static java.awt.Color |
ENERGY_COL
|
protected Transmission |
eqn
The object responsible for performing the calculations |
protected MultipleWells |
function
The potential function |
protected java.awt.TextField |
maxEnergyField
|
protected java.awt.TextField |
minEnergyField
|
protected java.awt.TextField |
nWellsField
|
protected java.awt.TextField |
periodField
|
protected Plotter |
plotter
|
protected static java.awt.Color |
POT_COL
|
protected Plotter |
potPlotter
|
protected java.awt.Checkbox |
reflection
|
protected java.lang.Thread |
refreshThread
The thread used to perform the repainting, or null if
no repainting is in progress. |
protected java.awt.Checkbox |
transmission
|
protected static java.awt.Color |
WAVE_FN_COL
|
protected static java.awt.Color |
WELL_BOUNDS_COL
|
protected java.awt.TextField |
widthField
|
| Fields inherited from class BaseApplet2 |
boxes,
buttons,
enablePrompt,
fields,
focus,
panel,
statusLabel,
useSwing,
V_MARGIN |
| Fields inherited from class BaseApplet |
buffer,
GRAPH_MARGIN,
refresh,
resizeListener,
safetyLimit,
useBuffer |
| Fields inherited from class java.applet.Applet |
serialVersionUID,
stub |
| Fields inherited from class java.awt.Panel |
base,
nameCounter,
serialVersionUID |
| Fields inherited from class java.awt.Container |
component,
containerListener,
containerSerializedDataVersion,
dispatcher,
layoutMgr,
maxSize,
ncomponents,
serialVersionUID |
| Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
| Constructor Summary | |
TransGraph()
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent ae)
Subclasses should at least provide an empty implementation of this method. |
protected void |
addWithLabel(java.awt.Component c,
java.lang.String label)
Helper method; puts a component and a label in a Panel, then adds it to the GUI. |
void |
doPaint(java.awt.Graphics g)
Called by forcePaint() to actually
perform the painting. |
void |
init()
Performs extra initialisation, including adding a panel to the bottom of the applet. |
void |
refresh()
Modified refresh() method; performs repainting in a
separate thread, so that events (such as an abort request) can still
be delivered by the AWT event dispatching thread. |
protected void |
refreshImpl()
Calls the superclass implementation of refresh() |
void |
start()
Applets should use this method to perform any final initialisation necessary to "activate" the applet |
void |
stop()
When this method is called, the applet should cease any user interaction. |
void |
updateInput()
Reads in (and validates) input from the text fields. |
protected void |
updateSolution(int w,
int h)
Updates the solution data in the two plotters. |
protected void |
validateInput(double minEnergy,
double maxEnergy,
double depth,
double width,
double period,
int nWells)
Performs the validation for updateInput(). |
| Methods inherited from class BaseApplet2 |
add,
add,
addButton,
addCheckbox,
addField,
addField,
addField,
addListeners,
focusGained,
focusLost,
getDouble,
getGraphHeight,
getInt,
lockControls,
makeButton,
makePanel,
paintDashedLineH,
paintDashedLineV,
register,
removeListeners,
setComponentsEnabled,
setLayout,
setPromptEnabled,
textValueChanged,
toString,
unlockControls |
| Methods inherited from class BaseApplet |
changeFont,
forcePaint,
getAppletInfo,
getParameterInfo,
itemStateChanged,
paint,
update |
| Methods inherited from class java.applet.Applet |
destroy,
getAppletContext,
getAudioClip,
getAudioClip,
getCodeBase,
getDocumentBase,
getImage,
getImage,
getLocale,
getParameter,
isActive,
newAudioClip,
play,
play,
resize,
resize,
setStub,
showStatus |
| Methods inherited from class java.awt.Panel |
|
| Methods inherited from class java.awt.Container |
add,
add,
add,
add,
addContainerListener,
addImpl,
applyOrientation,
countComponents,
deliverEvent,
dispatchEventImpl,
dispatchEventToSelf,
doLayout,
eventEnabled,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getCursorTarget,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getMouseEventTarget,
getPreferredSize,
getWindow,
initIDs,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
nextFocus,
paintComponents,
paramString,
postProcessKeyEvent,
postsOldMouseEvents,
preferredSize,
preProcessKeyEvent,
print,
printComponents,
printOneComponent,
processContainerEvent,
processEvent,
proxyEnableEvents,
proxyRequestFocus,
readObject,
remove,
remove,
removeAll,
removeContainerListener,
removeNotify,
setCursor,
setFocusOwner,
setFont,
transferFocus,
updateCursor,
validate,
validateTree,
writeObject |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputContext,
getInputMethodRequests,
getIntrinsicCursor,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getSize,
getToolkit,
getToolkitImpl,
getTreeLock,
getWidth,
getWindowForObject,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
hide,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
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,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
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,
registerNatives,
wait,
wait,
wait |
| Field Detail |
protected java.awt.TextField minEnergyField
protected java.awt.TextField maxEnergyField
protected java.awt.TextField depthField
protected java.awt.TextField widthField
protected java.awt.TextField periodField
protected java.awt.TextField nWellsField
protected java.awt.Checkbox transmission
protected java.awt.Checkbox reflection
protected java.awt.Checkbox both
protected java.awt.Panel bottomPanel
protected Transmission eqn
protected java.lang.Thread refreshThread
null if
no repainting is in progress.protected java.awt.event.MouseListener abortListener
protected Plotter plotter
protected Plotter potPlotter
protected MultipleWells function
protected static java.awt.Color POT_COL
protected static java.awt.Color ENERGY_COL
protected static java.awt.Color AXES_COL
protected static java.awt.Color WAVE_FN_COL
protected static java.awt.Color WELL_BOUNDS_COL
protected static int DEFAULT_STEPS
protected static int DEFAULT_NWELLS
| Constructor Detail |
public TransGraph()
| Method Detail |
public void init()
protected void addWithLabel(java.awt.Component c,
java.lang.String label)
c - The component to addlabel - The text label associated with the componentpublic void updateInput()
protected void validateInput(double minEnergy,
double maxEnergy,
double depth,
double width,
double period,
int nWells)
updateInput().public void start()
public void stop()
start().public void actionPerformed(java.awt.event.ActionEvent ae)
protected void updateSolution(int w,
int h)
w - The width of the sample array (number of samples taken)h - Unusedpublic void refresh()
refresh() method; performs repainting in a
separate thread, so that events (such as an abort request) can still
be delivered by the AWT event dispatching thread. If the calculations
are likely to take more than a couple of seconds, all the GUI controls
will be disabled (visibly, they will be greyed out, or some similar
effect will be applied), to ensure the user knows that the applet is
busy.
A call to this method while repainting is already in progress will have no effect.
protected void refreshImpl()
refresh()public void doPaint(java.awt.Graphics g)
forcePaint() to actually
perform the painting. Subclasses should implement this method as if
it were the standard paint() method; buffering will
then take place transparently.g - The Graphics object on which to paint
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||