Class CCApplet

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--java.applet.Applet
                          |
                          +--BaseApplet
                                |
                                +--BaseApplet2
                                      |
                                      +--CCApplet

public class CCApplet
extends BaseApplet2

Applet to plot density of states, Fermi-Dirac distribution, and carrier concentration. The RotatedPlotter class is used to allow the energy axes of all three graph to be parallel.

A slider is provided to modify the Fermi level, and a temperature scale is also provided.

See Also:
Serialized Form

Inner Class Summary
(package private)  class CCApplet.DensityFunction
          Provides a simple representation of the density function.
protected  class CCApplet.EFListener
          Detects changes in the position of the Fermi level slider.
protected  class CCApplet.TemperatureListener
          Detects changes in the position of the temperature slider.
 
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.Checkbox autoScale
           
protected  CCApplet.DensityFunction dFunction
          The density of states function
protected  double dispRange
          The selected display to band gap size ratio
protected  Plotter dPlotter
           
protected  double ef
          The selected Fermi level
protected  CCApplet.EFListener efListener
          Listener for the Fermi level slider
protected  FermiDirac fdFunction
          The Fermi-Dirac function
protected  java.awt.TextField fermiField
           
protected  Plotter fPlotter
           
protected  CarrierConcentration function
          Electron concentration function
protected  double gap
          The selected band gap size
protected  java.awt.TextField gapField
           
protected  int graphW
           
protected  CarrierConcentration holeFunction
          Hole concentration function
protected  Plotter holePlotter
           
protected  int hSpace
           
protected  java.awt.Checkbox logScale
           
protected  double maxEF
          The maximum Fermi level
protected  double maxT
          The maximum temperature
protected  double minEF
          The minimum Fermi level
protected  double minT
          The minimum temperature
protected  java.awt.Checkbox noScale
           
protected  Plotter plotter
           
protected  java.awt.TextField rangeField
           
protected  java.awt.TextField ratioField
           
protected  double t
          The selected temperature
protected  java.awt.TextField tempField
           
protected  CCApplet.TemperatureListener tempListener
          Listener for the temperature slider
protected  java.awt.Checkbox tempScale
           
protected  Plotter tPlotter
           
protected  int vSpace
           
 
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
CCApplet()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent ae)
          Subclasses should at least provide an empty implementation of this method.
 void doPaint(java.awt.Graphics g)
          Called by forcePaint() to actually perform the painting.
 double getDispRange()
          Returns the ratio between the size of the vertical range and the size of the band gap.
 double getEF()
          Returns the selected Fermi level
 double getGap()
          Returns the size of the band gap.
 double getN()
          Returns the integral of the electron distribution.
 double getP()
          Returns the integral of the hole distribution.
 double getT()
          Returns the selected temperature
 void init()
          Performs extra initialisation, including adding a panel to the bottom of the applet.
 void setDispRange(double d)
          Sets the ratio between the size of the vertical range and the size of the band gap.
 void setEF(double d)
          Sets the selected Fermi level
 void setGap(double d)
          Sets the size of the band gap.
 void setRatio(double d)
          Sets the hole/electron effective mass ratio.
 void setT(double d)
          Sets the selected temperature
 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.
 
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, refresh, 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
, addNotify, constructComponentName
 
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

vSpace

protected int vSpace

hSpace

protected int hSpace

graphW

protected int graphW

ef

protected double ef
The selected Fermi level

maxEF

protected double maxEF
The maximum Fermi level

minEF

protected double minEF
The minimum Fermi level

minT

protected double minT
The minimum temperature

maxT

protected double maxT
The maximum temperature

t

protected double t
The selected temperature

gap

protected double gap
The selected band gap size

dispRange

protected double dispRange
The selected display to band gap size ratio

function

protected CarrierConcentration function
Electron concentration function

holeFunction

protected CarrierConcentration holeFunction
Hole concentration function

fdFunction

protected FermiDirac fdFunction
The Fermi-Dirac function

dFunction

protected CCApplet.DensityFunction dFunction
The density of states function

plotter

protected Plotter plotter

holePlotter

protected Plotter holePlotter

tPlotter

protected Plotter tPlotter

fPlotter

protected Plotter fPlotter

dPlotter

protected Plotter dPlotter

efListener

protected CCApplet.EFListener efListener
Listener for the Fermi level slider

tempListener

protected CCApplet.TemperatureListener tempListener
Listener for the temperature slider

fermiField

protected java.awt.TextField fermiField

tempField

protected java.awt.TextField tempField

gapField

protected java.awt.TextField gapField

rangeField

protected java.awt.TextField rangeField

ratioField

protected java.awt.TextField ratioField

autoScale

protected java.awt.Checkbox autoScale

noScale

protected java.awt.Checkbox noScale

tempScale

protected java.awt.Checkbox tempScale

logScale

protected java.awt.Checkbox logScale
Constructor Detail

CCApplet

public CCApplet()
Method Detail

init

public void init()
Description copied from class: BaseApplet2
Performs extra initialisation, including adding a panel to the bottom of the applet.
Overrides:
init in class BaseApplet2

start

public void start()
Description copied from class: BaseApplet
Applets should use this method to perform any final initialisation necessary to "activate" the applet
Overrides:
start in class BaseApplet2

stop

public void stop()
Description copied from class: BaseApplet
When this method is called, the applet should cease any user interaction. In particular, any threads explicitly started should be stopped, any external resources should be closed. This method should negate the action of start().
Overrides:
stop in class BaseApplet2

doPaint

public void doPaint(java.awt.Graphics g)
Description copied from class: BaseApplet
Called by 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.
Overrides:
doPaint in class BaseApplet
Tags copied from class: BaseApplet
Parameters:
g - The Graphics object on which to paint

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent ae)
Description copied from class: BaseApplet
Subclasses should at least provide an empty implementation of this method.
Overrides:
actionPerformed in class BaseApplet

updateInput

public void updateInput()
Reads in (and validates) input from the text fields.
Throws:
java.lang.IllegalArgumentException - if any input fields are invalid

getP

public double getP()
Returns the integral of the hole distribution. The integral is not found numerically - a formula for the integral is used.

getN

public double getN()
Returns the integral of the electron distribution. The integral is not found numerically - a formula for the integral is used.

getEF

public double getEF()
Returns the selected Fermi level

setEF

public void setEF(double d)
Sets the selected Fermi level

getT

public double getT()
Returns the selected temperature

setT

public void setT(double d)
Sets the selected temperature

getGap

public double getGap()
Returns the size of the band gap. The size is measured from the centre of the gap, so the width of the gap is actually twice this value.

setGap

public void setGap(double d)
Sets the size of the band gap. The size is measured from the centre of the gap, so the width of the gap is actually twice this value.

getDispRange

public double getDispRange()
Returns the ratio between the size of the vertical range and the size of the band gap.

If the band gap occupies a quarter of the display, this method will return 4.


setDispRange

public void setDispRange(double d)
Sets the ratio between the size of the vertical range and the size of the band gap.

If the band gap is to occupy a quarter of the display, then the value 4 should be supplied.


setRatio

public void setRatio(double d)
Sets the hole/electron effective mass ratio.