Example usage for java.awt CardLayout next

List of usage examples for java.awt CardLayout next

Introduction

In this page you can find the example usage for java.awt CardLayout next.

Prototype

public void next(Container parent) 

Source Link

Document

Flips to the next card of the specified container.

Usage

From source file:UserInterface.PatientRole.ManageMyVitalSignsAndFitnessRecordJPanel.java

private void addJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addJButtonActionPerformed
    // TODO add your handling code here:
    AddRecordJPanel panel = new AddRecordJPanel(userProcessContainer, userAccount, patientOrganization,
            enterprise, ecoSystem);/*from www .j a v a  2 s .  c o  m*/
    userProcessContainer.add("AddRecordJPanel", panel);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);

}

From source file:UserInterface.PatientRole.ManageMyVitalSignsAndFitnessRecordJPanel.java

private void showVitalSignsChartJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showVitalSignsChartJButtonActionPerformed
    // TODO add your handling code here:
    ArrayList<Record> recordList = patient.getRecordHistory().getRecordList();
    /*At least 2 vital sign records needed to show chart */
    if (recordList.isEmpty() || recordList.size() == 1) {
        JOptionPane.showMessageDialog(this,
                "No Vital Signs or only one Vital Sign found. At least 2 Vital Signs records needed to show chart!",
                "Warning", JOptionPane.INFORMATION_MESSAGE);
        return;/*w ww. j av  a2  s .c o  m*/
    }
    VitalSignsChartJPanel panel = new VitalSignsChartJPanel(userProcessContainer, userAccount,
            patientOrganization, enterprise, ecoSystem);
    userProcessContainer.add("VitalSignsChartJPanel", panel);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);
}

From source file:UserInterface.PatientRole.ManageMyVitalSignsAndFitnessRecordJPanel.java

private void viewJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewJButtonActionPerformed
    // TODO add your handling code here:
    int selectedRow = viewVitalSignsJTable1.getSelectedRow();
    if (selectedRow < 0) {
        JOptionPane.showMessageDialog(null, "Please select a row from the table first to view detail",
                "Warning", JOptionPane.WARNING_MESSAGE);

    } else {//w w  w.j  a va  2 s.co  m

        Record vs = (Record) viewVitalSignsJTable1.getValueAt(selectedRow, 0);
        ViewUpdateRecordDetailsJPanel panel = new ViewUpdateRecordDetailsJPanel(userProcessContainer,
                userAccount, patientOrganization, enterprise, ecoSystem, vs);
        userProcessContainer.add("ViewUpdateRecordDetailsJPanel", panel);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);

    }

}

From source file:com.neu.css.view.ViewPatientDetailsJPanel.java

private void addVitalSignButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addVitalSignButtonActionPerformed
    // TODO add your handling code here:
    AddVitalSignJPanel addVitalSignJPanel = new AddVitalSignJPanel(userProcessContainer, patientList, patient);
    userProcessContainer.add("AddVitalSignJPanel", addVitalSignJPanel);
    CardLayout cardLayout = (CardLayout) userProcessContainer.getLayout();
    cardLayout.next(userProcessContainer);
}

From source file:UserInterface.ViewPersonDetails.java

private void btngraphicActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btngraphicActionPerformed
    // TODO add your handling code here:
    int selectedRow = tblvitalSign.getSelectedRow();
    VitalSign vs = (VitalSign) tblvitalSign.getValueAt(selectedRow, 0);
    JFreeChartJPanel panel = new JFreeChartJPanel(vs, userProcessContainer);
    userProcessContainer.add("JFreeChartJPanel", panel);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);

}

From source file:UserInterface.ViewPersonDetails.java

private void btnupdateVitalSignActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnupdateVitalSignActionPerformed
    // TODO add your handling code here:
    int selectedRow = tblvitalSign.getSelectedRow();
    if (selectedRow < 0) {
        JOptionPane.showMessageDialog(null, "Please select a product from the table");
        return;//from   ww  w.  j  a  v a 2  s .  c  o m
    }
    VitalSign vs = (VitalSign) tblvitalSign.getValueAt(selectedRow, 0);
    UpdateJPanel panel = new UpdateJPanel(p, vs, userProcessContainer);
    userProcessContainer.add("UpdateJPanel", panel);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);
}

From source file:UserInterface.ViewPersonDetails.java

private void btnupdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnupdateActionPerformed
    // TODO add your handling code here:
    {//from  w w w.  j  a v a2  s  .c o m
        Person result = (Person) cmbPerson.getSelectedItem();

        PersonUpdateJPanel panel = new PersonUpdateJPanel(result, userProcessContainer);
        userProcessContainer.add("PersonUpdateJPanel", panel);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    }

}

From source file:com.neu.css.view.ViewPatientDetailsJPanel.java

private void viewVitalSignButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewVitalSignButtonActionPerformed
    // TODO add your handling code here:
    int selectedRow = jTable1.getSelectedRow();
    if (selectedRow >= 0) {
        VitalSign vitalSign = (VitalSign) jTable1.getValueAt(selectedRow, 0);
        ViewVitalSignJPanel viewVitalSignJPanel = new ViewVitalSignJPanel(userProcessContainer, vitalSign);
        userProcessContainer.add("ViewVitalSignJPanel", viewVitalSignJPanel);
        CardLayout cardLayout = (CardLayout) userProcessContainer.getLayout();
        cardLayout.next(userProcessContainer);
    } else {// www .  j a v  a  2  s .  co m
        JOptionPane.showMessageDialog(null, Consts.NO_SELECTION_VALIDATE_MESSAGE, "Warning",
                JOptionPane.WARNING_MESSAGE);
    }

}

From source file:UserInterface.ViewPersonDetails.java

private void btncreateVitalSignActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btncreateVitalSignActionPerformed
    // TODO add your handling code here:
    Person result = (Person) cmbPerson.getSelectedItem();

    if (result != null) {

        CreateVitalSignJPanel panel = new CreateVitalSignJPanel(result, userProcessContainer);
        userProcessContainer.add("CreateVitalSignJPanel", panel);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    }/*  w  w w . j  a va2s  . co m*/
    // btnviewVitalSigns.setEnabled(true);

}

From source file:UserInterface.ViewPersonDetails.java

private void btncreatePatientActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btncreatePatientActionPerformed
    // TODO add your handling code here:

    p = (Person) cmbPerson.getSelectedItem();

    if (p.getPatient().getName() != null) {

        JOptionPane.showMessageDialog(null, "Patient is already created", "Information",
                JOptionPane.INFORMATION_MESSAGE);
        btncreatePatient.setEnabled(false);
    } else {//from  ww w  .  j av a  2 s.com

        CreatePatientJPanel panel = new CreatePatientJPanel(p, userProcessContainer);
        userProcessContainer.add("CreatePatientJPanel", panel);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    }

}