Revision 4e59c9c1
Added by Andreas Kohlbecker about 10 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/group/grantedauthority/CdmAuthorityRow.java | ||
---|---|---|
24 | 24 |
import eu.etaxonomy.cdm.model.common.GrantedAuthorityImpl; |
25 | 25 |
import eu.etaxonomy.cdm.persistence.hibernate.permission.CdmAuthority; |
26 | 26 |
import eu.etaxonomy.taxeditor.model.ImageResources; |
27 |
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityLabelTextProvider; |
|
27 | 28 |
|
28 | 29 |
|
29 | 30 |
/** |
... | ... | |
37 | 38 |
|
38 | 39 |
private final FormToolkit toolkit = new FormToolkit(Display.getCurrent()); |
39 | 40 |
private Label lblEntity; |
40 |
private Label lblUuid;
|
|
41 |
private Label lblTarget;
|
|
41 | 42 |
private CRUDOperationChooser operationChooser; |
42 | 43 |
private Button btnDelete; |
43 | 44 |
|
... | ... | |
87 | 88 |
toolkit.adapt(lblEntity, true, true); |
88 | 89 |
lblEntity.setText("Entity"); |
89 | 90 |
|
90 |
lblUuid = new Label(this, SWT.BORDER);
|
|
91 |
GridData gd_lblUuid = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);
|
|
92 |
gd_lblUuid.heightHint = 30;
|
|
93 |
gd_lblUuid.widthHint = 270;
|
|
94 |
lblUuid.setLayoutData(gd_lblUuid);
|
|
95 |
lblUuid.setAlignment(SWT.CENTER);
|
|
96 |
toolkit.adapt(lblUuid, true, true);
|
|
97 |
lblUuid.setText("Uuid");
|
|
91 |
lblTarget = new Label(this, SWT.BORDER + SWT.WRAP);
|
|
92 |
GridData gd_lblTarget = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);
|
|
93 |
gd_lblTarget.heightHint = 30;
|
|
94 |
gd_lblTarget.widthHint = 270;
|
|
95 |
lblTarget.setLayoutData(gd_lblTarget);
|
|
96 |
lblTarget.setAlignment(SWT.LEFT);
|
|
97 |
toolkit.adapt(lblTarget, true, true);
|
|
98 |
lblTarget.setText("Uuid");
|
|
98 | 99 |
|
99 | 100 |
operationChooser = new CRUDOperationChooser(this, SWT.BORDER); |
100 | 101 |
operationChooser.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1)); |
... | ... | |
149 | 150 |
|
150 | 151 |
String entityStr = (cdmAuthority.getPermissionClass() == null)?"":cdmAuthority.getPermissionClass().toString(); |
151 | 152 |
lblEntity.setText(entityStr); |
152 |
String uuidStr = (cdmAuthority.getTargetUUID() == null)?"":cdmAuthority.getTargetUUID().toString();
|
|
153 |
lblUuid.setText(uuidStr);
|
|
153 |
String targetLabelText = GrantedAuthorityLabelTextProvider.getTargetText(cdmAuthority);
|
|
154 |
lblTarget.setText(targetLabelText);
|
|
154 | 155 |
|
155 | 156 |
operationChooser.setAuthority(cdmaModel, grantedAuthorityI, cdmAuthority); |
156 | 157 |
|
Also available in: Unified diff
solving #4013 (GrantedAuthority: Humane label of TaxonNode authorities)