|
|
@ -10,9 +10,8 @@ import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
import com.fr.main.ReportFitAttr; |
|
|
|
import com.fr.report.reportfit.ReportFitAttr; |
|
|
|
import com.fr.main.ReportFitConfig; |
|
|
|
import com.fr.reportfit.ReportFitConfig; |
|
|
|
import com.fr.report.fun.ReportFitAttrProvider; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.ButtonGroup; |
|
|
|
import javax.swing.ButtonGroup; |
|
|
@ -28,13 +27,13 @@ import java.awt.event.MouseEvent; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Created by Administrator on 2016/5/5/0005. |
|
|
|
* Created by Administrator on 2016/5/5/0005. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> { |
|
|
|
public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttr> { |
|
|
|
|
|
|
|
|
|
|
|
protected FontRadioGroup fontRadioGroup; |
|
|
|
protected FontRadioGroup fontRadioGroup; |
|
|
|
protected FitRadioGroup fitRadionGroup; |
|
|
|
protected FitRadioGroup fitRadionGroup; |
|
|
|
protected UICheckBox globalCheck; |
|
|
|
protected UICheckBox globalCheck; |
|
|
|
protected FitPreviewPane fitPreviewPane; |
|
|
|
protected FitPreviewPane fitPreviewPane; |
|
|
|
protected ReportFitAttrProvider localFitAttr; |
|
|
|
protected ReportFitAttr localFitAttr; |
|
|
|
protected UIRadioButton defaultRadio; |
|
|
|
protected UIRadioButton defaultRadio; |
|
|
|
protected UIRadioButton horizonRadio; |
|
|
|
protected UIRadioButton horizonRadio; |
|
|
|
protected UIRadioButton doubleRadio; |
|
|
|
protected UIRadioButton doubleRadio; |
|
|
@ -118,14 +117,14 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> { |
|
|
|
boolean isLocalConfig = !globalCheck.isSelected(); |
|
|
|
boolean isLocalConfig = !globalCheck.isSelected(); |
|
|
|
//勾选全局时,采用全局保存的自适应属性更新界面
|
|
|
|
//勾选全局时,采用全局保存的自适应属性更新界面
|
|
|
|
if (!isLocalConfig) { |
|
|
|
if (!isLocalConfig) { |
|
|
|
ReportFitAttrProvider attr = globalFitAttr; |
|
|
|
ReportFitAttr attr = globalFitAttr; |
|
|
|
fontRadioGroup.selectFontFit(((ReportFitAttr) attr).isFitFont()); |
|
|
|
fontRadioGroup.selectFontFit(((ReportFitAttr) attr).isFitFont()); |
|
|
|
fitRadionGroup.selectIndexButton(attr.fitStateInPC()); |
|
|
|
fitRadionGroup.selectIndexButton(attr.fitStateInPC()); |
|
|
|
fitPreviewPane.refreshPreview(getCurrentFitOptions(), fitRadionGroup.isEnabled()); |
|
|
|
fitPreviewPane.refreshPreview(getCurrentFitOptions(), fitRadionGroup.isEnabled()); |
|
|
|
remove(BrowserFitAttrPane.this.borderPane); |
|
|
|
remove(BrowserFitAttrPane.this.borderPane); |
|
|
|
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Global")); |
|
|
|
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Global")); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ReportFitAttrProvider attr = localFitAttr; |
|
|
|
ReportFitAttr attr = localFitAttr; |
|
|
|
fontRadioGroup.selectFontFit(((ReportFitAttr) attr).isFitFont()); |
|
|
|
fontRadioGroup.selectFontFit(((ReportFitAttr) attr).isFitFont()); |
|
|
|
fitRadionGroup.selectIndexButton(attr.fitStateInPC()); |
|
|
|
fitRadionGroup.selectIndexButton(attr.fitStateInPC()); |
|
|
|
fitPreviewPane.refreshPreview(getCurrentFitOptions(), fitRadionGroup.isEnabled()); |
|
|
|
fitPreviewPane.refreshPreview(getCurrentFitOptions(), fitRadionGroup.isEnabled()); |
|
|
@ -169,7 +168,7 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void populateBean(ReportFitAttrProvider attr) { |
|
|
|
public void populateBean(ReportFitAttr attr) { |
|
|
|
if (attr == null) { |
|
|
|
if (attr == null) { |
|
|
|
//如果为空, 就用全局的
|
|
|
|
//如果为空, 就用全局的
|
|
|
|
attr = ReportFitConfig.getInstance().getFrmFitAttr(); |
|
|
|
attr = ReportFitConfig.getInstance().getFrmFitAttr(); |
|
|
@ -178,7 +177,7 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> { |
|
|
|
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Local")); |
|
|
|
initBorderPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Local")); |
|
|
|
} |
|
|
|
} |
|
|
|
this.localFitAttr = attr; |
|
|
|
this.localFitAttr = attr; |
|
|
|
fontRadioGroup.selectFontFit(((ReportFitAttr) attr).isFitFont()); |
|
|
|
fontRadioGroup.selectFontFit((attr).isFitFont()); |
|
|
|
fitRadionGroup.selectIndexButton(attr.fitStateInPC()); |
|
|
|
fitRadionGroup.selectIndexButton(attr.fitStateInPC()); |
|
|
|
fitPreviewPane.refreshPreview(getCurrentFitOptions(), fitRadionGroup.isEnabled()); |
|
|
|
fitPreviewPane.refreshPreview(getCurrentFitOptions(), fitRadionGroup.isEnabled()); |
|
|
|
} |
|
|
|
} |
|
|
@ -207,7 +206,7 @@ public class BrowserFitAttrPane extends BasicBeanPane<ReportFitAttrProvider> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public ReportFitAttrProvider updateBean() { |
|
|
|
public ReportFitAttr updateBean() { |
|
|
|
ReportFitAttr attr = new ReportFitAttr(); |
|
|
|
ReportFitAttr attr = new ReportFitAttr(); |
|
|
|
attr.setFitFont(fontRadioGroup.isFontFit()); |
|
|
|
attr.setFitFont(fontRadioGroup.isFontFit()); |
|
|
|
attr.setFitStateInPC(fitRadionGroup.getSelectRadioIndex()); |
|
|
|
attr.setFitStateInPC(fitRadionGroup.getSelectRadioIndex()); |
|
|
|