Examples of PhysicalModel


Examples of open.dolphin.infomodel.PhysicalModel

   
    private void add() {
       
        String h = view.getHeightFld().getText().trim();
        String w = view.getWeightFld().getText().trim();
        final PhysicalModel model = new PhysicalModel();

        if (!h.equals("")) {
            model.setHeight(h);
        }
        if (!w.equals("")) {
            model.setWeight(w);
        }

        // 同定日
        String confirmedStr = view.getIdentifiedDateFld().getText().trim();
        model.setIdentifiedDate(confirmedStr);
       
        addBtn.setEnabled(false);
        clearBtn.setEnabled(false);
        inspector.add(model);
    }
View Full Code Here

Examples of open.dolphin.infomodel.PhysicalModel

        // 身長体重ともある場合
        if (listH != null && listW != null) {
           
            for (int i = 0; i < listH.size(); i++) {
               
                PhysicalModel h = (PhysicalModel) listH.get(i);
                String memo = h.getMemo();
                if (memo == null) {
                    memo = h.getIdentifiedDate();
                }
               
                //
                // 体重のメモが一致するものを見つける
                //
                Object found = null;
                for (int j = 0; j < listW.size(); j++) {
                    PhysicalModel w = (PhysicalModel) listW.get(j);
                    String memo2 = w.getMemo();
                    if (memo2 == null) {
                        memo2 = w.getIdentifiedDate();
                    }
                    if (memo2.equals(memo)) {
                        found = w;
                        PhysicalModel m = new PhysicalModel();
                        m.setHeightId(h.getHeightId());
                        m.setHeight(h.getHeight());
                        m.setWeightId(w.getWeightId());
                        m.setWeight(w.getWeight());
                        m.setIdentifiedDate(h.getIdentifiedDate());
                        m.setMemo(memo);
                        list.add(m);
                        break;
                    }
                }
               
View Full Code Here

Examples of open.dolphin.infomodel.PhysicalModel

    /**
     * テーブルで選択した身長体重データを削除する。
     */
    public void delete(final int row) {

        PhysicalModel model = (PhysicalModel) tableModel.getObject(row);
        if (model == null) {
            return;
        }
       
        final List<Long> list = new ArrayList<Long>(2);
       
        if (model.getHeight() != null) {
//pns       list.add(new Long(model.getHeightId()));
            list.add(Long.valueOf(model.getHeightId()));
        }
       
        if (model.getWeight() != null) {
//pns       list.add(new Long(model.getWeightId()));
            list.add(Long.valueOf(model.getWeightId()));
        }
       
        DBTask task = new DBTask<Void>(context) {

            @Override
View Full Code Here

Examples of open.dolphin.infomodel.PhysicalModel

                } else {
                    setBackground(ClientContext.getColor("color.odd"));
                }
            }
           
            PhysicalModel h = (PhysicalModel) tableModel.getObject(row);
           
            Color fore = (h != null && h.getBmi() != null && h.getBmi().compareTo("25") > 0? Color.RED : Color.BLACK;
            this.setForeground(fore);
           
            ((JLabel) c).setText(value == null ? "" : (String) value);
           
            if (h != null && h.getStandardWeight() != null) {
                this.setToolTipText("標準体重 = " + h.getStandardWeight());
            }
           
            return c;
        }
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.