Examples of AppointmentModel


Examples of open.dolphin.infomodel.AppointmentModel

     */
    public ArrayList<AppointmentModel> getAppointDays() {
       
        ArrayList<AppointmentModel> results = new ArrayList<AppointmentModel>();
        MedicalEvent event = null;
        AppointmentModel appoint = null;
       
        // 1 週目を調べる
        for (int col = firstCol; col < 7; col++) {
            event = days[0][col];
            appoint = event.getAppointEntry();
            if (appoint != null && appoint.getName() != null) {
                results.add(appoint);
            }
        }
       
        // 2 週目以降を調べる
        for (int row = 1; row < numRows - 1; row++) {
            for (int col = 0; col < 7; col++) {
                event = days[row][col];
                appoint = event.getAppointEntry();
                if (appoint != null && appoint.getName() != null) {
                    results.add(appoint);
                }
            }
        }
       
        // 最後の週を調べる
        for (int col = 0; col < lastCol + 1; col++) {
            event = days[numRows - 1][col];
            appoint = event.getAppointEntry();
            if (appoint != null && appoint.getName() != null) {
                results.add(appoint);
            }
        }
       
        return results;
View Full Code Here

Examples of open.dolphin.infomodel.AppointmentModel

     */
    public ArrayList<AppointmentModel> getUpdatedAppoints() {
       
        ArrayList<AppointmentModel> results = new ArrayList<AppointmentModel>();
        MedicalEvent event = null;
        AppointmentModel appoint = null;
       
        // 1 週目を調べる
        for (int col = firstCol; col < 7; col++) {
            event = days[0][col];
            appoint = event.getAppointEntry();
            if (appoint != null && appoint.getState() != AppointmentModel.TT_NONE) {
                results.add(appoint);
            }
        }
       
        // 2週目以降を調べる
        for (int row = 1; row < numRows - 1; row++) {
            for (int col = 0; col < 7; col++) {
                event = days[row][col];
                appoint = event.getAppointEntry();
                if (appoint != null && appoint.getState() != AppointmentModel.TT_NONE) {
                    results.add(appoint);
                }
            }
        }
       
        // 最後の週を調べる
        for (int col = 0; col < lastCol + 1; col++) {
            event = days[numRows - 1][col];
            appoint = event.getAppointEntry();
            if (appoint != null && appoint.getState() != AppointmentModel.TT_NONE) {
                results.add(appoint);
            }
        }
       
        return results;
View Full Code Here

Examples of open.dolphin.infomodel.AppointmentModel

        String startDate = isThisMonth() ? MMLDate.getDayFromToday(-3) : MMLDate.getDate(firstDay);
       
        // 表示する
        int size = list.size();
        for (int i = 0; i < size; i++) {
            AppointmentModel ae = (AppointmentModel)list.get(i);
            ae.setState(AppointmentModel.TT_HAS);
            String date = ModelUtils.getDateAsString(ae.getDate());
            int index = date.indexOf('T');
            if (index > 0) {
                date = date.substring(0, index);
            }
           
View Full Code Here

Examples of open.dolphin.infomodel.AppointmentModel

        }
       
        dragRow = row;
        dragCol = col;
        MedicalEvent me = days[row][col];
        AppointmentModel appo = me.getAppointEntry();
        if (appo == null) {
            //System.out.println("No Appoint");
            return;
        }
        Transferable t = new AppointEntryTransferable(appo);
View Full Code Here

Examples of open.dolphin.infomodel.AppointmentModel

            e.getDropTargetContext().dropComplete(false);
            return;
        }
       
        // Drop 処理
        AppointmentModel source = null;
        try {
            source = (AppointmentModel)tr.getTransferData(AppointEntryTransferable.appointFlavor);
           
        } catch (Exception ue) {
            System.out.println(ue);
            source = null;
        }
        if (source == null) {
            e.getDropTargetContext().dropComplete(false);
            return;
        }
       
        processAppoint(row, col, source.getName(), source.getMemo());
       
        e.getDropTargetContext().dropComplete(true);
    }
View Full Code Here

Examples of open.dolphin.infomodel.AppointmentModel

    }
   
    private void processAppoint(int row, int col, String appointName, String memo) {
       
        MedicalEvent entry = days[row][col];
        AppointmentModel appoint = entry.getAppointEntry();
       
        if (appoint == null) {
            appoint = new AppointmentModel();
            appoint.setDate(ModelUtils.getDateAsObject(entry.getDisplayDate()));
            entry.setAppointEntry(appoint);
        }
       
        int oldState = appoint.getState();
        int next = 0;
        switch (oldState) {
           
            case AppointmentModel.TT_NONE:
                next = AppointmentModel.TT_NEW;
                break;
               
            case AppointmentModel.TT_NEW:
                next = AppointmentModel.TT_NEW;
                break;
               
            case AppointmentModel.TT_HAS:
                next = AppointmentModel.TT_REPLACE;
                break;
               
            case AppointmentModel.TT_REPLACE:
                next = AppointmentModel.TT_REPLACE;
                break;
        }
        appoint.setState(next);
       
        appoint.setName(appointName);
        appoint.setMemo(memo);
       
        ((AbstractTableModel)table.getModel()).fireTableCellUpdated(popedRow, popedCol);
       
        boundSupport.firePropertyChange(CareMapDocument.APPOINT_PROP, null, appoint);
       
View Full Code Here

Examples of open.dolphin.infomodel.AppointmentModel

    }
   
    private void processCancel(int row, int col) {
       
        MedicalEvent entry = days[row][col];
        AppointmentModel appoint = entry.getAppointEntry();
        if (appoint == null) {
            return;
        }
       
        int oldState = appoint.getState();
        int nextState = 0;
       
        switch (oldState) {
            case AppointmentModel.TT_NONE:
                break;
               
            case AppointmentModel.TT_NEW:
                nextState = AppointmentModel.TT_NONE;
                break;
               
            case AppointmentModel.TT_HAS:
                nextState = AppointmentModel.TT_REPLACE;
                break;
               
            case AppointmentModel.TT_REPLACE:
                nextState = AppointmentModel.TT_REPLACE;
                break;
        }
       
        appoint.setState(nextState);
        appoint.setName(null);
       
        ((AbstractTableModel)table.getModel()).fireTableCellUpdated(popedRow, popedCol);
       
        boundSupport.firePropertyChange(CareMapDocument.APPOINT_PROP, null, appoint);
       
View Full Code Here

Examples of open.dolphin.infomodel.AppointmentModel

           
            private static final long serialVersionUID = -3446348785385967929L;
           
            public TableCellRenderer getCellRenderer(int row, int col) {
               
                AppointmentModel e = (AppointmentModel)tableModel.getObject(row);
               
                if (e != null && e.getDate().equals(today)) {
                    Color c = parent.getAppointColor(e.getName());
                    todayRenderer.setBackground(c);
                    return todayRenderer;
                   
                } else {
                    return super.getCellRenderer(row, col);
View Full Code Here

Examples of open.dolphin.infomodel.AppointmentModel

           
            tableModel.setObjectList(list);
           
        } else if (prop.equals(CareMapDocument.APPOINT_PROP)) {
           
            AppointmentModel appoint = (AppointmentModel)e.getNewValue();
            tableModel.updateAppoint(appoint);
           
        } else if (prop.equals(CareMapDocument.SELECTED_APPOINT_DATE_PROP)) {
           
            findAppoint((String)e.getNewValue());
View Full Code Here

Examples of open.dolphin.infomodel.AppointmentModel

        }
       
        @Override
        public Object getValueAt(int row, int col) {
           
            AppointmentModel e = (AppointmentModel)getObject(row);
           
            if (e == null) {
                return null;
            }
           
            String ret = null;
           
            switch (col) {
               
                case 0:
                    ret = ModelUtils.getDateAsString(e.getDate());
                    break;
                   
                case 1:
                    ret = e.getName();
                    break;
                   
                case 2:
                    ret = e.getMemo();
                    break;
            }
           
            return (Object)ret;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.