use of java.beans.PropertyVetoException in project sic by belluccifranco.
the class PrincipalGUI method mnu_CajasActionPerformed.
//GEN-LAST:event_mnuItm_PedidosActionPerformed
private void mnu_CajasActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_mnu_CajasActionPerformed
JInternalFrame gui = Utilidades.estaEnDesktop(getDesktopPane(), CajasGUI.class);
if (gui == null) {
gui = new CajasGUI();
gui.setLocation(getDesktopPane().getWidth() / 2 - gui.getWidth() / 2, getDesktopPane().getHeight() / 2 - gui.getHeight() / 2);
getDesktopPane().add(gui);
gui.setVisible(true);
} else {
//selecciona y trae al frente el internalframe
try {
gui.setSelected(true);
} catch (PropertyVetoException ex) {
String msjError = "No se pudo seleccionar la ventana requerida.";
LOGGER.error(msjError + " - " + ex.getMessage());
JOptionPane.showInternalMessageDialog(this.getDesktopPane(), msjError, "Error", JOptionPane.ERROR_MESSAGE);
}
}
}
use of java.beans.PropertyVetoException in project sic by belluccifranco.
the class PrincipalGUI method mnuItm_FacturasVentaActionPerformed.
//GEN-LAST:event_mnuItm_IrTPVActionPerformed
private void mnuItm_FacturasVentaActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_mnuItm_FacturasVentaActionPerformed
JInternalFrame gui = Utilidades.estaEnDesktop(getDesktopPane(), FacturasVentaGUI.class);
if (gui == null) {
gui = new FacturasVentaGUI();
gui.setLocation(getDesktopPane().getWidth() / 2 - gui.getWidth() / 2, getDesktopPane().getHeight() / 2 - gui.getHeight() / 2);
getDesktopPane().add(gui);
gui.setVisible(true);
} else {
//selecciona y trae al frente el internalframe
try {
gui.setSelected(true);
} catch (PropertyVetoException ex) {
String msjError = "No se pudo seleccionar la ventana requerida.";
LOGGER.error(msjError + " - " + ex.getMessage());
JOptionPane.showInternalMessageDialog(this.getDesktopPane(), msjError, "Error", JOptionPane.ERROR_MESSAGE);
}
}
}
use of java.beans.PropertyVetoException in project sic by belluccifranco.
the class PrincipalGUI method mnuItm_ProveedoresActionPerformed.
//GEN-LAST:event_mnuItm_UsuariosActionPerformed
private void mnuItm_ProveedoresActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_mnuItm_ProveedoresActionPerformed
JInternalFrame gui = Utilidades.estaEnDesktop(getDesktopPane(), ProveedoresGUI.class);
if (gui == null) {
gui = new ProveedoresGUI();
gui.setLocation(getDesktopPane().getWidth() / 2 - gui.getWidth() / 2, getDesktopPane().getHeight() / 2 - gui.getHeight() / 2);
getDesktopPane().add(gui);
gui.setVisible(true);
} else {
//selecciona y trae al frente el internalframe
try {
gui.setSelected(true);
} catch (PropertyVetoException ex) {
String msjError = "No se pudo seleccionar la ventana requerida.";
LOGGER.error(msjError + " - " + ex.getMessage());
JOptionPane.showInternalMessageDialog(this.getDesktopPane(), msjError, "Error", JOptionPane.ERROR_MESSAGE);
}
}
}
use of java.beans.PropertyVetoException in project sic by belluccifranco.
the class PrincipalGUI method mnuItm_ClientesActionPerformed.
//GEN-LAST:event_mnuItm_ProductosActionPerformed
private void mnuItm_ClientesActionPerformed(java.awt.event.ActionEvent evt) {
//GEN-FIRST:event_mnuItm_ClientesActionPerformed
JInternalFrame gui = Utilidades.estaEnDesktop(getDesktopPane(), ClientesGUI.class);
if (gui == null) {
gui = new ClientesGUI();
gui.setLocation(getDesktopPane().getWidth() / 2 - gui.getWidth() / 2, getDesktopPane().getHeight() / 2 - gui.getHeight() / 2);
getDesktopPane().add(gui);
gui.setVisible(true);
} else {
//selecciona y trae al frente el internalframe
try {
gui.setSelected(true);
} catch (PropertyVetoException ex) {
String msjError = "No se pudo seleccionar la ventana requerida.";
LOGGER.error(msjError + " - " + ex.getMessage());
JOptionPane.showInternalMessageDialog(this.getDesktopPane(), msjError, "Error", JOptionPane.ERROR_MESSAGE);
}
}
}
use of java.beans.PropertyVetoException in project GCViewer by chewiebug.
the class Arrange method actionPerformed.
public void actionPerformed(final ActionEvent e) {
final JInternalFrame[] frames = gcViewer.getDesktopPane().getAllFrames();
final DesktopManager desktopManager = gcViewer.getDesktopPane().getDesktopManager();
for (int i = 0; i < frames.length; i++) {
final JInternalFrame frame = frames[i];
desktopManager.deiconifyFrame(frame);
try {
frame.setMaximum(false);
} catch (PropertyVetoException e1) {
e1.printStackTrace();
}
final int height = gcViewer.getDesktopPane().getHeight() / frames.length;
desktopManager.setBoundsForFrame(frame, 0, height * i, gcViewer.getDesktopPane().getWidth(), height);
}
}
Aggregations