Browse Source

1.修复聚合报表缩放后点击选中问题

2.触发缩放条自定义按钮选中
3.报表缩放40%以下不显示网格线
master
MoMeak 7 years ago
parent
commit
6d9b8ad2a8
  1. 12
      designer/src/com/fr/design/mainframe/JWorkBook.java
  2. 7
      designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java
  3. 2
      designer_base/src/com/fr/design/mainframe/JSliderPane.java

12
designer/src/com/fr/design/mainframe/JWorkBook.java

@ -87,6 +87,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
private static final String SHARE_SUFFIX = "_share"; private static final String SHARE_SUFFIX = "_share";
private static final String SHARE_FOLDER = "share"; private static final String SHARE_FOLDER = "share";
private static final int TOOLBARPANEDIMHEIGHT = 26; private static final int TOOLBARPANEDIMHEIGHT = 26;
private static final double MIN_TIME = 0.4;
private UIModeControlContainer centerPane; private UIModeControlContainer centerPane;
public ReportComponentComposite reportComposite; public ReportComponentComposite reportComposite;
@ -364,6 +365,12 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
ElementCasePane elementCasePane = reportComposite.centerCardPane.editingComponet.elementCasePane; ElementCasePane elementCasePane = reportComposite.centerCardPane.editingComponet.elementCasePane;
PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi(); PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi();
if (elementCasePane != null) { if (elementCasePane != null) {
//分页线
if (resolution < ScreenResolution.getScreenResolution() * MIN_TIME) {
elementCasePane.getGrid().setShowGridLine(false);
} else {
elementCasePane.getGrid().setShowGridLine(true);
}
elementCasePane.setResolution(resolution); elementCasePane.setResolution(resolution);
elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution);
elementCasePane.getGrid().setResolution(resolution); elementCasePane.getGrid().setResolution(resolution);
@ -389,6 +396,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
} }
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified();
} }
@Override @Override
public int selfAdaptUpdate() { public int selfAdaptUpdate() {
PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi(); PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi();
@ -414,6 +422,9 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
} else if (elementCasePane != null) { } else if (elementCasePane != null) {
ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane(); ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane();
if (reportPane.getSelection().getSelectedColumns().length == 0) {
return resolution;
}
int column = reportPane.getSelection().getSelectedColumns()[0]; int column = reportPane.getSelection().getSelectedColumns()[0];
double columnLength = reportPane.getSelection().getSelectedColumns().length; double columnLength = reportPane.getSelection().getSelectedColumns().length;
double columnExtent = reportPane.getGrid().getHorizontalExtent(); double columnExtent = reportPane.getGrid().getHorizontalExtent();
@ -790,7 +801,6 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
* 是否支持预览 * 是否支持预览
* *
* @return 预览接口 * @return 预览接口
*
*/ */
public PreviewProvider[] supportPreview() { public PreviewProvider[] supportPreview() {
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING);

7
designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java

@ -33,6 +33,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
private static final int MAX = 400; private static final int MAX = 400;
private static final int HUND = 100; private static final int HUND = 100;
private static final int MIN = 10; private static final int MIN = 10;
private static final double MIN_TIME = 0.4;
public FormElementCaseDesigner elementCaseDesigner; public FormElementCaseDesigner elementCaseDesigner;
private BaseJForm jForm; private BaseJForm jForm;
@ -112,6 +113,12 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
private void setScale(int resolution) { private void setScale(int resolution) {
ElementCasePane elementCasePane = elementCaseDesigner.getEditingElementCasePane(); ElementCasePane elementCasePane = elementCaseDesigner.getEditingElementCasePane();
//分页线
if (resolution < ScreenResolution.getScreenResolution() * MIN_TIME) {
elementCasePane.getGrid().setShowGridLine(false);
} else {
elementCasePane.getGrid().setShowGridLine(true);
}
elementCasePane.setResolution(resolution); elementCasePane.setResolution(resolution);
elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution);
elementCasePane.getGrid().setResolution(resolution); elementCasePane.getGrid().setResolution(resolution);

2
designer_base/src/com/fr/design/mainframe/JSliderPane.java

@ -91,7 +91,6 @@ public class JSliderPane extends JPanel {
} }
public static final JSliderPane getInstance() { public static final JSliderPane getInstance() {
// if (THIS == null) { // if (THIS == null) {
// THIS = new JSliderPane(); // THIS = new JSliderPane();
@ -278,6 +277,7 @@ public class JSliderPane extends JPanel {
getTimes(sliderValue); getTimes(sliderValue);
showValue = times; showValue = times;
showValSpinner.setValue(times); showValSpinner.setValue(times);
customButton.setSelected(true);
} }
}); });
} else { } else {

Loading…
Cancel
Save