/** * Gets the item count. * * @param control * the control * @return the item count */ private static int getItemCount(final AbstractSWTBotControl<?> control) { int itemCount; if (control instanceof SWTBotCCombo) { itemCount = ((SWTBotCCombo) control).itemCount(); } else if (control instanceof SWTBotList) { itemCount = ((SWTBotList) control).itemCount(); } else if (control instanceof SWTBotCombo) { itemCount = ((SWTBotCombo) control).itemCount(); } else { throw new WrappedException("Control not supported", null); } return itemCount; }
/** * @return 列表:可选目标语言; */ public SWTBotList lstTgtLangAvailable() { return dlgBot.list(); }
/** * @return 列表:已选目标语言; */ public SWTBotList lstTgtLangSelected() { return dlgBot.list(1); }
/** * @return 列表:自定义过滤规则; */ public SWTBotList lstWLblCustomFilter() { return dialogBot.listWithLabel(TsUIConstants.getString("lstWLblCustomFilter")); }
/** * @return ; */ public SWTBotList lstSrcFile() { return dialogBot.list(); }
/** * @param bot * 对话框的 SWTBot 对象 * @param labelKey * 列表的文字标签 * @return */ public static SWTBotList listWithLabel(SWTBot bot, String labelKey) { return bot.listWithLabel(getString(labelKey)); }