/*
* This file is part of the aidGer project.
*
* Copyright (C) 2010-2013 The aidGer Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.aidger.view.forms;
import static de.aidger.utils.Translation._;
import javax.swing.JPanel;
import de.aidger.model.models.Assistant;
import de.aidger.view.forms.HourlyWageEditorForm.Qualification;
/**
* A form used for viewing assistants in detail.
*
* @author aidGer Team
*/
@SuppressWarnings("serial")
public class AssistantViewerForm extends JPanel {
/**
* Constructs an assistant viewer form.
*
* @param assistant
* The assistant who will be displayed
*/
public AssistantViewerForm(Assistant assistant) {
initComponents();
firstName.setText(assistant.getFirstName());
lastName.setText(assistant.getLastName());
email.setText(assistant.getEmail());
qualification.setText(Qualification.valueOf(
assistant.getQualification()).toString());
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
lblFirstName = new javax.swing.JLabel();
lblLastName = new javax.swing.JLabel();
lblEmail = new javax.swing.JLabel();
lblQualification = new javax.swing.JLabel();
firstName = new javax.swing.JLabel();
lastName = new javax.swing.JLabel();
email = new javax.swing.JLabel();
qualification = new javax.swing.JLabel();
filler = new javax.swing.JLabel();
setLayout(new java.awt.GridBagLayout());
lblFirstName.setText(_("First Name"));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
add(lblFirstName, gridBagConstraints);
lblLastName.setText(_("Last Name"));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
add(lblLastName, gridBagConstraints);
lblEmail.setText(_("Email"));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
add(lblEmail, gridBagConstraints);
lblQualification.setText(_("Qualification"));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
add(lblQualification, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
add(firstName, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
add(lastName, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
add(email, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 3;
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10);
add(qualification, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 4;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.weighty = 1.0;
add(filler, gridBagConstraints);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel email;
private javax.swing.JLabel filler;
private javax.swing.JLabel firstName;
private javax.swing.JLabel lastName;
private javax.swing.JLabel lblEmail;
private javax.swing.JLabel lblFirstName;
private javax.swing.JLabel lblLastName;
private javax.swing.JLabel lblQualification;
private javax.swing.JLabel qualification;
// End of variables declaration//GEN-END:variables
}