Search in sources :

Example 1 with IsEditorLayoutVertical

use of net.heartsome.cat.ts.test.ui.waits.IsEditorLayoutVertical in project translationstudio8 by heartsome.

the class XlfEditor method changeEditorLayout.

/**
	 * 修改编辑器布局 将编辑器布局由水平改为垂直,或反之
	 */
public void changeEditorLayout() {
    XlfEditor xe = new XlfEditor(bot.activeEditor());
    SWTBotToolbarButton changeEditorLayout = TS.getInstance().tlbBtnWTltChangeEditorLayout();
    if (xe.isHorizontalLayout()) {
        changeEditorLayout.click();
        // 修改布局会导致 NatTable 重绘,重新赋值以更新其他地方的引用
        getNatTable();
        bot.waitUntil(new IsEditorLayoutVertical(xe));
    } else {
        changeEditorLayout.click();
        getNatTable();
        bot.waitUntil(new IsEditorLayoutHorizontal(xe));
    }
}
Also used : IsEditorLayoutVertical(net.heartsome.cat.ts.test.ui.waits.IsEditorLayoutVertical) IsEditorLayoutHorizontal(net.heartsome.cat.ts.test.ui.waits.IsEditorLayoutHorizontal) SWTBotToolbarButton(org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton)

Aggregations

IsEditorLayoutHorizontal (net.heartsome.cat.ts.test.ui.waits.IsEditorLayoutHorizontal)1 IsEditorLayoutVertical (net.heartsome.cat.ts.test.ui.waits.IsEditorLayoutVertical)1 SWTBotToolbarButton (org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton)1