public String[] getRelativeNotePathTextEx() { String[] noteNames = getNoteNameEx(); if (noteNames == null) return null; String[] relativeNotePathTexts = new String[noteNames.length]; for (int i = 0; i < noteNames.length; i++) { String relativeNotePathText = PathUtil.makeChildPath(getNoteType(), noteNames[i]); relativeNotePathTexts[i] = relativeNotePathText; } return relativeNotePathTexts; }
public String[] getNotePathTextEx() { String[] noteNames = getNoteNameEx(); if (noteNames == null) return null; String[] notePathTexts = new String[noteNames.length]; for (int i = 0; i < noteNames.length; i++) { String notePathText = PathUtil.makeChildPath(getNoteDir(), noteNames[i]); notePathTexts[i] = notePathText; } return notePathTexts; }
public void treeExpanded(TreeExpansionEvent event) { TreePath treePath = event.getPath(); if (treePath != null) { TreeUINode targetNode = (TreeUINode) treePath.getLastPathComponent(); if (!targetNode.isChildrenLoaded()) { String targetPathText = TreeUtil.makePathText(treePath); String absPathText = PathUtil.makeChildPath(_tree.getRelativeRoot(), targetPathText); expandNode(targetNode, absPathText); } } }
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(); }
public String getRelativeNotePathText() { return PathUtil.makeChildPath(getNoteType(), getNoteName()); }
public String getNotePathText() { return PathUtil.makeChildPath(getNoteDir(), getNoteName()); }
public String getNoteDir() { return PathUtil.makeChildPath( _tree.getRelativeRoot(), _tree.getTreeUI().getSelectionPathText()); }