org.kuali.student.common.ui.client.configurable.mvc.multiplicity
Class MultiplicityGroup

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.Composite
              extended by org.kuali.student.common.ui.client.configurable.mvc.multiplicity.MultiplicityGroup
All Implemented Interfaces:
com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener

public class MultiplicityGroup
extends com.google.gwt.user.client.ui.Composite


Nested Class Summary
 class MultiplicityGroup.ConditionChoices
           
 class MultiplicityGroup.SwappableFieldsHelper
           
 
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  MultiplicityConfiguration config
           
private  List<String> deletionParentKeys
           
private  boolean isDirty
           
private  int itemCount
           
private  List<MultiplicityGroupItem> items
           
private  com.google.gwt.user.client.ui.FlowPanel itemsPanel
           
private  boolean loaded
           
private  com.google.gwt.user.client.ui.FlowPanel mainPanel
           
private  String parentPath
           
protected  Callback<MultiplicityGroupItem> removeCallback
           
private  List<MultiplicityGroupItem> removed
           
private  Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
MultiplicityGroup()
           
MultiplicityGroup(MultiplicityConfiguration config)
          Creates an instance of a MultiplicityGroup based on the options in the MultiplicityConfiguration A MultiplicityGroup uses GroupSection to display data in a variable grid.
MultiplicityGroup(MultiplicityConfiguration config, Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition, List<String> deletionParentKeys)
           
 
Method Summary
 void clear()
           
 MultiplicityConfiguration configSwappableMultiplicitySection(MultiplicityConfiguration origConfig)
           
 MultiplicityGroupItem createItem()
          This adds an empty item to the multiplicity group
private  com.google.gwt.user.client.ui.Widget createWidget()
           
private  com.google.gwt.user.client.ui.Widget generateAddWidget()
           
 int getAddItemKey()
          This returns the index key for the model for the item currently being added by addItem This is useful, if you need to refer to the index in the createItem method
 MultiplicityConfiguration getConfig()
           
 int getItemCount()
           
 List<MultiplicityGroupItem> getItems()
           
 com.google.gwt.user.client.ui.FlowPanel getItemsPanel()
           
 String getParentPath()
           
 List<MultiplicityGroupItem> getRemovedItems()
           
 void incrementItemKey()
           
 boolean isDirty()
           
 void onLoad()
           
 void redraw()
           
 void resetDirtyFlags()
           
 void setConfig(MultiplicityConfiguration config)
           
 void setIsDirty(boolean dirty)
           
 void setItemCount(int itemCount)
           
 void setParentPath(String parentPath)
          Allows the parentpath for this instance to be set, e.g.
 String translatePath(String path)
           
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, 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, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

config

private MultiplicityConfiguration config

items

private List<MultiplicityGroupItem> items

removed

private List<MultiplicityGroupItem> removed

mainPanel

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

itemsPanel

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

loaded

private boolean loaded

itemCount

private int itemCount

parentPath

private String parentPath

isDirty

private boolean isDirty

swappableFieldsDefinition

private Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition

deletionParentKeys

private List<String> deletionParentKeys

removeCallback

protected Callback<MultiplicityGroupItem> removeCallback
Constructor Detail

MultiplicityGroup

public MultiplicityGroup()

MultiplicityGroup

public MultiplicityGroup(MultiplicityConfiguration config,
                         Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition,
                         List<String> deletionParentKeys)

MultiplicityGroup

public MultiplicityGroup(MultiplicityConfiguration config)
Creates an instance of a MultiplicityGroup based on the options in the MultiplicityConfiguration A MultiplicityGroup uses GroupSection to display data in a variable grid. May be multiple rows and multiple fields per row based on the defs in the MultiplicityConfiguration. May contain one or more MultiplicityItemSections based on user action, dictionary defs or data found in the model.

Parameters:
config -
Method Detail

onLoad

public void onLoad()
Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget

generateAddWidget

private com.google.gwt.user.client.ui.Widget generateAddWidget()

createItem

public MultiplicityGroupItem createItem()
This adds an empty item to the multiplicity group

Returns:

getItemsPanel

public com.google.gwt.user.client.ui.FlowPanel getItemsPanel()

createWidget

private com.google.gwt.user.client.ui.Widget createWidget()

configSwappableMultiplicitySection

public MultiplicityConfiguration configSwappableMultiplicitySection(MultiplicityConfiguration origConfig)

translatePath

public String translatePath(String path)

clear

public void clear()

redraw

public void redraw()

incrementItemKey

public void incrementItemKey()

getAddItemKey

public int getAddItemKey()
This returns the index key for the model for the item currently being added by addItem This is useful, if you need to refer to the index in the createItem method

Returns:

getItems

public List<MultiplicityGroupItem> getItems()

getRemovedItems

public List<MultiplicityGroupItem> getRemovedItems()

getItemCount

public int getItemCount()

setItemCount

public void setItemCount(int itemCount)

getParentPath

public String getParentPath()

setParentPath

public void setParentPath(String parentPath)
Allows the parentpath for this instance to be set, e.g. course/formats/0/activities

Parameters:
parentPath -

getConfig

public MultiplicityConfiguration getConfig()

setConfig

public void setConfig(MultiplicityConfiguration config)

resetDirtyFlags

public void resetDirtyFlags()

isDirty

public boolean isDirty()

setIsDirty

public void setIsDirty(boolean dirty)


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