├── lib ├── mail-1.4.5.jar ├── mail-1.4.7.jar ├── activation-1.1.1.jar ├── commons-email-1.5.jar ├── postgresql-42.2.5.jar └── commons-email-1.3.1.jar ├── manifest.mf ├── src ├── ViewsImagens │ ├── Banner.jpg │ ├── MenuBar.jpg │ ├── service.jpg │ ├── BannerPC.jpg │ ├── Logo (2).png │ └── Logo_resized.png ├── ViewsIcons │ ├── agenda-icon.png │ ├── cliente-icon.png │ ├── tesoura-icon.png │ ├── usuario-icon.png │ ├── agenda32-icon.png │ ├── cliente32-icon.png │ ├── tesoura32-icon.png │ ├── usuario32-icon.png │ ├── relatorioTrabalho-icon.png │ ├── relatorioTrabalho24-icon.png │ └── relatorioTrabalho32-icon.png ├── DAO │ ├── Conexao.java │ ├── ServiceDAO.java │ ├── UsuarioDAO.java │ ├── ClienteDAO.java │ └── AgendamentoDAO.java ├── ServiceEmail │ ├── EmailTeste.java │ ├── Correio.java │ └── Email.java ├── Model │ ├── Cliente.java │ ├── Service.java │ ├── Usuario.java │ └── Agendamento.java ├── Controller │ ├── ClienteController.java │ ├── HorarioController.java │ ├── ServicesController.java │ ├── AgendamentoController.java │ └── BarbeiroController.java └── Views │ ├── MenuCliente.java │ ├── TelaService.form │ ├── MenuCliente.form │ ├── TelaService.java │ ├── LoginBarbeiro.java │ ├── LoginBarbeiro.form │ ├── MenuBarbeiro.form │ ├── MenuBarbeiro.java │ ├── ControleHorario.form │ └── AddService.form ├── nbproject ├── private │ ├── private.properties │ └── private.xml ├── genfiles.properties ├── project.xml └── project.properties └── README.md /lib/mail-1.4.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/lib/mail-1.4.5.jar -------------------------------------------------------------------------------- /lib/mail-1.4.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/lib/mail-1.4.7.jar -------------------------------------------------------------------------------- /lib/activation-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/lib/activation-1.1.1.jar -------------------------------------------------------------------------------- /lib/commons-email-1.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/lib/commons-email-1.5.jar -------------------------------------------------------------------------------- /lib/postgresql-42.2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/lib/postgresql-42.2.5.jar -------------------------------------------------------------------------------- /manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /lib/commons-email-1.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/lib/commons-email-1.3.1.jar -------------------------------------------------------------------------------- /src/ViewsImagens/Banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsImagens/Banner.jpg -------------------------------------------------------------------------------- /src/ViewsImagens/MenuBar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsImagens/MenuBar.jpg -------------------------------------------------------------------------------- /src/ViewsImagens/service.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsImagens/service.jpg -------------------------------------------------------------------------------- /src/ViewsIcons/agenda-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/agenda-icon.png -------------------------------------------------------------------------------- /src/ViewsIcons/cliente-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/cliente-icon.png -------------------------------------------------------------------------------- /src/ViewsIcons/tesoura-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/tesoura-icon.png -------------------------------------------------------------------------------- /src/ViewsIcons/usuario-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/usuario-icon.png -------------------------------------------------------------------------------- /src/ViewsImagens/BannerPC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsImagens/BannerPC.jpg -------------------------------------------------------------------------------- /src/ViewsImagens/Logo (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsImagens/Logo (2).png -------------------------------------------------------------------------------- /src/ViewsIcons/agenda32-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/agenda32-icon.png -------------------------------------------------------------------------------- /src/ViewsIcons/cliente32-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/cliente32-icon.png -------------------------------------------------------------------------------- /src/ViewsIcons/tesoura32-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/tesoura32-icon.png -------------------------------------------------------------------------------- /src/ViewsIcons/usuario32-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/usuario32-icon.png -------------------------------------------------------------------------------- /src/ViewsImagens/Logo_resized.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsImagens/Logo_resized.png -------------------------------------------------------------------------------- /src/ViewsIcons/relatorioTrabalho-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/relatorioTrabalho-icon.png -------------------------------------------------------------------------------- /src/ViewsIcons/relatorioTrabalho24-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/relatorioTrabalho24-icon.png -------------------------------------------------------------------------------- /src/ViewsIcons/relatorioTrabalho32-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FGabriel0/BarberShop/HEAD/src/ViewsIcons/relatorioTrabalho32-icon.png -------------------------------------------------------------------------------- /nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | user.properties.file=C:\\Users\\Biel\\AppData\\Roaming\\NetBeans\\18\\build.properties 3 | -------------------------------------------------------------------------------- /nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=48162130 2 | build.xml.script.CRC32=4da77d47 3 | build.xml.stylesheet.CRC32=f85dc8f2@1.107.0.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=48162130 7 | nbproject/build-impl.xml.script.CRC32=7d1ce527 8 | nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.107.0.48 9 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | BarberShop 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/DAO/Conexao.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package DAO; 6 | 7 | import java.sql.Connection; 8 | import java.sql.DriverManager; 9 | import java.sql.SQLException; 10 | /** 11 | * 12 | * @author Biel 13 | */ 14 | public class Conexao { 15 | 16 | public Connection getConnection() throws SQLException{ 17 | Connection conexao = DriverManager.getConnection("jdbc:postgresql://localhost:5432/BarberShop","postgres", "admin"); 18 | return conexao; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/Biel/Documents/NetBeansProjects/BarberShop/src/Model/Agendamento.java 7 | file:/C:/Users/Biel/Documents/NetBeansProjects/BarberShop/src/Views/MenuCliente.java 8 | file:/C:/Users/Biel/Documents/NetBeansProjects/BarberShop/src/Views/CadastroCliente.java 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/ServiceEmail/EmailTeste.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package ServiceEmail; 7 | 8 | import org.apache.commons.mail.DefaultAuthenticator; 9 | import org.apache.commons.mail.EmailException; 10 | import org.apache.commons.mail.SimpleEmail; 11 | 12 | /** 13 | * 14 | * @author Denner Dias 15 | */ 16 | public class EmailTeste { 17 | 18 | /** 19 | * @param args the command line arguments 20 | */ 21 | public static void main(String[] args) { 22 | 23 | 24 | Email email = new Email("Senha e Usuário Sistema Service Desk", "Seggue usuário e senha para acesso ao sistema de auditoria\n"+"Usuario:FelipeSoster\n"+"gabrielcarrosel", "carrosel3g@gmail.com"); 25 | 26 | email.enviar(); 27 | 28 | 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/ServiceEmail/Correio.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package ServiceEmail; 6 | 7 | import Model.Agendamento; 8 | /** 9 | * 10 | * @author Biel 11 | */ 12 | public class Correio { 13 | public void NotificarEmail(Agendamento agendamento){ 14 | 15 | String emailFormat = formartEmail(agendamento); 16 | String destinatario = agendamento.getEmail(); 17 | 18 | Email email = new Email("BarberShop", emailFormat, destinatario); 19 | 20 | } 21 | 22 | private String formartEmail(Agendamento agendamento) { 23 | String nomeCliente = agendamento.getNome(); 24 | String Servico = agendamento.getServico_id(); 25 | String Data = agendamento.getData(); 26 | String Hora = agendamento.getHora(); 27 | String price = agendamento.getPrice_agendamento(); 28 | String Observacao = agendamento.getObservacao(); 29 | 30 | return "Olá " + nomeCliente + "Vai dar um Tapa no visu... Seu agendamento para "+ 31 | Servico + ",Esta marcado para o dia " + Data + "às " + Hora + "o vai sair baratinho de " + 32 | price + ".\n Um Forte Abraço e aguadamos você..." ; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Model/Cliente.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package Model; 6 | 7 | /** 8 | * 9 | * @author Biel 10 | */ 11 | public class Cliente { 12 | 13 | private int id; 14 | private String nome; 15 | private String email; 16 | private String senha; 17 | 18 | public Cliente(int id, String nome, String email, String senha) { 19 | this.id = id; 20 | this.nome = nome; 21 | this.email = email; 22 | this.senha = senha; 23 | } 24 | 25 | public Cliente(String nome, String email, String senha) { 26 | this.nome = nome; 27 | this.email = email; 28 | this.senha = senha; 29 | } 30 | 31 | public Cliente(String email, String senha) { 32 | this.email = email; 33 | this.senha = senha; 34 | } 35 | public Cliente(int id,String nome, String senha) { 36 | this.id = id; 37 | this.nome = nome; 38 | this.senha = senha; 39 | } 40 | 41 | 42 | public int getId() { 43 | return id; 44 | } 45 | 46 | public void setId(int id) { 47 | this.id = id; 48 | } 49 | 50 | public String getNome() { 51 | return nome; 52 | } 53 | 54 | public void setNome(String nome) { 55 | this.nome = nome; 56 | } 57 | 58 | public String getEmail() { 59 | return email; 60 | } 61 | 62 | public void setEmail(String email) { 63 | this.email = email; 64 | } 65 | 66 | public String getSenha() { 67 | return senha; 68 | } 69 | 70 | public void setSenha(String senha) { 71 | this.senha = senha; 72 | } 73 | 74 | 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/Model/Service.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package Model; 6 | 7 | /** 8 | * 9 | * @author Biel 10 | */ 11 | 12 | public class Service { 13 | private int id; 14 | private String imagem; 15 | private String nome; 16 | private String price; 17 | 18 | public Service(int id, String imagem, String nome, String price) { 19 | this.id = id; 20 | this.imagem = imagem; 21 | this.nome = nome; 22 | this.price = price; 23 | } 24 | 25 | public Service(int id) { 26 | this.id = id; 27 | } 28 | 29 | 30 | public Service(String imagem, String nome, String price) { 31 | this.imagem = imagem; 32 | this.nome = nome; 33 | this.price = price; 34 | } 35 | 36 | public Service(int id, String nome, String price) { 37 | this.id = id; 38 | this.nome = nome; 39 | this.price = price; 40 | } 41 | 42 | 43 | public Service(String nome) { 44 | this.nome = nome; 45 | } 46 | 47 | public int getId() { 48 | return id; 49 | } 50 | 51 | public void setId(int id) { 52 | this.id = id; 53 | } 54 | 55 | public String getImagem() { 56 | return imagem; 57 | } 58 | 59 | public void setImagem(String imagem) { 60 | this.imagem = imagem; 61 | } 62 | 63 | public String getNome() { 64 | return nome; 65 | } 66 | 67 | public void setNome(String nome) { 68 | this.nome = nome; 69 | } 70 | 71 | public String getPrice() { 72 | return price; 73 | } 74 | 75 | public void setPrice(String price) { 76 | this.price = price; 77 | } 78 | 79 | @Override 80 | public String toString() { 81 | return "Service{" + "nome=" + nome + '}'; 82 | } 83 | 84 | 85 | 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/Model/Usuario.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package Model; 6 | 7 | /** 8 | * 9 | * @author Biel 10 | */ 11 | public class Usuario { 12 | 13 | private int id; 14 | private String nome; 15 | private String email; 16 | private String cpf; 17 | private String data_Nasc; 18 | private String senha; 19 | 20 | public Usuario(int id, String nome, String email, String cpf, String data_Nasc, String senha) { 21 | this.id = id; 22 | this.nome = nome; 23 | this.email = email; 24 | this.cpf = cpf; 25 | this.data_Nasc = data_Nasc; 26 | this.senha = senha; 27 | } 28 | 29 | public Usuario(String nome, String senha) { 30 | this.nome = nome; 31 | this.senha = senha; 32 | } 33 | 34 | public Usuario(String nome, String email, String cpf, String data_Nasc, String senha) { 35 | this.nome = nome; 36 | this.email = email; 37 | this.cpf = cpf; 38 | this.data_Nasc = data_Nasc; 39 | this.senha = senha; 40 | } 41 | 42 | public Usuario(String nome) { 43 | this.nome = nome; 44 | } 45 | 46 | 47 | 48 | 49 | public int getId() { 50 | return id; 51 | } 52 | 53 | public void setId(int id) { 54 | this.id = id; 55 | } 56 | 57 | public String getNome() { 58 | return nome; 59 | } 60 | 61 | public void setNome(String nome) { 62 | this.nome = nome; 63 | } 64 | 65 | public String getSenha() { 66 | return senha; 67 | } 68 | 69 | public String getEmail() { 70 | return email; 71 | } 72 | 73 | public void setEmail(String email) { 74 | this.email = email; 75 | } 76 | 77 | public String getCpf() { 78 | return cpf; 79 | } 80 | 81 | public void setCpf(String cpf) { 82 | this.cpf = cpf; 83 | } 84 | 85 | public String getData_Nasc() { 86 | return data_Nasc; 87 | } 88 | 89 | public void setData_Nasc(String data_Nasc) { 90 | this.data_Nasc = data_Nasc; 91 | } 92 | 93 | public void setSenha(String senha) { 94 | this.senha = senha; 95 | } 96 | 97 | 98 | 99 | 100 | } 101 | -------------------------------------------------------------------------------- /src/ServiceEmail/Email.java: -------------------------------------------------------------------------------- 1 | package ServiceEmail; 2 | 3 | import org.apache.commons.mail.DefaultAuthenticator; 4 | import org.apache.commons.mail.EmailException; 5 | import org.apache.commons.mail.HtmlEmail; 6 | import org.apache.commons.mail.SimpleEmail; 7 | 8 | /** 9 | * Classe responsável por enviar E-mail. 10 | * @author Biel 11 | */ 12 | public class Email { 13 | static final String REMETENTE_NOME = "sbaber026@gmail.com"; 14 | static final String REMETENTE_SENHA = "barbershopadmin"; 15 | private String assunto ; 16 | private String mensagem; 17 | private String destinatario; 18 | 19 | /** 20 | * 21 | * @param assunto Assunto para envio do E-mail. 22 | * @param mensagem Mensagem qual vai ser enviado ao destinatário. 23 | * @param destinatario E-mail do destinatário. 24 | */ 25 | public Email(String assunto, String mensagem, String destinatario) { 26 | this.assunto = assunto; 27 | this.mensagem = mensagem; 28 | this.destinatario = destinatario; 29 | } 30 | 31 | 32 | 33 | public String getAssunto() { 34 | return assunto; 35 | } 36 | 37 | public void setAssunto(String assunto) { 38 | this.assunto = assunto; 39 | } 40 | 41 | public String getMensagem() { 42 | return mensagem; 43 | } 44 | 45 | public void setMensagem(String mensagem) { 46 | this.mensagem = mensagem; 47 | } 48 | 49 | public String getDestinatario() { 50 | return destinatario; 51 | } 52 | 53 | public void setDestinatario(String destinatario) { 54 | this.destinatario = destinatario; 55 | } 56 | 57 | /** 58 | * Função para enviar o e-mail ao destinatário. 59 | */ 60 | public void enviar (){ 61 | 62 | System.setProperty("mail.smtp.starttls.enable", "true"); 63 | 64 | 65 | HtmlEmail email = new HtmlEmail(); 66 | email.setSSL(true); 67 | email.setHostName("smtp.gmail.com"); 68 | email.setSmtpPort(465); // Use a porta 465 para SSL 69 | email.setAuthenticator(new DefaultAuthenticator(REMETENTE_NOME, REMETENTE_SENHA)); 70 | 71 | 72 | try { 73 | email.setFrom(REMETENTE_NOME); 74 | 75 | email.setDebug(true); 76 | 77 | email.setSubject(this.assunto); 78 | email.setMsg(this.mensagem); 79 | email.addTo(this.destinatario);//por favor trocar antes de testar!!!! 80 | 81 | email.send(); 82 | 83 | } catch (EmailException e) { 84 | e.printStackTrace(); 85 | } 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BarberShop 2 | 3 | Este é um projeto de sistema de gerenciamento para uma barbearia, desenvolvido em Java e utilizando PostgreSQL como banco de dados. O desenvolvimento foi realizado utilizando o IDE NetBeans. 4 | 5 | ## Descrição 6 | 7 | O projeto BarberShop foi criado para gerenciar agendamentos, clientes, serviços e funcionários de uma barbearia. Com este sistema, é possível realizar cadastros, atualizações, exclusões e consultas de dados relacionados à barbearia, além de facilitar o controle de horários e a organização do estabelecimento. 8 | 9 | ## Tecnologias Utilizadas 10 | 11 | - **Java:** Linguagem de programação utilizada para desenvolver a aplicação. 12 | - **PostgreSQL:** Sistema de gerenciamento de banco de dados relacional utilizado para armazenar os dados da aplicação. 13 | - **NetBeans:** Ambiente de desenvolvimento integrado (IDE) utilizado para o desenvolvimento do projeto. 14 | 15 | ## Funcionalidades 16 | 17 | - Cadastro de clientes 18 | - Cadastro de funcionários 19 | - Cadastro de serviços 20 | - Agendamento de horários 21 | - Consulta e atualização de dados 22 | - Relatórios de atendimentos 23 | 24 | ## Requisitos 25 | 26 | - **Java 11 ou superior** 27 | - **PostgreSQL 12 ou superior** 28 | - **NetBeans 12 ou superior** 29 | 30 | ## Instalação 31 | 32 | 1. Clone o repositório para a sua máquina local: 33 | ```bash 34 | git clone https://github.com/seu-usuario/barberShop.git 35 | ``` 36 | 37 | 2. Abra o NetBeans e importe o projeto: 38 | - Vá em `File` > `Open Project` e selecione o diretório onde o projeto foi clonado. 39 | 40 | 3. Configure o banco de dados PostgreSQL: 41 | - Crie um banco de dados chamado `barbershop`: 42 | ```sql 43 | CREATE DATABASE barbershop; 44 | ``` 45 | 46 | - Execute o script SQL de criação das tabelas (localizado em `sql/create_tables.sql`): 47 | ```bash 48 | psql -U seu_usuario -d barbershop -f sql/create_tables.sql 49 | ``` 50 | 51 | 4. Configure as credenciais do banco de dados no arquivo `src/main/resources/application.properties`: 52 | ```properties 53 | spring.datasource.url=jdbc:postgresql://localhost:5432/barbershop 54 | spring.datasource.username=seu_usuario 55 | spring.datasource.password=sua_senha 56 | ``` 57 | 58 | 5. Compile e execute a aplicação pelo NetBeans: 59 | - Clique com o botão direito no projeto e selecione `Clean and Build`. 60 | - Após a compilação, clique com o botão direito no projeto novamente e selecione `Run`. 61 | 62 | ## Uso 63 | 64 | 1. Abra o navegador e acesse `http://localhost:8080` para acessar a interface do sistema. 65 | 2. Utilize os menus para navegar pelas funcionalidades disponíveis, como cadastro de clientes, agendamento de horários, etc. 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/Controller/ClienteController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package Controller; 6 | 7 | import DAO.AgendamentoDAO; 8 | import DAO.ClienteDAO; 9 | import DAO.Conexao; 10 | import Model.Agendamento; 11 | import Model.Cliente; 12 | import Views.Agendar; 13 | import Views.CadastroCliente; 14 | import Views.LoginCliente; 15 | import Views.MenuCliente; 16 | import java.sql.Connection; 17 | import java.sql.SQLException; 18 | import java.text.ParseException; 19 | import java.text.SimpleDateFormat; 20 | import java.util.ArrayList; 21 | import java.util.Date; 22 | import java.util.List; 23 | import java.util.logging.Level; 24 | import java.util.logging.Logger; 25 | import javax.swing.JLabel; 26 | import javax.swing.JOptionPane; 27 | import javax.swing.table.DefaultTableModel; 28 | 29 | /** 30 | * 31 | * @author Biel 32 | */ 33 | public class ClienteController { 34 | 35 | private LoginCliente login; 36 | private CadastroCliente cadastrar; 37 | private Agendar agendar; 38 | private MenuCliente menu; 39 | 40 | 41 | public ClienteController(MenuCliente menu) { 42 | this.menu = menu; 43 | } 44 | 45 | public ClienteController(LoginCliente login) { 46 | this.login = login; 47 | } 48 | 49 | public ClienteController(CadastroCliente cadastrar) { 50 | this.cadastrar = cadastrar; 51 | } 52 | 53 | 54 | 55 | public void Autenticar() throws SQLException { 56 | String email = login.getTextName().getText(); 57 | String senha = login.getTextPassword().getText(); 58 | 59 | Cliente clienteAutenticar = new Cliente(email, senha); 60 | 61 | // Verificar se o cliente existe no banco de dados 62 | Connection conexao = new Conexao().getConnection(); 63 | ClienteDAO clienteDAO = new ClienteDAO(conexao); 64 | 65 | Cliente clienteAutenticado = clienteDAO.autenticarCliente(clienteAutenticar); 66 | 67 | if (clienteAutenticado != null) { 68 | // Autenticação bem-sucedida 69 | MenuCliente menu = new MenuCliente(); 70 | ClienteController controller = new ClienteController(menu); 71 | menu.setVisible(true); 72 | login.setVisible(false); 73 | 74 | // Chame a função para atualizar a tabela de agendamentos, passando o cliente autenticado 75 | } else { 76 | JOptionPane.showMessageDialog(null, "Cliente Não Encontrado no Banco"); 77 | } 78 | } 79 | 80 | public void salvarCliente(){ 81 | 82 | String nome = cadastrar.getTextNome().getText(); 83 | String email = cadastrar.getTextEmail().getText(); 84 | String senha = cadastrar.getTextSenha().getText(); 85 | 86 | Cliente cliente = new Cliente(nome, email, senha); 87 | 88 | 89 | try { 90 | Connection conexao = new Conexao().getConnection(); 91 | ClienteDAO clienteDAO = new ClienteDAO(conexao); 92 | clienteDAO.Salvar(cliente); 93 | 94 | JOptionPane.showMessageDialog(null, "Cliente Salvo com Sucesso"); 95 | cadastrar.dispose(); 96 | LoginCliente loginCliente = new LoginCliente(); 97 | loginCliente.setVisible(true); 98 | 99 | } catch (SQLException ex) { 100 | Logger.getLogger(CadastroCliente.class.getName()).log(Level.SEVERE, null, ex); 101 | } 102 | } 103 | 104 | public void atualizarTextoBoasVindas(String nome){ 105 | JLabel welcomeLabel = menu.getWelcomeCliente(); 106 | welcomeLabel.setText("Seja Bem-Vindo: "+ nome); 107 | 108 | } 109 | 110 | 111 | 112 | 113 | } 114 | -------------------------------------------------------------------------------- /src/Controller/HorarioController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package Controller; 6 | 7 | import DAO.Conexao; 8 | import DAO.ServiceDAO; 9 | import Model.Service; 10 | import Views.ControleHorario; 11 | import java.sql.Connection; 12 | import java.sql.SQLException; 13 | import java.text.SimpleDateFormat; 14 | import java.time.LocalTime; 15 | import java.time.format.DateTimeFormatter; 16 | import java.util.ArrayList; 17 | import java.util.Calendar; 18 | import java.util.Date; 19 | import javax.swing.JComboBox; 20 | 21 | /** 22 | * 23 | * @author Biel 24 | */ 25 | public class HorarioController { 26 | 27 | private ControleHorario controller; 28 | 29 | public HorarioController(ControleHorario controller) { 30 | this.controller = controller; 31 | } 32 | 33 | public void AdicionandoHorasTermino() throws SQLException{ 34 | Connection conexao = new Conexao().getConnection(); 35 | ServiceDAO serviceDAO = new ServiceDAO(conexao); 36 | 37 | ArrayList listar = serviceDAO.Buscar(); 38 | 39 | 40 | ArrayList horas = new ArrayList<>(); 41 | LocalTime currentTime = LocalTime.of(8, 0); 42 | 43 | while(currentTime.isBefore(LocalTime.of(20, 30))){ 44 | horas.add(currentTime.format(DateTimeFormatter.ofPattern("HH:mm"))); 45 | 46 | currentTime = currentTime.plusMinutes(30); 47 | } 48 | JComboBox dataComboBox = controller.getHoradeInicio(); 49 | dataComboBox.removeAllItems(); 50 | for(String hora : horas){ 51 | dataComboBox.addItem(hora); 52 | } 53 | 54 | } 55 | 56 | 57 | public void AdicionandoHoras() throws SQLException{ 58 | Connection conexao = new Conexao().getConnection(); 59 | ServiceDAO serviceDAO = new ServiceDAO(conexao); 60 | 61 | ArrayList listar = serviceDAO.Buscar(); 62 | 63 | 64 | ArrayList horas = new ArrayList<>(); 65 | LocalTime currentTime = LocalTime.of(8, 0); 66 | 67 | while(currentTime.isBefore(LocalTime.of(20, 30))){ 68 | horas.add(currentTime.format(DateTimeFormatter.ofPattern("HH:mm"))); 69 | 70 | currentTime = currentTime.plusMinutes(30); 71 | } 72 | JComboBox dataComboBox = controller.getHoradeInicio(); 73 | dataComboBox.removeAllItems(); 74 | for(String hora : horas){ 75 | dataComboBox.addItem(hora); 76 | } 77 | 78 | } 79 | 80 | public void AdicionandoData(){ 81 | 82 | Calendar calendar = Calendar.getInstance(); 83 | SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); 84 | 85 | 86 | int year = calendar.get(Calendar.YEAR); 87 | int month = calendar.get(Calendar.MONTH); 88 | int day = calendar.get(Calendar.DAY_OF_MONTH); 89 | 90 | //Data Atual 91 | calendar.set(Calendar.YEAR, year); 92 | calendar.set(Calendar.MONTH, month); 93 | calendar.set(Calendar.DAY_OF_MONTH, day); 94 | 95 | 96 | while (year == calendar.get(Calendar.YEAR)) { 97 | Date date = calendar.getTime(); 98 | boolean horaJaAgendada = false; 99 | 100 | if (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) { 101 | controller.getDiaController().addItem(dateFormat.format(date)); 102 | } 103 | calendar.add(Calendar.DAY_OF_MONTH, 1); 104 | 105 | } 106 | 107 | } 108 | 109 | 110 | } 111 | -------------------------------------------------------------------------------- /nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processor.options= 4 | annotation.processing.processors.list= 5 | annotation.processing.run.all.processors=true 6 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 7 | build.classes.dir=${build.dir}/classes 8 | build.classes.excludes=**/*.java,**/*.form 9 | # This directory is removed when the project is cleaned: 10 | build.dir=build 11 | build.generated.dir=${build.dir}/generated 12 | build.generated.sources.dir=${build.dir}/generated-sources 13 | # Only compile against the classpath explicitly listed here: 14 | build.sysclasspath=ignore 15 | build.test.classes.dir=${build.dir}/test/classes 16 | build.test.results.dir=${build.dir}/test/results 17 | # Uncomment to specify the preferred debugger connection transport: 18 | #debug.transport=dt_socket 19 | debug.classpath=\ 20 | ${run.classpath} 21 | debug.modulepath=\ 22 | ${run.modulepath} 23 | debug.test.classpath=\ 24 | ${run.test.classpath} 25 | debug.test.modulepath=\ 26 | ${run.test.modulepath} 27 | # Files in build.classes.dir which should be excluded from distribution jar 28 | dist.archive.excludes= 29 | # This directory is removed when the project is cleaned: 30 | dist.dir=dist 31 | dist.jar=${dist.dir}/BarberShop.jar 32 | dist.javadoc.dir=${dist.dir}/javadoc 33 | dist.jlink.dir=${dist.dir}/jlink 34 | dist.jlink.output=${dist.jlink.dir}/BarberShop 35 | excludes= 36 | file.reference.activation-1.1.1.jar=lib\\activation-1.1.1.jar 37 | file.reference.commons-email-1.3.1.jar=lib\\commons-email-1.3.1.jar 38 | file.reference.commons-email-1.5.jar=lib\\commons-email-1.5.jar 39 | file.reference.mail-1.4.5.jar=lib\\mail-1.4.5.jar 40 | file.reference.mail-1.4.7.jar=lib\\mail-1.4.7.jar 41 | file.reference.postgresql-42.2.5.jar=lib\\postgresql-42.2.5.jar 42 | includes=** 43 | jar.compress=false 44 | javac.classpath=\ 45 | ${libs.absolutelayout.classpath}:\ 46 | ${file.reference.postgresql-42.2.5.jar}:\ 47 | ${file.reference.activation-1.1.1.jar}:\ 48 | ${file.reference.commons-email-1.3.1.jar}:\ 49 | ${file.reference.mail-1.4.5.jar}:\ 50 | ${file.reference.commons-email-1.5.jar}:\ 51 | ${file.reference.mail-1.4.7.jar} 52 | # Space-separated list of extra javac options 53 | javac.compilerargs= 54 | javac.deprecation=false 55 | javac.external.vm=true 56 | javac.modulepath= 57 | javac.processormodulepath= 58 | javac.processorpath=\ 59 | ${javac.classpath} 60 | javac.source=11 61 | javac.target=11 62 | javac.test.classpath=\ 63 | ${javac.classpath}:\ 64 | ${build.classes.dir} 65 | javac.test.modulepath=\ 66 | ${javac.modulepath} 67 | javac.test.processorpath=\ 68 | ${javac.test.classpath} 69 | javadoc.additionalparam= 70 | javadoc.author=false 71 | javadoc.encoding=${source.encoding} 72 | javadoc.html5=false 73 | javadoc.noindex=false 74 | javadoc.nonavbar=false 75 | javadoc.notree=false 76 | javadoc.private=false 77 | javadoc.splitindex=true 78 | javadoc.use=true 79 | javadoc.version=false 80 | javadoc.windowtitle= 81 | # The jlink additional root modules to resolve 82 | jlink.additionalmodules= 83 | # The jlink additional command line parameters 84 | jlink.additionalparam= 85 | jlink.launcher=true 86 | jlink.launcher.name=BarberShop 87 | main.class=Views.LoginCliente 88 | manifest.file=manifest.mf 89 | meta.inf.dir=${src.dir}/META-INF 90 | mkdist.disabled=false 91 | platform.active=default_platform 92 | run.classpath=\ 93 | ${javac.classpath}:\ 94 | ${build.classes.dir} 95 | # Space-separated list of JVM arguments used when running the project. 96 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 97 | # To set system properties for unit tests define test-sys-prop.name=value: 98 | run.jvmargs= 99 | run.modulepath=\ 100 | ${javac.modulepath} 101 | run.test.classpath=\ 102 | ${javac.test.classpath}:\ 103 | ${build.test.classes.dir} 104 | run.test.modulepath=\ 105 | ${javac.test.modulepath} 106 | source.encoding=UTF-8 107 | src.dir=src 108 | test.src.dir=test 109 | -------------------------------------------------------------------------------- /src/DAO/ServiceDAO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package DAO; 6 | import Model.Service; 7 | import java.sql.Connection; 8 | import java.sql.PreparedStatement; 9 | import java.sql.ResultSet; 10 | import java.sql.SQLException; 11 | import java.util.ArrayList; 12 | /** 13 | * 14 | * @author Biel 15 | */ 16 | public class ServiceDAO { 17 | 18 | private final Connection connection; 19 | 20 | public ServiceDAO(Connection connection) { 21 | this.connection = connection; 22 | } 23 | 24 | public void Salvar(Service services) throws SQLException{ 25 | 26 | String sql = "insert into services(imagem,nome,price) values(? , ?, ?)"; 27 | 28 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 29 | prepareStatement.setString(1, services.getImagem()); 30 | prepareStatement.setString(2, services.getNome()); 31 | prepareStatement.setString(3, services.getPrice()); 32 | 33 | prepareStatement.execute(); 34 | connection.close(); 35 | 36 | } 37 | 38 | public void Atualizar(Service services) throws SQLException{ 39 | String sql = "update services set imagem = ? ,nome = ?, price = ? where id = ? "; 40 | 41 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 42 | prepareStatement.setString(1, services.getImagem()); 43 | prepareStatement.setString(2, services.getNome()); 44 | prepareStatement.setString(3, services.getPrice()); 45 | prepareStatement.setInt(4, services.getId()); 46 | prepareStatement.execute(); 47 | 48 | connection.close(); 49 | } 50 | 51 | public void SalvarouAtualiza(Service services) throws SQLException{ 52 | if(services.getId() > 0){ 53 | Atualizar(services); 54 | } 55 | else{ 56 | Salvar(services); 57 | } 58 | } 59 | 60 | public void Deleta(Service services) throws SQLException{ 61 | String sql = "DELETE from services where id = ? "; 62 | 63 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 64 | prepareStatement.setInt(1, services.getId()); 65 | prepareStatement.executeUpdate(); 66 | 67 | connection.close(); 68 | } 69 | 70 | public ArrayList Buscar() throws SQLException{ 71 | String sql = "select * from services"; 72 | 73 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 74 | prepareStatement.execute(); 75 | 76 | return pesquisa(prepareStatement); 77 | } 78 | 79 | private ArrayList pesquisa(PreparedStatement prepareStatement) throws SQLException { 80 | ArrayList services = new ArrayList(); 81 | 82 | prepareStatement.execute(); 83 | ResultSet resultSet = prepareStatement.getResultSet(); 84 | 85 | while(resultSet.next()){ 86 | int id = resultSet.getInt("id"); 87 | 88 | String imagem = resultSet.getString("imagem"); 89 | String nome = resultSet.getString("nome"); 90 | String price = resultSet.getString("price"); 91 | 92 | Service serviceEncontrado = new Service(id, imagem, nome, price); 93 | services.add(serviceEncontrado); 94 | 95 | } 96 | return services; 97 | } 98 | 99 | public Service BuscarPorId(int id) throws SQLException { 100 | String sql = "SELECT * FROM services WHERE id = ?"; 101 | 102 | PreparedStatement preparedStatement = connection.prepareStatement(sql); 103 | preparedStatement.setInt(1, id); 104 | 105 | ArrayList services = pesquisa(preparedStatement); 106 | 107 | if (!services.isEmpty()) { 108 | return services.get(0); 109 | } else { 110 | return null; // ou lançar uma exceção se preferir 111 | } 112 | } 113 | 114 | } 115 | -------------------------------------------------------------------------------- /src/Model/Agendamento.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package Model; 6 | 7 | /** 8 | * 9 | * @author Biel 10 | */ 11 | public class Agendamento { 12 | 13 | private int id; 14 | private String nome; 15 | private String email; 16 | private String telefone; 17 | private String servico_id; 18 | private String price_agendamento; 19 | private String data; 20 | private String hora; 21 | private String observacao; 22 | 23 | public Agendamento(int id, String nome, String email, String telefone, String servico_id, String price_agendamento, String data, String hora, String observacao, int Cliente_id) { 24 | this.id = id; 25 | this.nome = nome; 26 | this.email = email; 27 | this.telefone = telefone; 28 | this.servico_id = servico_id; 29 | this.price_agendamento = price_agendamento; 30 | this.data = data; 31 | this.hora = hora; 32 | this.observacao = observacao; 33 | } 34 | 35 | public Agendamento(int id, String nome, String email, String telefone, String servico_id, String price_agendamento, String data, String hora, String observacao) { 36 | this.id = id; 37 | this.nome = nome; 38 | this.email = email; 39 | this.telefone = telefone; 40 | this.servico_id = servico_id; 41 | this.price_agendamento = price_agendamento; 42 | this.data = data; 43 | this.hora = hora; 44 | this.observacao = observacao; 45 | } 46 | 47 | public Agendamento(int id, String nome, String telefone, String servico_id, String price_agendamento, String data, String hora, String observacao, int Cliente_id) { 48 | this.id = id; 49 | this.nome = nome; 50 | this.telefone = telefone; 51 | this.servico_id = servico_id; 52 | this.price_agendamento = price_agendamento; 53 | this.data = data; 54 | this.hora = hora; 55 | this.observacao = observacao; 56 | } 57 | 58 | 59 | 60 | public Agendamento(int id) { 61 | this.id = id; 62 | } 63 | 64 | public Agendamento(String email) { 65 | this.email = email; 66 | } 67 | 68 | 69 | 70 | public Agendamento(String nome, String email, String telefone, String servico_id, String price_agendamento, String data, String hora, String observacao) { 71 | this.nome = nome; 72 | this.email = email; 73 | this.telefone = telefone; 74 | this.servico_id = servico_id; 75 | this.price_agendamento = price_agendamento; 76 | this.data = data; 77 | this.hora = hora; 78 | this.observacao = observacao; 79 | } 80 | 81 | public String getTelefone() { 82 | return telefone; 83 | } 84 | 85 | public void setTelefone(String telefone) { 86 | this.telefone = telefone; 87 | } 88 | 89 | 90 | public int getId() { 91 | return id; 92 | } 93 | 94 | public void setId(int id) { 95 | this.id = id; 96 | } 97 | 98 | public String getNome() { 99 | return nome; 100 | } 101 | 102 | public void setNome(String nome) { 103 | this.nome = nome; 104 | } 105 | 106 | public String getServico_id() { 107 | return servico_id; 108 | } 109 | 110 | public void setServico_id(String servico_id) { 111 | this.servico_id = servico_id; 112 | } 113 | 114 | public String getPrice_agendamento() { 115 | return price_agendamento; 116 | } 117 | 118 | public void setPrice_agendamento(String price_agendamento) { 119 | this.price_agendamento = price_agendamento; 120 | } 121 | 122 | public String getData() { 123 | return data; 124 | } 125 | 126 | public void setData(String data) { 127 | this.data = data; 128 | } 129 | 130 | public String getHora() { 131 | return hora; 132 | } 133 | 134 | public void setHora(String hora) { 135 | this.hora = hora; 136 | } 137 | public String getObservacao() { 138 | return observacao; 139 | } 140 | 141 | public void setObservacao(String observacao) { 142 | this.observacao = observacao; 143 | } 144 | 145 | public String getEmail() { 146 | return email; 147 | } 148 | 149 | public void setEmail(String email) { 150 | this.email = email; 151 | } 152 | 153 | 154 | 155 | 156 | 157 | } 158 | -------------------------------------------------------------------------------- /src/DAO/UsuarioDAO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package DAO; 6 | 7 | import Model.Usuario; 8 | import java.sql.Connection; 9 | import java.sql.PreparedStatement; 10 | import java.sql.ResultSet; 11 | import java.sql.SQLException; 12 | import java.util.ArrayList; 13 | 14 | /** 15 | * 16 | * @author Biel 17 | */ 18 | public class UsuarioDAO { 19 | private final Connection connection; 20 | 21 | public UsuarioDAO(Connection connection) { 22 | this.connection = connection; 23 | } 24 | 25 | public void Salvar(Usuario usuarios) throws SQLException{ 26 | 27 | String sql = "insert into usuario(nome,senha,email,cpf,datanasc) values(? , ?, ?, ? , ?)"; 28 | 29 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 30 | prepareStatement.setString(1, usuarios.getNome()); 31 | prepareStatement.setString(3, usuarios.getEmail()); 32 | prepareStatement.setString(4, usuarios.getCpf()); 33 | prepareStatement.setString(5, usuarios.getData_Nasc()); 34 | prepareStatement.setString(2, usuarios.getSenha()); 35 | prepareStatement.execute(); 36 | connection.close(); 37 | 38 | 39 | } 40 | 41 | public boolean autenticarUsuario(Usuario usuarioAutenticar) throws SQLException { 42 | String sql = "select * from usuario where nome = ? and senha = ?"; 43 | 44 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 45 | prepareStatement.setString(1, usuarioAutenticar.getNome()); 46 | prepareStatement.setString(2, usuarioAutenticar.getSenha()); 47 | prepareStatement.execute(); 48 | connection.close(); 49 | 50 | ResultSet resultSet = prepareStatement.getResultSet(); 51 | 52 | return resultSet.next(); 53 | } 54 | 55 | 56 | public void Atualizar(Usuario usuarios) throws SQLException{ 57 | String sql = "update usuario set nome = ?, senha = ? where id = ? "; 58 | 59 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 60 | prepareStatement.setString(1, usuarios.getNome()); 61 | prepareStatement.setString(2, usuarios.getSenha()); 62 | prepareStatement.setInt(3, usuarios.getId()); 63 | prepareStatement.execute(); 64 | 65 | connection.close(); 66 | } 67 | 68 | public void SalvarouAtualiza(Usuario usuarios) throws SQLException{ 69 | if(usuarios.getId() > 0){ 70 | Atualizar(usuarios); 71 | } 72 | else{ 73 | Salvar(usuarios); 74 | } 75 | } 76 | 77 | public void Deleta(Usuario usuarios) throws SQLException{ 78 | String sql = "delete from usuario where id = ? "; 79 | 80 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 81 | prepareStatement.setInt(1, usuarios.getId()); 82 | prepareStatement.execute(); 83 | 84 | connection.close(); 85 | } 86 | 87 | public ArrayList Buscar() throws SQLException{ 88 | String sql = "select * from usuario"; 89 | 90 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 91 | prepareStatement.execute(); 92 | 93 | return pesquisa(prepareStatement); 94 | } 95 | 96 | private ArrayList pesquisa(PreparedStatement prepareStatement) throws SQLException { 97 | ArrayList usuarios = new ArrayList(); 98 | 99 | prepareStatement.execute(); 100 | ResultSet resultSet = prepareStatement.getResultSet(); 101 | 102 | while(resultSet.next()){ 103 | int id = resultSet.getInt("id"); 104 | String nome = resultSet.getString("nome"); 105 | String email = resultSet.getString("email"); 106 | String cpf = resultSet.getString("cpf"); 107 | String data_nasc = resultSet.getString("DataNasc"); 108 | String Senha = resultSet.getString("senha"); 109 | 110 | 111 | Usuario usuarioEncontrado = new Usuario(id, nome, email, cpf, data_nasc, Senha); 112 | usuarios.add(usuarioEncontrado); 113 | 114 | } 115 | return usuarios; 116 | } 117 | 118 | public Usuario BuscarPorId(Usuario usuarios) throws SQLException{ 119 | String sql = "select from usuario where id = ? "; 120 | 121 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 122 | prepareStatement.setInt(1, usuarios.getId()); 123 | 124 | return pesquisa(prepareStatement).get(0); 125 | } 126 | 127 | 128 | } 129 | -------------------------------------------------------------------------------- /src/Controller/ServicesController.java: -------------------------------------------------------------------------------- 1 | package Controller; 2 | 3 | import DAO.Conexao; 4 | import DAO.ServiceDAO; 5 | import Model.Service; 6 | import Views.AddService; 7 | import Views.AlterarService; 8 | import Views.CadastroCliente; 9 | import Views.TelaService; 10 | import java.sql.Connection; 11 | import java.sql.SQLException; 12 | import java.util.logging.Level; 13 | import java.util.logging.Logger; 14 | import javax.swing.JOptionPane; 15 | 16 | public class ServicesController { 17 | private AddService views; 18 | private Service currentService; 19 | private AlterarService edit; 20 | private TelaService services; 21 | 22 | public ServicesController(TelaService services) { 23 | this.services = services; 24 | } 25 | 26 | public ServicesController(AddService views) { 27 | this.views = views; 28 | } 29 | 30 | public ServicesController(AlterarService edit) { 31 | this.edit = edit; 32 | } 33 | 34 | public void salvarServico(){ 35 | 36 | String nome = views.getVarNameService().getText(); 37 | String price = views.getVarPriceService().getText(); 38 | String imagem = views.getTfCaminho().getText(); 39 | 40 | Service service = new Service(imagem, nome, price); 41 | 42 | try { 43 | Connection conexao = new Conexao().getConnection(); 44 | ServiceDAO serviceDAO = new ServiceDAO(conexao); 45 | serviceDAO.Salvar(service); 46 | 47 | JOptionPane.showMessageDialog(null, "Service Salvo com Sucesso"); 48 | 49 | views.dispose(); 50 | TelaService tela = new TelaService(); 51 | tela.setVisible(true); 52 | 53 | 54 | } catch (SQLException ex) { 55 | Logger.getLogger(CadastroCliente.class.getName()).log(Level.SEVERE, null, ex); 56 | } 57 | 58 | } 59 | 60 | public void AtualizarService(){ 61 | String nome = edit.getVarEditNameService().getText(); 62 | String price = edit.getVarEditPriceService().getText(); 63 | String idStr = edit.getVarCodigo().getText(); 64 | String imagem = edit.getTfEditCaminho().getText(); 65 | 66 | Service service = new Service(imagem, nome, price); 67 | 68 | try { 69 | Connection conexao = new Conexao().getConnection(); 70 | ServiceDAO serviceDAO = new ServiceDAO(conexao); 71 | 72 | int id = Integer.parseInt(idStr); 73 | 74 | Service existingService = serviceDAO.BuscarPorId(id); 75 | 76 | if (existingService != null) { 77 | // Se o serviço com o ID existir, atualize seus valores 78 | existingService.setNome(nome); 79 | existingService.setPrice(price); 80 | existingService.setImagem(imagem); 81 | 82 | serviceDAO.Atualizar(existingService); 83 | JOptionPane.showMessageDialog(null, "Service Atualizado com Sucesso"); 84 | 85 | views.dispose(); 86 | TelaService tela = new TelaService(); 87 | tela.setVisible(true); 88 | } else { 89 | // Se o serviço com o ID não existe, exiba uma mensagem de erro 90 | JOptionPane.showMessageDialog(null, "ID não encontrado. Não é possível atualizar o serviço."); 91 | } 92 | 93 | conexao.close(); 94 | } catch (Exception e) { 95 | Logger.getLogger(CadastroCliente.class.getName()).log(Level.SEVERE, null, e); 96 | 97 | } 98 | } 99 | 100 | public void Excluir() { 101 | String idStr = JOptionPane.showInputDialog(null, "Digite o Código a ser excluído:"); 102 | Service service = new Service(0); 103 | if (idStr != null && !idStr.isEmpty()) { 104 | try { 105 | int id = Integer.parseInt(idStr); // Converter a string para int 106 | Connection conexao = new Conexao().getConnection(); 107 | ServiceDAO serviceDAO = new ServiceDAO(conexao); 108 | 109 | // Verificar se o serviço com o ID fornecido existe no banco de dados 110 | Service existingService = serviceDAO.BuscarPorId(id); 111 | 112 | if (existingService != null) { 113 | // Se o serviço com o ID existir, exclua-o 114 | serviceDAO.Deleta(existingService); 115 | JOptionPane.showMessageDialog(null, "Service excluído com sucesso."); 116 | } else { 117 | // Se o serviço com o ID não existe, exiba uma mensagem de erro 118 | JOptionPane.showMessageDialog(null, "Código não encontrado. Não é possível excluir o serviço."); 119 | } 120 | 121 | conexao.close(); 122 | } catch (NumberFormatException e) { 123 | JOptionPane.showMessageDialog(null, "Código inválido. Digite um número válido."); 124 | } catch (Exception e) { 125 | Logger.getLogger(CadastroCliente.class.getName()).log(Level.SEVERE, null, e); 126 | } 127 | } else { 128 | JOptionPane.showMessageDialog(null, "Nenhum ID fornecido. A exclusão foi cancelada."); 129 | } 130 | } 131 | 132 | 133 | 134 | 135 | } 136 | 137 | -------------------------------------------------------------------------------- /src/DAO/ClienteDAO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package DAO; 6 | import Model.Agendamento; 7 | import java.sql.Connection; 8 | import Model.Cliente; 9 | import java.sql.PreparedStatement; 10 | import java.sql.ResultSet; 11 | import java.sql.SQLException; 12 | import java.util.ArrayList; 13 | 14 | /** 15 | * 16 | * @author Biel 17 | */ 18 | public class ClienteDAO { 19 | 20 | private final Connection connection; 21 | 22 | public ClienteDAO(Connection connection) { 23 | this.connection = connection; 24 | } 25 | 26 | public void Salvar(Cliente clientes) throws SQLException{ 27 | 28 | String sql = "insert into clientes(nome,email,senha) values(? , ?, ?)"; 29 | 30 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 31 | prepareStatement.setString(1, clientes.getNome()); 32 | prepareStatement.setString(2, clientes.getEmail()); 33 | prepareStatement.setString(3, clientes.getSenha()); 34 | prepareStatement.execute(); 35 | connection.close(); 36 | 37 | 38 | } 39 | 40 | public Cliente autenticarCliente(Cliente cliente) throws SQLException { 41 | String sql = "SELECT * FROM clientes WHERE email = ? AND senha = ?"; 42 | try (PreparedStatement preparedStatement = connection.prepareStatement(sql)) { 43 | preparedStatement.setString(1, cliente.getEmail()); 44 | preparedStatement.setString(2, cliente.getSenha()); 45 | try (ResultSet resultSet = preparedStatement.executeQuery()) { 46 | if (resultSet.next()) { 47 | int id = resultSet.getInt("id"); 48 | String nome = resultSet.getString("nome"); 49 | // Outros campos, se necessário 50 | 51 | return new Cliente(id, nome, cliente.getEmail(), cliente.getSenha()); 52 | } 53 | } 54 | } 55 | return null; 56 | } 57 | 58 | 59 | public void Atualizar(Cliente clientes) throws SQLException{ 60 | String sql = "update clientes set nome = ?, senha = ? where id = ? "; 61 | 62 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 63 | prepareStatement.setString(1, clientes.getNome()); 64 | prepareStatement.setString(2, clientes.getSenha()); 65 | prepareStatement.setInt(3, clientes.getId()); 66 | prepareStatement.execute(); 67 | 68 | connection.close(); 69 | } 70 | 71 | public void SalvarouAtualiza(Cliente clientes) throws SQLException{ 72 | if(clientes.getId() > 0){ 73 | Atualizar(clientes); 74 | } 75 | else{ 76 | Salvar(clientes); 77 | } 78 | } 79 | 80 | public void Deleta(Cliente clientes) throws SQLException{ 81 | String sql = "delete from clientes where id = ? "; 82 | 83 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 84 | prepareStatement.setInt(1, clientes.getId()); 85 | prepareStatement.execute(); 86 | 87 | connection.close(); 88 | } 89 | 90 | public ArrayList Buscar() throws SQLException{ 91 | String sql = "select * from clientes"; 92 | 93 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 94 | prepareStatement.execute(); 95 | 96 | return pesquisa(prepareStatement); 97 | } 98 | 99 | private ArrayList pesquisa(PreparedStatement prepareStatement) throws SQLException { 100 | ArrayList clientes = new ArrayList(); 101 | 102 | prepareStatement.execute(); 103 | ResultSet resultSet = prepareStatement.getResultSet(); 104 | 105 | while(resultSet.next()){ 106 | int id = resultSet.getInt("id"); 107 | String nome = resultSet.getString("nome"); 108 | String Senha = resultSet.getString("senha"); 109 | 110 | Cliente clienteEncontrado = new Cliente(id,nome, Senha); 111 | clientes.add(clienteEncontrado); 112 | 113 | } 114 | return clientes; 115 | } 116 | 117 | public Cliente BuscarPorId(Cliente cliente) throws SQLException{ 118 | String sql = "select from clientes where id = ? "; 119 | 120 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 121 | prepareStatement.setInt(1, cliente.getId()); 122 | 123 | return pesquisa(prepareStatement).get(0); 124 | } 125 | 126 | public String getNomeClienteByEmail(String email) throws SQLException { 127 | String nomeCliente = null; 128 | 129 | String query = "SELECT nome FROM clientes WHERE email = ?"; 130 | 131 | try (PreparedStatement preparedStatement = connection.prepareStatement(query)) { 132 | preparedStatement.setString(1, email); 133 | try (ResultSet resultSet = preparedStatement.executeQuery()) { 134 | if (resultSet.next()) { 135 | nomeCliente = resultSet.getString("nome"); 136 | } 137 | } 138 | } 139 | 140 | return nomeCliente; 141 | } 142 | 143 | 144 | } 145 | -------------------------------------------------------------------------------- /src/DAO/AgendamentoDAO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package DAO; 6 | 7 | import Model.Agendamento; 8 | import Model.Cliente; 9 | import java.sql.PreparedStatement; 10 | import java.sql.ResultSet; 11 | import java.sql.SQLException; 12 | import java.util.ArrayList; 13 | import java.sql.Connection; 14 | import java.util.List; 15 | 16 | /** 17 | * 18 | * @author Biel 19 | */ 20 | public class AgendamentoDAO { 21 | 22 | private final Connection connection; 23 | 24 | public AgendamentoDAO(Connection connection) { 25 | this.connection = connection; 26 | } 27 | 28 | 29 | 30 | public void Salvar(Agendamento agendamentos) throws SQLException{ 31 | 32 | String sql = "insert into agendamentos(nome,telefone,email,service_id,price_service,data,hora,observacao) values(? , ?, ?, ?, ?, ?, ?, ?)"; 33 | 34 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 35 | prepareStatement.setString(1, agendamentos.getNome()); 36 | prepareStatement.setString(2, agendamentos.getTelefone()); 37 | prepareStatement.setString(3, agendamentos.getEmail()); 38 | prepareStatement.setString(4, agendamentos.getServico_id()); 39 | prepareStatement.setString(5, agendamentos.getPrice_agendamento()); 40 | prepareStatement.setString(6, agendamentos.getData()); 41 | prepareStatement.setString(7, agendamentos.getHora()); 42 | prepareStatement.setString(8, agendamentos.getObservacao()); 43 | prepareStatement.execute(); 44 | connection.close(); 45 | 46 | 47 | } 48 | 49 | 50 | public void Atualizar(Agendamento agendamentos) throws SQLException{ 51 | String sql = "update agendamentos set nome = ?, telefone = ?,email = ?,service_id = ?, price_service = ?,data= ?,hora = ?,observacao = ? where id = ? "; 52 | 53 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 54 | prepareStatement.setString(1, agendamentos.getNome()); 55 | prepareStatement.setString(2, agendamentos.getTelefone()); 56 | prepareStatement.setString(3, agendamentos.getEmail()); 57 | prepareStatement.setString(4, agendamentos.getServico_id()); 58 | prepareStatement.setString(5, agendamentos.getPrice_agendamento()); 59 | prepareStatement.setString(6, agendamentos.getData()); 60 | prepareStatement.setString(7, agendamentos.getHora()); 61 | prepareStatement.setString(8, agendamentos.getObservacao()); 62 | prepareStatement.setInt(9, agendamentos.getId()); 63 | prepareStatement.execute(); 64 | 65 | connection.close(); 66 | } 67 | 68 | /* public void SalvarouAtualiza(Agendamento agendamentos) throws SQLException{; 69 | if(agendamentos.getId() > 0){ 70 | Atualizar(agendamentos); 71 | } 72 | else{ 73 | Salvar(agendamentos); 74 | } 75 | }*/ 76 | 77 | public void Deleta(Agendamento agendamentos) throws SQLException{ 78 | String sql = "DELETE from agendamentos where id = ? "; 79 | 80 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 81 | prepareStatement.setInt(1, agendamentos.getId()); 82 | prepareStatement.executeUpdate(); 83 | 84 | connection.close(); 85 | } 86 | 87 | public ArrayList Buscar() throws SQLException{ 88 | String sql = "select * from agendamentos"; 89 | 90 | PreparedStatement prepareStatement = connection.prepareStatement(sql); 91 | prepareStatement.execute(); 92 | 93 | return pesquisa(prepareStatement); 94 | } 95 | 96 | private ArrayList pesquisa(PreparedStatement prepareStatement) throws SQLException { 97 | ArrayList agendamentos = new ArrayList(); 98 | 99 | prepareStatement.execute(); 100 | ResultSet resultSet = prepareStatement.getResultSet(); 101 | 102 | while(resultSet.next()){ 103 | int Id = resultSet.getInt("id"); 104 | 105 | String Nome = resultSet.getString("nome"); 106 | String Telefone = resultSet.getString("telefone"); 107 | String Email = resultSet.getString("email"); 108 | String Service_id = resultSet.getString("service_id"); 109 | String Price_service = resultSet.getString("price_service"); 110 | String Data = resultSet.getString("data"); 111 | String Hora = resultSet.getString("hora"); 112 | String Observacao = resultSet.getString("observacao"); 113 | 114 | Agendamento AgendamentoEncontrado = new Agendamento(Id, Nome, Email, Telefone, Service_id, Price_service, Data, Hora, Observacao); 115 | agendamentos.add(AgendamentoEncontrado); 116 | 117 | } 118 | return agendamentos; 119 | } 120 | 121 | public Agendamento BuscarPorId(int id) throws SQLException { 122 | String sql = "SELECT * FROM agendamentos WHERE id = ?"; 123 | 124 | PreparedStatement preparedStatement = connection.prepareStatement(sql); 125 | preparedStatement.setInt(1, id); 126 | 127 | ArrayList services = pesquisa(preparedStatement); 128 | 129 | if (!services.isEmpty()) { 130 | return services.get(0); 131 | } else { 132 | return null; 133 | } 134 | } 135 | 136 | public boolean existeAgendamentoNaDataHora(String data, String hora) throws SQLException { 137 | String sql = "SELECT COUNT(*) FROM agendamentos WHERE data = ? AND hora = ?"; 138 | try (PreparedStatement stmt = connection.prepareStatement(sql)) { 139 | stmt.setString(1, data); 140 | stmt.setString(2, hora); 141 | try (ResultSet resultSet = stmt.executeQuery()) { 142 | if (resultSet.next()) { 143 | int count = resultSet.getInt(1); 144 | return count > 0; 145 | } 146 | } 147 | } 148 | return false; 149 | } 150 | 151 | public Agendamento BuscarPorEmail(String email) throws SQLException { 152 | String sql = "select from agendamentos where email = ? "; 153 | 154 | PreparedStatement preparedStatement = connection.prepareStatement(sql); 155 | preparedStatement.setString(1,email); 156 | 157 | ArrayList services = pesquisa(preparedStatement); 158 | 159 | if (!services.isEmpty()) { 160 | return services.get(0); 161 | } else { 162 | return null; // ou lançar uma exceção se preferir 163 | } 164 | } 165 | 166 | 167 | 168 | 169 | 170 | } 171 | -------------------------------------------------------------------------------- /src/Controller/AgendamentoController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package Controller; 6 | 7 | import DAO.AgendamentoDAO; 8 | import DAO.Conexao; 9 | import DAO.ServiceDAO; 10 | import Model.Agendamento; 11 | import Model.Service; 12 | import Views.Agendar; 13 | import Views.CadastroCliente; 14 | import Views.ControleHorario; 15 | import Views.MenuBarbeiro; 16 | import Views.MenuCliente; 17 | import Views.TelaAgendamentoBarbeiro; 18 | import java.awt.Image; 19 | import java.awt.event.ActionEvent; 20 | import java.awt.event.ActionListener; 21 | import java.sql.Connection; 22 | import java.sql.SQLException; 23 | import java.text.SimpleDateFormat; 24 | import java.time.LocalTime; 25 | import java.time.format.DateTimeFormatter; 26 | import java.util.ArrayList; 27 | import java.util.Calendar; 28 | import java.util.Date; 29 | import java.util.logging.Level; 30 | import java.util.logging.Logger; 31 | import javax.swing.ImageIcon; 32 | import javax.swing.JComboBox; 33 | import javax.swing.JOptionPane; 34 | 35 | /** 36 | * 37 | * @author Biel 38 | */ 39 | public class AgendamentoController { 40 | private Agendar view; 41 | private MenuBarbeiro menu; 42 | private ControleHorario controller; 43 | private TelaAgendamentoBarbeiro AgendamentoBarbeiro; 44 | 45 | public AgendamentoController(MenuBarbeiro menu) { 46 | this.menu = menu; 47 | } 48 | 49 | public AgendamentoController(TelaAgendamentoBarbeiro AgendamentoBarbeiro) { 50 | this.AgendamentoBarbeiro = AgendamentoBarbeiro; 51 | } 52 | 53 | public AgendamentoController(Agendar view) { 54 | this.view = view; 55 | } 56 | 57 | public void ComboboxService() throws SQLException { 58 | Connection conexao = new Conexao().getConnection(); 59 | ServiceDAO serviceDAO = new ServiceDAO(conexao); 60 | 61 | ArrayList listar = serviceDAO.Buscar(); 62 | 63 | view.getComboBoxService().removeAll(); // Remove itens do ComboBox 64 | 65 | for (Service service : listar) { 66 | view.getComboBoxService().addItem(service.getNome()); 67 | } 68 | 69 | view.getComboBoxService().addActionListener(new ActionListener() { 70 | 71 | @Override 72 | public void actionPerformed(ActionEvent e) { 73 | // Quando um item é selecionado no ComboBox, este código será executado. 74 | String selectedItem = (String) view.getComboBoxService().getSelectedItem(); 75 | 76 | if (selectedItem != null) { 77 | for (Service service : listar) { 78 | if (selectedItem.equals(service.getNome())) { 79 | view.getVarPrice().setText(service.getPrice()); 80 | 81 | ImageIcon imagem = new ImageIcon(service.getImagem()); 82 | view.getImagemCorte().setIcon(new ImageIcon(imagem.getImage().getScaledInstance(view.getImagemCorte().getWidth() 83 | , view.getImagemCorte().getHeight(), Image.SCALE_DEFAULT))); 84 | break; 85 | } 86 | } 87 | } else { 88 | view.getVarPrice().setText(""); 89 | 90 | } 91 | } 92 | }); 93 | } 94 | 95 | public void AdicionandoHoras() throws SQLException{ 96 | Connection conexao = new Conexao().getConnection(); 97 | ServiceDAO serviceDAO = new ServiceDAO(conexao); 98 | 99 | ArrayList listar = serviceDAO.Buscar(); 100 | 101 | 102 | ArrayList horas = new ArrayList<>(); 103 | LocalTime currentTime = LocalTime.of(8, 0); 104 | 105 | while(currentTime.isBefore(LocalTime.of(20, 30))){ 106 | horas.add(currentTime.format(DateTimeFormatter.ofPattern("HH:mm"))); 107 | 108 | currentTime = currentTime.plusMinutes(30); 109 | } 110 | JComboBox dataComboBox = view.getVarHora(); 111 | dataComboBox.removeAllItems(); 112 | for(String hora : horas){ 113 | dataComboBox.addItem(hora); 114 | } 115 | 116 | } 117 | 118 | public void AdicionandoData(){ 119 | 120 | Calendar calendar = Calendar.getInstance(); 121 | SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); 122 | 123 | 124 | int year = calendar.get(Calendar.YEAR); 125 | int month = calendar.get(Calendar.MONTH); 126 | int day = calendar.get(Calendar.DAY_OF_MONTH); 127 | 128 | //Data Atual 129 | calendar.set(Calendar.YEAR, year); 130 | calendar.set(Calendar.MONTH, month); 131 | calendar.set(Calendar.DAY_OF_MONTH, day); 132 | 133 | 134 | while (year == calendar.get(Calendar.YEAR)) { 135 | Date date = calendar.getTime(); 136 | boolean horaJaAgendada = false; 137 | 138 | if (calendar.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) { 139 | view.getVarData().addItem(dateFormat.format(date)); 140 | } 141 | calendar.add(Calendar.DAY_OF_MONTH, 1); 142 | 143 | } 144 | 145 | } 146 | 147 | public void salvarAgendamento(){ 148 | String Nome = view.getVarName().getText(); 149 | String Email = view.getVarEmail().getText(); 150 | String Telefone = view.getVarTelefone().getText(); 151 | String Data = (String) view.getVarData().getSelectedItem(); 152 | String Hora = (String) view.getVarHora().getSelectedItem(); 153 | String Servico = (String) view.getComboBoxService().getSelectedItem(); 154 | String Price = view.getVarPrice().getText(); 155 | String Observacao = view.getVarObeservacao().getText(); 156 | 157 | 158 | Agendamento agendamento = new Agendamento(Nome, Email, Telefone, Servico, Price, Data, Hora, Observacao); 159 | 160 | try { 161 | Connection conexao = new Conexao().getConnection(); 162 | AgendamentoDAO agendamentoDAO = new AgendamentoDAO(conexao); 163 | 164 | // Verifique se já existe um agendamento para a mesma data e hora 165 | if (agendamentoDAO.existeAgendamentoNaDataHora(Data, Hora)) { 166 | view.getVarHora().removeItem(Hora); 167 | JOptionPane.showMessageDialog(null, "Já existe um agendamento para essa data e hora. Escolha outra data ou hora."); 168 | } else { 169 | agendamentoDAO.Salvar(agendamento); 170 | JOptionPane.showMessageDialog(null, "Agendamento Salvo com Sucesso"); 171 | 172 | view.dispose(); 173 | MenuCliente menuCliente = new MenuCliente(); 174 | menuCliente.setVisible(true); 175 | } 176 | } catch (SQLException ex) { 177 | Logger.getLogger(CadastroCliente.class.getName()).log(Level.SEVERE, null, ex); 178 | } 179 | } 180 | 181 | public void ExcluirAgendamento() { 182 | String idStr = JOptionPane.showInputDialog(null, "Digite o Código a ser excluído:"); 183 | Agendamento agendamento = new Agendamento(0); 184 | if (idStr != null && !idStr.isEmpty()) { 185 | try { 186 | int id = Integer.parseInt(idStr); // Converter a string para int 187 | Connection conexao = new Conexao().getConnection(); 188 | AgendamentoDAO agendamentoDAO = new AgendamentoDAO(conexao); 189 | 190 | // Verificar se o serviço com o ID fornecido existe no banco de dados 191 | Agendamento existingService = agendamentoDAO.BuscarPorId(id); 192 | 193 | if (existingService != null) { 194 | // Se o serviço com o ID existir, exclua-o 195 | agendamentoDAO.Deleta(existingService); 196 | JOptionPane.showMessageDialog(null, "Agendamento excluído com sucesso."); 197 | } else { 198 | // Se o serviço com o ID não existe, exiba uma mensagem de erro 199 | JOptionPane.showMessageDialog(null, "Código não encontrado. Não é possível excluir o Agendamento."); 200 | } 201 | 202 | conexao.close(); 203 | } catch (NumberFormatException e) { 204 | JOptionPane.showMessageDialog(null, "Código inválido. Digite um número válido."); 205 | } catch (Exception e) { 206 | Logger.getLogger(CadastroCliente.class.getName()).log(Level.SEVERE, null, e); 207 | } 208 | } else { 209 | JOptionPane.showMessageDialog(null, "Nenhum ID fornecido. A exclusão foi cancelada."); 210 | } 211 | } 212 | 213 | 214 | 215 | } 216 | -------------------------------------------------------------------------------- /src/Controller/BarbeiroController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template 4 | */ 5 | package Controller; 6 | 7 | import DAO.AgendamentoDAO; 8 | import DAO.Conexao; 9 | import DAO.ServiceDAO; 10 | import DAO.UsuarioDAO; 11 | import Model.Agendamento; 12 | import Model.Service; 13 | import Model.Usuario; 14 | import Views.CadastrarBarbeiro; 15 | import Views.CadastroCliente; 16 | import Views.LoginBarbeiro; 17 | import Views.MenuBarbeiro; 18 | import Views.TelaService; 19 | import java.awt.Image; 20 | import java.sql.Connection; 21 | import java.sql.SQLException; 22 | import java.text.ParseException; 23 | import java.text.SimpleDateFormat; 24 | import java.util.ArrayList; 25 | import java.util.Date; 26 | import java.util.logging.Level; 27 | import java.util.logging.Logger; 28 | import javax.swing.ImageIcon; 29 | import javax.swing.JLabel; 30 | import javax.swing.JOptionPane; 31 | import javax.swing.table.DefaultTableModel; 32 | 33 | /** 34 | * 35 | * @author Biel 36 | */ 37 | public class BarbeiroController { 38 | 39 | private LoginBarbeiro view; 40 | private CadastrarBarbeiro cadastrar; 41 | private TelaService service; 42 | private MenuBarbeiro menu; 43 | 44 | 45 | public BarbeiroController(LoginBarbeiro view) { 46 | this.view = view; 47 | } 48 | 49 | public BarbeiroController(CadastrarBarbeiro cadastrar){ 50 | this.cadastrar = cadastrar; 51 | } 52 | 53 | public BarbeiroController(TelaService service) { 54 | this.service = service; 55 | } 56 | 57 | public BarbeiroController(MenuBarbeiro menu) { 58 | this.menu = menu; 59 | } 60 | 61 | public void atualizarTextoBoasVindas(String nome){ 62 | JLabel welcomeLabel = menu.getWelcome(); 63 | welcomeLabel.setText("Seja Bem-Vindo: "+ nome); 64 | 65 | 66 | } 67 | 68 | 69 | public void Autenticar() throws SQLException { 70 | // Buscar usuario da View 71 | String nome = view.getVarNameBarbeiro().getText(); 72 | String senha = view.getVarPasswordBarbeiro().getText(); 73 | 74 | Usuario usuarioAutenticar = new Usuario(nome, senha); 75 | 76 | // Verificar Se existir no banco de dados 77 | Connection conexao = new Conexao().getConnection(); 78 | UsuarioDAO usuarioDAO = new UsuarioDAO(conexao); 79 | boolean existe = usuarioDAO.autenticarUsuario(usuarioAutenticar); 80 | 81 | if (existe) { 82 | MenuBarbeiro menubarbeiro = new MenuBarbeiro(); 83 | menubarbeiro.setVisible(true); 84 | view.setVisible(false); 85 | 86 | BarbeiroController barbeiroController = new BarbeiroController(menubarbeiro); 87 | 88 | // Passe o nome do usuário para o método de atualização 89 | barbeiroController.atualizarTextoBoasVindas(nome); 90 | } else { 91 | JOptionPane.showMessageDialog(null, "Usuario Não Encontrado no Banco"); 92 | } 93 | } 94 | 95 | public void salvarBarbeiro(){ 96 | 97 | String Nome = cadastrar.getTextNome().getText(); 98 | String Email = cadastrar.getTextEmail().getText(); 99 | String Senha = cadastrar.getTextSenha().getText(); 100 | String Cpf = cadastrar.getTextCpf().getText(); 101 | String Data_nasc = cadastrar.getTextNascimento().getText(); 102 | 103 | 104 | Usuario usuario = new Usuario(Nome, Email, Cpf, Data_nasc, Senha); 105 | 106 | 107 | try { 108 | Connection conexao = new Conexao().getConnection(); 109 | UsuarioDAO usuarioDAO = new UsuarioDAO(conexao); 110 | usuarioDAO.Salvar(usuario); 111 | 112 | JOptionPane.showMessageDialog(null, "Usuario Salvo com Sucesso"); 113 | 114 | cadastrar.dispose(); 115 | MenuBarbeiro menuBarbeiro = new MenuBarbeiro(); 116 | menuBarbeiro.setVisible(true); 117 | 118 | } catch (SQLException ex) { 119 | Logger.getLogger(CadastroCliente.class.getName()).log(Level.SEVERE, null, ex); 120 | } 121 | } 122 | 123 | public void atualizarTableService() throws SQLException{ 124 | //Buscar Elementos no Banco 125 | Connection conexao = new Conexao().getConnection(); 126 | ServiceDAO serviceDAO = new ServiceDAO(conexao); 127 | ArrayList Buscar = serviceDAO.Buscar(); 128 | 129 | //Enviar para View 130 | DefaultTableModel tableModel = (DefaultTableModel) service.getTableServices().getModel(); 131 | tableModel.setNumRows(0); 132 | 133 | for (Service services : Buscar) { 134 | tableModel.addRow(new Object[]{ 135 | services.getId(), 136 | services.getNome(), 137 | services.getPrice() 138 | }); 139 | 140 | } 141 | 142 | } 143 | 144 | public void VincularCampodaTabelaService() throws SQLException{ 145 | Connection conexao = new Conexao().getConnection(); 146 | ServiceDAO serviceDAO = new ServiceDAO(conexao); 147 | ArrayList Buscar = serviceDAO.Buscar(); 148 | 149 | Service services = Buscar.get(service.getTableServices().getSelectedRow()); 150 | ImageIcon imagem = new ImageIcon(services.getImagem()); 151 | service.getFotodoService().setIcon(new ImageIcon(imagem.getImage().getScaledInstance(service.getFotodoService().getWidth() 152 | , service.getFotodoService().getHeight(), Image.SCALE_DEFAULT))); 153 | } 154 | 155 | public void atualizarTabelaAgendamento() throws SQLException{ 156 | //Buscar Elementos no Banco 157 | Connection conexao = new Conexao().getConnection(); 158 | AgendamentoDAO agendamentoDAO = new AgendamentoDAO(conexao); 159 | ArrayList Buscar = agendamentoDAO.Buscar(); 160 | 161 | //Enviar para View 162 | DefaultTableModel tableModel = (DefaultTableModel) menu.getTableAgendamentos() .getModel(); 163 | tableModel.setNumRows(0); 164 | 165 | //Pecorrer o TableMode 166 | SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); 167 | 168 | for (Agendamento agendamentos : Buscar) { 169 | try { 170 | Date dataAgendamento = dateFormat.parse(agendamentos.getData()); 171 | Date dataAtual = new Date(); // Obter a data atual 172 | 173 | // Verificar se a data do agendamento é maior ou igual à data de hoje 174 | if (dataAgendamento.equals(dataAtual) || dataAgendamento.after(dataAtual)) { 175 | tableModel.addRow( 176 | new Object[]{ 177 | agendamentos.getId(), 178 | agendamentos.getNome(), 179 | agendamentos.getTelefone(), 180 | agendamentos.getServico_id(), 181 | agendamentos.getData(), 182 | agendamentos.getHora(), 183 | agendamentos.getPrice_agendamento(), 184 | agendamentos.getObservacao() 185 | } 186 | ); 187 | } 188 | } catch (ParseException e) { 189 | e.printStackTrace(); 190 | } 191 | } 192 | } 193 | 194 | public void filtrarAgendamentosHoje() throws SQLException { 195 | SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); 196 | String hoje = dateFormat.format(new Date()); 197 | 198 | Connection conexao = new Conexao().getConnection(); 199 | AgendamentoDAO agendamentoDAO = new AgendamentoDAO(conexao); 200 | ArrayList agendamentos = agendamentoDAO.Buscar(); 201 | 202 | ArrayList agendamentosHoje = new ArrayList<>(); 203 | 204 | for (Agendamento agendamento : agendamentos) { 205 | String dataAgendamento = agendamento.getData(); // Suponhamos que o método de Agendamento que retorna a data seja "getData()" 206 | if (dataAgendamento.equals(hoje)) { 207 | agendamentosHoje.add(agendamento); 208 | } 209 | } 210 | atualizarTabela(agendamentosHoje); 211 | 212 | } 213 | 214 | public void atualizarTabela(ArrayList agendamentos) { 215 | DefaultTableModel model = (DefaultTableModel) menu.getTableAgendamentos().getModel(); 216 | 217 | // Limpa o modelo atual da tabela 218 | model.setRowCount(0); 219 | 220 | // Adiciona os novos agendamentos à tabela 221 | for (Agendamento agendamento : agendamentos) { 222 | String[] rowData = { 223 | agendamento.getNome(), 224 | agendamento.getTelefone(), 225 | agendamento.getServico_id(), 226 | agendamento.getData(), 227 | agendamento.getHora(), 228 | agendamento.getPrice_agendamento(), 229 | agendamento.getObservacao() 230 | }; 231 | model.addRow(rowData); 232 | } 233 | } 234 | 235 | public void filtrarTodos() throws SQLException{ 236 | atualizarTabelaAgendamento(); 237 | } 238 | 239 | public boolean dataAnterior(String data1, String data2) { 240 | SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); 241 | 242 | try { 243 | Date date1 = dateFormat.parse(data1); 244 | Date date2 = dateFormat.parse(data2); 245 | 246 | return date1.before(date2); 247 | } catch (ParseException e) { 248 | e.printStackTrace(); 249 | return false; 250 | } 251 | } 252 | 253 | public void atualizarHistoricodaTabela() throws SQLException{ 254 | Connection conexao = new Conexao().getConnection(); 255 | AgendamentoDAO agendamentoDAO = new AgendamentoDAO(conexao); 256 | ArrayList Buscar = agendamentoDAO.Buscar(); 257 | 258 | //Enviar para View 259 | DefaultTableModel tableModel = (DefaultTableModel) menu.getTableAgendamentos() .getModel(); 260 | tableModel.setNumRows(0); 261 | 262 | //Pecorrer o TableMode 263 | for (Agendamento agendamentos : Buscar) { 264 | tableModel.addRow( 265 | new Object[]{ 266 | agendamentos.getId(), 267 | agendamentos.getNome(), 268 | agendamentos.getTelefone(), 269 | agendamentos.getServico_id(), 270 | agendamentos.getData(), 271 | agendamentos.getHora(), 272 | agendamentos.getPrice_agendamento(), 273 | agendamentos.getObservacao() 274 | 275 | } 276 | ); 277 | } 278 | } 279 | 280 | 281 | } 282 | -------------------------------------------------------------------------------- /src/Views/MenuCliente.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template 4 | */ 5 | package Views; 6 | 7 | import Controller.ClienteController; 8 | import java.awt.EventQueue; 9 | import java.sql.SQLException; 10 | import javax.swing.JLabel; 11 | import javax.swing.JTable; 12 | 13 | /** 14 | * 15 | * @author Biel 16 | */ 17 | public class MenuCliente extends javax.swing.JFrame { 18 | 19 | private ClienteController controller; 20 | 21 | /** 22 | * Creates new form MenuCliente 23 | */ 24 | public MenuCliente() { 25 | this.controller = controller; 26 | initComponents(); 27 | } 28 | 29 | private void iniciarTable() throws SQLException { 30 | } 31 | /** 32 | * This method is called from within the constructor to initialize the form. 33 | * WARNING: Do NOT modify this code. The content of this method is always 34 | * regenerated by the Form Editor. 35 | */ 36 | @SuppressWarnings("unchecked") 37 | // //GEN-BEGIN:initComponents 38 | private void initComponents() { 39 | 40 | ButtonEmDia = new javax.swing.JButton(); 41 | ButtonTodos = new javax.swing.JButton(); 42 | welcomeCliente = new javax.swing.JLabel(); 43 | jLabel3 = new javax.swing.JLabel(); 44 | ButtonAgendar = new javax.swing.JButton(); 45 | jScrollPane1 = new javax.swing.JScrollPane(); 46 | TableAgendamentos = new javax.swing.JTable(); 47 | jLabel1 = new javax.swing.JLabel(); 48 | jLabel2 = new javax.swing.JLabel(); 49 | jMenuBar2 = new javax.swing.JMenuBar(); 50 | jMenu2 = new javax.swing.JMenu(); 51 | jMenuItem2 = new javax.swing.JMenuItem(); 52 | 53 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 54 | getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); 55 | 56 | ButtonEmDia.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 57 | ButtonEmDia.setForeground(new java.awt.Color(0, 0, 0)); 58 | ButtonEmDia.setText("Em Dia"); 59 | ButtonEmDia.addActionListener(new java.awt.event.ActionListener() { 60 | public void actionPerformed(java.awt.event.ActionEvent evt) { 61 | ButtonEmDiaActionPerformed(evt); 62 | } 63 | }); 64 | getContentPane().add(ButtonEmDia, new org.netbeans.lib.awtextra.AbsoluteConstraints(520, 70, 80, 30)); 65 | 66 | ButtonTodos.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 67 | ButtonTodos.setForeground(new java.awt.Color(0, 0, 0)); 68 | ButtonTodos.setText("Todos"); 69 | getContentPane().add(ButtonTodos, new org.netbeans.lib.awtextra.AbsoluteConstraints(430, 70, 70, 30)); 70 | 71 | welcomeCliente.setFont(new java.awt.Font("Segoe UI", 1, 24)); // NOI18N 72 | welcomeCliente.setForeground(new java.awt.Color(255, 255, 255)); 73 | getContentPane().add(welcomeCliente, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 20, 220, 30)); 74 | 75 | jLabel3.setFont(new java.awt.Font("Segoe UI", 1, 20)); // NOI18N 76 | jLabel3.setForeground(new java.awt.Color(255, 255, 255)); 77 | jLabel3.setText("Agendamentos"); 78 | getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 70, -1, -1)); 79 | 80 | ButtonAgendar.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 81 | ButtonAgendar.setForeground(new java.awt.Color(0, 0, 0)); 82 | ButtonAgendar.setText("Agendar"); 83 | ButtonAgendar.addActionListener(new java.awt.event.ActionListener() { 84 | public void actionPerformed(java.awt.event.ActionEvent evt) { 85 | ButtonAgendarActionPerformed(evt); 86 | } 87 | }); 88 | getContentPane().add(ButtonAgendar, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 70, -1, 30)); 89 | 90 | TableAgendamentos.setBackground(new java.awt.Color(204, 204, 204)); 91 | TableAgendamentos.setForeground(new java.awt.Color(255, 255, 255)); 92 | TableAgendamentos.setModel(new javax.swing.table.DefaultTableModel( 93 | new Object [][] { 94 | 95 | }, 96 | new String [] { 97 | "Id", "Email", "Telefone", "Serviço", "Preço", "Dia", "Hora", "Obeservação" 98 | } 99 | )); 100 | jScrollPane1.setViewportView(TableAgendamentos); 101 | if (TableAgendamentos.getColumnModel().getColumnCount() > 0) { 102 | TableAgendamentos.getColumnModel().getColumn(0).setHeaderValue("id"); 103 | TableAgendamentos.getColumnModel().getColumn(1).setHeaderValue("Telefone"); 104 | TableAgendamentos.getColumnModel().getColumn(2).setHeaderValue("Serviço"); 105 | TableAgendamentos.getColumnModel().getColumn(3).setHeaderValue("Preço"); 106 | TableAgendamentos.getColumnModel().getColumn(4).setHeaderValue("Dia"); 107 | TableAgendamentos.getColumnModel().getColumn(5).setHeaderValue("Hora"); 108 | TableAgendamentos.getColumnModel().getColumn(6).setHeaderValue("Observação"); 109 | } 110 | 111 | getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 130, 860, 290)); 112 | getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(338, 64, -1, -1)); 113 | 114 | jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsImagens/BannerPC.jpg"))); // NOI18N 115 | getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1140, 490)); 116 | 117 | jMenu2.setText("Ações"); 118 | 119 | jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsIcons/usuario-icon.png"))); // NOI18N 120 | jMenuItem2.setText("Voltar"); 121 | jMenuItem2.addActionListener(new java.awt.event.ActionListener() { 122 | public void actionPerformed(java.awt.event.ActionEvent evt) { 123 | jMenuItem2ActionPerformed(evt); 124 | } 125 | }); 126 | jMenu2.add(jMenuItem2); 127 | 128 | jMenuBar2.add(jMenu2); 129 | 130 | setJMenuBar(jMenuBar2); 131 | 132 | pack(); 133 | }// //GEN-END:initComponents 134 | 135 | private void ButtonAgendarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonAgendarActionPerformed 136 | // TODO add your handling code here: 137 | Agendar agendar = new Agendar(); 138 | agendar.setVisible(true); 139 | setVisible(false); 140 | }//GEN-LAST:event_ButtonAgendarActionPerformed 141 | 142 | private void ButtonEmDiaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonEmDiaActionPerformed 143 | // TODO add your handling code here: 144 | }//GEN-LAST:event_ButtonEmDiaActionPerformed 145 | 146 | private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed 147 | // TODO add your handling code here: 148 | LoginCliente login = new LoginCliente(); 149 | login.setVisible(true); 150 | setVisible(false); 151 | }//GEN-LAST:event_jMenuItem2ActionPerformed 152 | 153 | /** 154 | * @param args the command line arguments 155 | */ 156 | public static void main(String args[]) { 157 | EventQueue.invokeLater(() -> { 158 | MenuCliente menu = new MenuCliente(); 159 | menu.setVisible(true); 160 | 161 | ClienteController controller = new ClienteController(menu); // Crie o ClienteController passando o MenuCliente 162 | 163 | menu.setController(controller); // Defina o controlador no MenuCliente 164 | }); 165 | /* Set the Nimbus look and feel */ 166 | // 167 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 168 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 169 | */ 170 | try { 171 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 172 | if ("Nimbus".equals(info.getName())) { 173 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 174 | break; 175 | } 176 | } 177 | } catch (ClassNotFoundException ex) { 178 | java.util.logging.Logger.getLogger(MenuCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 179 | } catch (InstantiationException ex) { 180 | java.util.logging.Logger.getLogger(MenuCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 181 | } catch (IllegalAccessException ex) { 182 | java.util.logging.Logger.getLogger(MenuCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 183 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 184 | java.util.logging.Logger.getLogger(MenuCliente.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 185 | } 186 | // 187 | 188 | /* Create and display the form */ 189 | java.awt.EventQueue.invokeLater(new Runnable() { 190 | public void run() { 191 | new MenuCliente().setVisible(true); 192 | } 193 | }); 194 | } 195 | 196 | public JTable getTableAgendamentos() { 197 | return TableAgendamentos; 198 | } 199 | 200 | public void setTableAgendamentos(JTable TableAgendamentos) { 201 | this.TableAgendamentos = TableAgendamentos; 202 | } 203 | 204 | public JLabel getWelcomeCliente() { 205 | return welcomeCliente; 206 | } 207 | 208 | public void setWelcomeCliente(JLabel welcomeCliente) { 209 | this.welcomeCliente = welcomeCliente; 210 | } 211 | 212 | public ClienteController getController() { 213 | return controller; 214 | } 215 | 216 | public void setController(ClienteController controller) { 217 | this.controller = controller; 218 | } 219 | 220 | 221 | // Variables declaration - do not modify//GEN-BEGIN:variables 222 | private javax.swing.JButton ButtonAgendar; 223 | private javax.swing.JButton ButtonEmDia; 224 | private javax.swing.JButton ButtonTodos; 225 | private javax.swing.JTable TableAgendamentos; 226 | private javax.swing.JLabel jLabel1; 227 | private javax.swing.JLabel jLabel2; 228 | private javax.swing.JLabel jLabel3; 229 | private javax.swing.JMenu jMenu2; 230 | private javax.swing.JMenuBar jMenuBar2; 231 | private javax.swing.JMenuItem jMenuItem2; 232 | private javax.swing.JScrollPane jScrollPane1; 233 | private javax.swing.JLabel welcomeCliente; 234 | // End of variables declaration//GEN-END:variables 235 | } 236 | -------------------------------------------------------------------------------- /src/Views/TelaService.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 |
144 |
145 | 146 | 147 | 148 | 149 | <Editor/> 150 | <Renderer/> 151 | </Column> 152 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 153 | <Title/> 154 | <Editor/> 155 | <Renderer/> 156 | </Column> 157 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 158 | <Title/> 159 | <Editor/> 160 | <Renderer/> 161 | </Column> 162 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 163 | <Title/> 164 | <Editor/> 165 | <Renderer/> 166 | </Column> 167 | </TableColumnModel> 168 | </Property> 169 | <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> 170 | <TableHeader reorderingAllowed="true" resizingAllowed="true"/> 171 | </Property> 172 | </Properties> 173 | <Events> 174 | <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="TableServicesMouseClicked"/> 175 | </Events> 176 | </Component> 177 | </SubComponents> 178 | </Container> 179 | <Component class="javax.swing.JLabel" name="FotodoService"> 180 | <Properties> 181 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 182 | <Color blue="0" green="0" red="0" type="rgb"/> 183 | </Property> 184 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 185 | <Font name="Segoe UI" size="12" style="1"/> 186 | </Property> 187 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 188 | <Image iconType="3" name="/ViewsImagens/service.jpg"/> 189 | </Property> 190 | </Properties> 191 | </Component> 192 | <Component class="javax.swing.JButton" name="jButton1"> 193 | <Properties> 194 | <Property name="text" type="java.lang.String" value="Novo"/> 195 | </Properties> 196 | <Events> 197 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 198 | </Events> 199 | </Component> 200 | <Component class="javax.swing.JButton" name="jButton2"> 201 | <Properties> 202 | <Property name="text" type="java.lang.String" value="Delete"/> 203 | </Properties> 204 | <Events> 205 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> 206 | </Events> 207 | </Component> 208 | <Component class="javax.swing.JButton" name="jButton3"> 209 | <Properties> 210 | <Property name="text" type="java.lang.String" value="Alterar"/> 211 | </Properties> 212 | <Events> 213 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> 214 | </Events> 215 | </Component> 216 | </SubComponents> 217 | </Container> 218 | </SubComponents> 219 | </Form> 220 | -------------------------------------------------------------------------------- /src/Views/MenuCliente.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <NonVisualComponents> 5 | <Menu class="javax.swing.JMenuBar" name="jMenuBar2"> 6 | <SubComponents> 7 | <Menu class="javax.swing.JMenu" name="jMenu2"> 8 | <Properties> 9 | <Property name="text" type="java.lang.String" value="Ações"/> 10 | </Properties> 11 | <SubComponents> 12 | <MenuItem class="javax.swing.JMenuItem" name="jMenuItem2"> 13 | <Properties> 14 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 15 | <Image iconType="3" name="/ViewsIcons/usuario-icon.png"/> 16 | </Property> 17 | <Property name="text" type="java.lang.String" value="Voltar"/> 18 | </Properties> 19 | <Events> 20 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem2ActionPerformed"/> 21 | </Events> 22 | </MenuItem> 23 | </SubComponents> 24 | </Menu> 25 | </SubComponents> 26 | </Menu> 27 | </NonVisualComponents> 28 | <Properties> 29 | <Property name="defaultCloseOperation" type="int" value="3"/> 30 | </Properties> 31 | <SyntheticProperties> 32 | <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar2"/> 33 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 34 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 35 | </SyntheticProperties> 36 | <AuxValues> 37 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 38 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 39 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 40 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 41 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 42 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 43 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 44 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 45 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 46 | <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-20,0,0,4,118"/> 47 | </AuxValues> 48 | 49 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> 50 | <Property name="useNullLayout" type="boolean" value="false"/> 51 | </Layout> 52 | <SubComponents> 53 | <Component class="javax.swing.JButton" name="ButtonEmDia"> 54 | <Properties> 55 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 56 | <Font name="Segoe UI" size="12" style="1"/> 57 | </Property> 58 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 59 | <Color blue="0" green="0" red="0" type="rgb"/> 60 | </Property> 61 | <Property name="text" type="java.lang.String" value="Em Dia"/> 62 | </Properties> 63 | <Events> 64 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ButtonEmDiaActionPerformed"/> 65 | </Events> 66 | <Constraints> 67 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 68 | <AbsoluteConstraints x="520" y="70" width="80" height="30"/> 69 | </Constraint> 70 | </Constraints> 71 | </Component> 72 | <Component class="javax.swing.JButton" name="ButtonTodos"> 73 | <Properties> 74 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 75 | <Font name="Segoe UI" size="12" style="1"/> 76 | </Property> 77 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 78 | <Color blue="0" green="0" red="0" type="rgb"/> 79 | </Property> 80 | <Property name="text" type="java.lang.String" value="Todos"/> 81 | </Properties> 82 | <Constraints> 83 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 84 | <AbsoluteConstraints x="430" y="70" width="70" height="30"/> 85 | </Constraint> 86 | </Constraints> 87 | </Component> 88 | <Component class="javax.swing.JLabel" name="welcomeCliente"> 89 | <Properties> 90 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 91 | <Font name="Segoe UI" size="24" style="1"/> 92 | </Property> 93 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 94 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 95 | </Property> 96 | </Properties> 97 | <Constraints> 98 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 99 | <AbsoluteConstraints x="150" y="20" width="220" height="30"/> 100 | </Constraint> 101 | </Constraints> 102 | </Component> 103 | <Component class="javax.swing.JLabel" name="jLabel3"> 104 | <Properties> 105 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 106 | <Font name="Segoe UI" size="20" style="1"/> 107 | </Property> 108 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 109 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 110 | </Property> 111 | <Property name="text" type="java.lang.String" value="Agendamentos"/> 112 | </Properties> 113 | <Constraints> 114 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 115 | <AbsoluteConstraints x="160" y="70" width="-1" height="-1"/> 116 | </Constraint> 117 | </Constraints> 118 | </Component> 119 | <Component class="javax.swing.JButton" name="ButtonAgendar"> 120 | <Properties> 121 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 122 | <Font name="Segoe UI" size="12" style="1"/> 123 | </Property> 124 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 125 | <Color blue="0" green="0" red="0" type="rgb"/> 126 | </Property> 127 | <Property name="text" type="java.lang.String" value="Agendar"/> 128 | </Properties> 129 | <Events> 130 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ButtonAgendarActionPerformed"/> 131 | </Events> 132 | <Constraints> 133 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 134 | <AbsoluteConstraints x="330" y="70" width="-1" height="30"/> 135 | </Constraint> 136 | </Constraints> 137 | </Component> 138 | <Container class="javax.swing.JScrollPane" name="jScrollPane1"> 139 | <AuxValues> 140 | <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> 141 | </AuxValues> 142 | <Constraints> 143 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 144 | <AbsoluteConstraints x="130" y="130" width="860" height="290"/> 145 | </Constraint> 146 | </Constraints> 147 | 148 | <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> 149 | <SubComponents> 150 | <Component class="javax.swing.JTable" name="TableAgendamentos"> 151 | <Properties> 152 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 153 | <Color blue="cc" green="cc" red="cc" type="rgb"/> 154 | </Property> 155 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 156 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 157 | </Property> 158 | <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> 159 | <Table columnCount="8" rowCount="0"> 160 | <Column editable="true" title="Id" type="java.lang.Object"/> 161 | <Column editable="true" title="Email" type="java.lang.Object"/> 162 | <Column editable="true" title="Telefone" type="java.lang.Object"/> 163 | <Column editable="true" title="Serviço" type="java.lang.Object"/> 164 | <Column editable="true" title="Preço" type="java.lang.Object"/> 165 | <Column editable="true" title="Dia" type="java.lang.Object"/> 166 | <Column editable="true" title="Hora" type="java.lang.Object"/> 167 | <Column editable="true" title="Obeservação" type="java.lang.Object"/> 168 | </Table> 169 | </Property> 170 | <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> 171 | <TableColumnModel selectionModel="0"> 172 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 173 | <Title value="id"/> 174 | <Editor/> 175 | <Renderer/> 176 | </Column> 177 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 178 | <Title value="Telefone"/> 179 | <Editor/> 180 | <Renderer/> 181 | </Column> 182 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 183 | <Title value="Serviço"/> 184 | <Editor/> 185 | <Renderer/> 186 | </Column> 187 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 188 | <Title value="Preço"/> 189 | <Editor/> 190 | <Renderer/> 191 | </Column> 192 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 193 | <Title value="Dia"/> 194 | <Editor/> 195 | <Renderer/> 196 | </Column> 197 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 198 | <Title value="Hora"/> 199 | <Editor/> 200 | <Renderer/> 201 | </Column> 202 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 203 | <Title value="Observação"/> 204 | <Editor/> 205 | <Renderer/> 206 | </Column> 207 | </TableColumnModel> 208 | </Property> 209 | <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> 210 | <TableHeader reorderingAllowed="true" resizingAllowed="true"/> 211 | </Property> 212 | </Properties> 213 | </Component> 214 | </SubComponents> 215 | </Container> 216 | <Component class="javax.swing.JLabel" name="jLabel1"> 217 | <Constraints> 218 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 219 | <AbsoluteConstraints x="338" y="64" width="-1" height="-1"/> 220 | </Constraint> 221 | </Constraints> 222 | </Component> 223 | <Component class="javax.swing.JLabel" name="jLabel2"> 224 | <Properties> 225 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 226 | <Image iconType="3" name="/ViewsImagens/BannerPC.jpg"/> 227 | </Property> 228 | </Properties> 229 | <Constraints> 230 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 231 | <AbsoluteConstraints x="0" y="0" width="1140" height="490"/> 232 | </Constraint> 233 | </Constraints> 234 | </Component> 235 | </SubComponents> 236 | </Form> 237 | -------------------------------------------------------------------------------- /src/Views/TelaService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template 4 | */ 5 | package Views; 6 | 7 | import Controller.BarbeiroController; 8 | import Controller.ServicesController; 9 | import Model.Service; 10 | import java.sql.SQLException; 11 | import java.util.ArrayList; 12 | import java.util.logging.Level; 13 | import java.util.logging.Logger; 14 | import javax.swing.JLabel; 15 | import javax.swing.JTable; 16 | 17 | /** 18 | * 19 | * @author Biel 20 | */ 21 | public class TelaService extends javax.swing.JFrame { 22 | private final BarbeiroController controller; 23 | private final ServicesController serviceController; 24 | /** 25 | * Creates new form TelaService 26 | */ 27 | public TelaService() throws SQLException { 28 | initComponents(); 29 | controller = new BarbeiroController(this); 30 | serviceController= new ServicesController(this); 31 | iniciarTable(); 32 | 33 | } 34 | 35 | private void iniciarTable() throws SQLException { 36 | controller.atualizarTableService(); 37 | } 38 | 39 | /** 40 | * This method is called from within the constructor to initialize the form. 41 | * WARNING: Do NOT modify this code. The content of this method is always 42 | * regenerated by the Form Editor. 43 | */ 44 | @SuppressWarnings("unchecked") 45 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 46 | private void initComponents() { 47 | 48 | jPanel1 = new javax.swing.JPanel(); 49 | jScrollPane1 = new javax.swing.JScrollPane(); 50 | TableServices = new javax.swing.JTable(); 51 | FotodoService = new javax.swing.JLabel(); 52 | jButton1 = new javax.swing.JButton(); 53 | jButton2 = new javax.swing.JButton(); 54 | jButton3 = new javax.swing.JButton(); 55 | jMenuBar1 = new javax.swing.JMenuBar(); 56 | jMenu1 = new javax.swing.JMenu(); 57 | jMenuItem1 = new javax.swing.JMenuItem(); 58 | 59 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 60 | 61 | jPanel1.setBackground(new java.awt.Color(0, 0, 0, 140)); 62 | 63 | TableServices.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 64 | TableServices.setModel(new javax.swing.table.DefaultTableModel( 65 | new Object [][] { 66 | {null, null, null}, 67 | {null, null, null}, 68 | {null, null, null}, 69 | {null, null, null} 70 | }, 71 | new String [] { 72 | "Codigo", "Corte", "Preço" 73 | } 74 | )); 75 | TableServices.addMouseListener(new java.awt.event.MouseAdapter() { 76 | public void mouseClicked(java.awt.event.MouseEvent evt) { 77 | TableServicesMouseClicked(evt); 78 | } 79 | }); 80 | jScrollPane1.setViewportView(TableServices); 81 | 82 | FotodoService.setBackground(new java.awt.Color(0, 0, 0)); 83 | FotodoService.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 84 | FotodoService.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsImagens/service.jpg"))); // NOI18N 85 | 86 | jButton1.setText("Novo"); 87 | jButton1.addActionListener(new java.awt.event.ActionListener() { 88 | public void actionPerformed(java.awt.event.ActionEvent evt) { 89 | jButton1ActionPerformed(evt); 90 | } 91 | }); 92 | 93 | jButton2.setText("Delete"); 94 | jButton2.addActionListener(new java.awt.event.ActionListener() { 95 | public void actionPerformed(java.awt.event.ActionEvent evt) { 96 | jButton2ActionPerformed(evt); 97 | } 98 | }); 99 | 100 | jButton3.setText("Alterar"); 101 | jButton3.addActionListener(new java.awt.event.ActionListener() { 102 | public void actionPerformed(java.awt.event.ActionEvent evt) { 103 | jButton3ActionPerformed(evt); 104 | } 105 | }); 106 | 107 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); 108 | jPanel1.setLayout(jPanel1Layout); 109 | jPanel1Layout.setHorizontalGroup( 110 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 111 | .addGroup(jPanel1Layout.createSequentialGroup() 112 | .addGap(102, 102, 102) 113 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 114 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE) 115 | .addGroup(jPanel1Layout.createSequentialGroup() 116 | .addComponent(FotodoService) 117 | .addGap(59, 59, 59) 118 | .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE) 119 | .addGap(59, 59, 59) 120 | .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE) 121 | .addGap(60, 60, 60) 122 | .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))) 123 | .addGap(0, 133, Short.MAX_VALUE)) 124 | ); 125 | jPanel1Layout.setVerticalGroup( 126 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 127 | .addGroup(jPanel1Layout.createSequentialGroup() 128 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 129 | .addGroup(jPanel1Layout.createSequentialGroup() 130 | .addGap(0, 0, Short.MAX_VALUE) 131 | .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 132 | .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) 133 | .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) 134 | .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)) 135 | .addGap(54, 54, 54)) 136 | .addGroup(jPanel1Layout.createSequentialGroup() 137 | .addGap(22, 22, 22) 138 | .addComponent(FotodoService) 139 | .addGap(30, 30, 30))) 140 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE) 141 | .addGap(32, 32, 32)) 142 | ); 143 | 144 | jMenu1.setForeground(new java.awt.Color(255, 255, 255)); 145 | jMenu1.setText("Ações"); 146 | 147 | jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsIcons/usuario-icon.png"))); // NOI18N 148 | jMenuItem1.setText("Voltar"); 149 | jMenuItem1.addActionListener(new java.awt.event.ActionListener() { 150 | public void actionPerformed(java.awt.event.ActionEvent evt) { 151 | jMenuItem1ActionPerformed(evt); 152 | } 153 | }); 154 | jMenu1.add(jMenuItem1); 155 | 156 | jMenuBar1.add(jMenu1); 157 | 158 | setJMenuBar(jMenuBar1); 159 | 160 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 161 | getContentPane().setLayout(layout); 162 | layout.setHorizontalGroup( 163 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 164 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 165 | .addContainerGap() 166 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 167 | .addContainerGap()) 168 | ); 169 | layout.setVerticalGroup( 170 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 171 | .addGroup(layout.createSequentialGroup() 172 | .addContainerGap() 173 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 174 | .addContainerGap(27, Short.MAX_VALUE)) 175 | ); 176 | 177 | pack(); 178 | }// </editor-fold>//GEN-END:initComponents 179 | 180 | private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed 181 | try { 182 | // TODO add your handling code here: 183 | MenuBarbeiro menu = new MenuBarbeiro(); 184 | menu.setVisible(true); 185 | setVisible(false); 186 | } catch (SQLException ex) { 187 | Logger.getLogger(TelaService.class.getName()).log(Level.SEVERE, null, ex); 188 | } 189 | }//GEN-LAST:event_jMenuItem1ActionPerformed 190 | 191 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 192 | // TODO add your handling code here: 193 | AddService service = new AddService(); 194 | service.setVisible(true); 195 | setVisible(false); 196 | }//GEN-LAST:event_jButton1ActionPerformed 197 | 198 | private void TableServicesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_TableServicesMouseClicked 199 | try { 200 | // TODO add your handling code here: 201 | controller.VincularCampodaTabelaService(); 202 | } catch (SQLException ex) { 203 | Logger.getLogger(TelaService.class.getName()).log(Level.SEVERE, null, ex); 204 | } 205 | }//GEN-LAST:event_TableServicesMouseClicked 206 | 207 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed 208 | // TODO add your handling code here: 209 | serviceController.Excluir(); 210 | }//GEN-LAST:event_jButton2ActionPerformed 211 | 212 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed 213 | // TODO add your handling code here: 214 | AlterarService alterar = new AlterarService(); 215 | alterar.setVisible(true); 216 | setVisible(false); 217 | 218 | }//GEN-LAST:event_jButton3ActionPerformed 219 | 220 | /** 221 | * @param args the command line arguments 222 | */ 223 | public static void main(String args[]) { 224 | /* Set the Nimbus look and feel */ 225 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 226 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 227 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 228 | */ 229 | try { 230 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 231 | if ("Nimbus".equals(info.getName())) { 232 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 233 | break; 234 | } 235 | } 236 | } catch (ClassNotFoundException ex) { 237 | java.util.logging.Logger.getLogger(TelaService.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 238 | } catch (InstantiationException ex) { 239 | java.util.logging.Logger.getLogger(TelaService.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 240 | } catch (IllegalAccessException ex) { 241 | java.util.logging.Logger.getLogger(TelaService.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 242 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 243 | java.util.logging.Logger.getLogger(TelaService.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 244 | } 245 | //</editor-fold> 246 | 247 | /* Create and display the form */ 248 | java.awt.EventQueue.invokeLater(new Runnable() { 249 | public void run() { 250 | try { 251 | new TelaService().setVisible(true); 252 | } catch (SQLException ex) { 253 | Logger.getLogger(TelaService.class.getName()).log(Level.SEVERE, null, ex); 254 | } 255 | } 256 | }); 257 | } 258 | 259 | // Variables declaration - do not modify//GEN-BEGIN:variables 260 | private javax.swing.JLabel FotodoService; 261 | private javax.swing.JTable TableServices; 262 | private javax.swing.JButton jButton1; 263 | private javax.swing.JButton jButton2; 264 | private javax.swing.JButton jButton3; 265 | private javax.swing.JMenu jMenu1; 266 | private javax.swing.JMenuBar jMenuBar1; 267 | private javax.swing.JMenuItem jMenuItem1; 268 | private javax.swing.JPanel jPanel1; 269 | private javax.swing.JScrollPane jScrollPane1; 270 | // End of variables declaration//GEN-END:variables 271 | 272 | public JTable getTableServices() { 273 | return TableServices; 274 | } 275 | 276 | public void setTableServices(JTable TableServices) { 277 | this.TableServices = TableServices; 278 | } 279 | 280 | public JLabel getFotodoService() { 281 | return FotodoService; 282 | } 283 | 284 | public void setFotodoService(JLabel FotodoService) { 285 | this.FotodoService = FotodoService; 286 | } 287 | 288 | 289 | 290 | 291 | } 292 | -------------------------------------------------------------------------------- /src/Views/LoginBarbeiro.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template 4 | */ 5 | package Views; 6 | 7 | import Controller.BarbeiroController; 8 | import DAO.Conexao; 9 | import java.sql.Connection; 10 | import java.sql.PreparedStatement; 11 | import java.sql.SQLException; 12 | import java.util.logging.Level; 13 | import java.util.logging.Logger; 14 | import javax.swing.JPasswordField; 15 | import javax.swing.JTextField; 16 | /** 17 | * 18 | * @author Biel 19 | */ 20 | public class LoginBarbeiro extends javax.swing.JFrame { 21 | 22 | private final BarbeiroController controller; 23 | /** 24 | * Creates new form LoginBarbeiro 25 | */ 26 | public LoginBarbeiro() { 27 | initComponents(); 28 | controller = new BarbeiroController(this); 29 | } 30 | 31 | public LoginBarbeiro(BarbeiroController controller) { 32 | this.controller = controller; 33 | } 34 | 35 | /** 36 | * This method is called from within the constructor to initialize the form. 37 | * WARNING: Do NOT modify this code. The content of this method is always 38 | * regenerated by the Form Editor. 39 | */ 40 | @SuppressWarnings("unchecked") 41 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 42 | private void initComponents() { 43 | 44 | jPanel2 = new javax.swing.JPanel(); 45 | jLabel3 = new javax.swing.JLabel(); 46 | jLabel4 = new javax.swing.JLabel(); 47 | jLabel6 = new javax.swing.JLabel(); 48 | jLabel2 = new javax.swing.JLabel(); 49 | jButton1 = new javax.swing.JButton(); 50 | VarNameBarbeiro = new javax.swing.JTextField(); 51 | VarPasswordBarbeiro = new javax.swing.JPasswordField(); 52 | jLabel5 = new javax.swing.JLabel(); 53 | jPanel1 = new javax.swing.JPanel(); 54 | jLabel8 = new javax.swing.JLabel(); 55 | 56 | setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); 57 | getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); 58 | 59 | jPanel2.setBackground(new java.awt.Color(0, 0, 0, 150)); 60 | jPanel2.setForeground(new java.awt.Color(244, 244, 244)); 61 | 62 | jLabel3.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N 63 | jLabel3.setForeground(new java.awt.Color(255, 255, 255)); 64 | jLabel3.setText("Nome:"); 65 | 66 | jLabel4.setFont(new java.awt.Font("Segoe UI", 1, 14)); // NOI18N 67 | jLabel4.setForeground(new java.awt.Color(255, 255, 255)); 68 | jLabel4.setText("Senha:"); 69 | 70 | jLabel6.setForeground(new java.awt.Color(255, 255, 255)); 71 | jLabel6.setText("Esqueceu a Senha?"); 72 | 73 | jLabel2.setFont(new java.awt.Font("Segoe UI", 1, 18)); // NOI18N 74 | jLabel2.setForeground(new java.awt.Color(255, 255, 255)); 75 | jLabel2.setText("Entrar como barbeiro"); 76 | 77 | jButton1.setBackground(new java.awt.Color(0, 153, 0)); 78 | jButton1.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 79 | jButton1.setForeground(new java.awt.Color(255, 255, 255)); 80 | jButton1.setText("ENTRAR"); 81 | jButton1.setBorder(null); 82 | jButton1.addActionListener(new java.awt.event.ActionListener() { 83 | public void actionPerformed(java.awt.event.ActionEvent evt) { 84 | jButton1ActionPerformed(evt); 85 | } 86 | }); 87 | 88 | VarNameBarbeiro.setBorder(null); 89 | VarNameBarbeiro.addActionListener(new java.awt.event.ActionListener() { 90 | public void actionPerformed(java.awt.event.ActionEvent evt) { 91 | VarNameBarbeiroActionPerformed(evt); 92 | } 93 | }); 94 | 95 | VarPasswordBarbeiro.setBorder(null); 96 | VarPasswordBarbeiro.addActionListener(new java.awt.event.ActionListener() { 97 | public void actionPerformed(java.awt.event.ActionEvent evt) { 98 | VarPasswordBarbeiroActionPerformed(evt); 99 | } 100 | }); 101 | 102 | jLabel5.setForeground(new java.awt.Color(255, 255, 255)); 103 | jLabel5.setText("Entrar como Cliente"); 104 | jLabel5.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); 105 | jLabel5.addMouseListener(new java.awt.event.MouseAdapter() { 106 | public void mouseClicked(java.awt.event.MouseEvent evt) { 107 | jLabel5MouseClicked(evt); 108 | } 109 | }); 110 | 111 | jPanel1.setBackground(new java.awt.Color(153, 153, 153)); 112 | 113 | jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsImagens/Logo_resized.png"))); // NOI18N 114 | 115 | javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); 116 | jPanel1.setLayout(jPanel1Layout); 117 | jPanel1Layout.setHorizontalGroup( 118 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 119 | .addGroup(jPanel1Layout.createSequentialGroup() 120 | .addGap(23, 23, 23) 121 | .addComponent(jLabel8) 122 | .addContainerGap(14, Short.MAX_VALUE)) 123 | ); 124 | jPanel1Layout.setVerticalGroup( 125 | jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 126 | .addGroup(jPanel1Layout.createSequentialGroup() 127 | .addGap(45, 45, 45) 128 | .addComponent(jLabel8) 129 | .addContainerGap(55, Short.MAX_VALUE)) 130 | ); 131 | 132 | javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); 133 | jPanel2.setLayout(jPanel2Layout); 134 | jPanel2Layout.setHorizontalGroup( 135 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 136 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() 137 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 138 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE) 139 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 140 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() 141 | .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 142 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) 143 | .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING) 144 | .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING) 145 | .addComponent(VarNameBarbeiro, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE) 146 | .addComponent(VarPasswordBarbeiro, javax.swing.GroupLayout.Alignment.LEADING) 147 | .addComponent(jButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 148 | .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout.createSequentialGroup() 149 | .addGap(9, 9, 9) 150 | .addComponent(jLabel2))) 151 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() 152 | .addComponent(jLabel6) 153 | .addGap(56, 56, 56))) 154 | .addGap(60, 60, 60)) 155 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() 156 | .addComponent(jLabel5) 157 | .addGap(107, 107, 107)))) 158 | ); 159 | jPanel2Layout.setVerticalGroup( 160 | jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 161 | .addGroup(jPanel2Layout.createSequentialGroup() 162 | .addGap(52, 52, 52) 163 | .addComponent(jLabel2) 164 | .addGap(26, 26, 26) 165 | .addComponent(jLabel3) 166 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 167 | .addComponent(VarNameBarbeiro, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) 168 | .addGap(18, 18, 18) 169 | .addComponent(jLabel4) 170 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 171 | .addComponent(VarPasswordBarbeiro, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) 172 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 173 | .addComponent(jLabel6) 174 | .addGap(18, 18, 18) 175 | .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) 176 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 177 | .addComponent(jLabel5) 178 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 179 | .addGroup(jPanel2Layout.createSequentialGroup() 180 | .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 181 | .addGap(0, 0, Short.MAX_VALUE)) 182 | ); 183 | 184 | getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 660, 400)); 185 | 186 | pack(); 187 | }// </editor-fold>//GEN-END:initComponents 188 | 189 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 190 | try { 191 | // TODO add your handling code here: 192 | controller.Autenticar(); 193 | } catch (SQLException ex) { 194 | Logger.getLogger(LoginBarbeiro.class.getName()).log(Level.SEVERE, null, ex); 195 | } 196 | 197 | }//GEN-LAST:event_jButton1ActionPerformed 198 | 199 | private void VarNameBarbeiroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VarNameBarbeiroActionPerformed 200 | // TODO add your handling code here: 201 | }//GEN-LAST:event_VarNameBarbeiroActionPerformed 202 | 203 | private void jLabel5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel5MouseClicked 204 | // TODO add your handling code here: 205 | LoginCliente cliente = new LoginCliente(); 206 | cliente.setVisible(true); 207 | setVisible(false); 208 | }//GEN-LAST:event_jLabel5MouseClicked 209 | 210 | private void VarPasswordBarbeiroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VarPasswordBarbeiroActionPerformed 211 | // TODO add your handling code here: 212 | }//GEN-LAST:event_VarPasswordBarbeiroActionPerformed 213 | 214 | /** 215 | * @param args the command line arguments 216 | */ 217 | public static void main(String args[]) { 218 | /* Set the Nimbus look and feel */ 219 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 220 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 221 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 222 | */ 223 | try { 224 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 225 | if ("Nimbus".equals(info.getName())) { 226 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 227 | break; 228 | } 229 | } 230 | } catch (ClassNotFoundException ex) { 231 | java.util.logging.Logger.getLogger(LoginBarbeiro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 232 | } catch (InstantiationException ex) { 233 | java.util.logging.Logger.getLogger(LoginBarbeiro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 234 | } catch (IllegalAccessException ex) { 235 | java.util.logging.Logger.getLogger(LoginBarbeiro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 236 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 237 | java.util.logging.Logger.getLogger(LoginBarbeiro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 238 | } 239 | //</editor-fold> 240 | 241 | /* Create and display the form */ 242 | java.awt.EventQueue.invokeLater(new Runnable() { 243 | public void run() { 244 | new LoginBarbeiro().setVisible(true); 245 | } 246 | }); 247 | } 248 | 249 | public JTextField getVarNameBarbeiro() { 250 | return VarNameBarbeiro; 251 | } 252 | 253 | public void setVarNameBarbeiro(JTextField VarNameBarbeiro) { 254 | this.VarNameBarbeiro = VarNameBarbeiro; 255 | } 256 | 257 | public JPasswordField getVarPasswordBarbeiro() { 258 | return VarPasswordBarbeiro; 259 | } 260 | 261 | public void setVarPasswordBarbeiro(JPasswordField VarPasswordBarbeiro) { 262 | this.VarPasswordBarbeiro = VarPasswordBarbeiro; 263 | } 264 | 265 | 266 | 267 | 268 | // Variables declaration - do not modify//GEN-BEGIN:variables 269 | private javax.swing.JTextField VarNameBarbeiro; 270 | private javax.swing.JPasswordField VarPasswordBarbeiro; 271 | private javax.swing.JButton jButton1; 272 | private javax.swing.JLabel jLabel2; 273 | private javax.swing.JLabel jLabel3; 274 | private javax.swing.JLabel jLabel4; 275 | private javax.swing.JLabel jLabel5; 276 | private javax.swing.JLabel jLabel6; 277 | private javax.swing.JLabel jLabel8; 278 | private javax.swing.JPanel jPanel1; 279 | private javax.swing.JPanel jPanel2; 280 | // End of variables declaration//GEN-END:variables 281 | } 282 | -------------------------------------------------------------------------------- /src/Views/LoginBarbeiro.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <Properties> 5 | <Property name="defaultCloseOperation" type="int" value="2"/> 6 | </Properties> 7 | <SyntheticProperties> 8 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 9 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 10 | </SyntheticProperties> 11 | <AuxValues> 12 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 13 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 14 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 15 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 16 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 17 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 18 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 19 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 20 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 21 | <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-111,0,0,2,-116"/> 22 | </AuxValues> 23 | 24 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> 25 | <Property name="useNullLayout" type="boolean" value="false"/> 26 | </Layout> 27 | <SubComponents> 28 | <Container class="javax.swing.JPanel" name="jPanel2"> 29 | <Properties> 30 | <Property name="background" type="java.awt.Color" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> 31 | <Connection code="new java.awt.Color(0, 0, 0, 150)" type="code"/> 32 | </Property> 33 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 34 | <Color blue="f4" green="f4" red="f4" type="rgb"/> 35 | </Property> 36 | </Properties> 37 | <Constraints> 38 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 39 | <AbsoluteConstraints x="0" y="0" width="660" height="400"/> 40 | </Constraint> 41 | </Constraints> 42 | 43 | <Layout> 44 | <DimensionLayout dim="0"> 45 | <Group type="103" groupAlignment="0" attributes="0"> 46 | <Group type="102" alignment="1" attributes="0"> 47 | <Component id="jPanel1" min="-2" max="-2" attributes="0"/> 48 | <EmptySpace pref="63" max="32767" attributes="0"/> 49 | <Group type="103" groupAlignment="0" attributes="0"> 50 | <Group type="102" alignment="1" attributes="0"> 51 | <Group type="103" groupAlignment="0" attributes="0"> 52 | <Group type="103" alignment="1" groupAlignment="1" max="-2" attributes="0"> 53 | <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> 54 | <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> 55 | <Component id="VarNameBarbeiro" alignment="0" pref="200" max="32767" attributes="0"/> 56 | <Component id="VarPasswordBarbeiro" alignment="0" max="32767" attributes="0"/> 57 | <Component id="jButton1" alignment="0" max="32767" attributes="0"/> 58 | <Group type="102" alignment="0" attributes="0"> 59 | <EmptySpace min="-2" pref="9" max="-2" attributes="0"/> 60 | <Component id="jLabel2" min="-2" max="-2" attributes="0"/> 61 | </Group> 62 | </Group> 63 | <Group type="102" alignment="1" attributes="0"> 64 | <Component id="jLabel6" min="-2" max="-2" attributes="0"/> 65 | <EmptySpace min="-2" pref="56" max="-2" attributes="0"/> 66 | </Group> 67 | </Group> 68 | <EmptySpace min="-2" pref="60" max="-2" attributes="0"/> 69 | </Group> 70 | <Group type="102" alignment="1" attributes="0"> 71 | <Component id="jLabel5" min="-2" max="-2" attributes="0"/> 72 | <EmptySpace min="-2" pref="107" max="-2" attributes="0"/> 73 | </Group> 74 | </Group> 75 | </Group> 76 | </Group> 77 | </DimensionLayout> 78 | <DimensionLayout dim="1"> 79 | <Group type="103" groupAlignment="0" attributes="0"> 80 | <Group type="102" attributes="0"> 81 | <EmptySpace min="-2" pref="52" max="-2" attributes="0"/> 82 | <Component id="jLabel2" min="-2" max="-2" attributes="0"/> 83 | <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> 84 | <Component id="jLabel3" min="-2" max="-2" attributes="0"/> 85 | <EmptySpace max="-2" attributes="0"/> 86 | <Component id="VarNameBarbeiro" min="-2" pref="34" max="-2" attributes="0"/> 87 | <EmptySpace type="separate" max="-2" attributes="0"/> 88 | <Component id="jLabel4" min="-2" max="-2" attributes="0"/> 89 | <EmptySpace max="-2" attributes="0"/> 90 | <Component id="VarPasswordBarbeiro" min="-2" pref="34" max="-2" attributes="0"/> 91 | <EmptySpace max="-2" attributes="0"/> 92 | <Component id="jLabel6" min="-2" max="-2" attributes="0"/> 93 | <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> 94 | <Component id="jButton1" min="-2" pref="40" max="-2" attributes="0"/> 95 | <EmptySpace max="-2" attributes="0"/> 96 | <Component id="jLabel5" min="-2" max="-2" attributes="0"/> 97 | <EmptySpace max="32767" attributes="0"/> 98 | </Group> 99 | <Group type="102" alignment="0" attributes="0"> 100 | <Component id="jPanel1" min="-2" max="-2" attributes="0"/> 101 | <EmptySpace min="0" pref="0" max="32767" attributes="0"/> 102 | </Group> 103 | </Group> 104 | </DimensionLayout> 105 | </Layout> 106 | <SubComponents> 107 | <Component class="javax.swing.JLabel" name="jLabel3"> 108 | <Properties> 109 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 110 | <Font name="Segoe UI" size="14" style="1"/> 111 | </Property> 112 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 113 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 114 | </Property> 115 | <Property name="text" type="java.lang.String" value="Nome:"/> 116 | </Properties> 117 | </Component> 118 | <Component class="javax.swing.JLabel" name="jLabel4"> 119 | <Properties> 120 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 121 | <Font name="Segoe UI" size="14" style="1"/> 122 | </Property> 123 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 124 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 125 | </Property> 126 | <Property name="text" type="java.lang.String" value="Senha:"/> 127 | </Properties> 128 | </Component> 129 | <Component class="javax.swing.JLabel" name="jLabel6"> 130 | <Properties> 131 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 132 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 133 | </Property> 134 | <Property name="text" type="java.lang.String" value="Esqueceu a Senha?"/> 135 | </Properties> 136 | </Component> 137 | <Component class="javax.swing.JLabel" name="jLabel2"> 138 | <Properties> 139 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 140 | <Font name="Segoe UI" size="18" style="1"/> 141 | </Property> 142 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 143 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 144 | </Property> 145 | <Property name="text" type="java.lang.String" value="Entrar como barbeiro"/> 146 | </Properties> 147 | </Component> 148 | <Component class="javax.swing.JButton" name="jButton1"> 149 | <Properties> 150 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 151 | <Color blue="0" green="99" red="0" type="rgb"/> 152 | </Property> 153 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 154 | <Font name="Segoe UI" size="12" style="1"/> 155 | </Property> 156 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 157 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 158 | </Property> 159 | <Property name="text" type="java.lang.String" value="ENTRAR"/> 160 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 161 | <Border info="null"/> 162 | </Property> 163 | </Properties> 164 | <Events> 165 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 166 | </Events> 167 | </Component> 168 | <Component class="javax.swing.JTextField" name="VarNameBarbeiro"> 169 | <Properties> 170 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 171 | <Border info="null"/> 172 | </Property> 173 | </Properties> 174 | <Events> 175 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="VarNameBarbeiroActionPerformed"/> 176 | </Events> 177 | </Component> 178 | <Component class="javax.swing.JPasswordField" name="VarPasswordBarbeiro"> 179 | <Properties> 180 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 181 | <Border info="null"/> 182 | </Property> 183 | </Properties> 184 | <Events> 185 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="VarPasswordBarbeiroActionPerformed"/> 186 | </Events> 187 | </Component> 188 | <Component class="javax.swing.JLabel" name="jLabel5"> 189 | <Properties> 190 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 191 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 192 | </Property> 193 | <Property name="text" type="java.lang.String" value="Entrar como Cliente"/> 194 | <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> 195 | <Color id="Hand Cursor"/> 196 | </Property> 197 | </Properties> 198 | <Events> 199 | <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel5MouseClicked"/> 200 | </Events> 201 | </Component> 202 | <Container class="javax.swing.JPanel" name="jPanel1"> 203 | <Properties> 204 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 205 | <Color blue="99" green="99" red="99" type="rgb"/> 206 | </Property> 207 | </Properties> 208 | 209 | <Layout> 210 | <DimensionLayout dim="0"> 211 | <Group type="103" groupAlignment="0" attributes="0"> 212 | <Group type="102" alignment="0" attributes="0"> 213 | <EmptySpace min="-2" pref="23" max="-2" attributes="0"/> 214 | <Component id="jLabel8" min="-2" max="-2" attributes="0"/> 215 | <EmptySpace pref="14" max="32767" attributes="0"/> 216 | </Group> 217 | </Group> 218 | </DimensionLayout> 219 | <DimensionLayout dim="1"> 220 | <Group type="103" groupAlignment="0" attributes="0"> 221 | <Group type="102" alignment="0" attributes="0"> 222 | <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> 223 | <Component id="jLabel8" min="-2" max="-2" attributes="0"/> 224 | <EmptySpace pref="55" max="32767" attributes="0"/> 225 | </Group> 226 | </Group> 227 | </DimensionLayout> 228 | </Layout> 229 | <SubComponents> 230 | <Component class="javax.swing.JLabel" name="jLabel8"> 231 | <Properties> 232 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 233 | <Image iconType="3" name="/ViewsImagens/Logo_resized.png"/> 234 | </Property> 235 | </Properties> 236 | </Component> 237 | </SubComponents> 238 | </Container> 239 | </SubComponents> 240 | </Container> 241 | </SubComponents> 242 | </Form> 243 | -------------------------------------------------------------------------------- /src/Views/MenuBarbeiro.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <NonVisualComponents> 5 | <Menu class="javax.swing.JMenuBar" name="jMenuBar1"> 6 | <Properties> 7 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 8 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 9 | </Property> 10 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 11 | <Color blue="0" green="0" red="0" type="rgb"/> 12 | </Property> 13 | </Properties> 14 | <SubComponents> 15 | <Menu class="javax.swing.JMenu" name="jMenu2"> 16 | <Properties> 17 | <Property name="text" type="java.lang.String" value="Edit"/> 18 | </Properties> 19 | <SubComponents> 20 | <MenuItem class="javax.swing.JMenuItem" name="jMenuItem2"> 21 | <Properties> 22 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 23 | <Color blue="0" green="0" red="0" type="rgb"/> 24 | </Property> 25 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 26 | <Image iconType="3" name="/ViewsIcons/tesoura-icon.png"/> 27 | </Property> 28 | <Property name="text" type="java.lang.String" value="Serviços"/> 29 | </Properties> 30 | <Events> 31 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem2ActionPerformed"/> 32 | </Events> 33 | </MenuItem> 34 | <MenuItem class="javax.swing.JMenuItem" name="jMenuItem3"> 35 | <Properties> 36 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 37 | <Color blue="0" green="0" red="0" type="rgb"/> 38 | </Property> 39 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 40 | <Image iconType="3" name="/ViewsIcons/usuario-icon.png"/> 41 | </Property> 42 | <Property name="text" type="java.lang.String" value="Sair"/> 43 | </Properties> 44 | <Events> 45 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem3ActionPerformed"/> 46 | </Events> 47 | </MenuItem> 48 | <MenuItem class="javax.swing.JMenuItem" name="jMenuItem1"> 49 | <Properties> 50 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 51 | <Color blue="0" green="0" red="0" type="rgb"/> 52 | </Property> 53 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 54 | <Image iconType="3" name="/ViewsIcons/cliente-icon.png"/> 55 | </Property> 56 | <Property name="text" type="java.lang.String" value="Novo Acesso"/> 57 | </Properties> 58 | <Events> 59 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem1ActionPerformed"/> 60 | </Events> 61 | </MenuItem> 62 | <MenuItem class="javax.swing.JMenuItem" name="jMenuItem4"> 63 | <Properties> 64 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 65 | <Color blue="0" green="0" red="0" type="rgb"/> 66 | </Property> 67 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 68 | <Image iconType="3" name="/ViewsIcons/agenda-icon.png"/> 69 | </Property> 70 | <Property name="text" type="java.lang.String" value="Agendar"/> 71 | </Properties> 72 | <Events> 73 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem4ActionPerformed"/> 74 | </Events> 75 | </MenuItem> 76 | </SubComponents> 77 | </Menu> 78 | </SubComponents> 79 | </Menu> 80 | </NonVisualComponents> 81 | <Properties> 82 | <Property name="defaultCloseOperation" type="int" value="3"/> 83 | </Properties> 84 | <SyntheticProperties> 85 | <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/> 86 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 87 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 88 | </SyntheticProperties> 89 | <AuxValues> 90 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 91 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 92 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 93 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 94 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 95 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 96 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 97 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 98 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 99 | <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,2,0,0,4,107"/> 100 | </AuxValues> 101 | 102 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> 103 | <Property name="useNullLayout" type="boolean" value="false"/> 104 | </Layout> 105 | <SubComponents> 106 | <Container class="javax.swing.JScrollPane" name="jScrollPane1"> 107 | <AuxValues> 108 | <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> 109 | </AuxValues> 110 | <Constraints> 111 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 112 | <AbsoluteConstraints x="100" y="120" width="910" height="330"/> 113 | </Constraint> 114 | </Constraints> 115 | 116 | <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> 117 | <SubComponents> 118 | <Component class="javax.swing.JTable" name="TableAgendamentos"> 119 | <Properties> 120 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 121 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 122 | </Property> 123 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 124 | <Color blue="0" green="0" red="0" type="rgb"/> 125 | </Property> 126 | <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> 127 | <Table columnCount="8" rowCount="4"> 128 | <Column editable="true" title="Código" type="java.lang.Object"/> 129 | <Column editable="true" title="Nome" type="java.lang.Object"/> 130 | <Column editable="true" title="whats" type="java.lang.Object"/> 131 | <Column editable="true" title="Serviço" type="java.lang.Object"/> 132 | <Column editable="true" title="Data" type="java.lang.Object"/> 133 | <Column editable="true" title="Hora" type="java.lang.Object"/> 134 | <Column editable="true" title="Preço" type="java.lang.Object"/> 135 | <Column editable="true" title="Obser" type="java.lang.Object"/> 136 | </Table> 137 | </Property> 138 | </Properties> 139 | </Component> 140 | </SubComponents> 141 | </Container> 142 | <Component class="javax.swing.JButton" name="TodosAgendamentos"> 143 | <Properties> 144 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 145 | <Font name="Segoe UI" size="12" style="1"/> 146 | </Property> 147 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 148 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 149 | </Property> 150 | <Property name="text" type="java.lang.String" value="Em Dia"/> 151 | </Properties> 152 | <Events> 153 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="TodosAgendamentosActionPerformed"/> 154 | </Events> 155 | <Constraints> 156 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 157 | <AbsoluteConstraints x="320" y="70" width="70" height="30"/> 158 | </Constraint> 159 | </Constraints> 160 | </Component> 161 | <Component class="javax.swing.JButton" name="jButton1"> 162 | <Properties> 163 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 164 | <Font name="Segoe UI" size="12" style="1"/> 165 | </Property> 166 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 167 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 168 | </Property> 169 | <Property name="text" type="java.lang.String" value="Delete"/> 170 | </Properties> 171 | <Events> 172 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 173 | </Events> 174 | <Constraints> 175 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 176 | <AbsoluteConstraints x="580" y="70" width="-1" height="30"/> 177 | </Constraint> 178 | </Constraints> 179 | </Component> 180 | <Component class="javax.swing.JButton" name="AgendamentoHistorico"> 181 | <Properties> 182 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 183 | <Font name="Segoe UI" size="12" style="1"/> 184 | </Property> 185 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 186 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 187 | </Property> 188 | <Property name="text" type="java.lang.String" value="Historico"/> 189 | </Properties> 190 | <Events> 191 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="AgendamentoHistoricoActionPerformed"/> 192 | </Events> 193 | <Constraints> 194 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 195 | <AbsoluteConstraints x="480" y="70" width="-1" height="30"/> 196 | </Constraint> 197 | </Constraints> 198 | </Component> 199 | <Component class="javax.swing.JLabel" name="Welcome"> 200 | <Properties> 201 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 202 | <Font name="Segoe UI" size="20" style="1"/> 203 | </Property> 204 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 205 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 206 | </Property> 207 | </Properties> 208 | <Constraints> 209 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 210 | <AbsoluteConstraints x="120" y="10" width="290" height="30"/> 211 | </Constraint> 212 | </Constraints> 213 | </Component> 214 | <Component class="javax.swing.JButton" name="AgendamentoHoje"> 215 | <Properties> 216 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 217 | <Font name="Segoe UI" size="12" style="1"/> 218 | </Property> 219 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 220 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 221 | </Property> 222 | <Property name="text" type="java.lang.String" value="Hoje"/> 223 | </Properties> 224 | <Events> 225 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="AgendamentoHojeActionPerformed"/> 226 | </Events> 227 | <Constraints> 228 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 229 | <AbsoluteConstraints x="410" y="70" width="-1" height="30"/> 230 | </Constraint> 231 | </Constraints> 232 | </Component> 233 | <Component class="javax.swing.JLabel" name="jLabel1"> 234 | <Properties> 235 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 236 | <Font name="Segoe UI" size="24" style="1"/> 237 | </Property> 238 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 239 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 240 | </Property> 241 | <Property name="text" type="java.lang.String" value="Agendamentos"/> 242 | </Properties> 243 | <Constraints> 244 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 245 | <AbsoluteConstraints x="120" y="70" width="-1" height="-1"/> 246 | </Constraint> 247 | </Constraints> 248 | </Component> 249 | <Component class="javax.swing.JLabel" name="jLabel2"> 250 | <Properties> 251 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 252 | <Image iconType="3" name="/ViewsImagens/BannerPC.jpg"/> 253 | </Property> 254 | </Properties> 255 | <Constraints> 256 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 257 | <AbsoluteConstraints x="0" y="0" width="1130" height="490"/> 258 | </Constraint> 259 | </Constraints> 260 | </Component> 261 | </SubComponents> 262 | </Form> 263 | -------------------------------------------------------------------------------- /src/Views/MenuBarbeiro.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license 3 | * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template 4 | */ 5 | package Views; 6 | 7 | import Controller.AgendamentoController; 8 | import Controller.BarbeiroController; 9 | import java.sql.SQLException; 10 | import java.util.logging.Level; 11 | import java.util.logging.Logger; 12 | import javax.swing.JLabel; 13 | import javax.swing.JTable; 14 | 15 | /** 16 | * 17 | * @author Biel 18 | */ 19 | public class MenuBarbeiro extends javax.swing.JFrame { 20 | 21 | private BarbeiroController controller; 22 | private AgendamentoController agendamentoController; 23 | private MenuBarbeiro menu; 24 | 25 | public MenuBarbeiro(BarbeiroController controller) { 26 | this.controller = controller; 27 | } 28 | 29 | /** 30 | * Creates new form MenuBarbeiro 31 | */ 32 | public MenuBarbeiro() throws SQLException { 33 | initComponents(); 34 | controller = new BarbeiroController(this); 35 | agendamentoController = new AgendamentoController(this); 36 | iniciarTable(); 37 | } 38 | 39 | private void iniciarTable() throws SQLException { 40 | controller.atualizarTabelaAgendamento(); 41 | } 42 | 43 | 44 | 45 | 46 | /** 47 | * This method is called from within the constructor to initialize the form. 48 | * WARNING: Do NOT modify this code. The content of this method is always 49 | * regenerated by the Form Editor. 50 | */ 51 | @SuppressWarnings("unchecked") 52 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 53 | private void initComponents() { 54 | 55 | jScrollPane1 = new javax.swing.JScrollPane(); 56 | TableAgendamentos = new javax.swing.JTable(); 57 | TodosAgendamentos = new javax.swing.JButton(); 58 | jButton1 = new javax.swing.JButton(); 59 | AgendamentoHistorico = new javax.swing.JButton(); 60 | Welcome = new javax.swing.JLabel(); 61 | AgendamentoHoje = new javax.swing.JButton(); 62 | jLabel1 = new javax.swing.JLabel(); 63 | jLabel2 = new javax.swing.JLabel(); 64 | jMenuBar1 = new javax.swing.JMenuBar(); 65 | jMenu2 = new javax.swing.JMenu(); 66 | jMenuItem2 = new javax.swing.JMenuItem(); 67 | jMenuItem3 = new javax.swing.JMenuItem(); 68 | jMenuItem1 = new javax.swing.JMenuItem(); 69 | jMenuItem4 = new javax.swing.JMenuItem(); 70 | 71 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 72 | getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); 73 | 74 | TableAgendamentos.setBackground(new java.awt.Color(255, 255, 255)); 75 | TableAgendamentos.setForeground(new java.awt.Color(0, 0, 0)); 76 | TableAgendamentos.setModel(new javax.swing.table.DefaultTableModel( 77 | new Object [][] { 78 | {null, null, null, null, null, null, null, null}, 79 | {null, null, null, null, null, null, null, null}, 80 | {null, null, null, null, null, null, null, null}, 81 | {null, null, null, null, null, null, null, null} 82 | }, 83 | new String [] { 84 | "Código", "Nome", "whats", "Serviço", "Data", "Hora", "Preço", "Obser" 85 | } 86 | )); 87 | jScrollPane1.setViewportView(TableAgendamentos); 88 | 89 | getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 120, 910, 330)); 90 | 91 | TodosAgendamentos.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 92 | TodosAgendamentos.setForeground(new java.awt.Color(255, 255, 255)); 93 | TodosAgendamentos.setText("Em Dia"); 94 | TodosAgendamentos.addActionListener(new java.awt.event.ActionListener() { 95 | public void actionPerformed(java.awt.event.ActionEvent evt) { 96 | TodosAgendamentosActionPerformed(evt); 97 | } 98 | }); 99 | getContentPane().add(TodosAgendamentos, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 70, 70, 30)); 100 | 101 | jButton1.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 102 | jButton1.setForeground(new java.awt.Color(255, 255, 255)); 103 | jButton1.setText("Delete"); 104 | jButton1.addActionListener(new java.awt.event.ActionListener() { 105 | public void actionPerformed(java.awt.event.ActionEvent evt) { 106 | jButton1ActionPerformed(evt); 107 | } 108 | }); 109 | getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(580, 70, -1, 30)); 110 | 111 | AgendamentoHistorico.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 112 | AgendamentoHistorico.setForeground(new java.awt.Color(255, 255, 255)); 113 | AgendamentoHistorico.setText("Historico"); 114 | AgendamentoHistorico.addActionListener(new java.awt.event.ActionListener() { 115 | public void actionPerformed(java.awt.event.ActionEvent evt) { 116 | AgendamentoHistoricoActionPerformed(evt); 117 | } 118 | }); 119 | getContentPane().add(AgendamentoHistorico, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 70, -1, 30)); 120 | 121 | Welcome.setFont(new java.awt.Font("Segoe UI", 1, 20)); // NOI18N 122 | Welcome.setForeground(new java.awt.Color(255, 255, 255)); 123 | getContentPane().add(Welcome, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 10, 290, 30)); 124 | 125 | AgendamentoHoje.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N 126 | AgendamentoHoje.setForeground(new java.awt.Color(255, 255, 255)); 127 | AgendamentoHoje.setText("Hoje"); 128 | AgendamentoHoje.addActionListener(new java.awt.event.ActionListener() { 129 | public void actionPerformed(java.awt.event.ActionEvent evt) { 130 | AgendamentoHojeActionPerformed(evt); 131 | } 132 | }); 133 | getContentPane().add(AgendamentoHoje, new org.netbeans.lib.awtextra.AbsoluteConstraints(410, 70, -1, 30)); 134 | 135 | jLabel1.setFont(new java.awt.Font("Segoe UI", 1, 24)); // NOI18N 136 | jLabel1.setForeground(new java.awt.Color(255, 255, 255)); 137 | jLabel1.setText("Agendamentos"); 138 | getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(120, 70, -1, -1)); 139 | 140 | jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsImagens/BannerPC.jpg"))); // NOI18N 141 | getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1130, 490)); 142 | 143 | jMenuBar1.setBackground(new java.awt.Color(255, 255, 255)); 144 | jMenuBar1.setForeground(new java.awt.Color(0, 0, 0)); 145 | 146 | jMenu2.setText("Edit"); 147 | 148 | jMenuItem2.setForeground(new java.awt.Color(0, 0, 0)); 149 | jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsIcons/tesoura-icon.png"))); // NOI18N 150 | jMenuItem2.setText("Serviços"); 151 | jMenuItem2.addActionListener(new java.awt.event.ActionListener() { 152 | public void actionPerformed(java.awt.event.ActionEvent evt) { 153 | jMenuItem2ActionPerformed(evt); 154 | } 155 | }); 156 | jMenu2.add(jMenuItem2); 157 | 158 | jMenuItem3.setForeground(new java.awt.Color(0, 0, 0)); 159 | jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsIcons/usuario-icon.png"))); // NOI18N 160 | jMenuItem3.setText("Sair"); 161 | jMenuItem3.addActionListener(new java.awt.event.ActionListener() { 162 | public void actionPerformed(java.awt.event.ActionEvent evt) { 163 | jMenuItem3ActionPerformed(evt); 164 | } 165 | }); 166 | jMenu2.add(jMenuItem3); 167 | 168 | jMenuItem1.setForeground(new java.awt.Color(0, 0, 0)); 169 | jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsIcons/cliente-icon.png"))); // NOI18N 170 | jMenuItem1.setText("Novo Acesso"); 171 | jMenuItem1.addActionListener(new java.awt.event.ActionListener() { 172 | public void actionPerformed(java.awt.event.ActionEvent evt) { 173 | jMenuItem1ActionPerformed(evt); 174 | } 175 | }); 176 | jMenu2.add(jMenuItem1); 177 | 178 | jMenuItem4.setForeground(new java.awt.Color(0, 0, 0)); 179 | jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ViewsIcons/agenda-icon.png"))); // NOI18N 180 | jMenuItem4.setText("Agendar"); 181 | jMenuItem4.addActionListener(new java.awt.event.ActionListener() { 182 | public void actionPerformed(java.awt.event.ActionEvent evt) { 183 | jMenuItem4ActionPerformed(evt); 184 | } 185 | }); 186 | jMenu2.add(jMenuItem4); 187 | 188 | jMenuBar1.add(jMenu2); 189 | 190 | setJMenuBar(jMenuBar1); 191 | 192 | pack(); 193 | }// </editor-fold>//GEN-END:initComponents 194 | 195 | private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed 196 | try { 197 | // TODO add your handling code here: 198 | TelaService services = new TelaService(); 199 | services.setVisible(true); 200 | setVisible(false); 201 | } catch (SQLException ex) { 202 | Logger.getLogger(MenuBarbeiro.class.getName()).log(Level.SEVERE, null, ex); 203 | } 204 | 205 | }//GEN-LAST:event_jMenuItem2ActionPerformed 206 | 207 | private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed 208 | // TODO add your handling code here: 209 | LoginBarbeiro login = new LoginBarbeiro(); 210 | login.setVisible(true); 211 | setVisible(false); 212 | }//GEN-LAST:event_jMenuItem3ActionPerformed 213 | 214 | private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed 215 | // TODO add your handling code here: 216 | CadastrarBarbeiro cadastrar = new CadastrarBarbeiro(); 217 | cadastrar.setVisible(true); 218 | setVisible(false); 219 | }//GEN-LAST:event_jMenuItem1ActionPerformed 220 | 221 | private void TodosAgendamentosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_TodosAgendamentosActionPerformed 222 | try { 223 | // TODO add your handling code here: 224 | controller.filtrarTodos(); 225 | } catch (SQLException ex) { 226 | Logger.getLogger(MenuBarbeiro.class.getName()).log(Level.SEVERE, null, ex); 227 | } 228 | }//GEN-LAST:event_TodosAgendamentosActionPerformed 229 | 230 | private void AgendamentoHojeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AgendamentoHojeActionPerformed 231 | try { 232 | // TODO add your handling code here: 233 | controller.filtrarAgendamentosHoje(); 234 | } catch (SQLException ex) { 235 | Logger.getLogger(MenuBarbeiro.class.getName()).log(Level.SEVERE, null, ex); 236 | } 237 | }//GEN-LAST:event_AgendamentoHojeActionPerformed 238 | 239 | private void AgendamentoHistoricoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AgendamentoHistoricoActionPerformed 240 | try { 241 | // TODO add your handling code here: 242 | controller.atualizarHistoricodaTabela(); 243 | } catch (SQLException ex) { 244 | Logger.getLogger(MenuBarbeiro.class.getName()).log(Level.SEVERE, null, ex); 245 | } 246 | }//GEN-LAST:event_AgendamentoHistoricoActionPerformed 247 | 248 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 249 | // TODO add your handling code here: 250 | agendamentoController.ExcluirAgendamento(); 251 | 252 | }//GEN-LAST:event_jButton1ActionPerformed 253 | 254 | private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed 255 | // TODO add your handling code here: 256 | TelaAgendamentoBarbeiro agendar = new TelaAgendamentoBarbeiro(); 257 | agendar.setVisible(true); 258 | setVisible(false); 259 | }//GEN-LAST:event_jMenuItem4ActionPerformed 260 | 261 | /** 262 | * @param args the command line arguments 263 | */ 264 | public static void main(String args[]) { 265 | /* Set the Nimbus look and feel */ 266 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 267 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 268 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 269 | */ 270 | try { 271 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 272 | if ("Nimbus".equals(info.getName())) { 273 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 274 | break; 275 | } 276 | } 277 | } catch (ClassNotFoundException ex) { 278 | java.util.logging.Logger.getLogger(MenuBarbeiro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 279 | } catch (InstantiationException ex) { 280 | java.util.logging.Logger.getLogger(MenuBarbeiro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 281 | } catch (IllegalAccessException ex) { 282 | java.util.logging.Logger.getLogger(MenuBarbeiro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 283 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 284 | java.util.logging.Logger.getLogger(MenuBarbeiro.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 285 | } 286 | //</editor-fold> 287 | 288 | /* Create and display the form */ 289 | java.awt.EventQueue.invokeLater(new Runnable() { 290 | public void run() { 291 | try { 292 | new MenuBarbeiro().setVisible(true); 293 | } catch (SQLException ex) { 294 | Logger.getLogger(MenuBarbeiro.class.getName()).log(Level.SEVERE, null, ex); 295 | } 296 | } 297 | }); 298 | } 299 | 300 | public JTable getTableAgendamentos() { 301 | return TableAgendamentos; 302 | } 303 | 304 | public void setTableAgendamentos(JTable TableAgendamentos) { 305 | this.TableAgendamentos = TableAgendamentos; 306 | } 307 | public JLabel getWelcome() { 308 | return Welcome; 309 | } 310 | 311 | public void setWelcome(JLabel Welcome) { 312 | this.Welcome = Welcome; 313 | } 314 | 315 | // Variables declaration - do not modify//GEN-BEGIN:variables 316 | private javax.swing.JButton AgendamentoHistorico; 317 | private javax.swing.JButton AgendamentoHoje; 318 | private javax.swing.JTable TableAgendamentos; 319 | private javax.swing.JButton TodosAgendamentos; 320 | private javax.swing.JLabel Welcome; 321 | private javax.swing.JButton jButton1; 322 | private javax.swing.JLabel jLabel1; 323 | private javax.swing.JLabel jLabel2; 324 | private javax.swing.JMenu jMenu2; 325 | private javax.swing.JMenuBar jMenuBar1; 326 | private javax.swing.JMenuItem jMenuItem1; 327 | private javax.swing.JMenuItem jMenuItem2; 328 | private javax.swing.JMenuItem jMenuItem3; 329 | private javax.swing.JMenuItem jMenuItem4; 330 | private javax.swing.JScrollPane jScrollPane1; 331 | // End of variables declaration//GEN-END:variables 332 | } 333 | -------------------------------------------------------------------------------- /src/Views/ControleHorario.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <Properties> 5 | <Property name="defaultCloseOperation" type="int" value="3"/> 6 | </Properties> 7 | <SyntheticProperties> 8 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 9 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 10 | </SyntheticProperties> 11 | <AuxValues> 12 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 13 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 14 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 15 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 16 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 17 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 18 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 19 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 20 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 21 | </AuxValues> 22 | 23 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> 24 | <Property name="useNullLayout" type="boolean" value="false"/> 25 | </Layout> 26 | <SubComponents> 27 | <Container class="javax.swing.JPanel" name="jPanel1"> 28 | <Properties> 29 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 30 | <Color blue="99" green="99" red="99" type="rgb"/> 31 | </Property> 32 | </Properties> 33 | <Constraints> 34 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 35 | <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> 36 | </Constraint> 37 | </Constraints> 38 | 39 | <Layout> 40 | <DimensionLayout dim="0"> 41 | <Group type="103" groupAlignment="0" attributes="0"> 42 | <Group type="102" alignment="0" attributes="0"> 43 | <EmptySpace min="-2" pref="23" max="-2" attributes="0"/> 44 | <Component id="jLabel8" min="-2" max="-2" attributes="0"/> 45 | <EmptySpace pref="14" max="32767" attributes="0"/> 46 | </Group> 47 | </Group> 48 | </DimensionLayout> 49 | <DimensionLayout dim="1"> 50 | <Group type="103" groupAlignment="0" attributes="0"> 51 | <Group type="102" alignment="0" attributes="0"> 52 | <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> 53 | <Component id="jLabel8" min="-2" max="-2" attributes="0"/> 54 | <EmptySpace pref="55" max="32767" attributes="0"/> 55 | </Group> 56 | </Group> 57 | </DimensionLayout> 58 | </Layout> 59 | <SubComponents> 60 | <Component class="javax.swing.JLabel" name="jLabel8"> 61 | <Properties> 62 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 63 | <Image iconType="3" name="/ViewsImagens/Logo_resized.png"/> 64 | </Property> 65 | </Properties> 66 | </Component> 67 | </SubComponents> 68 | </Container> 69 | <Container class="javax.swing.JPanel" name="jPanel2"> 70 | <Properties> 71 | <Property name="background" type="java.awt.Color" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> 72 | <Connection code="new java.awt.Color(0, 0, 0, 140)" type="code"/> 73 | </Property> 74 | </Properties> 75 | <Constraints> 76 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 77 | <AbsoluteConstraints x="-5" y="-3" width="800" height="400"/> 78 | </Constraint> 79 | </Constraints> 80 | 81 | <Layout> 82 | <DimensionLayout dim="0"> 83 | <Group type="103" groupAlignment="0" attributes="0"> 84 | <Group type="102" attributes="0"> 85 | <EmptySpace pref="377" max="32767" attributes="0"/> 86 | <Group type="103" groupAlignment="0" attributes="0"> 87 | <Group type="103" alignment="1" groupAlignment="0" attributes="0"> 88 | <Component id="jLabel4" min="-2" max="-2" attributes="0"/> 89 | <Component id="DiaController" min="-2" pref="143" max="-2" attributes="0"/> 90 | <Group type="103" groupAlignment="0" attributes="0"> 91 | <Group type="102" alignment="1" attributes="0"> 92 | <Component id="jLabel1" min="-2" max="-2" attributes="0"/> 93 | <EmptySpace min="-2" pref="147" max="-2" attributes="0"/> 94 | </Group> 95 | <Group type="102" alignment="1" attributes="0"> 96 | <Group type="103" groupAlignment="0" attributes="0"> 97 | <Group type="102" alignment="1" attributes="0"> 98 | <Component id="HoradeInicio" min="-2" pref="143" max="-2" attributes="0"/> 99 | <EmptySpace min="-2" pref="66" max="-2" attributes="0"/> 100 | </Group> 101 | <Group type="102" alignment="0" attributes="0"> 102 | <Component id="jLabel2" min="-2" max="-2" attributes="0"/> 103 | <EmptySpace min="-2" pref="169" max="-2" attributes="0"/> 104 | </Group> 105 | </Group> 106 | <Group type="103" groupAlignment="0" attributes="0"> 107 | <Component id="jLabel3" min="-2" max="-2" attributes="0"/> 108 | <Component id="TerminoDia" min="-2" pref="141" max="-2" attributes="0"/> 109 | <Component id="NaoTrabalhar" alignment="0" min="-2" max="-2" attributes="0"/> 110 | </Group> 111 | <EmptySpace min="-2" pref="73" max="-2" attributes="0"/> 112 | </Group> 113 | </Group> 114 | </Group> 115 | <Group type="102" alignment="1" attributes="0"> 116 | <Component id="jButton1" min="-2" pref="164" max="-2" attributes="0"/> 117 | <EmptySpace min="-2" pref="161" max="-2" attributes="0"/> 118 | </Group> 119 | </Group> 120 | </Group> 121 | </Group> 122 | </DimensionLayout> 123 | <DimensionLayout dim="1"> 124 | <Group type="103" groupAlignment="0" attributes="0"> 125 | <Group type="102" attributes="0"> 126 | <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> 127 | <Component id="jLabel1" min="-2" max="-2" attributes="0"/> 128 | <EmptySpace min="-2" pref="70" max="-2" attributes="0"/> 129 | <Group type="103" groupAlignment="3" attributes="0"> 130 | <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> 131 | <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> 132 | </Group> 133 | <EmptySpace max="-2" attributes="0"/> 134 | <Group type="103" groupAlignment="3" attributes="0"> 135 | <Component id="HoradeInicio" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> 136 | <Component id="TerminoDia" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> 137 | </Group> 138 | <EmptySpace type="separate" max="-2" attributes="0"/> 139 | <Component id="jLabel4" min="-2" max="-2" attributes="0"/> 140 | <EmptySpace min="-2" pref="5" max="-2" attributes="0"/> 141 | <Group type="103" groupAlignment="3" attributes="0"> 142 | <Component id="DiaController" alignment="3" min="-2" pref="34" max="-2" attributes="0"/> 143 | <Component id="NaoTrabalhar" alignment="3" min="-2" max="-2" attributes="0"/> 144 | </Group> 145 | <EmptySpace min="-2" pref="33" max="-2" attributes="0"/> 146 | <Component id="jButton1" min="-2" pref="36" max="-2" attributes="0"/> 147 | <EmptySpace pref="74" max="32767" attributes="0"/> 148 | </Group> 149 | </Group> 150 | </DimensionLayout> 151 | </Layout> 152 | <SubComponents> 153 | <Component class="javax.swing.JComboBox" name="HoradeInicio"> 154 | <Properties> 155 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 156 | <StringArray count="0"/> 157 | </Property> 158 | </Properties> 159 | <Events> 160 | <EventHandler event="ancestorAdded" listener="javax.swing.event.AncestorListener" parameters="javax.swing.event.AncestorEvent" handler="HoradeInicioAncestorAdded"/> 161 | </Events> 162 | <AuxValues> 163 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 164 | </AuxValues> 165 | </Component> 166 | <Component class="javax.swing.JComboBox" name="TerminoDia"> 167 | <Properties> 168 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 169 | <StringArray count="0"/> 170 | </Property> 171 | </Properties> 172 | <Events> 173 | <EventHandler event="ancestorAdded" listener="javax.swing.event.AncestorListener" parameters="javax.swing.event.AncestorEvent" handler="TerminoDiaAncestorAdded"/> 174 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="TerminoDiaActionPerformed"/> 175 | </Events> 176 | <AuxValues> 177 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 178 | </AuxValues> 179 | </Component> 180 | <Component class="javax.swing.JLabel" name="jLabel1"> 181 | <Properties> 182 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 183 | <Font name="Segoe UI" size="18" style="1"/> 184 | </Property> 185 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 186 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 187 | </Property> 188 | <Property name="text" type="java.lang.String" value="Controle de Horários"/> 189 | </Properties> 190 | </Component> 191 | <Component class="javax.swing.JLabel" name="jLabel2"> 192 | <Properties> 193 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 194 | <Font name="Segoe UI" size="14" style="1"/> 195 | </Property> 196 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 197 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 198 | </Property> 199 | <Property name="text" type="java.lang.String" value="Inicio:"/> 200 | </Properties> 201 | </Component> 202 | <Component class="javax.swing.JLabel" name="jLabel3"> 203 | <Properties> 204 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 205 | <Font name="Segoe UI" size="14" style="1"/> 206 | </Property> 207 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 208 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 209 | </Property> 210 | <Property name="text" type="java.lang.String" value="Termino:"/> 211 | </Properties> 212 | </Component> 213 | <Component class="javax.swing.JComboBox" name="DiaController"> 214 | <Properties> 215 | <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> 216 | <StringArray count="0"/> 217 | </Property> 218 | </Properties> 219 | <Events> 220 | <EventHandler event="ancestorAdded" listener="javax.swing.event.AncestorListener" parameters="javax.swing.event.AncestorEvent" handler="DiaControllerAncestorAdded"/> 221 | </Events> 222 | <AuxValues> 223 | <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> 224 | </AuxValues> 225 | </Component> 226 | <Component class="javax.swing.JLabel" name="jLabel4"> 227 | <Properties> 228 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 229 | <Font name="Segoe UI" size="14" style="1"/> 230 | </Property> 231 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 232 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 233 | </Property> 234 | <Property name="text" type="java.lang.String" value="Dia:"/> 235 | </Properties> 236 | </Component> 237 | <Component class="javax.swing.JButton" name="jButton1"> 238 | <Properties> 239 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 240 | <Color blue="0" green="99" red="33" type="rgb"/> 241 | </Property> 242 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 243 | <Font name="Segoe UI" size="14" style="1"/> 244 | </Property> 245 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 246 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 247 | </Property> 248 | <Property name="text" type="java.lang.String" value="Salvar"/> 249 | </Properties> 250 | </Component> 251 | <Component class="javax.swing.JRadioButton" name="NaoTrabalhar"> 252 | <Properties> 253 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 254 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 255 | </Property> 256 | <Property name="text" type="java.lang.String" value="Remove Dia"/> 257 | </Properties> 258 | <Events> 259 | <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="NaoTrabalharMouseClicked"/> 260 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="NaoTrabalharActionPerformed"/> 261 | </Events> 262 | </Component> 263 | </SubComponents> 264 | </Container> 265 | </SubComponents> 266 | </Form> 267 | -------------------------------------------------------------------------------- /src/Views/AddService.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <NonVisualComponents> 5 | <Menu class="javax.swing.JMenuBar" name="jMenuBar1"> 6 | <SubComponents> 7 | <Menu class="javax.swing.JMenu" name="jMenu2"> 8 | <Properties> 9 | <Property name="text" type="java.lang.String" value="Ações"/> 10 | </Properties> 11 | <SubComponents> 12 | <MenuItem class="javax.swing.JMenuItem" name="jMenuItem1"> 13 | <Properties> 14 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 15 | <Image iconType="3" name="/ViewsIcons/usuario-icon.png"/> 16 | </Property> 17 | <Property name="text" type="java.lang.String" value="Voltar"/> 18 | </Properties> 19 | <Events> 20 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem1ActionPerformed"/> 21 | </Events> 22 | </MenuItem> 23 | </SubComponents> 24 | </Menu> 25 | </SubComponents> 26 | </Menu> 27 | </NonVisualComponents> 28 | <Properties> 29 | <Property name="defaultCloseOperation" type="int" value="3"/> 30 | </Properties> 31 | <SyntheticProperties> 32 | <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/> 33 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 34 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 35 | </SyntheticProperties> 36 | <AuxValues> 37 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 38 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 39 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 40 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 41 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 42 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 43 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 44 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 45 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 46 | <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-49,0,0,2,-3"/> 47 | </AuxValues> 48 | 49 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> 50 | <Property name="useNullLayout" type="boolean" value="false"/> 51 | </Layout> 52 | <SubComponents> 53 | <Container class="javax.swing.JPanel" name="jPanel2"> 54 | <Properties> 55 | <Property name="background" type="java.awt.Color" editor="org.netbeans.modules.form.RADConnectionPropertyEditor"> 56 | <Connection code="new java.awt.Color(0, 0, 0, 140)" type="code"/> 57 | </Property> 58 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 59 | <Color blue="f4" green="f4" red="f4" type="rgb"/> 60 | </Property> 61 | </Properties> 62 | <Constraints> 63 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 64 | <AbsoluteConstraints x="300" y="0" width="460" height="430"/> 65 | </Constraint> 66 | </Constraints> 67 | 68 | <Layout> 69 | <DimensionLayout dim="0"> 70 | <Group type="103" groupAlignment="0" attributes="0"> 71 | <Group type="102" alignment="0" attributes="0"> 72 | <EmptySpace min="-2" pref="55" max="-2" attributes="0"/> 73 | <Group type="103" groupAlignment="0" attributes="0"> 74 | <Group type="102" attributes="0"> 75 | <Component id="jLabel4" min="-2" max="-2" attributes="0"/> 76 | <EmptySpace max="32767" attributes="0"/> 77 | </Group> 78 | <Group type="102" alignment="1" attributes="0"> 79 | <Group type="103" groupAlignment="1" attributes="0"> 80 | <Component id="TfCaminho" alignment="0" max="32767" attributes="0"/> 81 | <Component id="VarNameService" alignment="1" max="32767" attributes="0"/> 82 | <Component id="jButton1" alignment="0" pref="347" max="32767" attributes="0"/> 83 | <Component id="VarPriceService" alignment="0" max="32767" attributes="0"/> 84 | <Group type="102" alignment="0" attributes="0"> 85 | <Component id="jLabel2" min="-2" max="-2" attributes="0"/> 86 | <EmptySpace min="0" pref="0" max="32767" attributes="0"/> 87 | </Group> 88 | </Group> 89 | <EmptySpace min="-2" pref="58" max="-2" attributes="0"/> 90 | </Group> 91 | </Group> 92 | </Group> 93 | <Group type="102" attributes="0"> 94 | <Group type="103" groupAlignment="0" attributes="0"> 95 | <Group type="102" alignment="0" attributes="0"> 96 | <EmptySpace min="-2" pref="176" max="-2" attributes="0"/> 97 | <Component id="ImagemDeService" min="-2" max="-2" attributes="0"/> 98 | </Group> 99 | <Group type="102" alignment="0" attributes="0"> 100 | <EmptySpace min="-2" pref="150" max="-2" attributes="0"/> 101 | <Component id="jLabel3" min="-2" max="-2" attributes="0"/> 102 | </Group> 103 | </Group> 104 | <EmptySpace max="32767" attributes="0"/> 105 | </Group> 106 | </Group> 107 | </DimensionLayout> 108 | <DimensionLayout dim="1"> 109 | <Group type="103" groupAlignment="0" attributes="0"> 110 | <Group type="102" alignment="0" attributes="0"> 111 | <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> 112 | <Component id="jLabel3" min="-2" max="-2" attributes="0"/> 113 | <EmptySpace max="-2" attributes="0"/> 114 | <Component id="ImagemDeService" min="-2" max="-2" attributes="0"/> 115 | <EmptySpace type="separate" max="-2" attributes="0"/> 116 | <Component id="TfCaminho" min="-2" pref="29" max="-2" attributes="0"/> 117 | <EmptySpace min="-2" pref="12" max="-2" attributes="0"/> 118 | <Component id="jLabel2" min="-2" max="-2" attributes="0"/> 119 | <EmptySpace max="-2" attributes="0"/> 120 | <Component id="VarNameService" min="-2" pref="38" max="-2" attributes="0"/> 121 | <EmptySpace type="unrelated" max="-2" attributes="0"/> 122 | <Component id="jLabel4" min="-2" max="-2" attributes="0"/> 123 | <EmptySpace max="-2" attributes="0"/> 124 | <Component id="VarPriceService" min="-2" pref="35" max="-2" attributes="0"/> 125 | <EmptySpace pref="28" max="32767" attributes="0"/> 126 | <Component id="jButton1" min="-2" pref="40" max="-2" attributes="0"/> 127 | <EmptySpace min="-2" pref="16" max="-2" attributes="0"/> 128 | </Group> 129 | </Group> 130 | </DimensionLayout> 131 | </Layout> 132 | <SubComponents> 133 | <Component class="javax.swing.JLabel" name="jLabel2"> 134 | <Properties> 135 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 136 | <Font name="Segoe UI" size="14" style="1"/> 137 | </Property> 138 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 139 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 140 | </Property> 141 | <Property name="text" type="java.lang.String" value="Nome:"/> 142 | </Properties> 143 | </Component> 144 | <Component class="javax.swing.JLabel" name="jLabel3"> 145 | <Properties> 146 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 147 | <Font name="Segoe UI" size="14" style="1"/> 148 | </Property> 149 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 150 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 151 | </Property> 152 | <Property name="text" type="java.lang.String" value="Adicionar novo Serviço"/> 153 | </Properties> 154 | </Component> 155 | <Component class="javax.swing.JLabel" name="jLabel4"> 156 | <Properties> 157 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 158 | <Font name="Segoe UI" size="14" style="1"/> 159 | </Property> 160 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 161 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 162 | </Property> 163 | <Property name="text" type="java.lang.String" value="Preço:"/> 164 | </Properties> 165 | </Component> 166 | <Component class="javax.swing.JTextField" name="VarNameService"> 167 | <Events> 168 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="VarNameServiceActionPerformed"/> 169 | </Events> 170 | </Component> 171 | <Component class="javax.swing.JTextField" name="VarPriceService"> 172 | <Events> 173 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="VarPriceServiceActionPerformed"/> 174 | </Events> 175 | </Component> 176 | <Component class="javax.swing.JButton" name="jButton1"> 177 | <Properties> 178 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 179 | <Color blue="0" green="99" red="33" type="rgb"/> 180 | </Property> 181 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 182 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 183 | </Property> 184 | <Property name="text" type="java.lang.String" value="Salvar"/> 185 | </Properties> 186 | <Events> 187 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 188 | </Events> 189 | </Component> 190 | <Component class="javax.swing.JLabel" name="ImagemDeService"> 191 | <Properties> 192 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 193 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 194 | </Property> 195 | <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> 196 | <Font name="Segoe UI" size="14" style="1"/> 197 | </Property> 198 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 199 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 200 | </Property> 201 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 202 | <Image iconType="3" name="/ViewsImagens/service.jpg"/> 203 | </Property> 204 | <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 205 | <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> 206 | <LineBorder thickness="2"> 207 | <Color PropertyName="color" blue="cc" green="cc" red="cc" type="rgb"/> 208 | </LineBorder> 209 | </Border> 210 | </Property> 211 | <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> 212 | <Color id="Hand Cursor"/> 213 | </Property> 214 | </Properties> 215 | <Events> 216 | <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="ImagemDeServiceMouseClicked"/> 217 | </Events> 218 | </Component> 219 | <Component class="javax.swing.JTextField" name="TfCaminho"> 220 | <Properties> 221 | <Property name="editable" type="boolean" value="false"/> 222 | </Properties> 223 | <Events> 224 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="TfCaminhoActionPerformed"/> 225 | </Events> 226 | </Component> 227 | </SubComponents> 228 | </Container> 229 | <Container class="javax.swing.JPanel" name="jPanel1"> 230 | <Properties> 231 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 232 | <Color blue="99" green="99" red="99" type="rgb"/> 233 | </Property> 234 | </Properties> 235 | <Constraints> 236 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 237 | <AbsoluteConstraints x="0" y="0" width="300" height="440"/> 238 | </Constraint> 239 | </Constraints> 240 | 241 | <Layout> 242 | <DimensionLayout dim="0"> 243 | <Group type="103" groupAlignment="0" attributes="0"> 244 | <Group type="102" alignment="1" attributes="0"> 245 | <EmptySpace max="32767" attributes="0"/> 246 | <Component id="jLabel9" min="-2" pref="318" max="-2" attributes="0"/> 247 | <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> 248 | </Group> 249 | </Group> 250 | </DimensionLayout> 251 | <DimensionLayout dim="1"> 252 | <Group type="103" groupAlignment="0" attributes="0"> 253 | <Group type="102" alignment="0" attributes="0"> 254 | <EmptySpace min="-2" pref="50" max="-2" attributes="0"/> 255 | <Component id="jLabel9" min="-2" pref="308" max="-2" attributes="0"/> 256 | <EmptySpace pref="82" max="32767" attributes="0"/> 257 | </Group> 258 | </Group> 259 | </DimensionLayout> 260 | </Layout> 261 | <SubComponents> 262 | <Component class="javax.swing.JLabel" name="jLabel9"> 263 | <Properties> 264 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 265 | <Image iconType="3" name="/ViewsImagens/Logo_resized.png"/> 266 | </Property> 267 | </Properties> 268 | </Component> 269 | </SubComponents> 270 | </Container> 271 | </SubComponents> 272 | </Form> 273 | --------------------------------------------------------------------------------