Browse Source

REPORT-42540 设计面板新增sheet的缩放率逻辑确认

【问题原因】之前改这个的时候REPORT-37950只关注了缩放条可以单独控制每个sheet,没注意新增sheet的缩放条初值问题
【改动思路】与产品确认后,将每个新增sheet的缩放初值设置为100
feature/big-screen
Yvan 4 years ago
parent
commit
a827dfefaa
  1. 18
      designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java

18
designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java

@ -5,6 +5,7 @@ import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.designer.EditingState; import com.fr.design.designer.EditingState;
import com.fr.design.event.RemoveListener; import com.fr.design.event.RemoveListener;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.icontainer.UIModeControlContainer; import com.fr.design.gui.icontainer.UIModeControlContainer;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
@ -18,8 +19,6 @@ import javax.swing.JPanel;
import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener; import javax.swing.event.ChangeListener;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseWheelEvent; import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener; import java.awt.event.MouseWheelListener;
import java.util.ArrayList; import java.util.ArrayList;
@ -85,7 +84,7 @@ public class ReportComponentComposite extends JComponent implements RemoveListen
value = value > MAX ? MAX : value; value = value > MAX ? MAX : value;
value = value < MIN ? MIN : value; value = value < MIN ? MIN : value;
int resolution = (int) (ScreenResolution.getScreenResolution() * value / HUND); int resolution = (int) (ScreenResolution.getScreenResolution() * value / HUND);
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(resolution); HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().setScale(resolution);
} }
}; };
@ -119,8 +118,12 @@ public class ReportComponentComposite extends JComponent implements RemoveListen
templateStateList.add(null); templateStateList.add(null);
} }
centerCardPane.editingComponet.setSelection(centerCardPane.editingComponet.getDefaultSelectElement()); centerCardPane.editingComponet.setSelection(centerCardPane.editingComponet.getDefaultSelectElement());
// Yvan: REPORT-37950 普通报表-多sheet-报表块缩放失效 // 这里jSliderContainer有可能为null,做个判断
//jSliderContainer = JFormSliderPane.getInstance(); if (jSliderContainer == null) {
jSliderContainer = JFormSliderPane.getInstance();
}
// 为新建的sheet的缩放条初始值置为100
jSliderContainer.setShowValue(HUND);
} }
if (centerCardPane.editingComponet.elementCasePane == null) { if (centerCardPane.editingComponet.elementCasePane == null) {
@ -206,8 +209,9 @@ public class ReportComponentComposite extends JComponent implements RemoveListen
hbarContainer = FRGUIPaneFactory.createBorderLayout_S_Pane(); hbarContainer = FRGUIPaneFactory.createBorderLayout_S_Pane();
hbarContainer.add(centerCardPane.editingComponet.getHorizontalScrollBar()); hbarContainer.add(centerCardPane.editingComponet.getHorizontalScrollBar());
JPanel southPane = new JPanel(new BorderLayout()); JPanel southPane = new JPanel(new BorderLayout());
jSliderContainer = JFormSliderPane.getInstance(); if (jSliderContainer == null) {
jSliderContainer = JFormSliderPane.getInstance();
}
southPane.add(hbarContainer, BorderLayout.NORTH); southPane.add(hbarContainer, BorderLayout.NORTH);
southPane.add(sheetNameTab, BorderLayout.CENTER); southPane.add(sheetNameTab, BorderLayout.CENTER);
southPane.add(jSliderContainer, BorderLayout.EAST); southPane.add(jSliderContainer, BorderLayout.EAST);

Loading…
Cancel
Save