Aniadido exportar xml

This commit is contained in:
roche
2019-11-16 21:05:09 +01:00
parent 8bfab6a9dc
commit 1e46c48068
8 changed files with 243 additions and 83 deletions

View File

@@ -1,12 +1,13 @@
package VistaControlador;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import javax.swing.JOptionPane;
import Ficheros.Configuracion;
public class ControladorBarra implements ActionListener{
private BarraOpciones barra;
private Menu menu;
@@ -26,7 +27,8 @@ public class ControladorBarra implements ActionListener{
JOptionPane.showMessageDialog(null, "Debe introducir algo", "error", JOptionPane.WARNING_MESSAGE);
return;
}
this.menu.nombreDatos = ruta;
this.menu.rutaGuardado = ruta;
Configuracion.guardarConfiguracion(this.menu);
break;
}
case "Guardar instantanea":{
@@ -45,46 +47,15 @@ public class ControladorBarra implements ActionListener{
break;
}
case "Modo claro":{
this.menu.setBackground(Color.WHITE);
this.menu.setOpacity(1);
this.menu.repaint();
this.menu.revalidate();
this.menu.panelCentral.setOpaque(true);
this.menu.panelCentral.setBackground(Color.WHITE);
this.menu.panelCentral.repaint();
this.menu.panelCentral.revalidate();
this.menu.panel.setBackground(Color.WHITE);
this.menu.panel.repaint();
this.menu.panel.revalidate();
menu.setTheme(0);
break;
}
case "Modo rosa":{
this.menu.setBackground(Color.PINK);
this.menu.setOpacity(1);
this.menu.repaint();
this.menu.revalidate();
this.menu.panelCentral.setOpaque(true);
this.menu.panelCentral.setBackground(Color.PINK);
this.menu.panelCentral.repaint();
this.menu.panelCentral.revalidate();
this.menu.panel.setOpaque(true);
this.menu.panel.setBackground(Color.PINK);
this.menu.panel.repaint();
this.menu.panel.revalidate();
menu.setTheme(1);
break;
}
case "Modo oscuro":{
this.menu.setBackground(Color.BLACK);
this.menu.repaint();
this.menu.revalidate();
this.menu.panelCentral.setOpaque(true);
this.menu.panelCentral.setBackground(Color.BLACK);
this.menu.panelCentral.repaint();
this.menu.panelCentral.revalidate();
this.menu.panel.setOpaque(true);
this.menu.panel.setBackground(Color.BLACK);
this.menu.panel.repaint();
this.menu.panel.revalidate();
menu.setTheme(2);
break;
}
case "Mostrar todo":{
@@ -92,6 +63,9 @@ public class ControladorBarra implements ActionListener{
mostrar.setVisible(true);
break;
}
case "Exportar XLM":{
this.menu.meses.exportarXML();
}
}
}
@@ -101,6 +75,8 @@ public class ControladorBarra implements ActionListener{
this.barra.cambiarRuta.setActionCommand("Cambiar ruta");
this.barra.guardarIns.addActionListener(this);
this.barra.guardarIns.setActionCommand("Guardar instantanea");
this.barra.exportarXML.addActionListener(this);
this.barra.exportarXML.setActionCommand("Exportar XLM");
this.barra.modoClaro.addActionListener(this);
this.barra.modoClaro.setActionCommand("Modo claro");
this.barra.modoRosa.addActionListener(this);