use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class OpUIManager method getACOutputParams.
public static List<OutPara> getACOutputParams() {
List<OutPara> show_ov = new ArrayList<OutPara>();
int len = OpUIManager.list_op.size();
for (int i = 1; i < len; i++) {
OutPara op = OpUIManager.list_op.get(i);
if (op.getKey().equals(ParamConst.DIVID_TITLE)) {
break;
}
show_ov.add(op);
}
return show_ov;
}
use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class OpUIManager method initDefaultOutputParamList.
/**
* 默认必备输出信息:在GT启动时完成注册
* 如果需要新增默认输出,请在GTApp中进行统一添加
* 此方法全局执行一次即可
*/
public static void initDefaultOutputParamList() {
list_op.clear();
List<OutPara> outParaList = getAll();
OutPara ov_title = new OutPara();
ov_title.setKey(ParamConst.PROMPT_TITLE);
ov_title.setDisplayProperty(OutPara.DISPLAY_TITLE);
list_op.add(ov_title);
// 添加默认显示在AC中的出参
for (OutPara ov : outParaList) {
if (OutPara.DISPLAY_AC == ov.getDisplayProperty()) {
list_op.add(ov);
}
}
// 添加关注线
OutPara ov_title_divid = new OutPara();
ov_title_divid.setKey(ParamConst.DIVID_TITLE);
ov_title_divid.setDisplayProperty(OutPara.DISPLAY_TITLE);
list_op.add(ov_title_divid);
// 普通关注出参
for (OutPara ov : outParaList) {
if (ov.getDisplayProperty() == AidlEntry.DISPLAY_NORMAL) {
list_op.add(ov);
}
}
// 不关注线
OutPara op_title_disable = new OutPara();
op_title_disable.setKey(ParamConst.PROMPT_DISABLE_TITLE);
op_title_disable.setDisplayProperty(OutPara.DISPLAY_TITLE);
list_op.add(op_title_disable);
// 不关注的出参
for (OutPara ov : outParaList) {
if (!list_op.contains(ov) && AidlEntry.DISPLAY_DISABLE == ov.getDisplayProperty()) {
list_op.add(ov);
}
}
}
use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class OpUIManager method setAUTitemTop.
public static void setAUTitemTop(GTParamOutListAdapter outparam_adapter) {
// Optional
int pos_Divide = getOutListDividePosition();
Client autClient = ClientManager.getInstance().getAUTClient();
if (null == autClient) {
return;
}
for (OutPara op : autClient.getAllOutParas()) {
if (AidlEntry.DISPLAY_NORMAL == op.getDisplayProperty()) {
int listpos = getPosition(op.getKey());
setOutListItemToTop(outparam_adapter, listpos, pos_Divide + 1);
}
}
}
use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class OpUIManager method setOutListItemToTop.
private static void setOutListItemToTop(GTParamOutListAdapter outparam_adapter, int from, int to) {
int direction = -1;
int loop_start = from;
int loop_end = to;
if (from < to) {
direction = 1;
}
OutPara ov_target = OpUIManager.list_op.get(from);
for (int i = loop_start; i != loop_end; i = i + direction) {
OpUIManager.list_op.set(i, OpUIManager.list_op.get(i + direction));
}
OpUIManager.list_op.set(to, ov_target);
if (null != outparam_adapter) {
outparam_adapter.notifyDataSetChanged();
}
}
use of com.tencent.wstt.gt.OutPara in project GT by Tencent.
the class IOutParaManager method register.
public void register(String paraName, String alias) {
if (alias.length() > 4) {
alias = alias.substring(0, 3) + ".";
}
OutPara para = new OutPara();
para.setKey(paraName);
para.setAlias(alias);
para.setDisplayProperty(OutPara.DISPLAY_NORMAL);
para.setClient(client.getKey());
if (!contains(paraName)) {
outParaMap.put(paraName, para);
}
}
Aggregations