org.kuali.student.common.ui.client.configurable.mvc.multiplicity
Class MultiplicityGroup
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Composite
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 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 |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
DEBUG_ID_PREFIX |
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 |
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
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
-
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.