forked from fanruan/design
Henry.Wang
4 years ago
2 changed files with 29 additions and 12 deletions
@ -1,21 +1,37 @@
|
||||
package com.fr.design.mainframe.widget.ui; |
||||
|
||||
import com.fr.design.designer.creator.XCreator; |
||||
import com.fr.design.designer.creator.XWParameterLayout; |
||||
import com.fr.design.file.HistoryTemplateListCache; |
||||
import com.fr.design.mainframe.EastRegionContainerPane; |
||||
import com.fr.design.mainframe.JForm; |
||||
|
||||
/** |
||||
* Created by kerry on 2017/9/30. |
||||
*/ |
||||
public class WidgetBasicPropertyPaneFactory { |
||||
|
||||
public static FormBasicPropertyPane createBasicPropertyPane(XCreator xCreator){ |
||||
if(xCreator.supportSetVisible() && xCreator.supportSetEnable()){ |
||||
public static FormBasicPropertyPane createBasicPropertyPane(XCreator xCreator) { |
||||
freshPropertyMode(xCreator); |
||||
if (xCreator.supportSetVisible() && xCreator.supportSetEnable()) { |
||||
return new FormBasicWidgetPropertyPane(); |
||||
} |
||||
if(xCreator.supportSetVisible()){ |
||||
if (xCreator.supportSetVisible()) { |
||||
return new BasicSetVisiblePropertyPane(); |
||||
}else{ |
||||
} else { |
||||
return new FormBasicPropertyPane(); |
||||
} |
||||
|
||||
} |
||||
|
||||
private static void freshPropertyMode(XCreator xCreator) { |
||||
if (!(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() instanceof JForm)) { |
||||
if (xCreator instanceof XWParameterLayout) { |
||||
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA); |
||||
} else { |
||||
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA_WIDGET); |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
Loading…
Reference in new issue