|
|
|
@ -2,6 +2,7 @@ package com.fr.design.fit.grid;
|
|
|
|
|
|
|
|
|
|
import com.fr.design.designer.creator.XElementCase; |
|
|
|
|
import com.fr.design.fit.AdaptiveCellElementPainter; |
|
|
|
|
import com.fr.design.fit.DesignerUIModeConfig; |
|
|
|
|
import com.fr.design.fit.common.FormDesignerUtil; |
|
|
|
|
import com.fr.design.mainframe.ElementCasePane; |
|
|
|
|
import com.fr.design.mainframe.FormDesigner; |
|
|
|
@ -58,12 +59,22 @@ public class NewFormDesignerGridUI extends GridUI {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
final Rectangle rectangle = getBoundsLineRect(elementCase, grid); |
|
|
|
|
int width = rectangle.width - columnWidthList.getRangeValue(0, horizontalValue).toPixI(resolution); |
|
|
|
|
int height = rectangle.height - rowHeightList.getRangeValue(0, verticalValue).toPixI(resolution); |
|
|
|
|
int width = getScaleWidth(rectangle.width) - columnWidthList.getRangeValue(0, horizontalValue).toPixI(resolution); |
|
|
|
|
int height = getScaleHeight(rectangle.height) - rowHeightList.getRangeValue(0, verticalValue).toPixI(resolution); |
|
|
|
|
drawBoundsLine(g2d, width, height); |
|
|
|
|
addListener(grid, elementCasePane, width, height, rectangle.width, rectangle.height); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private int getScaleWidth(int width) { |
|
|
|
|
return width * resolution / DesignerUIModeConfig.getInstance().getScreenResolution(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private int getScaleHeight(int height) { |
|
|
|
|
return height * resolution / DesignerUIModeConfig.getInstance().getScreenResolution(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 获取需要画线的矩形大小 |
|
|
|
|
*/ |
|
|
|
|