Search in sources :

Example 26 with FXML

use of javafx.fxml.FXML in project Entitas-Java by Rubentxu.

the class VisualDebbuger method handleGeneratedFolder.

@FXML
public void handleGeneratedFolder(ActionEvent event) {
    final DirectoryChooser directoryChooser = new DirectoryChooser();
    final File selectedDirectory = directoryChooser.showDialog(stage);
    if (selectedDirectory != null) {
        fieldGeneratedFolder.setText(selectedDirectory.getAbsolutePath());
        if (props != null)
            props.setProperty("fieldGeneratedFolder", selectedDirectory.getAbsolutePath());
    }
}
Also used : DirectoryChooser(javafx.stage.DirectoryChooser) FXML(javafx.fxml.FXML)

Example 27 with FXML

use of javafx.fxml.FXML in project SmartCity-Market by TechnionYP5777.

the class ManagePackagesTab method searchCodeButtonPressed.

@FXML
private void searchCodeButtonPressed(MouseEvent __) {
    try {
        LocalDate expirationDate = this.expirationDate != null ? this.expirationDate : datePickerForSmartCode.getValue();
        if (expirationDate == null)
            barcodeEntered(barcodeTextField.getText());
        else
            smartcodeEntered(new SmartCode(Long.parseLong(barcodeTextField.getText()), expirationDate));
        this.expirationDate = expirationDate;
    } catch (SMException e) {
        log.fatal(e);
        log.debug(StackTraceUtil.getStackTrace(e));
        e.showInfoToUser();
        return;
    }
    enableRunTheOperationButton();
}
Also used : SmartCode(BasicCommonClasses.SmartCode) SMException(SMExceptions.SMException) LocalDate(java.time.LocalDate) FXML(javafx.fxml.FXML)

Example 28 with FXML

use of javafx.fxml.FXML in project SmartCity-Market by TechnionYP5777.

the class EmployeeLoginScreen method loginButtonPressed.

@FXML
private void loginButtonPressed(ActionEvent __) {
    if (loginButton.isDisable())
        return;
    IManager employee = InjectionFactory.getInstance(Manager.class);
    CLIENT_TYPE employeeType = null;
    try {
        employeeType = employee.login(userNameTextField.getText(), passwordField.getText(), true);
    } catch (SMException e) {
        log.fatal(e);
        log.debug(StackTraceUtil.getStackTrace(e));
        e.showInfoToUser();
        return;
    }
    InjectionFactory.getInstance(EmployeeScreensParameterService.class).setClientType(employeeType);
    AbstractApplicationScreen.setScene("/EmployeeMenuScreen/EmployeeMenuScreen.fxml");
}
Also used : CLIENT_TYPE(CommonDefs.CLIENT_TYPE) IManager(EmployeeContracts.IManager) EmployeeScreensParameterService(EmployeeCommon.EmployeeScreensParameterService) SMException(SMExceptions.SMException) FXML(javafx.fxml.FXML)

Example 29 with FXML

use of javafx.fxml.FXML in project SmartCity-Market by TechnionYP5777.

the class EmployeeLoginScreen method forgetPassPressed.

@FXML
void forgetPassPressed(MouseEvent __) {
    try {
        IForgotPasswordHandler forgot = InjectionFactory.getInstance(Worker.class);
        ForgetPasswordWizard.start(forgot);
    } catch (Exception e) {
        log.fatal(e);
        log.debug(StackTraceUtil.getStackTrace(e));
    //TODO
    }
}
Also used : IForgotPasswordHandler(UtilsContracts.IForgotPasswordHandler) SMException(SMExceptions.SMException) FXML(javafx.fxml.FXML)

Example 30 with FXML

use of javafx.fxml.FXML in project SmartCity-Market by TechnionYP5777.

the class CustomerRegistration_FinalStepScreen method registerButtonPressed.

@FXML
void registerButtonPressed(ActionEvent __) {
    ICustomer customer = InjectionFactory.getInstance(Customer.class);
    ICustomerProfile iProfile = TempCustomerProfilePassingData.customerProfile;
    CustomerProfile profile = new CustomerProfile(iProfile.getUserName(), TempCustomerProfilePassingData.password, iProfile.getFirstName(), iProfile.getLastName(), iProfile.getPhoneNumber(), iProfile.getEmailAddress(), iProfile.getCity(), iProfile.getStreet(), iProfile.getBirthdate(), iProfile.getAllergens(), new ForgotPasswordData(TempCustomerProfilePassingData.sequrityQuestion, TempCustomerProfilePassingData.sequrityAnswer));
    try {
        customer.registerNewCustomer(profile);
        AbstractApplicationScreen.setScene("/CustomerLoginScreen/CustomerLoginScreen.fxml");
        TempCustomerProfilePassingData.clear();
    } catch (SMException e) {
        log.fatal(e);
        log.debug(StackTraceUtil.getStackTrace(e));
        e.showInfoToUser();
    }
}
Also used : ICustomer(CustomerContracts.ICustomer) ForgotPasswordData(BasicCommonClasses.ForgotPasswordData) ICustomerProfile(BasicCommonClasses.ICustomerProfile) ICustomerProfile(BasicCommonClasses.ICustomerProfile) CustomerProfile(BasicCommonClasses.CustomerProfile) SMException(SMExceptions.SMException) FXML(javafx.fxml.FXML)

Aggregations

FXML (javafx.fxml.FXML)251 Engine (jgnash.engine.Engine)46 InjectFXML (jgnash.uifx.util.InjectFXML)43 File (java.io.File)35 IOException (java.io.IOException)32 Stage (javafx.stage.Stage)30 List (java.util.List)23 ArrayList (java.util.ArrayList)22 Preferences (java.util.prefs.Preferences)18 SimpleObjectProperty (javafx.beans.property.SimpleObjectProperty)18 FXCollections (javafx.collections.FXCollections)16 Button (javafx.scene.control.Button)16 LocalDate (java.time.LocalDate)15 Scene (javafx.scene.Scene)15 BigDecimal (java.math.BigDecimal)14 ObjectProperty (javafx.beans.property.ObjectProperty)14 ObservableList (javafx.collections.ObservableList)13 Node (javafx.scene.Node)13 CurrencyNode (jgnash.engine.CurrencyNode)13 HashMap (java.util.HashMap)12