merging in latest changes from trunk
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / userecords / UseRecordDetailSection.java
1 /**
2 * Copyright (C) 2011 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.ui.section.userecords;
10
11 import org.eclipse.jface.viewers.ISelectionProvider;
12
13 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
14 import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
15 import eu.etaxonomy.taxeditor.store.CdmStore;
16 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
17 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
18 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
19 import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
20
21 /**
22 * UseRecordDetailSection Class
23 * @author a.theys
24 * @created mar 13, 2012
25 * @version 1.0
26 */
27 public class UseRecordDetailSection extends AbstractCdmDetailSection<DescriptionElementBase> {
28
29 /**Constructor for class UseRecordDetailSection
30 *
31 * @param cdmFormFactory
32 * @param conversation
33 * @param parentElement
34 * @param selectionProvider
35 * @param style
36 */
37 public UseRecordDetailSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation,
38 ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
39 super(cdmFormFactory, conversation, parentElement, selectionProvider, style);
40 }
41
42 /** {@inheritDoc} */
43 @Override
44 protected DetailType getDetailType() {
45 return DetailType.USE_RECORD;
46 }
47
48 /** {@inheritDoc} */
49 @Override
50 public String getHeading() {
51 return "Use Record";
52 }
53
54 /** {@inheritDoc} */
55 @Override
56 protected void setSectionTitle() {
57 this.setText(getHeading() + ": " + getEntity().getFeature().getLabel(CdmStore.getDefaultLanguage()));
58 setTextClient(createToolbar());
59 }
60 }