Browse Source

Merge pull request #1071 in BA/design from ~MOMEAK/design9.0:9.0release to 9.0release

* commit 'b03e1fe4de69ab6b71749d50df84758fc8a6c2c0':
  修改备注
  1.修复聚合报表缩放后点击选中问题 2.触发缩放条自定义按钮选中 3.报表缩放40%以下不显示网格线
  REPORT-2897 9.0设计器修改 聚合报表选中元素修改
master
superman 7 years ago
parent
commit
ac43e84231
  1. 12
      designer/src/com/fr/design/mainframe/JWorkBook.java
  2. 7
      designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java
  3. 10
      designer/src/com/fr/poly/PolyUtils.java
  4. 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);

10
designer/src/com/fr/poly/PolyUtils.java

@ -9,6 +9,7 @@ import java.util.HashMap;
import java.util.Map;
import com.fr.base.FRContext;
import com.fr.base.ScreenResolution;
import com.fr.base.chart.BaseChart;
import com.fr.base.chart.BaseChartCollection;
import com.fr.base.chart.BasePlot;
@ -114,10 +115,11 @@ public class PolyUtils {
AddedData addedData = designer.getAddedData();
for (int count = addedData.getAddedCount() - 1; count >= 0; count--) {
BlockCreator creator = addedData.getAddedAt(count);
int cx = creator.getX();
int cy = creator.getY();
int cw = creator.getWidth();
int ch = creator.getHeight();
float times = (float) designer.getResolution()/ScreenResolution.getScreenResolution();
int cx = (int) (creator.getX() * times);
int cy = (int) (creator.getY() * times);
int cw = (int) (creator.getWidth() * times);
int ch = (int) (creator.getHeight() * times);
if (x >= cx && x <= (cx + cw)) {
if(y >= cy && y <= (cy + ch)) {
return creator;

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