public class AddLimiterController
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private javafx.stage.Stage |
dialogStage
Dialog Stage.
|
private javafx.scene.control.TextField |
easting
Limitation point s easting.
|
private java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> |
limiters
Array of coordinates for limitation.
|
private MainApp |
mainApp
Main application.
|
private javafx.scene.control.TextField |
northing
Limitation point s northing.
|
private boolean |
okClicked
Boolean for confirmation button.
|
| Constructor and Description |
|---|
AddLimiterController() |
| Modifier and Type | Method and Description |
|---|---|
private void |
handleCancel()
Closes stage if operation is cancelled.
|
private void |
handleOk()
Called when confirmation button is clicked
Calls
isInputValid() method to check whether the
easting and northing is valid and adds them to array. |
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 giveen 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 and main application limiters to
limiters. |
private javafx.scene.control.TextField easting
private javafx.scene.control.TextField northing
private javafx.stage.Stage dialogStage
private MainApp mainApp
private java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> limiters
private boolean okClicked
private void initialize()
public void setMainApp(MainApp mainApp)
limiters.mainApp - MainApppublic boolean isNumeric(java.lang.String s)
s - String to be checkedpublic void onEnter(javafx.event.ActionEvent ae)
handleOk() method if Enter key is pressed.ae - ActionEvent.public void setDialogStage(javafx.stage.Stage dialogStage)
dialogStage - Given dialog Stagepublic boolean isOkClicked()
private void handleCancel()
private void handleOk()
isInputValid() method to check whether the
easting and northing is valid and adds them to array.
Array will be added to main application´s limitation array.
Sets okClicked to true and closes dialog.private boolean isInputValid()