Revision 3be6ef3e
Added by Niels Hoffmann over 13 years ago
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/section/AbstractCdmDetailSection.java | ||
---|---|---|
30 | 30 |
import eu.etaxonomy.taxeditor.forms.SelectionArbitrator; |
31 | 31 |
|
32 | 32 |
/** |
33 |
* <p>Abstract AbstractCdmDetailSection class.</p> |
|
34 |
* |
|
33 | 35 |
* @author n.hoffmann |
34 | 36 |
* @created Feb 26, 2010 |
35 | 37 |
* @version 1.0 |
... | ... | |
40 | 42 |
|
41 | 43 |
protected SelectionArbitrator selectionArbitrator; |
42 | 44 |
|
45 |
/** |
|
46 |
* <p>Constructor for AbstractCdmDetailSection.</p> |
|
47 |
* |
|
48 |
* @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object. |
|
49 |
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. |
|
50 |
* @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object. |
|
51 |
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object. |
|
52 |
* @param style a int. |
|
53 |
* @param <ENTITY> a ENTITY object. |
|
54 |
*/ |
|
43 | 55 |
public AbstractCdmDetailSection(CdmFormFactory formFactory, |
44 | 56 |
ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) { |
45 | 57 |
super(formFactory, conversation, parentElement, selectionProvider, Section.CLIENT_INDENT | style); |
... | ... | |
51 | 63 |
} |
52 | 64 |
|
53 | 65 |
|
66 |
/** |
|
67 |
* <p>createControls</p> |
|
68 |
* |
|
69 |
* @param formElement a {@link eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection} object. |
|
70 |
* @param style a int. |
|
71 |
*/ |
|
54 | 72 |
protected void createControls(AbstractCdmDetailSection<ENTITY> formElement, int style) { |
55 | 73 |
TableWrapLayout layout = (TableWrapLayout) getLayoutComposite().getLayout(); |
56 | 74 |
layout.topMargin = 10; |
... | ... | |
60 | 78 |
detailElement = formFactory.createCdmDetailElement(getDetailType(), formElement, style); |
61 | 79 |
} |
62 | 80 |
|
81 |
/** |
|
82 |
* <p>getDetailType</p> |
|
83 |
* |
|
84 |
* @return a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory.DetailType} object. |
|
85 |
*/ |
|
63 | 86 |
protected abstract DetailType getDetailType(); |
64 | 87 |
|
65 | 88 |
/** |
89 |
* <p>getHeading</p> |
|
90 |
* |
|
66 | 91 |
* @return the heading for this section |
67 | 92 |
*/ |
68 | 93 |
public abstract String getHeading(); |
69 | 94 |
|
95 |
/** {@inheritDoc} */ |
|
70 | 96 |
@Override |
71 | 97 |
public void dispose() { |
72 | 98 |
if(detailElement instanceof ISelectableElement){ |
... | ... | |
78 | 104 |
/* (non-Javadoc) |
79 | 105 |
* @see eu.etaxonomy.taxeditor.forms.section.AbstractEditorFormSection#setBackground(org.eclipse.swt.graphics.Color) |
80 | 106 |
*/ |
107 |
/** {@inheritDoc} */ |
|
81 | 108 |
@Override |
82 | 109 |
public void setBackground(Color color) { |
83 | 110 |
if(detailElement != null){ |
... | ... | |
86 | 113 |
super.setBackground(color); |
87 | 114 |
} |
88 | 115 |
|
116 |
/** |
|
117 |
* <p>setEntity</p> |
|
118 |
* |
|
119 |
* @param entity a ENTITY object. |
|
120 |
*/ |
|
89 | 121 |
public void setEntity(ENTITY entity) { |
90 | 122 |
if(detailElement != null){ |
91 | 123 |
detailElement.setEntity(entity); |
... | ... | |
95 | 127 |
layout(); |
96 | 128 |
} |
97 | 129 |
|
130 |
/** |
|
131 |
* <p>setSectionTitle</p> |
|
132 |
*/ |
|
98 | 133 |
protected void setSectionTitle(){ |
99 | 134 |
String title = ""; |
100 | 135 |
if(getEntity() != null && (getEntity() instanceof IdentifiableEntity)){ |
... | ... | |
103 | 138 |
this.setText(getHeading() + title); |
104 | 139 |
} |
105 | 140 |
|
141 |
/** |
|
142 |
* <p>updateTitle</p> |
|
143 |
*/ |
|
106 | 144 |
public void updateTitle(){ |
107 | 145 |
if(!isDisposed()){ |
108 | 146 |
setSectionTitle(); |
... | ... | |
110 | 148 |
} |
111 | 149 |
} |
112 | 150 |
|
151 |
/** {@inheritDoc} */ |
|
113 | 152 |
public void setIrrelevant(boolean irrelevant) { |
114 | 153 |
if(detailElement != null){ |
115 | 154 |
detailElement.setIrrelevant(irrelevant); |
116 | 155 |
} |
117 | 156 |
} |
118 | 157 |
|
158 |
/** {@inheritDoc} */ |
|
119 | 159 |
public void expansionStateChanging(ExpansionEvent e) { |
120 | 160 |
// logger.warn("Expansion State Changing"); |
121 | 161 |
} |
122 | 162 |
|
163 |
/** {@inheritDoc} */ |
|
123 | 164 |
public void expansionStateChanged(ExpansionEvent e) { |
124 | 165 |
// logger.warn("Expansion State Changed"); |
125 | 166 |
} |
Also available in: Unified diff
performed javacscript:fix and worked on documentation