Package vista

Source Code of vista.MostrarServicio

package vista;


import java.awt.Color;
import java.awt.Font;

import javax.swing.BorderFactory;
import javax.swing.border.SoftBevelBorder;
import javax.swing.border.TitledBorder;

import base.Servicio;


public class MostrarServicio extends FormularioServicio {

  private static final long serialVersionUID = 1L;

  @SuppressWarnings("unchecked")
  public MostrarServicio(AbmServicio a, Servicio servicio) {
    super(a, servicio);
   
    getPanelFormulario().setBorder(BorderFactory.createTitledBorder(new SoftBevelBorder(SoftBevelBorder.RAISED), "Mostrar Servicio", TitledBorder.LEFT, TitledBorder.TOP, new Font("Tahoma", Font.PLAIN, 14), Color.black));
   
    getTextoNombre().setText(getServicio().getNombre());
    getTextoNombre().setEditable(false);
    String costoMinimo = getServicio().getCostoMinimo().toString(); //convertimos el decimal a String
    getTextoCostoMinimo().setText(costoMinimo);
    getTextoCostoMinimo().setEditable(false);
    getTextoTiempoEjecucion().setText(getServicio().getTiempoEjecucion());
    getTextoTiempoEjecucion().setEditable(false);
    getTextoDescripcion().setText(getServicio().getDescripcion());
    getTextoDescripcion().setEditable(false);
    configurarBotonAceptar();
    configurarBotonCancelar();
  }

  @Override
  protected void configurarBotonAceptar() {
    getBotonAceptar().setVisible(false);
   
  }

  @Override
  protected void configurarBotonCancelar() {
    getBotonCancelar().setText("Volver");
    getBotonCancelar().addActionListener(new java.awt.event.ActionListener() {
      public void actionPerformed(java.awt.event.ActionEvent e) {
        getAbm().termino();
      }
    });
  }
 
}
TOP

Related Classes of vista.MostrarServicio

TOP
Copyright © 2018 www.massapi.com. 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.