private Button createDeleteBtn(CfgValue cfgValue, Component partPane) { Button btn = new Button(); btn.setAttribute("cfgValue", cfgValue); btn.setImage("images/easyicon_remove.png"); btn.setTooltiptext("删除"); btn.addEventListener(Events.ON_CLICK, DeleteValueBtnEventListener); btn.setAttribute("partPane", partPane); return btn; }
private Button createEnterBtn(CfgValue cfgValue) { Button btn = new Button(); btn.setAttribute("cfgValue", cfgValue); btn.setImage("images/easyicon_open.png"); btn.setTooltiptext("打开"); btn.addEventListener(Events.ON_CLICK, EnterBtnEventListener); return btn; }
private Button createCopyElementBtn(CfgValue origValue) { Button btn = new Button(); btn.setAttribute("cfgValue", origValue); btn.setImage("images/easyicon_copy.png"); btn.setTooltiptext("复制"); btn.addEventListener(Events.ON_CLICK, CopyValueBtnEventListener); return btn; }
private Button createAddPartBtn(CfgInfo cfgInfo) { Button btn = new Button(); btn.setAttribute("cfgInfo", cfgInfo); btn.setLabel(cfgInfo.getLabelOrId()); btn.setImage("images/easyicon_add.png"); btn.setTooltiptext("添加"); btn.addEventListener(Events.ON_CLICK, AddPartBtnEventListener); return btn; }
private void initList() { // incList List<GenericListHeaderType> header = new LinkedList<GenericListHeaderType>(); header.add( new GenericListHeaderType( Labels.getLabel("common.code"), 0, "", true, "String", true, true, false, false)); header.add( new GenericListHeaderType( Labels.getLabel("common.relation"), 130, "", true, "String", true, true, false, false)); header.add( new GenericListHeaderType( Labels.getLabel("common.code"), 0, "", true, "String", true, true, false, false)); List<GenericListRowType> dataList = new LinkedList<GenericListRowType>(); /*for (MetadataParameter meta : valueSet.getMetadataParameters()) { GenericListRowType row = createRowFromMetadataParameter(meta); dataList.add(row); }*/ // Liste initialisieren Include inc = (Include) getFellow("incList"); Window winGenericList = (Window) inc.getFellow("winGenericList"); genericList = (GenericList) winGenericList; // genericList.setUserDefinedId("1"); genericList.setListActions(this); genericList.setButton_new(false); genericList.setButton_edit(false); genericList.setButton_delete(true); genericList.setListHeader(header); genericList.setDataList(dataList); genericList.removeCustomButtons(); Button buttonAuto = new Button( Labels.getLabel("common.automatic") + "...", "/rsc/img/design/automatic_16x16.png"); buttonAuto.addEventListener( Events.ON_CLICK, new EventListener<Event>() { public void onEvent(Event t) throws Exception { automaticAssociations(); } }); buttonAuto.setAttribute("disabled", false); buttonAuto.setAttribute("right", true); genericList.addCustomButton(buttonAuto); Button button = new Button(Labels.getLabel("common.save"), "/rsc/img/design/save_16x16.png"); button.addEventListener( Events.ON_CLICK, new EventListener<Event>() { public void onEvent(Event t) throws Exception { saveAssociations(); } }); button.setAttribute("disabled", false); button.setAttribute("right", true); genericList.addCustomButton(button); }