Browse Source

Pull request #2775: REPORT-42540 设计面板新增sheet的缩放率逻辑确认

Merge in DESIGN/design from ~YVAN/design:release/10.0 to release/10.0

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

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

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

Loading…
Cancel
Save