Exemplo n.º 1
0
 protected void todoAddControls(Container parent, Cell thisCell) {
   Table tb = thisCell.split(2, 1);
   KDSplitPane sep = new KDSplitPane(1);
   sep.setLeftComponent(_tree.getTreeUI());
   sep.setRightComponent(_rightPanel);
   sep.setDividerLocation(220);
   parent.add(sep, tb.cell(0));
   if (_isShowSaveAsDefault) {
     _chkSaveAsDefault =
         new KDCheckBox(
             MultiLanguageUtil.getMLS(
                 "ui.NoteFileDialogEx.saveAsDefault", "将本次选中保存为缺省模板(可在“系统平台-套打-套打配置”中更改)"));
     //   parent.add(_chkSaveAsDefault, tb.cell(1));
   }
 }
Exemplo n.º 2
0
 NoteTemplatesPanel() {
   multiLanguage = new KDComboBox(Language.SUPPORT_LANGUAGES);
   lang = Language.locale2Language(Locale.getDefault());
   lstTemplates = new KDList();
   cbUseOrgFilter =
       new KDCheckBox(
           MultiLanguageUtil.getMLS("ui.NoteFileDialogEx.useOrgFilter", "只显示当前组织的模板"));
   TableLayout2 layout = new TableLayout2(2, 2);
   layout.setFixedHeight(0, 20);
   layout.setRatableHeight(1, 1);
   layout.setRatableWidth(0, 1);
   layout.setRatableWidth(1, 1);
   layout.setRowsSpacing(TableLayout2.ALL, 3);
   setLayout(layout);
   //    add(cbUseOrgFilter, TableLayout2.param(0, 0));
   add(
       CtrlSwingUtilities.createLabelContainer(
           multiLanguage,
           MultiLanguageUtil.getMLS("ui.NoteFileDialogEx.temLanguage", "模板语言"),
           80),
       TableLayout2.param(0, 1));
   multiLanguage.setSelectedItem(lang);
   add(new KDScrollPane(lstTemplates), TableLayout2.param(1, 0, 1, 1));
 }
Exemplo n.º 3
0
 public boolean showDialog() {
   if (!isAddControls) {
     String absPath = PathUtil.makeChildPath("/EAS_Note.kdrs", _tree.getPathTextToShow());
     HashMap multiResult[] = null;
     if (_rpcReducer != null)
       try {
         multiResult =
             (HashMap[])
                 (HashMap[])
                     _rpcReducer.getBatchResult(
                         "IBizContent.list2", new Object[] {absPath, List_Attrs});
       } catch (NotFoundException e) {
         WindowUtil.msgboxError(
             (new StringBuilder())
                 .append(
                     MultiLanguageUtil.getMLS("ui.NoteFileDialogEx.pathError1", "程序指定模板所在文件夹:"))
                 .append(_tree.getPathTextToShow())
                 .append(
                     MultiLanguageUtil.getMLS(
                         "ui.NoteFileDialogEx.pathError", "不存在,请联系套打管理员检查套打管理中该路径是否正确!"))
                 .toString(),
             MultiLanguageUtil.getMLS("ui.NoteFileDialogEx.pathErrorTitle", "路径错误"),
             this);
         return false;
       } catch (KDRSException e) {
         log.error("GetBatchResult list2 error.", e);
       }
     else
       try {
         multiResult = getBizContext().getBizContent().list2(absPath, List_Attrs);
       } catch (NotFoundException e) {
         WindowUtil.msgboxError(
             (new StringBuilder())
                 .append(
                     MultiLanguageUtil.getMLS("ui.NoteFileDialogEx.pathError1", "程序指定模板所在文件夹:"))
                 .append(_tree.getPathTextToShow())
                 .append(
                     MultiLanguageUtil.getMLS(
                         "ui.NoteFileDialogEx.pathError", "不存在,请联系套打管理员检查套打管理中该路径是否正确!"))
                 .toString(),
             MultiLanguageUtil.getMLS("ui.NoteFileDialogEx.pathErrorTitle", "路径错误"),
             this);
         return false;
       } catch (KDRSException e) {
         log.error("", e);
         if (e instanceof NotFoundException) {
           WindowUtil.msgboxError(
               (new StringBuilder())
                   .append(
                       MultiLanguageUtil.getMLS("ui.NoteFileDialogEx.pathError1", "程序指定模板所在文件夹:"))
                   .append(_tree.getPathTextToShow())
                   .append(
                       MultiLanguageUtil.getMLS(
                           "ui.NoteFileDialogEx.pathError", "不存在,请联系套打管理员检查套打管理中该路径是否正确!"))
                   .toString(),
               MultiLanguageUtil.getMLS("ui.NoteFileDialogEx.pathErrorTitle", "路径错误"),
               this);
           return false;
         }
       }
     TreeUINode node = _tree.getTreeUI().getRootNode();
     node.setChildrenLoaded(true);
     if (multiResult != null) {
       int relaRootDeep = PathUtil.splitPath("/EAS_Note.kdrs").length - 1;
       int i = relaRootDeep;
       do {
         if (i >= multiResult.length - 1) break;
         String name = (String) multiResult[i].get("name");
         String alias = (String) multiResult[i].get("alias");
         TreeUINode childNode;
         try {
           childNode = _tree.newTreeNode("folder", name, alias);
         } catch (Exception e) {
           log.error("", e);
           break;
         }
         _tree.getTreeUI().addChildNode(childNode, node);
         childNode.setChildrenLoaded(true);
         node = childNode;
         i++;
       } while (true);
       node.setUserObject(multiResult[multiResult.length - 1]);
       createUnloadedChildNode(node, multiResult[multiResult.length - 1]);
       _tree.getTreeUI().setSelectionNode(node);
       _tree.getTreeUI().expand(_tree.getTreeUI().getSelectionPath());
     }
   }
   return super.showDialog();
 }
Exemplo n.º 4
0
 protected void todoInit() {
   setTitle(MultiLanguageUtil.getMLS("ui.NoteFileDialogEx.selectTemplate", "多选择模板"));
   setSize(640, 480);
   super.btnOk.setEnabled(false);
 }