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.PatientWorkAreaJPanel.java

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

    ViewPatientOrders viewPatientOrders = new ViewPatientOrders(userProcessContainer, ecoSystem, userAccount);
    userProcessContainer.add("ViewPatientOrders", viewPatientOrders);
    CardLayout cardLayout = (CardLayout) userProcessContainer.getLayout();
    cardLayout.next(userProcessContainer);

}

From source file:userinterface.PatientRole.PatientWorkAreaJPanel.java

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

    if (patient.getEmailAddress() == null) {
        JOptionPane.showMessageDialog(null, "Please complete your Profile information first");
        return;/*w w  w.j  a  va 2 s . c om*/

    }

    PatientLikeMeJPanel plmjp = new PatientLikeMeJPanel(userProcessContainer, userAccount, patientOrganization,
            enterprise, ecoSystem);
    userProcessContainer.add("PatientLikeMeJPanel", plmjp);
    CardLayout layout = (CardLayout) userProcessContainer.getLayout();
    layout.next(userProcessContainer);

}

From source file:de.mpg.mpi_inf.bioinf.netanalyzer.ui.IntHistogramVisualizer.java

@Override
protected JComponent addSettingsPanels(JTabbedPane aPanel) {

    addTab(aPanel, Messages.DI_GENERAL, new SettingsPanel(general), Messages.TT_GENSETTINGS);
    addTab(aPanel, Messages.DI_AXES, new SettingsPanel(settings.axes), Messages.TT_AXESSETTINGS);
    addTab(aPanel, Messages.DI_GRID, new SettingsPanel(settings.grid), Messages.TT_GRIDSETTINGS);

    boolean useScatter = settings.useScatter();
    final Box histPanel = Box.createVerticalBox();

    final JComboBox choiceCombo = addChoice(histPanel, useScatter ? 1 : 0);

    final CardLayout innerLayout = new CardLayout();
    final JPanel innerPanel = new JPanel(innerLayout);
    histPanel.add(innerPanel);//www. j  a  v a 2 s  . c  o  m
    aPanel.addTab(Messages.DI_HISTOGRAM, null, histPanel, Messages.TT_HISTSETTINGS);

    ItemListener listener = new ItemListener() {

        public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
                innerLayout.next(innerPanel);
            }
        }
    };
    choiceCombo.addItemListener(listener);

    innerPanel.add(new SettingsPanel(settings.bars), "0");
    innerPanel.add(new SettingsPanel(settings.scatter), "1");
    if (useScatter) {
        innerLayout.next(innerPanel);
    }

    return choiceCombo;
}

From source file:UserInterface.ViewPatientJPanel.java

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

    ViewPersonJPanel viewAccountJPanel = new ViewPersonJPanel(userProcessContainer, person, mppjp);
    userProcessContainer.add("ViewAccountJPanel", viewAccountJPanel);
    CardLayout cardLayout = (CardLayout) userProcessContainer.getLayout();
    cardLayout.next(userProcessContainer);
}

From source file:UserInterface.QuickAssist.SeePatientDetailsJPanel.java

private void btnRequestMedicinesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRequestMedicinesActionPerformed
    String id = (String) cmbSensor.getSelectedItem();
    if (id == null) {
        JOptionPane.showMessageDialog(null, "Please select a patient sensor first");
    } else {//  w  ww  . j  a va 2 s .c o  m
        AssistanceRequestedJPanel arjp = new AssistanceRequestedJPanel(userProcessContainer, system,
                userAccount, enterprise, patient, network);
        userProcessContainer.add("medicineRequestedJPanel", arjp);
        CardLayout layout = (CardLayout) userProcessContainer.getLayout();
        layout.next(userProcessContainer);
    }

}

From source file:game.Clue.ClueGameUI.java

public void itemStateChanged(ItemEvent evt) {
    System.out.println(evt.getSource().toString());
    CardLayout cl = (CardLayout) (jPanel3.getLayout());
    cl.next(jPanel3);
    //show(jPanel3, (String)evt.getItem());
    System.out.println("itemStateChanged");
}