forked from Eliver-Salazar/PED
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hellebore
wants to merge
2
commits into
base-sha/099a7b6d0d6ff64bf7783c825f5fd529e4acba91
Choose a base branch
from
head-sha/300455fe156e56b773bd9cb38ba8dab1b63864db/2024-07-08T11-09-33/e3fc90
base: base-sha/099a7b6d0d6ff64bf7783c825f5fd529e4acba91
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
New Features #4
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
/** | ||
* 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 | ||
|
||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment helpful?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?