public class PolarTargetController
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private javafx.stage.Stage |
dialogStage
Dialog stage.
|
private javafx.scene.control.TextField |
distance
Distance from Forward Observer to target.
|
private javafx.scene.control.TextField |
easting
Easting of the target.
|
private javafx.scene.control.TextField |
FOdirectionAngle
Direction angle of the Forward Observer.
|
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 |
regionAngle
Direction angle for the region target.
|
private javafx.scene.control.CheckBox |
regionCheck
Checkbox whether the target is region target or not.
|
private Target |
Target
Target to be created.
|
| Constructor and Description |
|---|
PolarTargetController()
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 easting and northing 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 and fields to targets fields.
|
private javafx.scene.control.TextField easting
private javafx.scene.control.TextField northing
private javafx.scene.control.TextField FOdirectionAngle
private javafx.scene.control.TextField distance
private javafx.scene.control.CheckBox regionCheck
private javafx.scene.control.TextField regionAngle
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.private void handleCheckAction(javafx.event.ActionEvent e)
e - Checkbox ticked.public void setMainApp(MainApp mainApp)
mainApp - MainApp .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()