|
@@ -1,5 +1,5 @@
|
|
|
package nc.pub.filesystem.newui;
|
|
|
-
|
|
|
+import nc.vo.arap.utils.StringUtil;
|
|
|
import java.awt.BorderLayout;
|
|
|
import java.awt.Color;
|
|
|
import java.awt.Component;
|
|
@@ -91,8 +91,8 @@ import nc.ui.pub.beans.UISplitPane;
|
|
|
import nc.ui.pub.beans.UITable;
|
|
|
import nc.ui.pub.beans.UITree;
|
|
|
import nc.ui.pub.beans.table.VOTableModel;
|
|
|
+import nc.ui.pub.bill.BillCardPanel;
|
|
|
import nc.ui.pub.filesystem.FileManageServletClient;
|
|
|
-import nc.ui.uif2.editor.BillForm;
|
|
|
import nc.uitheme.ui.ThemeResourceCenter;
|
|
|
import nc.vo.pub.BusinessException;
|
|
|
import nc.vo.pub.ValueObject;
|
|
@@ -117,10 +117,13 @@ public class ThFileContentPanel extends JPanel {
|
|
|
public static final int BROWSESINGLEICON_STATE =2;
|
|
|
//缩略图浏览
|
|
|
public static final int BROWSESMALLICON_STATE =3;
|
|
|
+
|
|
|
+ public BillCardPanel fpcpanel;
|
|
|
private int colnumbtnpane =5 ;
|
|
|
private int colnumbtnbrow =1;
|
|
|
protected String rootDirStr = "dir1/dir2/ewei";
|
|
|
- protected BillForm editor_;
|
|
|
+ //
|
|
|
+
|
|
|
private String funcode ;
|
|
|
public String getFuncode(){
|
|
|
return funcode;
|
|
@@ -193,10 +196,10 @@ public class ThFileContentPanel extends JPanel {
|
|
|
setUIEnable();
|
|
|
initUI();
|
|
|
}
|
|
|
- public ThFileContentPanel(String root,BillForm editor) {
|
|
|
+ public ThFileContentPanel(String root,BillCardPanel cpanel) {
|
|
|
super();
|
|
|
rootDirStr = root ;
|
|
|
- editor_ = editor;
|
|
|
+ this.fpcpanel=cpanel;
|
|
|
//设置权限
|
|
|
initUI();
|
|
|
}
|
|
@@ -237,13 +240,13 @@ public class ThFileContentPanel extends JPanel {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
- // rootnode 放入缓存
|
|
|
- toCache(rootNode);
|
|
|
- //设置默认选中根节点
|
|
|
- TreePath path = new TreePath(rootNode);
|
|
|
- getPatchTree().setSelectionPath(path);
|
|
|
-
|
|
|
-
|
|
|
+ if(!StringUtil.isEmpty(rootDirStr)){
|
|
|
+ // rootnode 放入缓存
|
|
|
+ toCache(rootNode);
|
|
|
+ //设置默认选中根节点
|
|
|
+ TreePath path = new TreePath(rootNode);
|
|
|
+ getPatchTree().setSelectionPath(path);
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -406,7 +409,12 @@ public class ThFileContentPanel extends JPanel {
|
|
|
}
|
|
|
|
|
|
/** 上传action */
|
|
|
- private ThUploadAction uploadAction = new ThUploadAction(ThFileContentPanel.this);
|
|
|
+ private ThUploadAction uploadAction = new ThUploadAction(ThFileContentPanel.this);//上传附件类
|
|
|
+
|
|
|
+ /**ocr识别*/
|
|
|
+ private ThOCRAction thocrAction = new ThOCRAction(ThFileContentPanel.this);//ocr识别
|
|
|
+
|
|
|
+
|
|
|
/** 引用文档ation */
|
|
|
private ThUploadRefAction uprefaction = new ThUploadRefAction(ThFileContentPanel.this);
|
|
|
private ThUploadURLAction uploadurlaction = new ThUploadURLAction(ThFileContentPanel.this);
|
|
@@ -421,6 +429,10 @@ public class ThFileContentPanel extends JPanel {
|
|
|
}
|
|
|
|
|
|
private JButton btnupload;
|
|
|
+
|
|
|
+ private JButton btnocr;
|
|
|
+
|
|
|
+
|
|
|
/* 2010-10-24 以下按照uif2 画button 工具栏***/
|
|
|
ActionButton getupmenu(){
|
|
|
if(btnupload==null){
|
|
@@ -429,6 +441,17 @@ public class ThFileContentPanel extends JPanel {
|
|
|
return (ActionButton)btnupload;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ ActionButton getocrmenu(){
|
|
|
+ if(btnocr==null){
|
|
|
+ btnocr =new ActionButton(thocrAction);
|
|
|
+ }
|
|
|
+ return (ActionButton)btnocr;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
ActionButton getuprefmenu(){
|
|
|
if(btnuploadrefcenter==null){
|
|
|
btnuploadrefcenter =new ActionButton(uprefaction);
|
|
@@ -578,6 +601,9 @@ public class ThFileContentPanel extends JPanel {
|
|
|
bar =new FuncletMenuBar();
|
|
|
bar.setPreferredSize(new Dimension(0,30));
|
|
|
bar.addMenuComp(getupmenu());//上传按钮添加 zth
|
|
|
+ bar.addMenuComp(getocrmenu());//ocr按钮添加 zth
|
|
|
+
|
|
|
+
|
|
|
// bar.addMenuComp(getPastemenu());
|
|
|
// bar.addMenuComp(getuprefmenu());
|
|
|
// bar.addMenuComp(getGpyimenu());
|
|
@@ -1515,7 +1541,7 @@ public class ThFileContentPanel extends JPanel {
|
|
|
BtnPanel.this.setOpaque(true);
|
|
|
// BtnPanel.this.setBackground(Color.red);
|
|
|
BtnPanel.this.add(btndownload);
|
|
|
- BtnPanel.this.add(btnupfpload);
|
|
|
+// BtnPanel.this.add(btnupfpload);
|
|
|
// BtnPanel.this.add(btnmove);
|
|
|
BtnPanel.this.add(btneidt);
|
|
|
BtnPanel.this.add(btndelete);
|
|
@@ -1530,7 +1556,19 @@ public class ThFileContentPanel extends JPanel {
|
|
|
|
|
|
|
|
|
// springlayout 控制按钮间距离 15
|
|
|
- layout.putConstraint(SpringLayout.WEST, btndownload, 12,
|
|
|
+
|
|
|
+
|
|
|
+ layout.putConstraint(SpringLayout.WEST, btndownload, 20,
|
|
|
+ SpringLayout.WEST, BtnPanel.this);
|
|
|
+
|
|
|
+ layout.putConstraint(SpringLayout.WEST, btneidt, 20,
|
|
|
+ SpringLayout.EAST, btndownload);
|
|
|
+ layout.putConstraint(SpringLayout.WEST, btndelete, 20,
|
|
|
+ SpringLayout.EAST, btneidt);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /*layout.putConstraint(SpringLayout.WEST, btndownload, 12,
|
|
|
SpringLayout.WEST, BtnPanel.this);
|
|
|
|
|
|
layout.putConstraint(SpringLayout.WEST, btnupfpload, 12,
|
|
@@ -1539,7 +1577,7 @@ public class ThFileContentPanel extends JPanel {
|
|
|
layout.putConstraint(SpringLayout.WEST, btneidt, 12,
|
|
|
SpringLayout.EAST, btnupfpload);
|
|
|
layout.putConstraint(SpringLayout.WEST, btndelete, 12,
|
|
|
- SpringLayout.EAST, btneidt);
|
|
|
+ SpringLayout.EAST, btneidt);*/
|
|
|
|
|
|
|
|
|
/* layout.putConstraint(SpringLayout.WEST, btndownload, 15,
|