Class ItemElementPresenter
- java.lang.Object
-
- org.drools.workbench.screens.scenariosimulation.client.collectioneditor.ElementPresenter<ItemElementView>
-
- org.drools.workbench.screens.scenariosimulation.client.collectioneditor.ItemElementPresenter
-
- All Implemented Interfaces:
ElementView.Presenter<ItemElementView>,ItemElementView.Presenter
public class ItemElementPresenter extends ElementPresenter<ItemElementView> implements ItemElementView.Presenter
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,List<String>>itemIdExpandablePropertiesMapThisMapis used to map all the expandable properties names of a given itemId-
Fields inherited from class org.drools.workbench.screens.scenariosimulation.client.collectioneditor.ElementPresenter
collectionEditorPresenter, elementViewList, propertyPresenter, viewsProvider
-
-
Constructor Summary
Constructors Constructor Description ItemElementPresenter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddExpandableItemElementView(ItemElementView containerItemElementView, Map<String,String> propertiesMap, String expandablePropertyName)protected StringgenerateExpandableItemElementID(ItemElementView itemElementView, String expandablePropertyName)Map<String,Map<String,Map<String,String>>>getExpandableItemsProperties()Retrieves aMapwith theMaps of all the items' nested propertiescom.google.gwt.dom.client.LIElementgetItemContainer(String itemId, Map<String,String> simplePropertiesMap, Map<String,Map<String,String>> expandablePropertiesValues)Map<String,Map<String,String>>getSimpleItemsProperties()Retrieves aMapwith theMaps of all the items' simple propertiesvoidonDeleteItem(ItemElementView itemElementView)Delete the item and its properties shown on the givenitemElementViewvoidonEditItem(ItemElementView itemElementView)Start editing properties of the givenitemElementViewvoidonStopEditingItem(ItemElementView itemElementView)Stop editing properties of the givenitemElementViewwithout updating the propertiesvoidonToggleRowExpansion(ItemElementView itemElementView, boolean isShown)voidupdateItem(ItemElementView itemElementView)Update the values of the properties shown in the givenitemElementViewand stop the editing mode-
Methods inherited from class org.drools.workbench.screens.scenariosimulation.client.collectioneditor.ElementPresenter
onToggleRowExpansion, remove, setCollectionEditorPresenter, toggleEditingStatus, updateCommonToggleStatus
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.drools.workbench.screens.scenariosimulation.client.collectioneditor.ElementView.Presenter
onToggleRowExpansion, remove, setCollectionEditorPresenter, toggleEditingStatus, updateCommonToggleStatus
-
-
-
-
Method Detail
-
getItemContainer
public com.google.gwt.dom.client.LIElement getItemContainer(String itemId, Map<String,String> simplePropertiesMap, Map<String,Map<String,String>> expandablePropertiesValues)
- Specified by:
getItemContainerin interfaceItemElementView.Presenter- Parameters:
itemId- the id of the current itemsimplePropertiesMap- the properties to be put inside theUListElementexpandablePropertiesValues- representing a single item of the list- Returns:
- the
LIElementrepresenting all the items of the list
-
onToggleRowExpansion
public void onToggleRowExpansion(ItemElementView itemElementView, boolean isShown)
- Specified by:
onToggleRowExpansionin interfaceElementView.Presenter<ItemElementView>
-
onEditItem
public void onEditItem(ItemElementView itemElementView)
Description copied from interface:ElementView.PresenterStart editing properties of the givenitemElementView- Specified by:
onEditItemin interfaceElementView.Presenter<ItemElementView>
-
onStopEditingItem
public void onStopEditingItem(ItemElementView itemElementView)
Description copied from interface:ElementView.PresenterStop editing properties of the givenitemElementViewwithout updating the properties- Specified by:
onStopEditingItemin interfaceElementView.Presenter<ItemElementView>
-
updateItem
public void updateItem(ItemElementView itemElementView)
Description copied from interface:ElementView.PresenterUpdate the values of the properties shown in the givenitemElementViewand stop the editing mode- Specified by:
updateItemin interfaceElementView.Presenter<ItemElementView>
-
onDeleteItem
public void onDeleteItem(ItemElementView itemElementView)
Description copied from interface:ElementView.PresenterDelete the item and its properties shown on the givenitemElementView- Specified by:
onDeleteItemin interfaceElementView.Presenter<ItemElementView>
-
getSimpleItemsProperties
public Map<String,Map<String,String>> getSimpleItemsProperties()
Description copied from interface:ItemElementView.PresenterRetrieves aMapwith theMaps of all the items' simple properties- Specified by:
getSimpleItemsPropertiesin interfaceItemElementView.Presenter- Returns:
- a
Mapwhere the key is the itemId of the item container, and the value is the map propertyName/propertyValue
-
getExpandableItemsProperties
public Map<String,Map<String,Map<String,String>>> getExpandableItemsProperties()
Description copied from interface:ItemElementView.PresenterRetrieves aMapwith theMaps of all the items' nested properties- Specified by:
getExpandableItemsPropertiesin interfaceItemElementView.Presenter- Returns:
- a
Mapwhere the key is the itemId of the item container, and the value is the map of nested properties
-
addExpandableItemElementView
protected void addExpandableItemElementView(ItemElementView containerItemElementView, Map<String,String> propertiesMap, String expandablePropertyName)
-
generateExpandableItemElementID
protected String generateExpandableItemElementID(ItemElementView itemElementView, String expandablePropertyName)
-
-