org.kuali.student.lum.program.client.requirements
Class ProgramRequirementsSummaryView

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by org.kuali.student.common.ui.client.widgets.field.layout.element.SpanPanel
                      extended by org.kuali.student.common.ui.client.configurable.mvc.sections.BaseSection
                          extended by org.kuali.student.common.ui.client.configurable.mvc.views.SectionView
                              extended by org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView
                                  extended by org.kuali.student.lum.program.client.requirements.ProgramRequirementsSummaryView
All Implemented Interfaces:
com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.IndexedPanel, Iterable<com.google.gwt.user.client.ui.Widget>, HasLayoutController, Section, BreadcrumbSupport, HistorySupport, View, ReportExportWidget

public class ProgramRequirementsSummaryView
extends VerticalSectionView


Nested Class Summary
private static class ProgramRequirementsSummaryView.ProgramReqDialogView
           
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
private  ActionCancelGroup actionCancelButtons
           
private static CluSetRetriever cluSetRetriever
           
private static Metadata dialogMetadata
           
private  BlockingTask gettingMetadataTask
           
private  com.google.gwt.user.client.ui.FlowPanel holdFieldsPanel
           
private  boolean isReadOnly
           
private  com.google.gwt.user.client.ui.FlowPanel layout
           
private  MetadataRpcServiceAsync metadataServiceAsync
           
static String NEW_PROG_REQ_ID
           
static String NEW_REQ_COMP_ID
           
static String NEW_STMT_TREE_ID
           
private  ProgramRequirementsViewController parentController
           
private  Map<String,SpanPanel> perProgramRequirementTypePanel
           
private  Map<String,KSLabel> perProgramRequirementTypeTotalCredits
           
private static String PROG_REQ_MODEL_ID
           
private  DataModel progReqData
           
private  BasicLayout reqCompController
           
private  ProgramRequirementsDataModel rules
           
static int tempStmtTreeID
           
 
Fields inherited from class org.kuali.student.common.ui.client.configurable.mvc.views.SectionView
model, modelId
 
Fields inherited from class org.kuali.student.common.ui.client.configurable.mvc.sections.BaseSection
fields, isDirty, isValidationEnabled, layoutController, sections
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
ProgramRequirementsSummaryView(ProgramRequirementsViewController parentController, com.google.gwt.event.shared.HandlerManager eventBus, Enum<?> viewEnum, String name, String modelId, boolean isReadOnly)
           
ProgramRequirementsSummaryView(ProgramRequirementsViewController parentController, com.google.gwt.event.shared.HandlerManager eventBus, Enum<?> viewEnum, String name, String modelId, boolean isReadOnly, EditableHeader header)
           
 
Method Summary
private  RulePreviewWidget addProgramRequirement(SpanPanel requirementsPanel, ProgramRequirementInfo progReqInfo)
           
private  void addRulePreviewWidgetHandlers(SpanPanel requirementsPanel, RulePreviewWidget rulePreviewWidget, String stmtTypeId, Integer internalProgReqID)
           
 void beforeShow(Callback<Boolean> onReadyCallback)
          Called by controller before the view is displayed to allow lazy initialization or any other preparatory work to be done.
private  void createAddProgramReqDialog(KSLightBox dialog, ActionCancelGroup actionCancelButtons, Integer internalProgReqID)
           
private static FieldDescriptor createInputField(String id, Metadata metadata, Map<String,Metadata> fieldDefinitionMetadata, Map<String,FieldDescriptor> fields)
           
private  void displayRequirementSectionForGivenType(SpanPanel requirementsPanel, StatementTypeInfo stmtTypeInfo, boolean firstRequirement)
           
 void displayRules()
           
private static void findCluSetIds(StatementTreeViewInfo rule, Set<String> list)
           
static String generateStatementTreeId()
           
static Map<String,com.google.gwt.user.client.ui.Widget> getCluSetWidgetList(StatementTreeViewInfo rule)
           
protected  ProgramRequirementsDataModel getRules()
           
private  String getTotalCreditsString(int min, int max)
           
private  String getUILabel(String id)
           
private  void init(ProgramRequirementsViewController parentController, com.google.gwt.event.shared.HandlerManager eventBus, boolean isReadOnly)
           
 boolean isDirty()
          Returns true if this this section is considered dirty (the user may have entered data into this section)
 void justStoreRules(Callback<Boolean> callback)
           
private  void retrieveProgramRequirements(Callback<Boolean> onReadyCallback)
           
 void revertRuleChanges()
           
private  void setupSaveCancelButtons()
           
private  void showDialog(KSLightBox dialog, ActionCancelGroup actionCancelButtons, Metadata metadata, Integer internalProgReqID)
           
private  void showProgramRequirementDialog(SpanPanel requirementsPanel, String stmtTypeId, Integer internalProgReqID)
           
 void storeRules(Callback<Boolean> callback)
           
private  void updateProgramInfo(SpanPanel requirementsPanel, String stmtTypeId, Integer internalProgReqID)
           
protected  void updateRequirementWidgets(ProgramRequirementInfo programReqInfo)
           
private  void updateTotalCreditPerType(String stmtTypeId)
           
 
Methods inherited from class org.kuali.student.common.ui.client.configurable.mvc.views.VerticalSectionView
clear, setSectionTitle, updateModel
 
Methods inherited from class org.kuali.student.common.ui.client.configurable.mvc.views.SectionView
addView, asWidget, beforeHide, collectBreadcrumbNames, collectHistory, getController, getModel, getModelId, getName, getViewEnum, isExportButtonActive, onHistoryEvent, setController, setModelId, setName, setViewEnum, showExport, toString, updateMetadata, updateView, updateView
 
Methods inherited from class org.kuali.student.common.ui.client.configurable.mvc.sections.BaseSection
add, addField, addSection, addSection, addStyleName, addWidget, clearValidationErrors, clearValidationWarnings, enableField, enableValidation, ensureDirtyFlagPath, getField, getFields, getLayout, getLayoutController, getSection, getSections, getUnnestedFields, isValidationEnabled, processValidationResults, processValidationResults, progressiveEnableAndRequireFields, progressiveEnableFields, progressiveRequireFields, removeField, removeField, removeSection, removeSection, removeWidget, removeWidget, resetDirtyFlags, resetFieldInteractionFlags, setFieldHasHadFocusFlags, setHelp, setInstructions, setIsDirty, setLayoutController, setRequired, setSectionId, setStyleName, updateModel, updateWidgetData
 
Methods inherited from class org.kuali.student.common.ui.client.widgets.field.layout.element.SpanPanel
getExportElementSubset, getExportFieldValue, getText, insert, isExportElement, setExportElement, setHTML, setText
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
adopt, adopt, disown, doAttachChildren, doDetachChildren, onLoad, onUnload, orphan
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

metadataServiceAsync

private MetadataRpcServiceAsync metadataServiceAsync

cluSetRetriever

private static CluSetRetriever cluSetRetriever

layout

private com.google.gwt.user.client.ui.FlowPanel layout

actionCancelButtons

private ActionCancelGroup actionCancelButtons

reqCompController

private BasicLayout reqCompController

holdFieldsPanel

private com.google.gwt.user.client.ui.FlowPanel holdFieldsPanel

parentController

private ProgramRequirementsViewController parentController

rules

private ProgramRequirementsDataModel rules

isReadOnly

private boolean isReadOnly

tempStmtTreeID

public static int tempStmtTreeID

NEW_PROG_REQ_ID

public static final String NEW_PROG_REQ_ID
See Also:
Constant Field Values

NEW_STMT_TREE_ID

public static final String NEW_STMT_TREE_ID
See Also:
Constant Field Values

NEW_REQ_COMP_ID

public static final String NEW_REQ_COMP_ID
See Also:
Constant Field Values

PROG_REQ_MODEL_ID

private static final String PROG_REQ_MODEL_ID
See Also:
Constant Field Values

progReqData

private DataModel progReqData

gettingMetadataTask

private BlockingTask gettingMetadataTask

dialogMetadata

private static Metadata dialogMetadata

perProgramRequirementTypePanel

private Map<String,SpanPanel> perProgramRequirementTypePanel

perProgramRequirementTypeTotalCredits

private Map<String,KSLabel> perProgramRequirementTypeTotalCredits
Constructor Detail

ProgramRequirementsSummaryView

public ProgramRequirementsSummaryView(ProgramRequirementsViewController parentController,
                                      com.google.gwt.event.shared.HandlerManager eventBus,
                                      Enum<?> viewEnum,
                                      String name,
                                      String modelId,
                                      boolean isReadOnly)

ProgramRequirementsSummaryView

public ProgramRequirementsSummaryView(ProgramRequirementsViewController parentController,
                                      com.google.gwt.event.shared.HandlerManager eventBus,
                                      Enum<?> viewEnum,
                                      String name,
                                      String modelId,
                                      boolean isReadOnly,
                                      EditableHeader header)
Method Detail

init

private void init(ProgramRequirementsViewController parentController,
                  com.google.gwt.event.shared.HandlerManager eventBus,
                  boolean isReadOnly)

isDirty

public boolean isDirty()
Description copied from class: BaseSection
Returns true if this this section is considered dirty (the user may have entered data into this section)

Specified by:
isDirty in interface Section
Overrides:
isDirty in class BaseSection
See Also:
Section.isDirty()

getRules

protected ProgramRequirementsDataModel getRules()

beforeShow

public void beforeShow(Callback<Boolean> onReadyCallback)
Description copied from class: SectionView
Called by controller before the view is displayed to allow lazy initialization or any other preparatory work to be done. In SectionView, the section is cleared of all validation errors, the model is requested from its parent controller, the widgets are updated with the latest data, and beforeShow is called on all of its potential child views.

Specified by:
beforeShow in interface View
Overrides:
beforeShow in class SectionView

retrieveProgramRequirements

private void retrieveProgramRequirements(Callback<Boolean> onReadyCallback)

storeRules

public void storeRules(Callback<Boolean> callback)

justStoreRules

public void justStoreRules(Callback<Boolean> callback)

revertRuleChanges

public void revertRuleChanges()

updateRequirementWidgets

protected void updateRequirementWidgets(ProgramRequirementInfo programReqInfo)

displayRules

public void displayRules()

displayRequirementSectionForGivenType

private void displayRequirementSectionForGivenType(SpanPanel requirementsPanel,
                                                   StatementTypeInfo stmtTypeInfo,
                                                   boolean firstRequirement)

addProgramRequirement

private RulePreviewWidget addProgramRequirement(SpanPanel requirementsPanel,
                                                ProgramRequirementInfo progReqInfo)

addRulePreviewWidgetHandlers

private void addRulePreviewWidgetHandlers(SpanPanel requirementsPanel,
                                          RulePreviewWidget rulePreviewWidget,
                                          String stmtTypeId,
                                          Integer internalProgReqID)

getCluSetWidgetList

public static Map<String,com.google.gwt.user.client.ui.Widget> getCluSetWidgetList(StatementTreeViewInfo rule)

findCluSetIds

private static void findCluSetIds(StatementTreeViewInfo rule,
                                  Set<String> list)

showProgramRequirementDialog

private void showProgramRequirementDialog(SpanPanel requirementsPanel,
                                          String stmtTypeId,
                                          Integer internalProgReqID)

createAddProgramReqDialog

private void createAddProgramReqDialog(KSLightBox dialog,
                                       ActionCancelGroup actionCancelButtons,
                                       Integer internalProgReqID)

createInputField

private static FieldDescriptor createInputField(String id,
                                                Metadata metadata,
                                                Map<String,Metadata> fieldDefinitionMetadata,
                                                Map<String,FieldDescriptor> fields)

showDialog

private void showDialog(KSLightBox dialog,
                        ActionCancelGroup actionCancelButtons,
                        Metadata metadata,
                        Integer internalProgReqID)

getUILabel

private String getUILabel(String id)

updateProgramInfo

private void updateProgramInfo(SpanPanel requirementsPanel,
                               String stmtTypeId,
                               Integer internalProgReqID)

getTotalCreditsString

private String getTotalCreditsString(int min,
                                     int max)

updateTotalCreditPerType

private void updateTotalCreditPerType(String stmtTypeId)

setupSaveCancelButtons

private void setupSaveCancelButtons()

generateStatementTreeId

public static String generateStatementTreeId()


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.