public class TukTargetController
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private javafx.stage.Stage |
dialogStage
Dialog stage.
|
private javafx.scene.control.TextField |
directionAngle
Direction angle of the target.
|
private javafx.scene.control.TextField |
easting
Easting of the target.
|
private java.util.ArrayList<javafx.scene.control.TextField> |
fields
Array containing all the correction fields.
|
private MainApp |
mainApp
Main Application.
|
private javafx.scene.control.TextField |
northing
Northing of the target.
|
private boolean |
okClicked
Boolean for confirmation button.
|
private javafx.scene.control.TextField |
par
Correction to the right.
|
private javafx.scene.control.TextField |
regionAngle
Direction angle for the region target.
|
private javafx.scene.control.CheckBox |
regionCheck
Checkbox whether the target is region target or not.
|
private javafx.scene.control.TextField |
sur
Correction to the increase.
|
private Target |
Target
Target to be created.
|
private javafx.scene.control.TextField |
vah
Correction to decrease.
|
private javafx.scene.control.TextField |
vas
Correction to the left.
|
| Constructor and Description |
|---|
TukTargetController()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
cordCheck(java.lang.String dir)
Checks coordinate or direction format and returns it in correct format.
|
private void |
handleCancel()
Closes stage if operation is cancelled.
|
private void |
handleCheckAction(javafx.event.ActionEvent e)
Method is called when checkbox is ticked or unticked.
|
private void |
handleOk()
Called when confirmation button is clicked.
|
private void |
initialize()
Initializes the controller class.
|
private boolean |
isInputValid()
Checks if fields are valid.
|
boolean |
isNumeric(java.lang.String s)
Returns true if given string is numeric and false if it´s not.
|
boolean |
isOkClicked()
Returns true if confirmation button is pressed, false if not.
|
void |
onEnter(javafx.event.ActionEvent ae)
Calls
handleOk() method if Enter key is pressed. |
void |
setDialogStage(javafx.stage.Stage dialogStage)
Sets the stage of this dialog.
|
void |
setMainApp(MainApp mainApp)
Set´s class main application .
|
void |
setTarget(Target Target)
Set´s class target.
|
private javafx.scene.control.TextField easting
private javafx.scene.control.TextField northing
private javafx.scene.control.TextField directionAngle
private javafx.scene.control.TextField vas
private javafx.scene.control.TextField par
private javafx.scene.control.TextField vah
private javafx.scene.control.TextField sur
private javafx.scene.control.CheckBox regionCheck
private javafx.scene.control.TextField regionAngle
private java.util.ArrayList<javafx.scene.control.TextField> fields
private MainApp mainApp
private javafx.stage.Stage dialogStage
private Target Target
private boolean okClicked
private void initialize()
public boolean isNumeric(java.lang.String s)
s - String to be checked.public void setMainApp(MainApp mainApp)
mainApp - MainApp .private void handleCheckAction(javafx.event.ActionEvent e)
e - Checkbox ticked.public void setDialogStage(javafx.stage.Stage dialogStage)
dialogStage - Dialog stage.public void setTarget(Target Target)
Target - Target .public boolean isOkClicked()
private void handleCancel()
public void onEnter(javafx.event.ActionEvent ae)
handleOk() method if Enter key is pressed.ae - ActionEvent.private void handleOk()
public java.lang.String cordCheck(java.lang.String dir)
dir - Given coordinate or direction as string.private boolean isInputValid()