public class SquareTargetController
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private javafx.stage.Stage |
dialogStage
Dialog stage.
|
private javafx.scene.control.TextField |
directionAngleField
Direction angle of the target.
|
private javafx.scene.control.TextField |
eastingField
Easting of the target.
|
private javafx.scene.control.TextField |
northingField
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.
|
private javafx.scene.control.TextField |
targetName
Target name.
|
| Constructor and Description |
|---|
SquareTargetController() |
| Modifier and Type | Method and Description |
|---|---|
private void |
handleCancel()
Called when the user clicks cancel.
|
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()
Validates the user input in the text fields.
|
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 |
setTarget(Target Target)
Sets the Target to be edited in the dialog.
|
private javafx.scene.control.TextField eastingField
private javafx.scene.control.TextField northingField
private javafx.scene.control.TextField directionAngleField
private javafx.scene.control.TextField targetName
private javafx.scene.control.CheckBox regionCheck
private javafx.scene.control.TextField regionAngle
private javafx.stage.Stage dialogStage
private Target Target
private boolean okClicked
public boolean isNumeric(java.lang.String s)
s - String to be checked.private void initialize()
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 handleOk()
public void onEnter(javafx.event.ActionEvent ae)
handleOk() method if Enter key is pressed.ae - ActionEvent.private void handleCancel()
private boolean isInputValid()