27 de dez. de 2024

Software: Paint House - System - 0.0.0.1v - Measurement and Calculation for Residential Painting

 Project template for NetBeans IDE, Software built in JavaFX with FXML, built for Measurement and Calculation for Residential Painting, in the software is possible to calculate the square meter of a wall, know the number of cans to paint so many M² and calculate how many coats are needed to paint a wall.


Software: Paint House - System - 0.0.0.1v - Measurement and Calculation for Residential Painting



// Author: PHNO - Tecnologo | Pos-Graduado
// Data Release: 05/11/2024
// Versão Código: 0.0.0.2v
// Replit: @PHNO, @PHREPLIT
// E-mail: phreplit@gmail.com

// Software: Paint House - System - 0.0.0.1v - Measurement and Calculation for Residential Painting, com GUI[interface grafica] e compilacao em ambiente desktop.

package paint.house.system;

import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Alert;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
//import javafx.scene.control.Button;
//import javafx.scene.control.Label;

/**
 *
 * @author Paulo Henrique
 */
    
public class FXMLDocController implements Initializable {
    
    @FXML
    public TextField textfield;
    public TextField textfield1;
    public TextField textfield2;
    public TextField textfield3;
    public TextField textfield4;
    public TextField textfield5; 
    public TextField textfield6;
    public TextField textfield7;
    public TextField textfield8; 
    public TextField textfield9;
    public TextField textfield10;
    public TextField textfield11; 
    public TextField textfield12;
    public TextField textfield13;
    
    @FXML
    public void reset1(ActionEvent event) {
        textfield.setText("");
        textfield1.setText("");
        textfield2.setText("");
    };
    
    @FXML
    public void reset2(ActionEvent event) {
        textfield3.setText("");
        textfield4.setText("");
        textfield5.setText("");
    };
    
    @FXML
    public void reset3(ActionEvent event) {
        textfield6.setText("");
        textfield7.setText("");
        textfield8.setText("");
    };
    
    @FXML
    public void reset4(ActionEvent event) {
        textfield9.setText("");
        textfield10.setText("");
    };
    
    @FXML
    public void reset5(ActionEvent event) {
        textfield11.setText("");
        textfield12.setText("");
        textfield13.setText("");
    };
    
    
     @FXML
    public void calc_1(ActionEvent event) {
        int mult = Integer.parseInt(textfield.getText())*Integer.parseInt(textfield1.getText());
    textfield2.setText(String.valueOf(mult));
    };
    
    @FXML
    public void calc_2(ActionEvent event) {
        int var2 = 360;
    double qtdtinta = 3600; 
    int result = Integer.parseInt(textfield3.getText())*(var2);
    double result2 = result / qtdtinta; 
        textfield4.setText(String.valueOf(result));
    textfield5.setText(String.valueOf(result2));           
    };
    
    @FXML
    public void calc_3(ActionEvent event) {
        int var4 = 3;
    int mult3 = Integer.parseInt(textfield9.getText())*(var4);
    textfield10.setText(String.valueOf(mult3));  
    };
    
    @FXML
    public void calc_4(ActionEvent event) {
        int v2 = 3; // 3600ml(3,6) dividido por 3 sera 1200ml equivale a 3 demaos
    int mq1 = 360; // 1 metro quadrado
    int lata1 = 3600; // 1 lata de tinta
    int resultado4 = Integer.parseInt(textfield11.getText())*(v2);
    int calcqtdlitro = Integer.parseInt(textfield11.getText())*(lata1);
    int calcmq = calcqtdlitro / mq1;  // metro quadrado
    textfield12.setText(String.valueOf(calcmq));
    textfield13.setText(String.valueOf(resultado4));
    };
    
    @FXML
    public void sum(ActionEvent event) {
        int soma = Integer.parseInt(textfield6.getText())+Integer.parseInt(textfield7.getText());
    textfield8.setText(String.valueOf(soma));
    }
    
    @FXML
    public void sub(ActionEvent event) {
         int sub = Integer.parseInt(textfield6.getText())-Integer.parseInt(textfield7.getText());
    textfield8.setText(String.valueOf(sub));
    }
    
    @FXML
    public void div(ActionEvent event) {
         int div = Integer.parseInt(textfield6.getText())/Integer.parseInt(textfield7.getText());
    textfield8.setText(String.valueOf(div));
    }
    
    @FXML
    public void mult(ActionEvent event) {
         int mult = Integer.parseInt(textfield6.getText())*Integer.parseInt(textfield7.getText());
    textfield8.setText(String.valueOf(mult));
    }
    
    @FXML
    public void info(ActionEvent event) {
        Alert alert = new Alert(Alert.AlertType.INFORMATION); // mudar para Alert.AlertType.CONFIRMATION, duas opcoes OK e CANCEL
        
        alert.setTitle("Info");
        alert.setContentText("\nThis software was developed with integer variables so it does not accept numbers with commas e.g.: 2.90 meters change to 3 meters.\n"
+"\nTo Calculate Painting with Undiluted Paint:\n"
+"\nWith Base on a 3.6L can of paint and with base on a wall with (H 2.70 meters x W 3.70 meters) we have that H x W = 10 Square Meters, and then we have that 1 can of paint with 3600ml of paint divided by 10 will have 360ml for each 1 Square Meter, this will be the calculation standard 360ml = 1 Square Meter, so we have that Any (N) square meters x 360ml = (N) liters of paint and this result divided by 3600ml will be equal to (N) quantity of cans of paint.\n"
+"\nTo calculate a painting hand (one coat): \n"
+"\nTo paint one coat, we have that a tray of paint has 1000ml as a reference per coat, and a can of paint has 3600ml, so we have that a  can of paint has 1200ml per coat since 1200ml vs 3 = 3600ml (3.6L). One coat is equivalent to a complete painting of a wall. Generally, two to three coats are necessary to paint a wall.");

        alert.showAndWait();
        
        if(alert.getResult() == ButtonType.OK){
           //
        } // if (alert.getResult() == ButtonType.CANCEL) { 
         // System.exit(0); // ao clicar em cancel, sai da msg de alerta e fecha a aplicação desktop
        //}

    }
    
    @FXML
    public void about(ActionEvent event) {
        Alert alert = new Alert(Alert.AlertType.INFORMATION); // mudar para Alert.AlertType.CONFIRMATION, duas opcoes OK e CANCEL
        
        alert.setTitle("About");
        alert.setContentText("\nSoftware: Paint House - Measurement and Calculation for Residential Painting\n"+"\nAuthor: PHNO"+"\nData Release: 08/11/2024"+"\nVersao Codigo: 0.0.0.2v"+"\nReplit: @PHNO, @PHREPLIT"+"\nE-mail: phreplit@gmail.com");
        alert.showAndWait();
        
        if(alert.getResult() == ButtonType.OK){
           //
        } // if (alert.getResult() == ButtonType.CANCEL) { 
         // System.exit(0); // ao clicar em cancel, sai da msg de alerta e fecha a aplicação desktop
        //}

    }
    
    @FXML
    public void cleardata(ActionEvent event) {
        textfield.setText("");
        textfield1.setText("");
        textfield2.setText("");
        textfield3.setText("");
        textfield4.setText("");
        textfield5.setText(""); 
        textfield6.setText("");
        textfield7.setText("");
        textfield8.setText(""); 
        textfield9.setText("");
        textfield10.setText("");
        textfield11.setText(""); 
        textfield12.setText("");
        textfield13.setText("");
    }
    
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        // TODO
    }    
    
}

Nenhum comentário:

Postar um comentário

Seu comentário está sujeito a moderação.