Browse Source

Merge branch 'feature/10.0' of https://cloud.finedevelop.com/scm/~hugh.c/design into feature/10.0

research/11.0
Hugh.C 5 years ago
parent
commit
9757a58c68
  1. 3
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java
  2. 3
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormReportComponentComposite.java
  3. 12
      designer-realize/src/main/java/com/fr/grid/AbstractGridHeaderMouseHandler.java

3
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java

@ -102,7 +102,8 @@ public class CellStylePane extends AbstractCellAttrPane {
}
Style style = cellElement.getStyle();
if (style == null) {
style = style.DEFAULT_STYLE;
style = Style.DEFAULT_STYLE;
}
style = stylePane.updateStyle(style);
cellElement.setStyle(style);

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

@ -19,6 +19,7 @@ import com.fr.grid.Grid;
import com.fr.grid.GridUtils;
import com.fr.report.ReportHelper;
import com.fr.report.worksheet.FormElementCase;
import com.fr.stable.AssistUtils;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
@ -128,7 +129,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
int row = reportPane.getSelection().getSelectedRows()[0];
double rowLength = reportPane.getSelection().getSelectedRows().length;
double rowExtent = reportPane.getGrid().getVerticalExtent();
if (columnLength == 0 || rowLength == 0) {
if (AssistUtils.equals(columnLength, 0d) || AssistUtils.equals(rowLength, 0d)) {
return ScreenResolution.getScreenResolution();
}
double time = (columnExtent / columnLength) < (rowExtent / rowLength) ? (columnExtent / columnLength) : (rowExtent / rowLength);

12
designer-realize/src/main/java/com/fr/grid/AbstractGridHeaderMouseHandler.java

@ -112,14 +112,18 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
if (between(evt, tmpSize1, tmpSize2)) {
if (index >= dragIndex) {
try {
method.invoke(report, dragIndex, FU.valueOfPix(evtOffset(evt, oldEndValueSize), resolution));
if(method != null) {
method.invoke(report, dragIndex, FU.valueOfPix(evtOffset(evt, oldEndValueSize), resolution));
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
//sizeList.set(dragIndex, FU.valueOfPix(evtOffset(evt, oldEndValueSize), resolution));
} else {
try {
method.invoke(report, index, FU.valueOfPix(evtOffset(evt, (int) tmpSize1), resolution));
if(method != null) {
method.invoke(report, index, FU.valueOfPix(evtOffset(evt, (int) tmpSize1), resolution));
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
@ -127,7 +131,9 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
// from all to do.
for (int h = (dragIndex - 1); h > index; h--) {
try {
method.invoke(report, h, UNIT.ZERO);
if(method != null) {
method.invoke(report, h, UNIT.ZERO);
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}

Loading…
Cancel
Save