forked from fanruan/design
Browse Source
Merge in DESIGN/design from ~HENRY.WANG/design:feature/x to feature/x * commit '6d6be3b0c52b49dea53ce0e14f15fe286faff4a2': REPORT-59681 远程设计控制模板自适应权限控制 REPORT-60134 表单组件属性国际化-显示不全research/11.0
Henry.Wang
3 years ago
8 changed files with 84 additions and 29 deletions
@ -0,0 +1,55 @@
|
||||
package com.fr.design.report.fit; |
||||
|
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
import com.fr.design.report.fit.provider.AbstractFitAttrModelProvider; |
||||
|
||||
import com.fr.form.fit.common.LightTool; |
||||
import com.fr.form.fit.config.FormFitConfig; |
||||
import com.fr.form.main.Form; |
||||
import com.fr.report.fit.ReportFitAttr; |
||||
|
||||
|
||||
public class AdaptiveFrmFitAttrModel extends AbstractFitAttrModelProvider { |
||||
|
||||
public FitType[] getFitTypes() { |
||||
return new FitType[]{ |
||||
FitType.DOUBLE_FIT, |
||||
FitType.HORIZONTAL_FIT, |
||||
FitType.NOT_FIT |
||||
}; |
||||
} |
||||
|
||||
public String getFitName() { |
||||
return Toolkit.i18nText("Fine-Designer_Fit_Report_Scale_Method"); |
||||
} |
||||
|
||||
@Override |
||||
public String getModelName() { |
||||
return Toolkit.i18nText("Fine-Design_New_Decision_Report"); |
||||
} |
||||
|
||||
@Override |
||||
public ReportFitAttr getGlobalReportFitAttr() { |
||||
return FormFitConfig.getInstance().getNewFitAttr(); |
||||
} |
||||
|
||||
@Override |
||||
public void setGlobalReportFitAttr(ReportFitAttr reportFitAttr) { |
||||
FormFitConfig.getInstance().setNewFitAttr(reportFitAttr); |
||||
} |
||||
|
||||
@Override |
||||
public int getPriority() { |
||||
return 2; |
||||
} |
||||
|
||||
@Override |
||||
public boolean isAvailable(JTemplate jTemplate) { |
||||
if (jTemplate.getTarget() instanceof Form) { |
||||
return LightTool.containNewFormFlag((Form) jTemplate.getTarget()); |
||||
} |
||||
return false; |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue