Project

General

Profile

« Previous | Next » 

Revision cb4d176d

Added by Andreas Kohlbecker almost 7 years ago

ref #6719 RegistrationItemEditButtons active; Chooser for new type designations

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/RegistrationItemEditButtonGroup.java
57 57

  
58 58
        if(regDto.getName() != null){
59 59
            Button nameButton = new Button("Name:");
60
            nameButton.setDescription("Edit the Name");
60 61
            nameIdButton = new IdButton<TaxonName>(TaxonName.class, regDto.getName().getId(), nameButton);
61 62
            Label nameLabel = new Label(regDto.getName().getLabel());
62 63
            nameLabel.setWidthUndefined();
......
70 71
                TypeDesignationWorkingSet typeDesignationWorkingSet = regDto.getOrderdTypeDesignationWorkingSets().get(baseEntityRef);
71 72
                String buttonLabel = SpecimenOrObservationBase.class.isAssignableFrom(baseEntityRef.getType()) ? "Type": "NameType";
72 73
                Button tdButton = new Button(buttonLabel + ":");
74
                tdButton.setDescription("Edit the type designation working set");
73 75
                addComponent(tdButton);
74 76
                Set<Integer> idSet = new HashSet<>();
75 77
                typeDesignationWorkingSet.getTypeDesignations().forEach(td -> idSet.add(td.getId()));
76 78
                typeDesignationButtons.add(new IdSetButton<TypeDesignationWorkingSet>(TypeDesignationWorkingSet.class, idSet, tdButton));
77 79
                String labelText = typeDesignationWorkingSet.getRepresentation();
78
                labelText = labelText.replaceAll("^[^:]+:", ""); // remove Type:, NameType: from the beginning
80
                labelText = labelText.replaceAll("^[^:]+:", ""); // remove "Type:", "NameType:" from the beginning
79 81
                Label label = new Label(labelText);
80 82

  
81 83
                label.setWidthUndefined();
......
84 86
            }
85 87
        }
86 88
        addTypeDesignationButton = new Button(FontAwesome.PLUS);
89
        addTypeDesignationButton.setDescription("Add a new type designation");
87 90
        addComponent(addTypeDesignationButton);
88 91

  
89 92

  
......
96 99
        return nameIdButton;
97 100
    }
98 101

  
102
    public List<IdSetButton<TypeDesignationWorkingSet>> getTypeDesignationButtons() {
103
        return typeDesignationButtons;
104
    }
105

  
106
    public Button getAddTypeDesignationButton() {
107
        return addTypeDesignationButton;
108
    }
109

  
99 110
    /**
100 111
     * {@inheritDoc}
101 112
     */

Also available in: Unified diff