public void mostrarPanel(ModoEdicion modoEdicion) {
   try {
     this.modoEdicion = modoEdicion;
     mostrar();
   } catch (Exception ex) {
     DialogManager.mostrarError(getShell(), ex);
   }
 }
  private void mostrar() {
    try {
      cargarDatos();
      enlazarDatos();
      accionesGui();

    } catch (Exception e) {
      DialogManager.mostrarError(getShell(), e);
    }
  }
 public void setEditable(Composite composite, boolean editable) {
   try {
     Control[] controles = composite.getChildren();
     if (controles != null) {
       for (Control c : controles) {
         if (c instanceof Button && (((Button) c).getStyle() & SWT.CHECK) != 0)
           ((Button) c).setEnabled(editable);
         else if (c instanceof Text) ((Text) c).setEditable(editable);
         else if (c instanceof Combo) ((Combo) c).setEnabled(editable);
         else if (c instanceof Composite) setEditable((Composite) c, editable);
       }
     }
   } catch (Exception ex) {
     DialogManager.mostrarError(getShell(), ex);
   }
 }
 protected void mostrarErroresValidacion(CheckValidationException e) {
   bindingManager.clearWarnings();
   for (Errores err : e.getValidationErrors()) {
     Control c = bindingManager.getBindedControl(err.getPropiedad(), err.getClase());
     if (c != null) {
       ControlDecoration controlDecoration = new ControlDecoration(c, SWT.RIGHT);
       controlDecoration.setImage(
           SWTResourceManager.getImage(Composite.class, "/resources/exclamacion_16.png"));
       controlDecoration.setDescriptionText(err.getMensaje());
       bindingManager.addWarning(controlDecoration);
     } else {
       DialogManager.mostrarMensaje(
           getShell(), "Cuidado, hay un error de validación pero no se está mostrando");
     }
   }
 }
 private void mostrarErroresGuardado(Exception e) {
   DialogManager.mostrarError(getShell(), e);
 }