Browse Source
* commit '76080b2698f4666cc4bc9ecddf93613081d75f5b': REPORT-36386 自适应模板出现不自适应情况 REPORT-30352 删除不需要的import REPORT-30352 直接将RTextAreaBase的border的值改为0,以和8.0版本外观保持一致 REPORT-30352 在文本域的init方法里添加setMargin() REPORT-33194 sql新增删除字段预览无变化 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块,出现问题feature/big-screen
superman
4 years ago
12 changed files with 100 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