|
|
@ -46,11 +46,8 @@ public class TemplateTool { |
|
|
|
if (AdaptiveSwitchUtil.isSwitchJFromIng()) { |
|
|
|
if (AdaptiveSwitchUtil.isSwitchJFromIng()) { |
|
|
|
currentType = DesignerUIModeConfig.getInstance().newUIMode() ? JFormType.NEW_TYPE : JFormType.OLD_TYPE; |
|
|
|
currentType = DesignerUIModeConfig.getInstance().newUIMode() ? JFormType.NEW_TYPE : JFormType.OLD_TYPE; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (jTemplate instanceof NewJForm) { |
|
|
|
if (isNewJForm(jTemplate)) { |
|
|
|
NewJForm newJForm = (NewJForm) jTemplate; |
|
|
|
currentType = JFormType.NEW_TYPE; |
|
|
|
if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { |
|
|
|
|
|
|
|
currentType = JFormType.NEW_TYPE; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//UI转换
|
|
|
|
//UI转换
|
|
|
@ -62,6 +59,16 @@ public class TemplateTool { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static boolean isNewJForm(JTemplate jTemplate) { |
|
|
|
|
|
|
|
if (jTemplate instanceof NewJForm) { |
|
|
|
|
|
|
|
NewJForm newJForm = (NewJForm) jTemplate; |
|
|
|
|
|
|
|
if (LightTool.containNewFormFlag(newJForm.getTarget()) || newJForm.getTarget().getTemplateID() == null) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static Listener<JTemplate> getSwitchListener() { |
|
|
|
public static Listener<JTemplate> getSwitchListener() { |
|
|
|
return switchListener; |
|
|
|
return switchListener; |
|
|
|
} |
|
|
|
} |
|
|
|