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();
}
});