Browse Source

Merge branch 'newtemp' into release/9.0

# Conflicts:
#	designer/src/com/fr/design/mainframe/ElementCasePane.java
#	designer_form/src/com/fr/design/mainframe/FormArea.java
master
MoMeak 7 years ago
parent
commit
97e07f2cd2
  1. 6
      designer/src/com/fr/design/mainframe/ElementCasePane.java
  2. 13
      designer/src/com/fr/design/mainframe/ReportComponentComposite.java
  3. 7
      designer/src/com/fr/poly/PolyDesigner.java
  4. 4
      designer_base/src/com/fr/design/mainframe/JSliderPane.java
  5. 2
      designer_form/src/com/fr/design/mainframe/FormArea.java

6
designer/src/com/fr/design/mainframe/ElementCasePane.java

@ -1325,7 +1325,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
* @return 返回正在编辑的状态.
*/
public EditingState createEditingState() {
return new ElementCaseEditingState(this.selection, this.verScrollBar.getValue(), this.horScrollBar.getValue(), this.getResolution());
return new ElementCaseEditingState(this.selection, this.verScrollBar.getValue(), this.horScrollBar.getValue(), this.resolution);
}
public void setCellNeedTOFormat(CellSelection selection) {
@ -1352,6 +1352,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
}
this.verticalValue = verticalValue;
this.horizontalValue = horizontalValue;
this.resolution = resolution;
}
@Override
@ -1365,7 +1366,8 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
ElementCasePane.this.getVerticalScrollBar().setValue(this.verticalValue);
ElementCasePane.this.getHorizontalScrollBar().setValue(this.horizontalValue);
// ElementCasePane.this.setResolution(this.resolution);
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(this.resolution);
// 重绘.
ElementCasePane.this.repaint();
}

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

@ -120,12 +120,16 @@ public class ReportComponentComposite extends JComponent {
EditingState reportPaneEditState = templateStateList.get(newIndex);
if (reportPaneEditState != null) {
reportPaneEditState.revert();
updateJSlider();
}
} else {
while (templateStateList.size() <= newIndex) {
templateStateList.add(null);
}
centerCardPane.editingComponet.setSelection(centerCardPane.editingComponet.getDefaultSelectElement());
if (jSliderContainer != null){
jSliderContainer.reset();
}
}
if (centerCardPane.editingComponet.elementCasePane == null) {
@ -141,6 +145,15 @@ public class ReportComponentComposite extends JComponent {
}
}
private void updateJSlider(){
if (centerCardPane.editingComponet.elementCasePane == null) {
jSliderContainer.getShowVal().setValue(centerCardPane.getPolyDezi().getResolution() * HUND / ScreenResolution.getScreenResolution());
}else {
jSliderContainer.getShowVal().setValue(centerCardPane.editingComponet.elementCasePane.getResolution() * HUND / ScreenResolution.getScreenResolution());
}
}
/**
* 移除选中状态
*

7
designer/src/com/fr/poly/PolyDesigner.java

@ -687,14 +687,16 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
* @return 返回正在编辑的状态.
*/
public EditingState createEditingState() {
return new PolyDesignerEditingState(selection);
return new PolyDesignerEditingState(selection, resolution);
}
private class PolyDesignerEditingState implements EditingState {
private String blockName;
private Selection select;
protected int resolution = ScreenResolution.getScreenResolution();
public PolyDesignerEditingState(BlockCreator creator) {
public PolyDesignerEditingState(BlockCreator creator, int resolution) {
this.resolution = resolution;
if (creator == null) {
return;
}
@ -710,6 +712,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
public void revert() {
PolyDesigner.this.addedData = new AddedData(PolyDesigner.this);
stopEditingState();
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(this.resolution);
initPolyBlocks();
startEditing(blockName);
if (selection == null) {

4
designer_base/src/com/fr/design/mainframe/JSliderPane.java

@ -337,6 +337,10 @@ public class JSliderPane extends JPanel {
return this.showValue;
}
public void reset(){
this.showValSpinner.setValue(HUNDRED);
}
public static double divide(double v1, double v2, int scale) {
BigDecimal b1 = new BigDecimal(Double.toString(v1));
BigDecimal b2 = new BigDecimal(Double.toString(v2));

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

@ -119,7 +119,7 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
// slidePane = new UINumberSlidePane(SLIDER_MIN, SLIDER_FLOAT);
// slidePane.setPreferredSize(new Dimension(260,20));
slidePane = JFormSliderPane.getInstance();
slidePane.setPreferredSize(new Dimension(200, 0));
slidePane.setPreferredSize(new Dimension(200, 20));
JPanel resizePane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{

Loading…
Cancel
Save