import eu.etaxonomy.taxeditor.forms.SelectionArbitrator;
/**
+ * <p>Abstract AbstractCdmDetailSection class.</p>
+ *
* @author n.hoffmann
* @created Feb 26, 2010
* @version 1.0
protected SelectionArbitrator selectionArbitrator;
+ /**
+ * <p>Constructor for AbstractCdmDetailSection.</p>
+ *
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
+ * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
+ * @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
+ * @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object.
+ * @param style a int.
+ * @param <ENTITY> a ENTITY object.
+ */
public AbstractCdmDetailSection(CdmFormFactory formFactory,
ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) {
super(formFactory, conversation, parentElement, selectionProvider, Section.CLIENT_INDENT | style);
}
+ /**
+ * <p>createControls</p>
+ *
+ * @param formElement a {@link eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection} object.
+ * @param style a int.
+ */
protected void createControls(AbstractCdmDetailSection<ENTITY> formElement, int style) {
TableWrapLayout layout = (TableWrapLayout) getLayoutComposite().getLayout();
layout.topMargin = 10;
detailElement = formFactory.createCdmDetailElement(getDetailType(), formElement, style);
}
+ /**
+ * <p>getDetailType</p>
+ *
+ * @return a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory.DetailType} object.
+ */
protected abstract DetailType getDetailType();
/**
+ * <p>getHeading</p>
+ *
* @return the heading for this section
*/
public abstract String getHeading();
+ /** {@inheritDoc} */
@Override
public void dispose() {
if(detailElement instanceof ISelectableElement){
/* (non-Javadoc)
* @see eu.etaxonomy.taxeditor.forms.section.AbstractEditorFormSection#setBackground(org.eclipse.swt.graphics.Color)
*/
+ /** {@inheritDoc} */
@Override
public void setBackground(Color color) {
if(detailElement != null){
super.setBackground(color);
}
+ /**
+ * <p>setEntity</p>
+ *
+ * @param entity a ENTITY object.
+ */
public void setEntity(ENTITY entity) {
if(detailElement != null){
detailElement.setEntity(entity);
layout();
}
+ /**
+ * <p>setSectionTitle</p>
+ */
protected void setSectionTitle(){
String title = "";
if(getEntity() != null && (getEntity() instanceof IdentifiableEntity)){
this.setText(getHeading() + title);
}
+ /**
+ * <p>updateTitle</p>
+ */
public void updateTitle(){
if(!isDisposed()){
setSectionTitle();
}
}
+ /** {@inheritDoc} */
public void setIrrelevant(boolean irrelevant) {
if(detailElement != null){
detailElement.setIrrelevant(irrelevant);
}
}
+ /** {@inheritDoc} */
public void expansionStateChanging(ExpansionEvent e) {
// logger.warn("Expansion State Changing");
}
+ /** {@inheritDoc} */
public void expansionStateChanged(ExpansionEvent e) {
// logger.warn("Expansion State Changed");
}