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.HealthAnalystRole.ViewReportJPanel.java

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

    ManageDoctorJPanel mdjp = new ManageDoctorJPanel(userProcessContainer, organization);
    userProcessContainer.add("ViewReportJPanel10", mdjp);

    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);

}

From source file:StoreAdmin.ManageStoreJPanel.java

private void btnreportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnreportActionPerformed
    ReportJPanel panel = new ReportJPanel(upc, storeDirectory);
    upc.add("ReportJPanel", panel);
    CardLayout layout = (CardLayout) upc.getLayout();
    layout.next(upc);
}

From source file:userInterface.cdcRole.DecisionChartJPanel.java

public DecisionChartJPanel(JPanel userProcessContainer, CdcEnterprise e, Network n) {
    initComponents();//throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    this.userProcessContainer = userProcessContainer;
    this.e = e;/*from  w  w  w  .  j a v  a 2s.  c  om*/
    this.n = n;
    JFreeChart jfreechart = createChart(createDataset());
    Rotator rotator = new Rotator((PiePlot3D) jfreechart.getPlot());
    rotator.start();
    ChartPanel chartpanel = new ChartPanel(jfreechart);
    chartpanel.setPreferredSize(new Dimension(1000, 540));
    pieChartPanel.add(chartpanel);
    CardLayout layout = (CardLayout) pieChartPanel.getLayout();
    layout.next(pieChartPanel);

    JFreeChart jfreechart2 = createChart2(createDataset2());
    Rotator rotator2 = new Rotator((PiePlot3D) jfreechart2.getPlot());
    rotator.start();
    ChartPanel chartpanel2 = new ChartPanel(jfreechart2);
    chartpanel2.setPreferredSize(new Dimension(1000, 540));
    jPanel1.add(chartpanel2);
    CardLayout layout2 = (CardLayout) jPanel1.getLayout();
    layout2.next(jPanel1);

    JFreeChart jfreechart1 = createChart1(createDataset1());
    Rotator rotator1 = new Rotator((PiePlot3D) jfreechart1.getPlot());
    rotator1.start();
    ChartPanel chartpanel1 = new ChartPanel(jfreechart1);
    chartpanel1.setPreferredSize(new Dimension(1000, 540));
    top5HospPanel.add(chartpanel1);
    CardLayout layout1 = (CardLayout) top5HospPanel.getLayout();
    layout1.next(top5HospPanel);

    populate();
}

From source file:userInteface.Patient.ManageVitalSignsJPanel.java

private void viewVitalSignJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewVitalSignJButtonActionPerformed
    // TODO add your handling code here:
    int selectedRow = viewVitalSignsJTable.getSelectedRow();
    if (selectedRow < 0) {
        JOptionPane.showMessageDialog(this, "Please select a row from table.", "Error",
                JOptionPane.INFORMATION_MESSAGE);
        return;//from  w  w  w .  j  a va2s. co  m
    }
    VitalSign vitalSign = (VitalSign) viewVitalSignsJTable.getValueAt(selectedRow, 0);
    ViewUpdateVitalSignsJPanel vuvsJPanel = new ViewUpdateVitalSignsJPanel(userProcessContainer, vitalSign,
            Boolean.FALSE);
    userProcessContainer.add("vuvsJPanel", vuvsJPanel);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);
}

From source file:userInteface.Patient.ManageVitalSignsJPanel.java

private void editVitalSignsJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editVitalSignsJButtonActionPerformed
    // TODO add your handling code here:
    int selectedRow = viewVitalSignsJTable.getSelectedRow();
    if (selectedRow < 0) {
        JOptionPane.showMessageDialog(this, "Please select a row from table.", "Error",
                JOptionPane.INFORMATION_MESSAGE);
        return;/*from w w  w .j av a2s .  c o  m*/
    }
    VitalSign vitalSign = (VitalSign) viewVitalSignsJTable.getValueAt(selectedRow, 0);

    ViewUpdateVitalSignsJPanel vuvsJPanel = new ViewUpdateVitalSignsJPanel(userProcessContainer, vitalSign,
            Boolean.TRUE);
    userProcessContainer.add("vuvsJPanel", vuvsJPanel);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);
}

From source file:userInteface.Patient.ManageVitalSignsJPanel.java

private void addVitalSignsJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addVitalSignsJButtonActionPerformed
    // TODO add your handling code here:
    int selectedRow = viewPatientsJTable.getSelectedRow();
    if (selectedRow < 0) {
        JOptionPane.showMessageDialog(this, "Please select a row from table.", "Error",
                JOptionPane.INFORMATION_MESSAGE);
        return;// w w w .  j ava2s  .c  o  m
    }
    Person person = (Person) viewPatientsJTable.getValueAt(selectedRow, 0);
    Patient patient = person.getPatient();
    if (patient != null) {
        CreateVitalSignJPanel cvsJPanel = new CreateVitalSignJPanel(userProcessContainer, patient);
        userProcessContainer.add("cvsJPanel", cvsJPanel);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    } else {
        JOptionPane.showMessageDialog(this, "Patient not created, Please create Patient first.", "Error",
                JOptionPane.ERROR_MESSAGE);
    }
}

From source file:userinterface.PatientRole.PatientWorkAreaJPanel.java

private void btnAppointmentPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAppointmentPanelActionPerformed

    PatientAppointmentsJPanel patientAppointmentsJPanel = new PatientAppointmentsJPanel(userProcessContainer,
            userAccount, patientOrganization, enterprise, ecoSystem);
    userProcessContainer.add("PatientDetailsJPanel", patientAppointmentsJPanel);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);
}

From source file:userinterface.PatientRole.PatientWorkAreaJPanel.java

private void btnSrchAndSeekMedicalAdviceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSrchAndSeekMedicalAdviceActionPerformed

    PatientDetailsJPanel patientDetailsJPanel = new PatientDetailsJPanel(userProcessContainer, userAccount,
            patientOrganization, enterprise, ecoSystem);
    userProcessContainer.add("PatientDetailsJPanel", patientDetailsJPanel);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);
}

From source file:userinterface.PatientRole.PatientWorkAreaJPanel.java

private void btnProfileAndAccountInfoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnProfileAndAccountInfoActionPerformed

    PatientProfileAndOtherDetails ppaod = new PatientProfileAndOtherDetails(userProcessContainer, userAccount,
            patientOrganization, enterprise, ecoSystem);
    userProcessContainer.add("PatientProfileAndOtherDetails", ppaod);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);
}

From source file:userinterface.PatientRole.PatientWorkAreaJPanel.java

private void btnSendFeedbackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSendFeedbackActionPerformed

    PatientSendFeedBackForm patientSendFeedBackForm = new PatientSendFeedBackForm(userProcessContainer,
            userAccount, patientOrganization, enterprise, ecoSystem);
    userProcessContainer.add("PatientSendFeedBackForm", patientSendFeedBackForm);
    CardLayout cardLayout = (CardLayout) userProcessContainer.getLayout();
    cardLayout.next(userProcessContainer);
}