Package org.rioproject.examples.hospital

Examples of org.rioproject.examples.hospital.Bed


    private void addBed(JPanel roomPanel, Bed bed, boolean empty) {
        JButton b = new JButton();
        b.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent actionEvent) {
                Bed bed = findSelectedBed((JButton) actionEvent.getSource());
                if(bed!=null) {
                    try {
                        Patient p = bed.getPatient();
                        if(p!=null && listener!=null) {
                            listener.patientSelected(p);
                        }
                    } catch (IOException e) {
                        e.printStackTrace();
View Full Code Here


        }
        return bedC;
    }

    private Bed findSelectedBed(JButton button) {
        Bed bed = null;
        synchronized(beds) {
            for(BedComponent b : beds) {
                if(b.button.equals(button)) {
                    bed = b.bed;
                    break;
View Full Code Here

TOP

Related Classes of org.rioproject.examples.hospital.Bed

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.