Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Features #4

Open
wants to merge 2 commits into
base: base-sha/099a7b6d0d6ff64bf7783c825f5fd529e4acba91
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions PED/src/PED.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import data.App_Settings;
import data.SQLite_DBManager;
import gui.W_Login;
import gui.W_BankSelector;

/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Expand All @@ -23,6 +23,9 @@ public static void main(String[] args) {

App_Settings sysSettings = new App_Settings();




// Thread t_statusBar = new Thread(new Runnable(){
// @Override
// public void run() {
Expand All @@ -32,7 +35,8 @@ public static void main(String[] args) {
// }
// });

W_Login w_Login = new W_Login(sysSettings);
W_BankSelector w_BankSelector = new W_BankSelector(sysSettings);
//W_Login w_Login = new W_Login(sysSettings);

SQLite_DBManager dBManager = new SQLite_DBManager();
dBManager.connectDB("Bank_Of_America.ped");
Expand Down
Binary file added PED/src/assets/BG1-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added PED/src/assets/BG2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PED/src/assets/BTN_Hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PED/src/assets/BTN_Normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PED/src/assets/BTN_Pressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,608 changes: 2,608 additions & 0 deletions PED/src/assets/Button States.ai

Large diffs are not rendered by default.

6,645 changes: 3,456 additions & 3,189 deletions PED/src/assets/Login BG.ai

Large diffs are not rendered by default.

Binary file added PED/src/assets/TextField.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,842 changes: 1,842 additions & 0 deletions PED/src/assets/Textfield.ai

Large diffs are not rendered by default.

271 changes: 271 additions & 0 deletions PED/src/gui/W_BankSelector.form

Large diffs are not rendered by default.

246 changes: 246 additions & 0 deletions PED/src/gui/W_BankSelector.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
*/
package gui;

import data.App_Settings;
import java.awt.CardLayout;
import java.awt.GridBagConstraints;

/**
* @author manuel.mora
*/
public class W_BankSelector extends javax.swing.JFrame {

/**
* Creates new form W_Login
*/

private App_Settings appSettings;
private GridBagConstraints gbc;

public W_BankSelector(App_Settings appSettings) {

this.appSettings = appSettings;
setLocationRelativeTo(null);
initComponents();
checkBankSites();





/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
//new W_Login(appSettings).setVisible(true);
}
});


pnl_StatusBar.showPanel(appSettings);
pnl_Container.showPanel("BG1.png");

repaint();
revalidate();
setVisible(true);


}

private void checkBankSites() {

String [] sites = appSettings.checkBankSites();

if (sites != null) {

System.out.println("gui.W_BankSelector.checkBankSites()");
CardLayout cardLayout = (CardLayout) pnl_cards.getLayout();
cardLayout.show(pnl_cards, "Card1");
Comment on lines +56 to +60

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider using an enum or constant for card names

Using string literals for card names can be error-prone. An enum or constant would provide type safety and easier refactoring.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment correct?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment helpful?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the comment type correct?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the comment area correct?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What type of LLM test could this comment become?

  • 👍 - this comment is really good/important and we should always make it
  • 👎 - this comment is really bad and we should never make it
  • no reaction - don't turn this comment into an LLM test

}
}




/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;

pnl_StatusBar = new presets.Pnl_StatusBar();
pnl_Container = new presets.Custom_Panel();
p_container = new javax.swing.JPanel();
lbl_Title = new javax.swing.JLabel();
pnl_cards = new javax.swing.JPanel();
pnl_newSite = new javax.swing.JPanel();
lbl_Description = new javax.swing.JLabel();
lbl_BankName = new javax.swing.JLabel();
lbl_SiteName = new javax.swing.JLabel();
tf_Username = new presets.Custom_TextField();
tf_Password = new presets.Custom_PasswordField();
lbl_Counters = new javax.swing.JLabel();
lbl_TicketDispensers = new javax.swing.JLabel();
tf_Counters = new presets.Custom_TextField();
tf_TicketDispensers = new presets.Custom_PasswordField();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Sistema de registro");
setMinimumSize(new java.awt.Dimension(600, 400));
setName("Login"); // NOI18N
setResizable(false);
setSize(new java.awt.Dimension(0, 0));
setType(java.awt.Window.Type.UTILITY);

pnl_StatusBar.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
pnl_StatusBar.setMaximumSize(null);
pnl_StatusBar.setMinimumSize(null);
pnl_StatusBar.setPreferredSize(new java.awt.Dimension(600, 25));
getContentPane().add(pnl_StatusBar, java.awt.BorderLayout.SOUTH);

pnl_Container.setPreferredSize(new java.awt.Dimension(975, 600));
pnl_Container.setLayout(new java.awt.BorderLayout());

p_container.setOpaque(false);
p_container.setPreferredSize(new java.awt.Dimension(500, 550));
p_container.setLayout(new java.awt.BorderLayout());

lbl_Title.setFont(new java.awt.Font("Candara", 1, 24)); // NOI18N
lbl_Title.setForeground(new java.awt.Color(0, 204, 204));
lbl_Title.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
lbl_Title.setText("Bienvenido a nuestro sistema");
lbl_Title.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
lbl_Title.setMaximumSize(null);
lbl_Title.setMinimumSize(null);
lbl_Title.setPreferredSize(new java.awt.Dimension(500, 50));
p_container.add(lbl_Title, java.awt.BorderLayout.PAGE_START);

pnl_cards.setMaximumSize(null);
pnl_cards.setMinimumSize(null);
pnl_cards.setOpaque(false);
pnl_cards.setPreferredSize(new java.awt.Dimension(500, 525));
pnl_cards.setLayout(new java.awt.CardLayout());

pnl_newSite.setMaximumSize(null);
pnl_newSite.setMinimumSize(null);
pnl_newSite.setOpaque(false);
pnl_newSite.setPreferredSize(new java.awt.Dimension(500, 525));
pnl_newSite.setLayout(new java.awt.GridBagLayout());

lbl_Description.setFont(new java.awt.Font("Segoe UI", 0, 14)); // NOI18N
lbl_Description.setText("<html>No hemos encontrado Bancos registrados.<br>Por favor registre uno para iniciar el sistema.</html>");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.ipadx = 414;
gridBagConstraints.insets = new java.awt.Insets(10, 30, 10, 30);
pnl_newSite.add(lbl_Description, gridBagConstraints);

lbl_BankName.setText("Nombre del banco :");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.ipadx = 150;
gridBagConstraints.insets = new java.awt.Insets(10, 30, 10, 30);
pnl_newSite.add(lbl_BankName, gridBagConstraints);

lbl_SiteName.setText("Cede :");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.ipadx = 150;
gridBagConstraints.insets = new java.awt.Insets(10, 30, 10, 30);
pnl_newSite.add(lbl_SiteName, gridBagConstraints);

tf_Username.setBorder(null);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.ipadx = 150;
gridBagConstraints.insets = new java.awt.Insets(10, 30, 10, 30);
pnl_newSite.add(tf_Username, gridBagConstraints);

tf_Password.setBorder(null);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.ipadx = 150;
gridBagConstraints.insets = new java.awt.Insets(10, 30, 10, 30);
pnl_newSite.add(tf_Password, gridBagConstraints);

lbl_Counters.setText("Cantidad de cajas :");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
gridBagConstraints.ipadx = 150;
gridBagConstraints.insets = new java.awt.Insets(10, 30, 10, 30);
pnl_newSite.add(lbl_Counters, gridBagConstraints);

lbl_TicketDispensers.setText("Dispensadores de tiquetes :");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 3;
gridBagConstraints.ipadx = 150;
gridBagConstraints.insets = new java.awt.Insets(10, 30, 10, 30);
pnl_newSite.add(lbl_TicketDispensers, gridBagConstraints);

tf_Counters.setBorder(null);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 4;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.ipadx = 150;
gridBagConstraints.insets = new java.awt.Insets(10, 30, 10, 30);
pnl_newSite.add(tf_Counters, gridBagConstraints);

tf_TicketDispensers.setBorder(null);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 4;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.ipadx = 150;
gridBagConstraints.insets = new java.awt.Insets(10, 30, 10, 30);
pnl_newSite.add(tf_TicketDispensers, gridBagConstraints);

pnl_cards.add(pnl_newSite, "Card1");

p_container.add(pnl_cards, java.awt.BorderLayout.CENTER);

pnl_Container.add(p_container, java.awt.BorderLayout.EAST);

getContentPane().add(pnl_Container, java.awt.BorderLayout.NORTH);

pack();
}// </editor-fold>//GEN-END:initComponents



// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel lbl_BankName;
private javax.swing.JLabel lbl_Counters;
private javax.swing.JLabel lbl_Description;
private javax.swing.JLabel lbl_SiteName;
private javax.swing.JLabel lbl_TicketDispensers;
private javax.swing.JLabel lbl_Title;
private javax.swing.JPanel p_container;
private presets.Custom_Panel pnl_Container;
private presets.Pnl_StatusBar pnl_StatusBar;
private javax.swing.JPanel pnl_cards;
private javax.swing.JPanel pnl_newSite;
private presets.Custom_TextField tf_Counters;
private presets.Custom_PasswordField tf_Password;
private presets.Custom_PasswordField tf_TicketDispensers;
private presets.Custom_TextField tf_Username;
// End of variables declaration//GEN-END:variables


}
Loading