Package br.com.procempa.modus.entity

Examples of br.com.procempa.modus.entity.Turma


  class TurmaRenderer implements ListCellRenderer {

    public Component getListCellRendererComponent(JList arg0, Object value,
        int arg2, boolean arg3, boolean arg4) {
      Turma t = (Turma) value;
      JLabel label = new JLabel();
      String text = t.getNome();
      if (t.getVagas() != 0) {
        if (t.getHorario() != null && !t.getHorario().equals("")) {
          text = text + " (" + t.getHorario() + ")";
          label.setText(text);
        }
      }

      return label;
View Full Code Here


    super("", IconFactory.createNew());
    this.curso = curso;
  }

  public void actionPerformed(ActionEvent e) {
    Turma turma = new Turma();
    turma.setCurso(curso);
    Main.getInstance().buildPanel(TurmaForm.getInstance(turma));
  }
View Full Code Here

      public void actionPerformed(ActionEvent e) {

        Integer action = 0;

        Turma turma = (Turma) getSelectedData();
        try {
          List<Inscricao> list = InscricaoDataServices.getList(turma.getCurso());

          for (Inscricao inscricao : list) {
            if (inscricao.getUsuario().getRg().equals(
                usuario.getRg())) {
              action = ConfirmationView
View Full Code Here

    }

    @Override
    public void mouseClicked(MouseEvent e) {
      super.mouseClicked(e);
      Turma turma = (Turma) getTable().getValueAt(
          getTable().getSelectedRow(), -1);
      panel.enableButtons(turma.getVagas() > 0);
    }
View Full Code Here

    return validationList;
  }

  public static Turma getTurma(Long id) {
    Turma turma = null;
    try {
      PersistentAccess pa = PersistentAccessFactory.getInstance();
      turma = (Turma) pa.find(Turma.class, id);
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

    return turmas;
  }

  public static void remove(Long id) throws Exception {
    PersistentAccess pa = PersistentAccessFactory.getInstance();
    Turma turma = (Turma) pa.find(Turma.class, id);

    List<Inscricao> inscritos = InscricaoDataServices.getList(turma);
    if (inscritos.isEmpty()) {
      for (Inscricao inscrito : inscritos) {
        InscricaoDataServices.remove(inscrito.getId());
View Full Code Here

    try {
      JPanel appPanel = Main.getInstance().getAppPanel();
      appPanel.removeAll();
      JXTable table;
      table = TurmaSearch.getInstance().getTable();
      Turma t = (Turma) table.getValueAt(table.getSelectedRows()[0], -1);
      JComponent form = TurmaForm.getInstance(t);
      appPanel.add(form);
      appPanel.validate();
      appPanel.repaint();
View Full Code Here

    super("Turma", IconFactory.createEquipamento16());
    this.curso = curso;
  }

  public void actionPerformed(ActionEvent e) {
    Turma turma = new Turma();
    turma.setCurso(curso);
    Main.getInstance().buildPanel(TurmaForm.getInstance(turma));
  }
View Full Code Here

        .createInscreverCurso16()) {
     
      private static final long serialVersionUID = -1399701481720603062L;

      public void actionPerformed(ActionEvent e) {
        Turma turma = (Turma) getTable().getValueAt(
            getTable().getSelectedRow(), -1);
        JComponent form = InscritosTurmaView.getInstance(turma);
        Main.getInstance().buildPanel(form);
      }
    };
   
    inscritosButton.setAction(actionInscritos);
    inscritosButton.setText("Ver Inscritos");
    inscritosButton.setToolTipText("Lista inscritos da turma");
    inscritosButton.setEnabled(false);
    addToolBarButton(inscritosButton);
   
    Action actionEncontro = new AbstractAction("", IconFactory
        .createVerEncontroCurso16()) {

      private static final long serialVersionUID = 6896377001233184388L;

      public void actionPerformed(ActionEvent e) {
        Turma turma = (Turma) getSelectedData();
        JComponent form = EncontroView.getInstance(turma);
        Main.getInstance().buildPanel(form);
      }
    };

    encontroButton.setAction(actionEncontro);
    encontroButton.setText("Encontros");
    encontroButton.setToolTipText("Mostra a lista de encontros da turma");
    encontroButton.setEnabled(false);
    addToolBarButton(encontroButton);

    Action actionPresenca = new AbstractAction("", IconFactory
        .createVerPresencaCurso16()) {

      private static final long serialVersionUID = -7824001094065007868L;

      public void actionPerformed(ActionEvent e) {
        Turma turma = (Turma) getTable().getValueAt(
            getTable().getSelectedRow(), -1);
        JComponent form = PresencaView.getInstance(turma);
        Main.getInstance().buildPanel(form);
      }
    };

    presencaButton.setAction(actionPresenca);
    presencaButton.setText("Lista de Presen�a");
    presencaButton
        .setToolTipText("Mostra a lista de presen�a de uma turma");
    presencaButton.setEnabled(false);
    addToolBarButton(presencaButton);
   
    Action actionCertificado = new AbstractAction("", IconFactory
        .createCertificado16()) {

      private static final long serialVersionUID = -5455054487822890519L;

      public void actionPerformed(ActionEvent e) {
        Turma turma = (Turma) getTable().getValueAt(
            getTable().getSelectedRows()[0], -1);
        try {
          Main.getInstance().buildPanel(
              CertificadoView.getInstance(turma));
View Full Code Here

import br.com.procempa.modus.services.TurmaDataServices;

public class PresencaDataServicesTest extends TestCase {
 
  public void testGetListPresenca() throws Exception {
    Turma turma = TurmaDataServices.getList().get(0);
    List<PresencaVO> l = PresencaDataServices.getListVO(turma);  
    for (PresencaVO object : l) {
      System.out.println(((PresencaVO) object).getInscricao().getUsuario().getNome());
    }
  }
View Full Code Here

TOP

Related Classes of br.com.procempa.modus.entity.Turma

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.