Package carcel.views

Examples of carcel.views.PanelListener


        asignarPabellonButton.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                ResponsableController responsableController = new ResponsableController(policia);
                final WindowsCreator wc = new WindowsCreator(PrincipalController.instanciaControllerPrincipal(), responsableController, true);
                responsableController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });
       
        asignaUserBtt.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                UsuarioController uc = new UsuarioController(new Usuario(policia.getPersona(), "", ""),true);
                final WindowsCreator creator = new WindowsCreator(PrincipalController.getInstance(null), uc,false);
                uc.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        creator.dispose();
                    }
                });
View Full Code Here


            public void onActionExecute(Rol entity) {

                RolController rolcontrolador = new RolController(PrincipalController.getLogedUser(), entity);
                final WindowsCreator creator = new WindowsCreator(PrincipalController.instanciaControllerPrincipal(), rolcontrolador, true);
                rolcontrolador.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        creator.dispose();
                        createRolTable(true, null);
                    }
View Full Code Here

            public void actionPerformed(ActionEvent e) {

                RolController rolcontrolador = new RolController(PrincipalController.getLogedUser(), null);
                final WindowsCreator wc = new WindowsCreator(PrincipalController.instanciaControllerPrincipal(), rolcontrolador, true);
                rolcontrolador.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
View Full Code Here

           
            public void onActionExecute(Policia entity) {
              
                PoliciaController policiacontroller = new PoliciaController(entity);
                final WindowsCreator creator = new WindowsCreator(PrincipalController.instanciaControllerPrincipal(),policiacontroller,true);
                policiacontroller.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        creator.dispose();
                            createPoliciaTable(true,null);
                    }
View Full Code Here

            public void actionPerformed(ActionEvent e) {
            
                PoliciaController policiaController = new PoliciaController(null);
                final WindowsCreator wc = new WindowsCreator(PrincipalController.instanciaControllerPrincipal(), policiaController,true);
                policiaController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
View Full Code Here

            public void actionPerformed(ActionEvent e) {
                //Nuevo Pabellon desde el menu, por eso va null en pabellon
                PabellonController pabellonController = new PabellonController(usuario, null);
                final WindowsCreator wc = new WindowsCreator(principalController, pabellonController, true);
                pabellonController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });
        gestionPabellonMnu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                PabellonListPanelController pabellonListPanelController = new PabellonListPanelController(principalController);
                final WindowsCreator wc = new WindowsCreator(principalController, pabellonListPanelController, true);
                pabellonListPanelController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });


        //CELDAS................................................................
        celdaMnu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                CeldaController celdaController = new CeldaController();
                final WindowsCreator wc = new WindowsCreator(principalController, celdaController, true);
                celdaController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });


        //Presos ---------------------------------------------------------------
        presoMenu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                PresoController presoController = new PresoController(usuario, null, CarcelConstants.OPERACION_ALTA);
                final WindowsCreator wc = new WindowsCreator(principalController, presoController, true);
                presoController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });

            }
        });
        gestionpreso.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                PresoListPanelController presoListPanelController = new PresoListPanelController();
                final WindowsCreator wc = new WindowsCreator(principalController, presoListPanelController, true);
                presoListPanelController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });

            }
        });

        //Estados---------------------------------------------------------------


        //motivos---------------------------------------------------------------
        motivoMenuItem.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                MotivosDelPresoController motivosDelPresoController = new MotivosDelPresoController(null);
                final WindowsCreator wc = new WindowsCreator(principalController, motivosDelPresoController, true);
                motivosDelPresoController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });


        //condena---------------------------------------------------------------
        asignarCondenaItem.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                CondenaController controller = new CondenaController(null, true);

                final WindowsCreator wc = new WindowsCreator(principalController, controller, true);

                controller.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });

            }
        });

        gestionusuariomenu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                UsuarioListPanelController usuariocontrolador = new UsuarioListPanelController();
                final WindowsCreator wc = new WindowsCreator(principalController, usuariocontrolador, true);
                usuariocontrolador.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });

        //VISITA----------------------------------------------------------------
        visitasMenuItem.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                VisitasController visitasController = new VisitasController(null);
                final WindowsCreator wc = new WindowsCreator(principalController, visitasController, true);
                visitasController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });

        reasignacionPresoMenu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                AsignacionPresoController apc = new AsignacionPresoController(null, true);
                final WindowsCreator creator = new WindowsCreator(PrincipalController.this, apc,false );
                apc.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        creator.dispose();
                               
                    }
                });
            }
        });
       
        impMotivoMnu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                ImportarMotivosController imc = new ImportarMotivosController();
                final WindowsCreator creator = new WindowsCreator(principalController, imc, false);
                imc.setListener(new PanelListener() {

                    public void onPanelClose() {
                        creator.dispose();
                    }
                });
            }
        });


        //policias--------------------------------------------------------------

        gestionpoliciaMenuItem.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                PoliciaListPanelController policiaPanelController = new PoliciaListPanelController();
                final WindowsCreator wc = new WindowsCreator(principalController, policiaPanelController, true);
                policiaPanelController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });

            }
        });

        gestionRolMenu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {

                RolListPanelController panelcontroladorrol = new RolListPanelController();
                final WindowsCreator wc = new WindowsCreator(principalController, panelcontroladorrol, true);
                panelcontroladorrol.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });
        policiaMenuItem.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                PoliciaController policiaController = new PoliciaController(null);
                final WindowsCreator wc = new WindowsCreator(principalController, policiaController, true);
                policiaController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });

        historicoPresoMenu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                HistoricoPresoListPanelController historicocontroller = new HistoricoPresoListPanelController();
                final WindowsCreator wc = new WindowsCreator(principalController, historicocontroller, true);
                historicocontroller.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });



        gestionceldamenu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                CeldaListPanelController celdacontroller = new CeldaListPanelController();
                final WindowsCreator wc = new WindowsCreator(principalController, celdacontroller, true);
                celdacontroller.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });

        cerrarSesion.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                // como cierro la pantalla
                PrincipalController.this.dispose();
                ControlAccesoController control = new ControlAccesoController();
            }
        });

        salirPrograma.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                PrincipalController.this.dispose();
            }
        });
        asignarPabellonMenu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                ResponsableController responsableController = new ResponsableController(null);
                final WindowsCreator wc = new WindowsCreator(principalController, responsableController, true);
                responsableController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
            }
        });

        movimientoAComedorMenu.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                MovimientoAComedorController movimientoAComedorController = new MovimientoAComedorController();
                final WindowsCreator wc = new WindowsCreator(principalController, movimientoAComedorController, true);
                movimientoAComedorController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        wc.dispose();
                    }
                });
View Full Code Here

           
            public void onActionExecute(Preso entity) {
              
                HistoricoPresoListPanelController historicoController = new HistoricoPresoListPanelController(PrincipalController.getLogedUser(), entity,CarcelConstants.OPERACION_MODIFICACION);
                final WindowsCreator creator = new WindowsCreator(PrincipalController.instanciaControllerPrincipal(),historicoController,true);
                historicoController.setPanelListener(new PanelListener() {

                    public void onPanelClose() {
                        creator.dispose();
                            createHistoricoPreso(true,null);
                    }
View Full Code Here

                        if (!ComboEstado.getSelectedItem().toString().split(" - ")[1].equals("Libre")){
                            estado.setEstadoPreso(tipoestado) ;
                            ec.persist(estado, false);
                            final AsignacionPresoController asignacionPresoController = new AsignacionPresoController(preso,alta);
                            final WindowsCreator v2 = new WindowsCreator(PrincipalController.instanciaControllerPrincipal(), asignacionPresoController,true) ;
                            asignacionPresoController.setPanelListener(new PanelListener() {

                                public void onPanelClose() {
                                    v2.dispose();
                                }
                            });
                            panelListener.onPanelClose();
                        } else {
                            JOptionPane.showMessageDialog(EstadoPresoController.this, "No puede asignar como Libre a un Preso durante su alta en el sistema");
                        }
                    } else {
                        if(JOptionPane.showConfirmDialog(EstadoPresoController.this, "Desea Guardar?", "Estado Preso", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION){
                            if (!estadoAnterior.getDescripcion().equals("Libre")){
                                if (ComboEstado.getSelectedItem().toString().split(" - ")[1].equals("Libre")){
                                    Celda c = (Celda) ec.createQuery("select a.celda from AsignacionPresoCelda a where a.preso = :preso and a.fechaDesde >= (select max(a2.fechaDesde) from AsignacionPresoCelda a2 where a2.preso = a.preso)", AsignacionPresoCelda.class).setParameter("preso", preso).getSingleResult();
                                    modificarEstadoCelda(c);
                                    AsignacionPresoCelda asig = (AsignacionPresoCelda) ec.createQuery("select a from AsignacionPresoCelda a where a.preso = :preso and a.fechaDesde >= (select max(a2.fechaDesde) from AsignacionPresoCelda a2 where a2.preso = a.preso)", AsignacionPresoCelda.class).setParameter("preso", preso).getSingleResult();
                                    asig.setFechaHasta(new Timestamp(new Date().getTime()));
                                    ec.updateEntity(asig);
                                }
                                ec.persist(estado, true);
                                JOptionPane.showMessageDialog(EstadoPresoController.this, "Estado modificado satisfactoriamente!");
                                panelListener.onPanelClose();
                            } else {
                                if (!ComboEstado.getSelectedItem().toString().split(" - ")[1].equals("Libre")){
                                    ec.persist(estado, false);
                                    final AsignacionPresoController asignacionPresoController = new AsignacionPresoController(preso,alta);
                                    final WindowsCreator v2 = new WindowsCreator(PrincipalController.instanciaControllerPrincipal(), asignacionPresoController,true) ;
                                    asignacionPresoController.setPanelListener(new PanelListener() {

                                        public void onPanelClose() {
                                            v2.dispose();
                                        }
                                    });
View Full Code Here

TOP

Related Classes of carcel.views.PanelListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.