001    package org.kuali.student.lum.common.client.configuration;
002    
003    import com.google.gwt.user.client.ui.Widget;
004    
005    import org.kuali.student.common.ui.client.configurable.mvc.views.SectionView;
006    import org.kuali.student.common.ui.client.mvc.View;
007    
008    /**
009     * @author Igor
010     */
011    public abstract class AbstractSectionConfiguration extends AbstractConfiguration {
012    
013        protected SectionView rootSection;
014    
015        @Override
016        public View getView() {
017            return getView(true);
018        }
019    
020        public View getView(boolean build) {
021            if (build) {
022                buildLayout();
023            }
024            return rootSection;
025        }
026    
027        protected abstract void buildLayout();
028    
029        @Override
030        public Widget asWidget() {
031            return rootSection;
032        }
033    
034        @Override
035        public Enum<?> getName() {
036            return rootSection.getViewEnum();
037        }
038    }