Iniciada nueva vista y aniadido loggin
This commit is contained in:
		
							parent
							
								
									c759f93fea
								
							
						
					
					
						commit
						f17a530c56
					
				| @ -6,5 +6,6 @@ | ||||
| 	<classpathentry kind="lib" path="jfreechart-1.5.0.jar"/> | ||||
| 	<classpathentry kind="lib" path="LGoodDatePicker-10.4.1-javadoc.jar"/> | ||||
| 	<classpathentry kind="lib" path="LGoodDatePicker-10.4.1.jar"/> | ||||
| 	<classpathentry kind="lib" path="Loggin.jar"/> | ||||
| 	<classpathentry kind="output" path="bin"/> | ||||
| </classpath> | ||||
|  | ||||
							
								
								
									
										2
									
								
								.config
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								.config
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | ||||
| #Configuracion general | ||||
| #Sun Nov 17 14:23:42 CET 2019 | ||||
| #Fri Nov 22 12:55:58 CET 2019 | ||||
| tema=0 | ||||
| ruta=.mes | ||||
|  | ||||
							
								
								
									
										1
									
								
								.contrasenias.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								.contrasenias.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| admin:8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 | ||||
							
								
								
									
										
											BIN
										
									
								
								Loggin.jar
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Loggin.jar
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										4
									
								
								bin/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								bin/.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,5 +1 @@ | ||||
| /Fichero/ | ||||
| /Ficheros/ | ||||
| /Logica/ | ||||
| /Main.class | ||||
| /VistaControlador/ | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								bin/Ficheros/Configuracion.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/Ficheros/Configuracion.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								bin/Logica/Mes.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/Logica/Mes.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								bin/Logica/Meses.class
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/Logica/Meses.class
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								bin/Main.class
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								bin/Main.class
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -1,4 +1,5 @@ | ||||
| import VistaControlador.Menu; | ||||
| import loggin.Vista; | ||||
| 
 | ||||
| public class Main { | ||||
| 	/** | ||||
| @ -7,9 +8,12 @@ public class Main { | ||||
| 	 * @param args | ||||
| 	 */ | ||||
| 	public static void main(String[] args) { | ||||
| 		/*Vista loggin = new Vista(Vista.Comprobar); | ||||
| 		while(!loggin.verResultado()) { | ||||
| 			 | ||||
| 		}*/ | ||||
| 		Menu menu=new Menu(); | ||||
| 		menu.setVisible(true); | ||||
| 
 | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -21,6 +21,8 @@ public class BarraOpciones extends JMenuBar{ | ||||
| 	JMenu vistas; | ||||
| 	JMenuItem gestion; | ||||
| 	JMenuItem modificacion; | ||||
| 	JMenu administracion; | ||||
| 	JMenuItem aniadirUsuario; | ||||
| 	 | ||||
| 	/** | ||||
| 	 * Inicializa labarra con los datos por defecto | ||||
| @ -54,5 +56,9 @@ public class BarraOpciones extends JMenuBar{ | ||||
| 		this.vistas.add(this.gestion); | ||||
| 		this.modificacion = new JMenuItem("Modificacion"); | ||||
| 		this.vistas.add(this.modificacion); | ||||
| 		this.administracion = new JMenu("Administracion"); | ||||
| 		this.add(this.administracion); | ||||
| 		this.aniadirUsuario = new JMenuItem("Aniadir usuario"); | ||||
| 		this.administracion.add(this.aniadirUsuario); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @ -8,6 +8,7 @@ import java.time.LocalDate; | ||||
| import javax.swing.JOptionPane; | ||||
| 
 | ||||
| import Ficheros.Configuracion; | ||||
| import loggin.Vista; | ||||
| 
 | ||||
| public class ControladorBarra implements ActionListener{ | ||||
| 	private BarraOpciones barra; | ||||
| @ -87,6 +88,11 @@ public class ControladorBarra implements ActionListener{ | ||||
| 			} | ||||
| 			case "Cambiar Modificar":{ | ||||
| 				this.menu.cambiarVista(this.menu.VISTA_MODIFICAR); | ||||
| 				break; | ||||
| 			} | ||||
| 			case "Aniadir usuario":{ | ||||
| 				Vista loggin = new Vista(Vista.Guardar); | ||||
| 				break; | ||||
| 			} | ||||
| 			 | ||||
| 		} | ||||
| @ -117,6 +123,8 @@ public class ControladorBarra implements ActionListener{ | ||||
| 		this.barra.gestion.setActionCommand("Cambiar Gestion"); | ||||
| 		this.barra.modificacion.addActionListener(this); | ||||
| 		this.barra.modificacion.setActionCommand("Cambiar Modificar"); | ||||
| 		this.barra.aniadirUsuario.addActionListener(this); | ||||
| 		this.barra.aniadirUsuario.setActionCommand("Aniadir usuario"); | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
|  | ||||
							
								
								
									
										23
									
								
								src/VistaControlador/ControladorPanelInterfaz.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								src/VistaControlador/ControladorPanelInterfaz.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,23 @@ | ||||
| package VistaControlador; | ||||
| 
 | ||||
| import java.awt.event.ActionEvent; | ||||
| import java.awt.event.ActionListener; | ||||
| 
 | ||||
| public class ControladorPanelInterfaz implements ActionListener{ | ||||
| 	VistaPanelInterfaz vista; | ||||
| 	Menu menu; | ||||
| 	public ControladorPanelInterfaz(VistaPanelInterfaz vista, Menu menu) { | ||||
| 		this.menu = menu; | ||||
| 		this.vista = vista; | ||||
| 		this.aniadirListener(); | ||||
| 	} | ||||
| 	 | ||||
| 	private void aniadirListener() { | ||||
| 		//his.vista. | ||||
| 	} | ||||
| 	@Override | ||||
| 	public void actionPerformed(ActionEvent arg0) { | ||||
| 		// TODO Auto-generated method stub | ||||
| 		 | ||||
| 	} | ||||
| } | ||||
| @ -26,6 +26,7 @@ import Ficheros.Configuracion; | ||||
| import Logica.Gestion; | ||||
| import Logica.Meses; | ||||
| import Logica.Transaccion; | ||||
| import loggin.Vista; | ||||
| 
 | ||||
| public class Menu extends JFrame{ | ||||
| 	static final int VISTA_MODIFICAR = 0; | ||||
| @ -54,6 +55,11 @@ public class Menu extends JFrame{ | ||||
| 	 * Constructor que carga los datos del menu | ||||
| 	 */ | ||||
| 	public Menu() { | ||||
| 		Vista loggin = new Vista(Vista.Comprobar); | ||||
| 		 | ||||
| 		if(!loggin.verResultado()) { | ||||
| 			System.exit(0); | ||||
| 		} | ||||
| 		this.rutaGuardado = ".mes"; | ||||
| 		this.tema = 0; | ||||
| 		this.barra = new BarraOpciones(); | ||||
|  | ||||
							
								
								
									
										31
									
								
								src/VistaControlador/VistaPanelInterfaz.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								src/VistaControlador/VistaPanelInterfaz.java
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,31 @@ | ||||
| package VistaControlador; | ||||
| 
 | ||||
| import javax.swing.JButton; | ||||
| import javax.swing.JCheckBox; | ||||
| import javax.swing.JRadioButton; | ||||
| import javax.swing.JRadioButtonMenuItem; | ||||
| 
 | ||||
| public class VistaPanelInterfaz extends VistaPanel{ | ||||
| JRadioButtonMenuItem menu; | ||||
| JRadioButton temaClaro; | ||||
| JRadioButton temaRosa; | ||||
| JRadioButton temaOscuro; | ||||
| JCheckBox aplicarBarra; | ||||
| JButton aplicarCambios; | ||||
| 
 | ||||
| VistaPanelInterfaz() { | ||||
| 	this.menu = new JRadioButtonMenuItem(); | ||||
| 	this.temaClaro = new JRadioButton(); | ||||
| 	this.menu.add(this.temaClaro); | ||||
| 	this.temaOscuro = new JRadioButton(); | ||||
| 	this.menu.add(this.temaOscuro); | ||||
| 	this.temaRosa = new JRadioButton(); | ||||
| 	this.menu.add(this.temaRosa); | ||||
| 	this.add(this.menu); | ||||
| 	this.aplicarBarra = new JCheckBox(); | ||||
| 	this.add(this.aplicarBarra); | ||||
| 	this.aplicarCambios = new JButton("Aplicar"); | ||||
| 	this.add(this.aplicarCambios); | ||||
| } | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user