|
|
|
@ -75,7 +75,7 @@ public class XWAbsoluteLayout extends XLayoutContainer {
|
|
|
|
|
xConnectorMap.put(connector, new XConnector(connector, this)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
initPercent(); |
|
|
|
|
initPercent(widget); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -89,13 +89,14 @@ public class XWAbsoluteLayout extends XLayoutContainer {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//根据屏幕大小来确定显示的百分比, 1440*900默认100%, 1366*768缩放90%
|
|
|
|
|
private void initPercent(){ |
|
|
|
|
private void initPercent(WAbsoluteLayout widget){ |
|
|
|
|
Toolkit toolkit = Toolkit.getDefaultToolkit(); |
|
|
|
|
Dimension scrnsize = toolkit.getScreenSize(); |
|
|
|
|
double screenValue = FRScreen.getByDimension(scrnsize).getValue(); |
|
|
|
|
if(screenValue != FormArea.DEFAULT_SLIDER){ |
|
|
|
|
this.setContainerPercent(screenValue / FormArea.DEFAULT_SLIDER); |
|
|
|
|
} |
|
|
|
|
widget.setDesigningResolution(scrnsize); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|