3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
;
13 import eu
.etaxonomy
.cdm
.model
.common
.GrantedAuthorityImpl
;
14 import eu
.etaxonomy
.taxeditor
.ui
.campanula
.compatibility
.ICdmFormElement
;
15 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
16 import eu
.etaxonomy
.taxeditor
.ui
.element
.TextWithLabelElement
;
17 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractCdmDetailElement
;
21 * @author a.kohlbecker
22 * @created Mar 9, 2011
25 public class GrantedAuthorityDetailElement
extends AbstractCdmDetailElement
<GrantedAuthorityImpl
> {
27 private TextWithLabelElement text_authority
;
33 public GrantedAuthorityDetailElement(CdmFormFactory formFactory
,
34 ICdmFormElement formElement
) {
35 super(formFactory
, formElement
);
39 protected void createControls(ICdmFormElement formElement
,
40 GrantedAuthorityImpl entity
, int style
) {
41 text_authority
= formFactory
.createTextWithLabelElement(formElement
, "Authority", entity
.getAuthority(), style
);
46 public void handleEvent(Object eventSource
) {
47 if(eventSource
== text_authority
){
48 getEntity().setAuthority(text_authority
.getText());