public class FrequencyMatrixApplet
extends java.applet.Applet
implements java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.ActionListener
java.applet.Applet.AccessibleApplet
Modifier and Type | Field and Description |
---|---|
int |
FULL |
int |
HALF |
int |
NONE |
int |
PARTIAL |
int |
Update |
Constructor and Description |
---|
FrequencyMatrixApplet() |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
checkMatrixParamters(int mShape,
boolean mDiagon)
checks whether the matrix is square
|
void |
clearContent()
clears the fields and expected cells
|
void |
clearFields()
clears the various fields
|
void |
doChiSquare()
coordinates a Chi-square test on the observed values
|
void |
doFTukey()
coordinates a calculation of Freeman-Tukey deviates on the observed values
|
void |
doFTukeyOnPropFitting()
coordinates a calculation of Freeman-Tukey deviates on the observed values after
proportional fitting of the observed values
|
void |
doFTukeyOnTotals()
coordinates a calculation of Freeman-Tukey deviates on the observed values after upper and
lower matrix have been summed
|
void |
doGValue()
coordinates a G-test on the observed values
|
void |
doTauKr()
coordinates a calculation of Kendall Tau value for a correlation between an
actor and a receiver matrix
|
void |
findNextValidCell()
returns the next valid cell in the data matrix
|
java.lang.String |
getAppletInfo()
provided for future browsers to obtain development info
|
javax.swing.JPanel |
getDisplayPanel()
The routine creates the Applets display panel out of a set of hierarchical containers.
|
java.lang.String[][] |
getParameterInfo()
provided for future browsers to list the type of parameters the
applet needs to function properly and which options are available
|
void |
init()
“init” overrides “super.init()” and initializes the applet by: 1.
|
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
void |
listAppletInfo()
lists info for the applet
|
static void |
main(java.lang.String[] args)
Code creates an application that displays and runs the SquadronGunner Class.
|
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseEntered(java.awt.event.MouseEvent e) |
void |
mouseExited(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
paint(java.awt.Graphics g)
basic routine to coordinate a full paint of the applet
|
void |
paintExpected(java.awt.Graphics g)
basic routine to paint the expected cells
|
void |
paintFields(java.awt.Graphics g)
paints the various fields
|
void |
paintGrid(java.awt.Graphics g)
basic routine to paint the frame for the grid for the cells
|
void |
paintObserved(java.awt.Graphics g)
basic routine to paint the observed cells
|
java.awt.Point |
scaleMouseLocation(int x,
int y)
translates the mouse Capture from screen coordinates to rows and columns of the matrix
|
void |
selectCell(int x,
int y)
selects a cell in the data matrix if it can be edited
|
void |
selectFirstValidCell()
returns the first valid cell in the data matrix
|
void |
selectNextValidCell()
finds and selects the first valid cell in the data matrix
|
void |
setCParam(int nCols)
sets the number of columns for the matrix
|
void |
setCRParam(int nRowsCols)
sets the number of columns for the matrix
|
void |
setDParam(int mDiagon)
sets the diagonal for the matrix
|
void |
setParam(int nCols,
int nRows,
int mShape,
boolean mDiagon)
sets the parameters for the matrix
|
void |
setRParam(int nRows)
sets the number of rows for the matrix
|
void |
setSelectedCellValue(double val)
sets the value for the currently selected cell in the data matrix
|
void |
setSParam(int mShape)
sets the shape the matrix
|
void |
setupButtons()
labels the analysis buttons
|
void |
setupECells()
sets up the expected cells, first it sets up the cells in memory,
then it creates the applet's user interface elements to go with it.
|
void |
setupECol(int x,
java.lang.String aStr)
this section sets up a column for expected frequencies, where the content
is inactive, it then adds a summary cell and fills it with a string provided
|
void |
setupERow(int x,
java.lang.String aStr)
this section sets up a row for expected frequencies, where the content
is inactive, it then adds a summary cell and fills it with a string provided
|
void |
setupFields()
this sets up the various fields of the applet
|
void |
setupOCells()
sets up the observed cells, first it sets up the cells in memory,
then it creates the applet's user interface elements to go with it.
|
void |
start()
start the applet
|
void |
stop()
stop the applet
|
destroy, getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus
add, add, add, add, add, addContainerListener, addImpl, 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, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, 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, transferFocusBackward, transferFocusUpCycle
public final int FULL
public final int HALF
public final int PARTIAL
public final int NONE
public int Update
public java.lang.String getAppletInfo()
getAppletInfo
in class java.applet.Applet
public java.lang.String[][] getParameterInfo()
getParameterInfo
in class java.applet.Applet
public void listAppletInfo() throws java.lang.Exception
java.lang.Exception
public void setCParam(int nCols) throws java.lang.Exception
nCols
- the number of columns in the matrixjava.lang.Exception
public void setCRParam(int nRowsCols) throws java.lang.Exception
nRowsCols
- the number of rows and columns in the matrixjava.lang.Exception
public void setRParam(int nRows) throws java.lang.Exception
nRows
- the number of rows in the matrixjava.lang.Exception
public void setSParam(int mShape) throws java.lang.Exception
mShape
- the shape of the matrixjava.lang.Exception
public void setDParam(int mDiagon) throws java.lang.Exception
mDiagon
- the diagonal of the matrixjava.lang.Exception
public void checkMatrixParamters(int mShape, boolean mDiagon)
mShape
- the shape of the matrixmDiagon
- the diagonal of the matrixpublic void setParam(int nCols, int nRows, int mShape, boolean mDiagon) throws java.lang.Exception
nCols
- the number of columns in the matrixnRows
- the number of rows in the matrixmShape
- the shape of the matrixmDiagon
- the diagonal of the matrixjava.lang.Exception
public void init()
init
in class java.applet.Applet
public void setupOCells() throws java.lang.Exception
java.lang.Exception
public void setupECells()
public void setupERow(int x, java.lang.String aStr)
x
- rowaStr
- string for summary cellpublic void setupECol(int x, java.lang.String aStr)
x
- rowaStr
- string for summary cellpublic void setupButtons()
public void setupFields()
public void setSelectedCellValue(double val)
val
- value to setpublic void findNextValidCell()
public void selectFirstValidCell()
public void selectNextValidCell()
public void selectCell(int x, int y)
x
- column to selecty
- row to selectpublic void stop()
stop
in class java.applet.Applet
public void start()
start
in class java.applet.Applet
public void paintFields(java.awt.Graphics g)
g
- the graphics context of the appletpublic void paintObserved(java.awt.Graphics g)
g
- the graphics context of the appletpublic void paintExpected(java.awt.Graphics g)
g
- the graphics context of the appletpublic void paintGrid(java.awt.Graphics g)
g
- the graphics context of the appletpublic void paint(java.awt.Graphics g)
paint
in class java.awt.Container
g
- the graphics context of the appletpublic void clearFields()
public void clearContent()
public java.awt.Point scaleMouseLocation(int x, int y)
x
- screen coordinatey
- screen coordinatepublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void doChiSquare()
public void doGValue()
public void doFTukey()
public void doFTukeyOnTotals()
public void doFTukeyOnPropFitting()
public void doTauKr()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public javax.swing.JPanel getDisplayPanel()
public static void main(java.lang.String[] args)
RH, 2017