Browse Source

REPORT-2897 9.0设计器修改

PMD
master
MoMeak 7 years ago
parent
commit
20c4524cab
  1. 3
      designer/src/com/fr/design/mainframe/ReportComponentComposite.java
  2. 8
      designer_form/src/com/fr/design/mainframe/FormArea.java

3
designer/src/com/fr/design/mainframe/ReportComponentComposite.java

@ -30,6 +30,7 @@ import com.fr.report.report.TemplateReport;
public class ReportComponentComposite extends JComponent {
private static final int MAX = 400;
private static final int HUND = 100;
private static final int MIN = 10;
private JWorkBook parent;
private UIModeControlContainer parentContainer = null;
@ -68,7 +69,7 @@ public class ReportComponentComposite extends JComponent {
double value = Integer.parseInt(jSliderContainer.getShowVal().getText().substring(0, jSliderContainer.getShowVal().getText().indexOf("%")));
value = value>MAX ? MAX : value;
value = value<MIN ? MIN : value;
int resolution = (int) (ScreenResolution.getScreenResolution()*value/100);
int resolution = (int) (ScreenResolution.getScreenResolution()*value/HUND);
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution);
}

8
designer_form/src/com/fr/design/mainframe/FormArea.java

@ -51,8 +51,8 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
private static final double SLIDER_MIN = 10.0;
public static final double DEFAULT_SLIDER = 100.0;
private static final int ROTATIONS = 50;
private static final int showValMax = 400;
private static final int showValMin = 10;
private static final int SHOWVALMAX = 400;
private static final int SHOWVALMIN = 10;
private FormDesigner designer;
private int horizontalValue = 0;
private int verticalValue = 0;
@ -158,8 +158,8 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
public void insertUpdate(DocumentEvent e) {
// slidePane.getShowVal().getDocument()
double value = Integer.parseInt(slidePane.getShowVal().getText().substring(0, slidePane.getShowVal().getText().indexOf("%")));
value = value>showValMax ? showValMax : value;
value = value<showValMin ? showValMin : value;
value = value>SHOWVALMAX ? SHOWVALMAX : value;
value = value<SHOWVALMIN ? SHOWVALMIN : value;
reCalculateRoot(value, true);
JTemplate form = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if(form != null){

Loading…
Cancel
Save