forked from fanruan/design
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