Examples of StampDelegater


Examples of open.dolphin.delegater.StampDelegater

            // 無効なデータは読まない
            if (selectedNode == null || !(selectedNode.getUserObject() instanceof ModuleInfoBean)) return;

            final ModuleInfoBean stampInfo = (ModuleInfoBean) selectedNode.getUserObject();
           
            final StampDelegater sdl = new StampDelegater();           
            int maxEstimation = 30*1000;
            int delay = 200;
            String message = "スタンプ箱";
            String note = "検索しています...";
            Component c = SwingUtilities.getWindowAncestor(editorPanel);
           
            Task task = new Task<StampModel>(c, message, note, maxEstimation) {
                @Override
                protected StampModel doInBackground() throws Exception {
                    StampModel result = sdl.getStamp(stampInfo.getStampId());
                    return result;
                }
                @Override
                protected void succeeded(StampModel stampModel) {
                    if (sdl.isNoError() && stampModel != null) {
                        if (stampModel != null) {
                            IInfoModel model = (IInfoModel) BeanUtils.xmlDecode(stampModel.getStampBytes());
                            if (model != null) {

                                // diagnosis の場合
                                if (IInfoModel.ENTITY_DIAGNOSIS.equals(stampModel.getEntity())) {
                                    editorPanel.setValue((RegisteredDiagnosisModel) model);

                                } else {
                                    ModuleModel stamp = new ModuleModel();
                                    stamp.setModel(model);
                                    stamp.setModuleInfo(stampInfo);
                                    editorPanel.setValue(stamp);
                                    editorPanel.enter(); // SearchField にフォーカス
                                }
                            }
                        }

                    } else {
                        JOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(editorPanel),
                                (stampModel == null)? "実体のないスタンプです。削除してください。" : sdl.getErrorMessage(),
                                ClientContext.getFrameTitle("Stamp取得"),
                                JOptionPane.WARNING_MESSAGE);
                    }
                }
            };
View Full Code Here

Examples of open.dolphin.delegater.StampDelegater

    private void replaceStamp(final StampHolder target, final ModuleInfoBean stampInfo) {
       
        Runnable r = new Runnable() {
            @Override
            public void run() {
                StampDelegater sdl = new StampDelegater();
                StampModel getStamp = sdl.getStamp(stampInfo.getStampId());
                final ModuleModel stamp = new ModuleModel();
                if (getStamp != null) {
                    stamp.setModel((IInfoModel) BeanUtils.xmlDecode(getStamp.getStampBytes()));
                    stamp.setModuleInfo(stampInfo);
                }
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.