From 7004c763013d555497dab11252ae2f9c6345d524 Mon Sep 17 00:00:00 2001 From: giovaneneves7 Date: Fri, 25 Oct 2024 16:08:36 -0300 Subject: [PATCH] feat(fluido): Adiciona suporte para fluidos --- .../workspace/view/AreaDeTrabalho.form | 25 ++++++++++++++++- .../workspace/view/AreaDeTrabalho.java | 9 +++++- .../java/br/com/ifba/ipss/util/Fluido.java | 28 +++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 src/main/java/br/com/ifba/ipss/util/Fluido.java diff --git a/src/main/java/br/com/ifba/ipss/feature/workspace/view/AreaDeTrabalho.form b/src/main/java/br/com/ifba/ipss/feature/workspace/view/AreaDeTrabalho.form index 07fc554..e2a1ff3 100644 --- a/src/main/java/br/com/ifba/ipss/feature/workspace/view/AreaDeTrabalho.form +++ b/src/main/java/br/com/ifba/ipss/feature/workspace/view/AreaDeTrabalho.form @@ -342,7 +342,7 @@ - + @@ -360,6 +360,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/br/com/ifba/ipss/feature/workspace/view/AreaDeTrabalho.java b/src/main/java/br/com/ifba/ipss/feature/workspace/view/AreaDeTrabalho.java index 5bbd138..b3d86c3 100644 --- a/src/main/java/br/com/ifba/ipss/feature/workspace/view/AreaDeTrabalho.java +++ b/src/main/java/br/com/ifba/ipss/feature/workspace/view/AreaDeTrabalho.java @@ -182,6 +182,7 @@ private void initComponents() { pnlSpanSpace2 = new javax.swing.JPanel(); pnlEspacoTrabalho = new javax.swing.JPanel(); lblNotificacaoDeEstado = new javax.swing.JLabel(); + jComboTipoFluido = new javax.swing.JComboBox<>(); PnlBotoes = new javax.swing.JPanel(); btnTubulacoes = new javax.swing.JButton(); btnConexoes = new javax.swing.JButton(); @@ -405,8 +406,13 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { pnlEspacoTrabalho.add(lblNotificacaoDeEstado); lblNotificacaoDeEstado.setBounds(30, 10, 320, 18); + jComboTipoFluido.setForeground(new java.awt.Color(0, 102, 0)); + jComboTipoFluido.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Água", "Gasolina", "Diesel", "Biodiesel" })); + pnlEspacoTrabalho.add(jComboTipoFluido); + jComboTipoFluido.setBounds(100, 40, 76, 24); + pnlBackgruond.add(pnlEspacoTrabalho); - pnlEspacoTrabalho.setBounds(0, 80, 1250, 710); + pnlEspacoTrabalho.setBounds(-90, 70, 1250, 710); PnlBotoes.setBackground(new java.awt.Color(255, 255, 255)); @@ -666,6 +672,7 @@ public void run() { private javax.swing.JButton btnSimular; private javax.swing.JButton btnTubulacoes; private javax.swing.JButton btnVavulas; + private javax.swing.JComboBox jComboTipoFluido; private javax.swing.JLabel lblNotificacaoDeEstado; private javax.swing.JPanel pnlBackgruond; private javax.swing.JPanel pnlEspacoTrabalho; diff --git a/src/main/java/br/com/ifba/ipss/util/Fluido.java b/src/main/java/br/com/ifba/ipss/util/Fluido.java new file mode 100644 index 0000000..d6ac0ba --- /dev/null +++ b/src/main/java/br/com/ifba/ipss/util/Fluido.java @@ -0,0 +1,28 @@ +package br.com.ifba.ipss.util; + +/** + * + * @author Giovane Neves + * @since V0.0.1 + */ +public enum Fluido { + + AGUA("agua"), + BIODIESEL("biodiesel"), + DIESEL("diesel"); + + public final String fluido; + + private Fluido(final String fluido){ + + this.fluido = fluido; + + } + + public String getString(){ + + return fluido; + + } + +}