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_FOLDER = "share";
private static final int TOOLBARPANEDIMHEIGHT = 26;
private static final double MIN_TIME = 0.4;
private UIModeControlContainer centerPane;
public ReportComponentComposite reportComposite;
@ -364,6 +365,12 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
ElementCasePane elementCasePane = reportComposite.centerCardPane.editingComponet.elementCasePane;
PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi();
if (elementCasePane != null) {
//分页线
if (resolution < ScreenResolution.getScreenResolution() * MIN_TIME) {
elementCasePane.getGrid().setShowGridLine(false);
} else {
elementCasePane.getGrid().setShowGridLine(true);
}
elementCasePane.setResolution(resolution);
elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution);
elementCasePane.getGrid().setResolution(resolution);
@ -389,6 +396,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
}
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified();
}
@Override
public int selfAdaptUpdate() {
PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi();
@ -414,6 +422,9 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
} else if (elementCasePane != null) {
ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane();
if (reportPane.getSelection().getSelectedColumns().length == 0) {
return resolution;
}
int column = reportPane.getSelection().getSelectedColumns()[0];
double columnLength = reportPane.getSelection().getSelectedColumns().length;
double columnExtent = reportPane.getGrid().getHorizontalExtent();
@ -790,7 +801,6 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
* 是否支持预览
*
* @return 预览接口
*
*/
public PreviewProvider[] supportPreview() {
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 HUND = 100;
private static final int MIN = 10;
private static final double MIN_TIME = 0.4;
public FormElementCaseDesigner elementCaseDesigner;
private BaseJForm jForm;
@ -112,6 +113,12 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
private void setScale(int resolution) {
ElementCasePane elementCasePane = elementCaseDesigner.getEditingElementCasePane();
//分页线
if (resolution < ScreenResolution.getScreenResolution() * MIN_TIME) {
elementCasePane.getGrid().setShowGridLine(false);
} else {
elementCasePane.getGrid().setShowGridLine(true);
}
elementCasePane.setResolution(resolution);
elementCasePane.getGrid().getGridMouseAdapter().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() {
// if (THIS == null) {
// THIS = new JSliderPane();
@ -278,6 +277,7 @@ public class JSliderPane extends JPanel {
getTimes(sliderValue);
showValue = times;
showValSpinner.setValue(times);
customButton.setSelected(true);
}
});
} else {

Loading…
Cancel
Save