public class ShootingController
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private javafx.scene.control.ComboBox<java.lang.String> |
firstK
First position´s fragment mine shooting data.
|
private javafx.scene.control.ComboBox<java.lang.String> |
firstS
First position´s smoke mine shooting data.
|
private javafx.scene.control.ComboBox<java.lang.String> |
firstV
First position´s lightning mine shooting data.
|
private MainApp |
mainApp
Main Application.
|
private javafx.scene.control.ComboBox<java.lang.String> |
secondK
Second position´s fragment mine shooting data.
|
private javafx.scene.control.ComboBox<java.lang.String> |
secondS
Second position´s smoke mine shooting data.
|
private javafx.scene.control.ComboBox<java.lang.String> |
secondV
Second position´s lightning mine shooting data.
|
private javafx.collections.ObservableList<java.util.ArrayList<java.util.ArrayList<java.util.ArrayList<java.lang.Double>>>> |
shootingData1
First position´s shooting data.
|
private javafx.collections.ObservableList<java.util.ArrayList<java.util.ArrayList<java.util.ArrayList<java.lang.Double>>>> |
shootingData2
Second position´s shooting data.
|
private javafx.collections.ObservableList<java.util.ArrayList<java.util.ArrayList<java.util.ArrayList<java.lang.Double>>>> |
shootingData3
Third position´s shooting data.
|
private javafx.scene.control.ComboBox<java.lang.String> |
thirdK
Third position´s fragment mine shooting data.
|
private javafx.scene.control.ComboBox<java.lang.String> |
thirdS
Third position´s smoke mine shooting data.
|
private javafx.scene.control.ComboBox<java.lang.String> |
thirdV
Third position´s lightning mine shooting data.
|
| Constructor and Description |
|---|
ShootingController()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Double |
applyDeltaIncrement(java.lang.Double timeInput,
int type,
int charge)
Calculates new flight time, based on corrections made to lift/fall.
|
void |
fillBoxes()
If there is an active target, sets data to ComboBoxes.
|
void |
fillData()
Gets main applications positions and applies each position´s shooting
data.
|
private void |
initialize()
Initializes the controller class.
|
static double |
round(double value,
int places)
Returns rounded value of flight time, rounded up.
|
void |
setMainApp(MainApp mainApp)
Is called by the main application to give a reference back to itself.
|
javafx.collections.ObservableList<java.lang.String> |
toString(javafx.collections.ObservableList<java.util.ArrayList<java.lang.Double>> text,
java.lang.Double distance,
java.lang.Double direction,
int type)
Converts all shooting data of on positions one ammo type to
ObservableList string.
|
private MainApp mainApp
private javafx.collections.ObservableList<java.util.ArrayList<java.util.ArrayList<java.util.ArrayList<java.lang.Double>>>> shootingData1
private javafx.collections.ObservableList<java.util.ArrayList<java.util.ArrayList<java.util.ArrayList<java.lang.Double>>>> shootingData2
private javafx.collections.ObservableList<java.util.ArrayList<java.util.ArrayList<java.util.ArrayList<java.lang.Double>>>> shootingData3
private javafx.scene.control.ComboBox<java.lang.String> firstK
private javafx.scene.control.ComboBox<java.lang.String> firstS
private javafx.scene.control.ComboBox<java.lang.String> firstV
private javafx.scene.control.ComboBox<java.lang.String> secondK
private javafx.scene.control.ComboBox<java.lang.String> secondS
private javafx.scene.control.ComboBox<java.lang.String> secondV
private javafx.scene.control.ComboBox<java.lang.String> thirdK
private javafx.scene.control.ComboBox<java.lang.String> thirdS
private javafx.scene.control.ComboBox<java.lang.String> thirdV
public void setMainApp(MainApp mainApp)
fillData()
method to get every positions shooting data. Adds listener to every
positions shooting data. When change is detected, updates all shooting
data.mainApp - MainApp .public void fillData()
public void fillBoxes()
public javafx.collections.ObservableList<java.lang.String> toString(javafx.collections.ObservableList<java.util.ArrayList<java.lang.Double>> text,
java.lang.Double distance,
java.lang.Double direction,
int type)
applyDeltaIncrement(Double, int, int) method.text - Input shooting datadistance - Distancedirection - Directiontype - Type of ammopublic java.lang.Double applyDeltaIncrement(java.lang.Double timeInput,
int type,
int charge)
timeInput - Time of flighttype - Type of ammocharge - Charge numberpublic static double round(double value,
int places)
value - Time of flightplaces - Number of decimal pointsprivate void initialize()