forked from fanruan/design
Browse Source
* commit '6e12f0da837e70174946082fa7a5638b9466060e': REPORT-34954 在富文本设置中,未选中数据时直接点击上下标仍然可以同时设置 REPORT-33194 sql新增删除字段预览无变化 REPORT-35108 && REPORT-34895 REPORT-35259 当参数栏参数过多时是否有下拉框 调整格式 REPORT-35259 当参数栏参数过多时是否有下拉框 删除无用提交 REPORT-35259 当参数栏参数过多时是否有下拉框 REPORT-34737 绝对画布中的组件可视状态下移到侧边后组件移出画布可见区域 REPORT-33103 合并单元格时将用来覆盖网格的矩形的height减小0.5 REPORT-34596 远程设计服务器数据集字段修改问题 REPORT-31546 公式面板的说明切换偶尔会失效 REPORT-34962 数据集不点击刷新也能显示参数 REPORT-34465 预览视图页面无法关闭 REPORT-32427 设计器操作决策报表TAB块,出现问题 REPORT-32427 设计器操作决策报表TAB块,出现问题persist/11.0
superman
4 years ago
13 changed files with 102 additions and 15 deletions
@ -0,0 +1,46 @@ |
|||||||
|
package com.fr.design.designer.beans.adapters.layout; |
||||||
|
|
||||||
|
import com.fr.config.dao.DaoContext; |
||||||
|
import com.fr.config.dao.impl.LocalClassHelperDao; |
||||||
|
import com.fr.config.dao.impl.LocalEntityDao; |
||||||
|
import com.fr.config.dao.impl.LocalXmlEntityDao; |
||||||
|
import com.fr.design.designer.creator.XButton; |
||||||
|
import com.fr.design.designer.creator.XCreator; |
||||||
|
import com.fr.design.designer.creator.XWAbsoluteLayout; |
||||||
|
import com.fr.form.ui.Button; |
||||||
|
import com.fr.form.ui.container.WAbsoluteLayout; |
||||||
|
import java.awt.Dimension; |
||||||
|
import junit.framework.TestCase; |
||||||
|
import org.junit.Assert; |
||||||
|
|
||||||
|
public class FRAbsoluteLayoutAdapterTest extends TestCase { |
||||||
|
@Override |
||||||
|
protected void setUp() throws Exception { |
||||||
|
DaoContext.setEntityDao(new LocalEntityDao()); |
||||||
|
DaoContext.setClassHelperDao(new LocalClassHelperDao()); |
||||||
|
DaoContext.setXmlEntityDao(new LocalXmlEntityDao()); |
||||||
|
} |
||||||
|
|
||||||
|
public void testFix(){ |
||||||
|
WAbsoluteLayout layout =new WAbsoluteLayout(); |
||||||
|
XWAbsoluteLayout container =new XWAbsoluteLayout(layout); |
||||||
|
container.setBounds(0,320,400,160); |
||||||
|
FRAbsoluteLayoutAdapter frAbsoluteLayoutAdapter = new FRAbsoluteLayoutAdapter(container); |
||||||
|
XCreator button = new XButton(new Button(),new Dimension(88,40)); |
||||||
|
|
||||||
|
frAbsoluteLayoutAdapter.fix(button,-1,-1); |
||||||
|
Assert.assertEquals(0,button.getX()); |
||||||
|
Assert.assertEquals(0,button.getY()); |
||||||
|
|
||||||
|
frAbsoluteLayoutAdapter.fix(button,350,200); |
||||||
|
Assert.assertEquals(312,button.getX()); |
||||||
|
Assert.assertEquals(120,button.getY()); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
protected void tearDown() throws Exception { |
||||||
|
DaoContext.setEntityDao(null); |
||||||
|
DaoContext.setClassHelperDao(null); |
||||||
|
DaoContext.setXmlEntityDao(null); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue