Browse Source

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

* commit '3b2290cdf652a27ccaf42a5d4c002c50795463d6':
  REPORT-2897 9.0设计器修改 交互->聚合报表刻度等比缩放(精度四舍五入)
  REPORT-4423 缩放条问题 修改滚轮一格缩放比例
  REPORT-4099 [9.0一轮回归]权限编辑无法选中单元格
master
superman 7 years ago
parent
commit
940a892bb9
  1. 2
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  2. 2
      designer/src/com/fr/design/mainframe/JWorkBook.java
  3. 3
      designer/src/com/fr/design/mainframe/ReportComponentComposite.java
  4. 3
      designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java
  5. 4
      designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java
  6. 4
      designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java

2
designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -47,7 +47,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
this.addSelectionChangeListener(new SelectionListener() {
@Override
public void selectionChanged(SelectionEvent e) {
if (!isEditable()) {
if (!isEditable() && !BaseUtils.isAuthorityEditing()) {
return;
}
doOnSelectionChanged(e);

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

@ -92,7 +92,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
private UIModeControlContainer centerPane;
public ReportComponentComposite reportComposite;
private ParameterDefinitePane parameterPane;
private int resolution;
private int resolution = ScreenResolution.getScreenResolution();
public JWorkBook() {
super(new WorkBook(new WorkSheet()), "WorkBook");

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

@ -33,6 +33,7 @@ public class ReportComponentComposite extends JComponent {
private static final int MAX = 400;
private static final int HUND = 100;
private static final int MIN = 10;
private static final int DIR = 15;
private JWorkBook parent;
private UIModeControlContainer parentContainer = null;
@ -71,7 +72,7 @@ public class ReportComponentComposite extends JComponent {
if (InputEventBaseOnOS.isControlDown(e)) {
int dir = e.getWheelRotation();
int old_resolution = (int) jSliderContainer.getShowVal().getValue();
jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN));
jSliderContainer.getShowVal().setValue(old_resolution - (dir * DIR));
}
}
};

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

@ -34,6 +34,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 int DIR = 15;
private static final double MIN_TIME = 0.4;
public FormElementCaseDesigner elementCaseDesigner;
private BaseJForm jForm;
@ -61,7 +62,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
if (InputEventBaseOnOS.isControlDown(e)) {
int dir = e.getWheelRotation();
int old_resolution = (int) jSliderContainer.getShowVal().getValue();
jSliderContainer.getShowVal().setValue(old_resolution - (dir * MIN));
jSliderContainer.getShowVal().setValue(old_resolution - (dir * DIR));
}
}
};

4
designer_base/src/com/fr/design/scrollruler/HorizontalRulerUI.java

@ -12,6 +12,7 @@ import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.base.Utils;
import com.fr.design.file.HistoryTemplateListPane;
public class HorizontalRulerUI extends RulerUI {
@ -25,7 +26,8 @@ public class HorizontalRulerUI extends RulerUI {
for (int i = k; i < (pxToLength(size.getWidth() + extra) + 1) * ratio; i++) {
g.setColor(BaseRuler.UNIT_SIGN_COLOR);
if (i % BaseRuler.SCALE_10 == 0) {
String text = Utils.convertNumberStringToString(i / showText);
double times = (double)HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution() / ScreenResolution.getScreenResolution();
String text = Utils.convertNumberStringToString(Math.round(i / times));
Graphics2D gg = (Graphics2D) g.create((int) (toPX(i) / ratio) - extra + 1, 0, BaseRuler.NUMBER_100, size.height);
BaseUtils.drawStringStyleInRotation(gg, BaseRuler.NUMBER_100, BaseRuler.NUMBER_14, text, Style.getInstance().deriveHorizontalAlignment(
Style.LEFT_TO_RIGHT).deriveFRFont(BaseRuler.TEXT_FONT), ScreenResolution.getScreenResolution());

4
designer_base/src/com/fr/design/scrollruler/VerticalRulerUI.java

@ -9,6 +9,7 @@ import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution;
import com.fr.base.Style;
import com.fr.base.Utils;
import com.fr.design.file.HistoryTemplateListPane;
public class VerticalRulerUI extends RulerUI{
@ -22,8 +23,9 @@ public class VerticalRulerUI extends RulerUI{
for (int i = k; i < (pxToLength(size.height + extra) + 1) * ratio; i++) {
g.setColor(BaseRuler.UNIT_SIGN_COLOR);
if (i % BaseRuler.SCALE_10 == 0) {
double times = (double) HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getJTemplateResolution() / ScreenResolution.getScreenResolution();
String text = Utils.convertNumberStringToString(Math.round(i / times));
GraphHelper.drawLine(g, size.width, toPX(i) / ratio - extra, 0, toPX(i) / ratio - extra);
String text = Utils.convertNumberStringToString(i / showText);
Graphics2D gg = (Graphics2D) g.create(0, (int) (toPX(i) / ratio - extra + 1), size.width, BaseRuler.NUMBER_99);
BaseUtils.drawStringStyleInRotation(gg, BaseRuler.NUMBER_11, BaseRuler.NUMBER_100, text, Style.getInstance().deriveVerticalAlignment(1).deriveRotation(
BaseRuler.NUMBER_90).deriveFRFont(BaseRuler.TEXT_FONT), ScreenResolution.getScreenResolution());

Loading…
Cancel
Save