/*
* Desktop.java
*
* Created on 22 de octubre de 2002, 10:55 PM
*/
package com.dataman.prometeo.swing;
import cleavear.gds.gui.chi.PnlBitacora;
import cleavear.gds.gui.chi.PnlOSMon;
import com.dataman.prometeo.core.Compra;
import com.dataman.prometeo.core.IF_Constantes;
import com.dataman.prometeo.core.Proveedor;
import com.dataman.prometeo.core.Reportes;
import java.awt.Frame;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.plaf.metal.*;
/**
*
* @author Marco A. Balderas
*/
public class Desktop extends javax.swing.JFrame {
/**
* Creates new form Desktop
*/
public Desktop() {
Locale.setDefault(IF_Constantes.locMX);
initComponents();
desktopPane.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
setBounds(1, 1, 800, 570);
this.setExtendedState(Frame.MAXIMIZED_BOTH);
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
} catch (InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
Logger.getLogger(Desktop.class.getName()).log(Level.SEVERE, null, ex);
}
//</editor-fold>
}
/**
* Creates an icon from an image contained in the "images" directory.
*
* public ImageIcon createImageIcon(String filename, String description) {
* String path = "/resources/images/" + filename; return new
* ImageIcon(getClass().getResource(path)); }
*
* Show the spash screen while the rest of the demo loads
*
* public void createSplashScreen() { JLabel splashLabel = new JLabel(new
* Valida().createImageIcon("yeanBanner.gif",
* "Splash.accessible_description")); JWindow splashScreen = new JWindow();
* splashScreen.getContentPane().add(splashLabel); splashScreen.pack();
* splashScreen.show(); /* Rectangle screenRect =
* getFrame().getGraphicsConfiguration().getBounds();
* splashScreen.setLocation( screenRect.x + screenRect.width/2 -
* splashScreen.getSize().width/2, screenRect.y + screenRect.height/2 -
* splashScreen.getSize().height/2);
*
* }
*
* public void showSplashScreen() { //splashScreen.show(); }
*/
/**
* pop down the spash screen
*
* public void hideSplash() { if(!isApplet()) {
* splashScreen.setVisible(false); splashScreen = null; splashLabel = null;
* } }
*/
/**
* 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.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
desktopPane = new javax.swing.JDesktopPane();
jToolBar1 = new javax.swing.JToolBar();
jbtnClientes = new javax.swing.JButton();
jbtnVentas = new javax.swing.JButton();
jbtnCompras = new javax.swing.JButton();
jbtnCatalogo = new javax.swing.JButton();
menuBar = new javax.swing.JMenuBar();
VentasMenu = new javax.swing.JMenu();
venderMenuItem = new javax.swing.JMenuItem();
pagosMenuItem = new javax.swing.JMenuItem();
clientesMenuItem = new javax.swing.JMenuItem();
separadoMenuItem = new javax.swing.JMenuItem();
devolucionMenuItem = new javax.swing.JMenuItem();
cancelaMenuItem = new javax.swing.JMenuItem();
salirMenuItem = new javax.swing.JMenuItem();
inventarioMenu = new javax.swing.JMenu();
comprasMenuItem = new javax.swing.JMenuItem();
catalogoMenuItem = new javax.swing.JMenuItem();
proveedoresMenuItem = new javax.swing.JMenuItem();
devComprasMenuItem = new javax.swing.JMenuItem();
cancelMenuItem = new javax.swing.JMenuItem();
toolSetMenu = new javax.swing.JMenu();
verDetalleMenuItem = new javax.swing.JMenuItem();
facturasMenu = new javax.swing.JMenu();
emiteFactura = new javax.swing.JMenuItem();
compruebaFactura = new javax.swing.JMenuItem();
cancelarFactura = new javax.swing.JMenuItem();
facturaCompra = new javax.swing.JMenuItem();
reportesMenu = new javax.swing.JMenu();
chooserMenuItem = new javax.swing.JMenuItem();
preciosVentaMenuItem = new javax.swing.JMenuItem();
verMenu = new javax.swing.JMenu();
logMenuItem = new javax.swing.JMenuItem();
percentMenuItem = new javax.swing.JMenuItem();
preferenciasMenu = new javax.swing.JMenu();
opcionesMenu = new javax.swing.JMenuItem();
backgroundMenu = new javax.swing.JMenuItem();
fontMenu = new javax.swing.JMenuItem();
estilosMenu = new javax.swing.JMenu();
windowsMenuItem = new javax.swing.JMenuItem();
temasMenu = new javax.swing.JMenu();
nMenuItem = new javax.swing.JMenuItem();
eMenuItem = new javax.swing.JMenuItem();
rMenuItem = new javax.swing.JMenuItem();
coMenuItem = new javax.swing.JMenuItem();
aMenuItem = new javax.swing.JMenuItem();
helpMenu = new javax.swing.JMenu();
contentMenuItem = new javax.swing.JMenuItem();
aboutMenuItem = new javax.swing.JMenuItem();
setTitle("PROMETEO");
setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
setLocationByPlatform(true);
setName("frmDesktop"); // NOI18N
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
});
jToolBar1.setFloatable(false);
jToolBar1.setRollover(true);
jbtnClientes.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/morePeople.gif"))); // NOI18N
jbtnClientes.setToolTipText("Clientes");
jbtnClientes.setFocusable(false);
jbtnClientes.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jbtnClientes.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jbtnClientes.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
jbtnClientesMouseReleased(evt);
}
});
jToolBar1.add(jbtnClientes);
jbtnVentas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/cashRegister.gif"))); // NOI18N
jbtnVentas.setToolTipText("Ventas");
jbtnVentas.setFocusable(false);
jbtnVentas.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jbtnVentas.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jToolBar1.add(jbtnVentas);
jbtnCompras.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/shop.gif"))); // NOI18N
jbtnCompras.setToolTipText("Compras");
jbtnCompras.setFocusable(false);
jbtnCompras.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jbtnCompras.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jbtnCompras.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
jbtnComprasMouseReleased(evt);
}
});
jToolBar1.add(jbtnCompras);
jbtnCatalogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/blueBook.gif"))); // NOI18N
jbtnCatalogo.setToolTipText("Catalogo");
jbtnCatalogo.setFocusable(false);
jbtnCatalogo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
jbtnCatalogo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
jbtnCatalogo.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
jbtnCatalogoMouseReleased(evt);
}
});
jToolBar1.add(jbtnCatalogo);
desktopPane.add(jToolBar1);
jToolBar1.setBounds(0, 0, 300, 30);
getContentPane().add(desktopPane, java.awt.BorderLayout.CENTER);
VentasMenu.setText("Ventas");
venderMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/cashRegister.gif"))); // NOI18N
venderMenuItem.setText("Vender ...");
venderMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
venderMenuItemMouseReleased(evt);
}
});
VentasMenu.add(venderMenuItem);
pagosMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/box.gif"))); // NOI18N
pagosMenuItem.setText("Pagos ...");
pagosMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
pagosMenuItemMouseReleased(evt);
}
});
VentasMenu.add(pagosMenuItem);
clientesMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/morePeople.gif"))); // NOI18N
clientesMenuItem.setText("Clientes ...");
clientesMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
clientesMenuItemMouseReleased(evt);
}
});
VentasMenu.add(clientesMenuItem);
separadoMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/diary.gif"))); // NOI18N
separadoMenuItem.setText("Separado ...");
separadoMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
separadoMenuItemMouseReleased(evt);
}
});
VentasMenu.add(separadoMenuItem);
devolucionMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/014.gif"))); // NOI18N
devolucionMenuItem.setText("Devoluciones ...");
devolucionMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
devolucionMenuItemMouseReleased(evt);
}
});
VentasMenu.add(devolucionMenuItem);
cancelaMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/boardSkull.gif"))); // NOI18N
cancelaMenuItem.setText("Cancelaciones ...");
cancelaMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
cancelaMenuItemMouseReleased(evt);
}
});
VentasMenu.add(cancelaMenuItem);
salirMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/boardArrow.gif"))); // NOI18N
salirMenuItem.setText("Salir");
salirMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
salirMenuItemMouseReleased(evt);
}
});
VentasMenu.add(salirMenuItem);
menuBar.add(VentasMenu);
inventarioMenu.setText("Inventario");
comprasMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/shop.gif"))); // NOI18N
comprasMenuItem.setText("Compras ...");
comprasMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
comprasMenuItemMouseReleased(evt);
}
});
inventarioMenu.add(comprasMenuItem);
catalogoMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/blueBook.gif"))); // NOI18N
catalogoMenuItem.setText("Catalogo ...");
catalogoMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
catalogoMenuItemMouseReleased(evt);
}
});
inventarioMenu.add(catalogoMenuItem);
proveedoresMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/plant.gif"))); // NOI18N
proveedoresMenuItem.setText("Proveedores ...");
proveedoresMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
proveedoresMenuItemMouseReleased(evt);
}
});
inventarioMenu.add(proveedoresMenuItem);
devComprasMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/014.gif"))); // NOI18N
devComprasMenuItem.setText("Devoluciones ...");
devComprasMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
devComprasMenuItemMouseReleased(evt);
}
});
inventarioMenu.add(devComprasMenuItem);
cancelMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/boardSkull.gif"))); // NOI18N
cancelMenuItem.setText("Cancelaciones ...");
cancelMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
cancelMenuItemMouseReleased(evt);
}
});
inventarioMenu.add(cancelMenuItem);
menuBar.add(inventarioMenu);
toolSetMenu.setText("Consultas");
verDetalleMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/text.gif"))); // NOI18N
verDetalleMenuItem.setText("Ver Detalle ...");
verDetalleMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
verDetalleMenuItemMouseReleased(evt);
}
});
toolSetMenu.add(verDetalleMenuItem);
menuBar.add(toolSetMenu);
facturasMenu.setText("Facturas");
emiteFactura.setText("Emitir Factura ...");
facturasMenu.add(emiteFactura);
compruebaFactura.setText("Comprobar Factura ...");
facturasMenu.add(compruebaFactura);
cancelarFactura.setText("Cancelar Factura");
facturasMenu.add(cancelarFactura);
facturaCompra.setText("Factura de Compra ...");
facturasMenu.add(facturaCompra);
menuBar.add(facturasMenu);
reportesMenu.setText("Reportes");
reportesMenu.setToolTipText("null");
chooserMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/styleWriter.gif"))); // NOI18N
chooserMenuItem.setText("Ver Opciones ...");
chooserMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
chooserMenuItemMouseReleased(evt);
}
});
reportesMenu.add(chooserMenuItem);
preciosVentaMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/styleWriter.gif"))); // NOI18N
preciosVentaMenuItem.setText("Precio de Venta");
preciosVentaMenuItem.setToolTipText("Esta operacion puede requerir algunos minutos");
preciosVentaMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
preciosVentaMenuItemMouseReleased(evt);
}
});
reportesMenu.add(preciosVentaMenuItem);
menuBar.add(reportesMenu);
verMenu.setText("Ver");
logMenuItem.setText("Ver Bitácora ...");
logMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
logMenuItemMouseReleased(evt);
}
});
verMenu.add(logMenuItem);
percentMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/cashRegister.gif"))); // NOI18N
percentMenuItem.setText("Porcentajes ...");
percentMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
percentMenuItemMouseReleased(evt);
}
});
verMenu.add(percentMenuItem);
menuBar.add(verMenu);
preferenciasMenu.setText("Preferencias");
opcionesMenu.setText("Opciones ...");
preferenciasMenu.add(opcionesMenu);
backgroundMenu.setText("Fondo de Escritorio ...");
preferenciasMenu.add(backgroundMenu);
fontMenu.setText("Fuente Predeterminada");
preferenciasMenu.add(fontMenu);
menuBar.add(preferenciasMenu);
estilosMenu.setText("Estilos");
windowsMenuItem.setText("Windows");
windowsMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
windowsMenuItemMouseReleased(evt);
}
});
estilosMenu.add(windowsMenuItem);
temasMenu.setText("Java");
temasMenu.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
temasMenuMouseReleased(evt);
}
});
nMenuItem.setText("Nimbus");
nMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
nMenuItemMouseReleased(evt);
}
});
nMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
nMenuItemActionPerformed(evt);
}
});
temasMenu.add(nMenuItem);
eMenuItem.setText("Esmeralda");
eMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
eMenuItemMouseReleased(evt);
}
});
temasMenu.add(eMenuItem);
rMenuItem.setText("Ruby");
rMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
rMenuItemMouseReleased(evt);
}
});
temasMenu.add(rMenuItem);
coMenuItem.setText("Contraste");
coMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
coMenuItemMouseReleased(evt);
}
});
temasMenu.add(coMenuItem);
aMenuItem.setText("Akua");
aMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
aMenuItemMouseReleased(evt);
}
});
temasMenu.add(aMenuItem);
estilosMenu.add(temasMenu);
menuBar.add(estilosMenu);
helpMenu.setText("Help");
contentMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/ayuda.gif"))); // NOI18N
contentMenuItem.setText("Contenido");
contentMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
contentMenuItemMouseReleased(evt);
}
});
helpMenu.add(contentMenuItem);
aboutMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/dataman/prometeo/res/icons/bulb.gif"))); // NOI18N
aboutMenuItem.setText("Acerca de ...");
aboutMenuItem.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
aboutMenuItemMouseReleased(evt);
}
});
helpMenu.add(aboutMenuItem);
menuBar.add(helpMenu);
setJMenuBar(menuBar);
pack();
setLocationRelativeTo(null);
}// </editor-fold>//GEN-END:initComponents
private void temasMenuMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_temasMenuMouseReleased
// Add your handling code here:
setLF(metal);
}//GEN-LAST:event_temasMenuMouseReleased
private void preciosVentaMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_preciosVentaMenuItemMouseReleased
// Add your handling code here:
String header = "LISTADO DE PRECIOS DE VENTA(c/IVA)<BR><BR>";
//new SVista("text/html",header + jepDatos.getText()).show();
new JBrowser(header + new Reportes().listarPreciosVenta()).show();
}//GEN-LAST:event_preciosVentaMenuItemMouseReleased
private void verDetalleMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_verDetalleMenuItemMouseReleased
// Add your handling code here:
}//GEN-LAST:event_verDetalleMenuItemMouseReleased
private void contentMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_contentMenuItemMouseReleased
// Add your handling code here:
JOptionPane.showMessageDialog(frame, "LA AYUDA ESTA EN FORMATO DE WORD EN:\nC:\\SIVA\\MANUAL",
"MENSAJE DEL SISTEMA", JOptionPane.INFORMATION_MESSAGE);
}//GEN-LAST:event_contentMenuItemMouseReleased
private void pagosMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_pagosMenuItemMouseReleased
// Add your handling code here:
}//GEN-LAST:event_pagosMenuItemMouseReleased
private void cancelMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelMenuItemMouseReleased
}//GEN-LAST:event_cancelMenuItemMouseReleased
private void cancelaMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelaMenuItemMouseReleased
// Add your handling code here:
}//GEN-LAST:event_cancelaMenuItemMouseReleased
private void chooserMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chooserMenuItemMouseReleased
// Add your handling code here:
}//GEN-LAST:event_chooserMenuItemMouseReleased
private void aMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_aMenuItemMouseReleased
// Add your handling code here:
MetalLookAndFeel.setCurrentTheme(aTheme);
setLF(metal);
}//GEN-LAST:event_aMenuItemMouseReleased
private void coMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_coMenuItemMouseReleased
// Add your handling code here:
MetalLookAndFeel.setCurrentTheme(coTheme);
setLF(metal);
}//GEN-LAST:event_coMenuItemMouseReleased
private void rMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rMenuItemMouseReleased
// Add your handling code here:
MetalLookAndFeel.setCurrentTheme(rTheme);
setLF(metal);
}//GEN-LAST:event_rMenuItemMouseReleased
private void eMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_eMenuItemMouseReleased
// Add your handling code here:
MetalLookAndFeel.setCurrentTheme(etheme);
setLF(metal);
//swingset.updateLookAndFeel();
}//GEN-LAST:event_eMenuItemMouseReleased
private void aboutMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_aboutMenuItemMouseReleased
// Add your handling code here:
}//GEN-LAST:event_aboutMenuItemMouseReleased
private void devolucionMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_devolucionMenuItemMouseReleased
// Add your handling code here:
}//GEN-LAST:event_devolucionMenuItemMouseReleased
private void venderMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_venderMenuItemMouseReleased
// Add your handling code here:
}//GEN-LAST:event_venderMenuItemMouseReleased
private void separadoMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_separadoMenuItemMouseReleased
// Add your handling code here:
}//GEN-LAST:event_separadoMenuItemMouseReleased
private void devComprasMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_devComprasMenuItemMouseReleased
// Add your handling code here:
}//GEN-LAST:event_devComprasMenuItemMouseReleased
private void comprasMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_comprasMenuItemMouseReleased
// Add your handling code here:
// SCompras sco = new SCompras();
// sco.setVisible(true);
// desktopPane.add(sco);
// try {
// sco.setSelected(true);
// } catch (java.beans.PropertyVetoException e) {
// }
Transaccion<Compra> tX = new Transaccion("Compras", "/com/dataman/prometeo/res/icons/shop.gif",
new Proveedor());
tX.setVisible(true);
desktopPane.add(tX);
}//GEN-LAST:event_comprasMenuItemMouseReleased
private void windowsMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_windowsMenuItemMouseReleased
// Add your handling code here:
setLF(windows);
}//GEN-LAST:event_windowsMenuItemMouseReleased
private void clientesMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_clientesMenuItemMouseReleased
showClientes();
}//GEN-LAST:event_clientesMenuItemMouseReleased
private void showClientes() {
JIFGenerico sc = new JIFGenerico(
"/com/dataman/prometeo/res/icons/morePeople.gif",
"Clientes", new PnlClientes());
sc.setVisible(true);
desktopPane.add(sc);
try {
sc.setSelected(true);
} catch (java.beans.PropertyVetoException e) {
}
}
private void proveedoresMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_proveedoresMenuItemMouseReleased
// Add your handling code here:
// SProveedores sp = new SProveedores();
// sp.setVisible(true);
// desktopPane.add(sp);
// try {
// sp.setSelected(true);
// } catch (java.beans.PropertyVetoException e) {
// }
JIFGenerico sc = new JIFGenerico(
"/com/dataman/prometeo/res/icons/plant.gif",
"Proveedores", new PnlProveedores());
sc.setVisible(true);
desktopPane.add(sc);
try {
sc.setSelected(true);
} catch (java.beans.PropertyVetoException e) {
}
}//GEN-LAST:event_proveedoresMenuItemMouseReleased
private void catalogoMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_catalogoMenuItemMouseReleased
// Add your handling code here:
// SCatalogo sca = new SCatalogo();
// sca.setVisible(true);
// desktopPane.add(sca);
// try {
// sca.setSelected(true);
// } catch (java.beans.PropertyVetoException e) {
// }
JIFGenerico sc = new JIFGenerico(
"/com/dataman/prometeo/res/icons/blueBook.gif",
"Catalogo", new PnlItems());
sc.setVisible(true);
desktopPane.add(sc);
try {
sc.setSelected(true);
} catch (java.beans.PropertyVetoException e) {
}
}//GEN-LAST:event_catalogoMenuItemMouseReleased
private void salirMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_salirMenuItemMouseReleased
// Add your handling code here:
System.exit(0);
}//GEN-LAST:event_salirMenuItemMouseReleased
private void percentMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_percentMenuItemMouseReleased
// Add your handling code here:
/**
* Llama al frame de porcentajes y lo muestra
*/
}//GEN-LAST:event_percentMenuItemMouseReleased
/**
* Exit the Application
*/
private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
System.exit(0);
}//GEN-LAST:event_exitForm
private void nMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_nMenuItemMouseReleased
//Nimbus tema
//MetalLookAndFeel.setCurrentTheme(aTheme);
setLF("javax.swing.plaf.nimbus.NimbusLookAndFeel");
}//GEN-LAST:event_nMenuItemMouseReleased
private void nMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nMenuItemActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_nMenuItemActionPerformed
private void jbtnClientesMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jbtnClientesMouseReleased
showClientes();
}//GEN-LAST:event_jbtnClientesMouseReleased
private void jbtnComprasMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jbtnComprasMouseReleased
Transaccion<Compra> tX = new Transaccion("Compras", "/com/dataman/prometeo/res/icons/shop.gif",
new Proveedor());
tX.setVisible(true);
desktopPane.add(tX);
}//GEN-LAST:event_jbtnComprasMouseReleased
private void logMenuItemMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_logMenuItemMouseReleased
ThreadGroup tg = new ThreadGroup("Prometeo");
JIFGenerico log = new JIFGenerico(
"/com/dataman/prometeo/res/icons/shop.gif",
"Bitácora",
new PnlBitacora(), new PnlOSMon(tg));
log.setVisible(true);
desktopPane.add(log);
}//GEN-LAST:event_logMenuItemMouseReleased
private void jbtnCatalogoMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jbtnCatalogoMouseReleased
JIFGenerico sc = new JIFGenerico(
"/com/dataman/prometeo/res/icons/blueBook.gif",
"Catalogo", new PnlItems());
sc.setVisible(true);
desktopPane.add(sc);
try {
sc.setSelected(true);
} catch (java.beans.PropertyVetoException e) {
}
}//GEN-LAST:event_jbtnCatalogoMouseReleased
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
Desktop dk = new Desktop();
dk.show();
//new Desktop().show();
}
/**
* Metodo p/establecer look and feel mismo que se hereda a los Internal
* frames
*/
private void setLF(String lf) {
try {
UIManager.setLookAndFeel(lf);
SwingUtilities.updateComponentTreeUI(this);
//this.pack();
//this.repaint();
//this.setBounds(1,1,800,570);
} catch (Exception e) {
System.err.println(e.getMessage());
}
}
protected static JDesktopPane getDesktop() {
return desktopPane;
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JMenu VentasMenu;
private javax.swing.JMenuItem aMenuItem;
private javax.swing.JMenuItem aboutMenuItem;
private javax.swing.JMenuItem backgroundMenu;
private javax.swing.JMenuItem cancelMenuItem;
private javax.swing.JMenuItem cancelaMenuItem;
private javax.swing.JMenuItem cancelarFactura;
private javax.swing.JMenuItem catalogoMenuItem;
private javax.swing.JMenuItem chooserMenuItem;
private javax.swing.JMenuItem clientesMenuItem;
private javax.swing.JMenuItem coMenuItem;
private javax.swing.JMenuItem comprasMenuItem;
private javax.swing.JMenuItem compruebaFactura;
private javax.swing.JMenuItem contentMenuItem;
private static javax.swing.JDesktopPane desktopPane;
private javax.swing.JMenuItem devComprasMenuItem;
private javax.swing.JMenuItem devolucionMenuItem;
private javax.swing.JMenuItem eMenuItem;
private javax.swing.JMenuItem emiteFactura;
private javax.swing.JMenu estilosMenu;
private javax.swing.JMenuItem facturaCompra;
private javax.swing.JMenu facturasMenu;
private javax.swing.JMenuItem fontMenu;
private javax.swing.JMenu helpMenu;
private javax.swing.JMenu inventarioMenu;
private javax.swing.JToolBar jToolBar1;
private javax.swing.JButton jbtnCatalogo;
private javax.swing.JButton jbtnClientes;
private javax.swing.JButton jbtnCompras;
private javax.swing.JButton jbtnVentas;
private javax.swing.JMenuItem logMenuItem;
private javax.swing.JMenuBar menuBar;
private javax.swing.JMenuItem nMenuItem;
private javax.swing.JMenuItem opcionesMenu;
private javax.swing.JMenuItem pagosMenuItem;
private javax.swing.JMenuItem percentMenuItem;
private javax.swing.JMenuItem preciosVentaMenuItem;
private javax.swing.JMenu preferenciasMenu;
private javax.swing.JMenuItem proveedoresMenuItem;
private javax.swing.JMenuItem rMenuItem;
private javax.swing.JMenu reportesMenu;
private javax.swing.JMenuItem salirMenuItem;
private javax.swing.JMenuItem separadoMenuItem;
private javax.swing.JMenu temasMenu;
private javax.swing.JMenu toolSetMenu;
private javax.swing.JMenuItem venderMenuItem;
private javax.swing.JMenuItem verDetalleMenuItem;
private javax.swing.JMenu verMenu;
private javax.swing.JMenuItem windowsMenuItem;
// End of variables declaration//GEN-END:variables
private JFrame frame;
private Splash splash = new Splash();
private EmeraldTheme etheme = new EmeraldTheme();
private AquaTheme aTheme = new AquaTheme();
private CharcoalTheme cTheme = new CharcoalTheme();
private ContrastTheme coTheme = new ContrastTheme();
private RubyTheme rTheme = new RubyTheme();
private Desktop swingset;
/**
* Look And feels
*/
private String motif = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
private String windows = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
private String metal = "javax.swing.plaf.metal.MetalLookAndFeel";
}