hist
Class iHistFrame

public class iHistFrame
extends closeableFrame
implements scatterController
Constructor Detail

iHistFrame

public iHistFrame(double[] x)
class constructor

Method Detail

cvH

void cvH(boolean computehH)
when a0 is changed this will update the bin width cross validation graph with the new a0's, but do not need to redefine new h if computehH == true then hHfact is redefined with the new h computehH set to true when h is changed

cvB

void cvB(boolean computehB)
this recomputed cv graph for a0 if h has changed, then computehB == true and hBfact is updated if computehB == false, hBfact will not be updated

pressed

public void pressed(Canvas cv,
                    double x,
                    double y)
when user pressed on iscatter, reset the red dot, recalculate cv values, or reset hBfact accordingly

upDateButtonEnabled

void upDateButtonEnabled()
according to the current bin starting position and bin width, enable or disable + or - buttons to operate on bin width and bin starting position

upDateH

void upDateH()
when select bin width changed, reset the red dot on iScatter1, reset H for rawHist1, recalculate cv for iScatter1 and redraw iScatter1. Recalculate cv for a0 and redefine hBfact on iScatter2

upDateA

void upDateA()
when select bin starting position changed, reset the red dot on iScatter2, reset a0 for rawHist1, recalculate cv for iScatter1 and redraw iScatter1 but do not change hHfact

getMin

int getMin(double x,
           double[] fact)
return the minimum index of double[] fact, whose value is closest to x

buttonDecH_ActionPerformed

void buttonDecH_ActionPerformed(java.awt.event.ActionEvent event)
When - button for bin width clicked, it changes inH value and calls upDateH()

buttonIncH_ActionPerformed

void buttonIncH_ActionPerformed(java.awt.event.ActionEvent event)
When + button for bin width clicked, it changes inH value and calls upDateH()

buttonDecA_ActionPerformed

void buttonDecA_ActionPerformed(java.awt.event.ActionEvent event)
When - button for bin starting position clicked, it changes inA value and calls upDateA()

buttonIncA_ActionPerformed

void buttonIncA_ActionPerformed(java.awt.event.ActionEvent event)
When + button for bin starting position clicked, it changes inA value and calls upDateA()

button1_ActionPerformed

void button1_ActionPerformed(java.awt.event.ActionEvent event)
when OK button for bin width clicked, it calls textH()

textFieldA0_EnterHit

void textFieldA0_EnterHit(java.awt.event.ActionEvent event)
when user enters number for bin starting position, it calls textA()

textFieldH_EnterHit

void textFieldH_EnterHit(java.awt.event.ActionEvent event)
when user enters number for bin width, it calls textH()

textH

void textH()
When user enters a number for bin width, it sets the rawHist to that H, change the red dot on iScatter1, recalculate cv in iScatter 1 and reset hHfact(adjusted for the current H), recalculate cv in iScatter2 and reset hBfact for iScatter2

textA

void textA()
When user enters a number for bin width, it sets the rawHist to that a0, recalculate cv in iScatter2 and reset hBfact; recalculate cv in iScatter1 but not reset hHfact for iScatter1

button2_ActionPerformed

void button2_ActionPerformed(java.awt.event.ActionEvent event)
when OK button for bin starting position clicked, it calls textA()

textFieldH_FocusGained

void textFieldH_FocusGained(java.awt.event.FocusEvent event)
The following FocusGain and FocusLost procedures are for textField selections go with tab key