@ -1,5 +1,6 @@
package com.fr.design.share.ui.generate ;
import com.fr.design.designer.creator.XCreator ;
import com.fr.design.dialog.BasicDialog ;
import com.fr.design.dialog.BasicPane ;
import com.fr.design.dialog.DialogActionAdapter ;
@ -11,11 +12,14 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext ;
import com.fr.design.mainframe.DesignerFrame ;
import com.fr.design.mainframe.JTemplate ;
import com.fr.design.mainframe.WidgetPropertyPane ;
import com.fr.design.mainframe.share.Bean.ComponentGenerateInfo ;
import com.fr.design.mainframe.share.action.ShareUIAspect ;
import com.fr.design.mainframe.share.collect.ComponentCollector ;
import com.fr.design.mainframe.share.exception.LackOfValueException ;
import com.fr.design.mainframe.share.generate.ComponentGeneratorCenter ;
import com.fr.design.mainframe.share.select.ComponentTransformerFactory ;
import com.fr.design.mod.ContentObjectManager ;
import com.fr.form.share.exception.NetWorkFailedException ;
import com.fr.form.share.group.DefaultShareGroup ;
import com.fr.design.mainframe.share.util.ShareUIUtils ;
@ -31,6 +35,8 @@ import com.fr.form.ui.Widget;
import com.fr.log.FineLoggerFactory ;
import com.fr.stable.StringUtils ;
import java.util.HashSet ;
import java.util.Set ;
import javax.swing.BorderFactory ;
import javax.swing.JPanel ;
import javax.swing.SwingWorker ;
@ -100,8 +106,9 @@ public class ShareGeneratePane extends BasicPane {
JPanel pane = FRGUIPaneFactory . createBorderLayout_S_Pane ( ) ;
this . mainPane = FRGUIPaneFactory . createCardLayout_S_Pane ( ) ;
this . simplePane = new ShareMainPane ( shareCover , rec , false , effectItemGroups ) ;
this . uploadPane = new ShareMainPane ( shareCover , rec , true , effectItemGroups ) ;
boolean needContentTip = needContentTip ( ) ;
this . simplePane = new ShareMainPane ( shareCover , rec , false , effectItemGroups , needContentTip ) ;
this . uploadPane = new ShareMainPane ( shareCover , rec , true , effectItemGroups , needContentTip ) ;
//暂时换一下,目前不用上传
this . mainPane . add ( simplePane , ShareUIUtils . convertStateChange ( ItemEvent . DESELECTED ) ) ;
this . mainPane . add ( uploadPane , ShareUIUtils . convertStateChange ( ItemEvent . SELECTED ) ) ;
@ -161,6 +168,21 @@ public class ShareGeneratePane extends BasicPane {
}
}
private boolean needContentTip ( ) {
long start = System . currentTimeMillis ( ) ;
XCreator xCreator = ComponentTransformerFactory . getInstance ( ) . transform ( WidgetPropertyPane . getInstance ( ) . getEditingFormDesigner ( ) . getSelectionModel ( ) . getSelection ( ) ) . getMiddle ( ) ;
Set < XCreator > xCreators = new HashSet < > ( ) ;
xCreator . traversalNameRelatedXCreators ( xCreators ) ;
Set < String > nameSet = new HashSet < > ( ) ;
for ( XCreator creator : xCreators ) {
nameSet . add ( creator . toData ( ) . getWidgetName ( ) ) ;
}
boolean result = ContentObjectManager . getInstance ( ) . needContentTip ( shareWidget , nameSet ) ;
FineLoggerFactory . getLogger ( ) . debug ( "needContentTip spend {} ms" , ( System . currentTimeMillis ( ) - start ) ) ;
return result ;
}
private JPanel createUploadCheckBox ( ) {
JPanel panel = FRGUIPaneFactory . createBoxFlowInnerContainer_S_Pane ( ) ;