new BinaryHeapController(controlsDiv, treeDiv)
Parameters:
Name | Type | Description |
---|---|---|
controlsDiv |
HTMLDivElement | |
treeDiv |
HTMLDivElement |
- Source:
Extends
Members
-
<protected> algorithms :jsgl.util.ArrayList
-
Type:
- jsgl.util.ArrayList
- Inherited From:
- Source:
-
<protected> controlsDiv :HTMLDivElement
-
Type:
- HTMLDivElement
- Inherited From:
- Source:
-
<protected> delegatedDisableButtons :Function
-
Type:
- Function
- Inherited From:
- Source:
-
<protected> delegatedEnableButtons :Function
-
Type:
- Function
- Inherited From:
- Source:
-
returnedValue :mixed
-
Type:
- mixed
- Inherited From:
- Source:
-
<protected> treeDiv :HTMLDivElement
-
Type:
- HTMLDivElement
- Inherited From:
- Source:
-
<protected> visualiser :btv.Visualiser
-
Type:
- Inherited From:
- Source:
Methods
-
<protected> addHistoryOption(algorithm)
-
Add an option to historySelect.
Parameters:
Name Type Description algorithm
btv.AbstractAlgorithm - Inherited From:
- Source:
-
buildHeapButton()
-
- Source:
-
continuouslyCheckbox()
-
Add or remove listeners that ensure playing one animation after another.
- Inherited From:
- Source:
-
deleteButton()
-
- Source:
-
<protected> disableButtons()
-
Disable algorithms buttons and change animation buttons. Used as listener of start of animation.
- Inherited From:
- Source:
-
<protected> doAlgorithm(algorithm)
-
Add an algorithm to algorithms array list, add history option and increase current algorithm index that (re)does the algorithm for the first time and plays the algorithm.
Parameters:
Name Type Description algorithm
btv.AbstractAlgorithm - Inherited From:
- Source:
-
<protected> enableButtons()
-
Enable algorithms buttons and change animation buttons. Used as listener of end of animation.
- Inherited From:
- Source:
-
extractMaxButton()
-
- Source:
-
<protected> getAlgorithmsButtons()
-
- Source:
-
getMaxButton()
-
- Source:
-
heapSortButton()
-
- Source:
-
insertButton()
-
- Source:
-
<protected> isPlayingSafety()
-
Skip animation forward if it is playing but it is need to be stopped.
- Inherited From:
- Source:
-
moveSpeedButton()
-
Set new speed of move.
- Inherited From:
- Source:
-
pauseButton()
-
Pauses current visualisation. Change play/pause button.
- Inherited From:
- Source:
-
playButton()
-
Plays current visualisation. Change play/pause button.
- Inherited From:
- Source:
-
playPauseButton()
-
Plays or pause current visualisation depending on state of animation.
- Inherited From:
- Source:
-
randomBHeapButton()
-
- Source:
-
<protected> redoAlgorithm(algorithm)
-
Calls undoAlgorithm(returns tree to the state before given algorithm, redraw tree and select right history option) and execute the algorithm again and play the animation.
Parameters:
Name Type Description algorithm
btv.AbstractAlgorithm - Inherited From:
- Source:
-
redoNextButton()
-
Redo next algorithm and start animation.
- Inherited From:
- Source:
-
redoPreviousButton()
-
Redo previous algorithm and start animation.
- Inherited From:
- Source:
-
redoSelectedButton()
-
Redo algorithm selected from history and start animation.
- Inherited From:
- Source:
-
skipBackwardButton()
-
Skip current visualisation backward.
- Inherited From:
- Source:
-
skipForwardButton()
-
Skip current visualisation forward.
- Inherited From:
- Source:
-
stepDurationButton()
-
Set new duration of a step.
- Inherited From:
- Source:
-
<protected> undoAlgorithm(algorithm)
-
Returns tree to the state before given algorithm, redraw tree and select right history option.
Parameters:
Name Type Description algorithm
btv.AbstractAlgorithm - Inherited From:
- Source: