Class ListGroupItemPresenter
- java.lang.Object
-
- org.drools.workbench.screens.scenariosimulation.client.rightpanel.ListGroupItemPresenter
-
- All Implemented Interfaces:
ListGroupItemView.Presenter
@Dependent public class ListGroupItemPresenter extends Object implements ListGroupItemView.Presenter
-
-
Field Summary
Fields Modifier and Type Field Description protected FieldItemPresenterfieldItemPresenterprotected Map<String,ListGroupItemView>listGroupItemViewMapprotected TestToolsView.PresentertestToolsPresenterprotected ViewsProviderviewsProvider
-
Constructor Summary
Constructors Constructor Description ListGroupItemPresenter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ListGroupItemViewcommonGetListGroupItemView(List<String> parentPath, String factName, boolean toExpand)voiddisable()voidenable()Use this when click on grid' instance header.voidenable(String filterTerm)Use this when click on grid' instance header.com.google.gwt.dom.client.DivElementgetDivElement(String factName, org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree factModelTree)This method returns a top-levelDivElementrepresenting a complex (i.e. expandable) property, i.e. a class containing other propertiescom.google.gwt.dom.client.DivElementgetDivElement(List<String> fullPath, String factName, String factModelTreeClass)This method returns a nestedDivElementrepresenting a complex (i.e. expandable) property, i.e. a class containing other propertiesStringgetFilterTerm()voidhideProperty(String factName, List<String> propertyParts)Hide the node of the given propertyvoidinit(TestToolsView.Presenter testToolsPresenter)booleanisInstanceAssigned(String factName)voidonSelectedElement(FieldItemView selected)Method to set the "selected" information - use this to set the property level headervoidonSelectedElement(ListGroupItemView selected)Method to set the "selected" information - use this to set the instance level headervoidonToggleRowExpansion(ListGroupItemView listGroupItemView, boolean currentlyShown)protected voidpopulateListGroupItemView(ListGroupItemView toPopulate, String factName, String factType)Set the property' name (factName) and type (factModelTreeClass) of a givenListGroupItemViewprotected voidpopulateListGroupItemView(ListGroupItemView toPopulate, List<String> parentPath, String factName, org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree factModelTree)Populate the "Assets" list.voidreset()voidselectProperty(String factName, List<String> propertyParts)Expand the node and select the given propertyvoidsetInstanceAssigned(String factName, boolean assigned)voidshowAll()voidunselectAll()
-
-
-
Field Detail
-
viewsProvider
@Inject protected ViewsProvider viewsProvider
-
fieldItemPresenter
@Inject protected FieldItemPresenter fieldItemPresenter
-
testToolsPresenter
protected TestToolsView.Presenter testToolsPresenter
-
listGroupItemViewMap
protected Map<String,ListGroupItemView> listGroupItemViewMap
-
-
Method Detail
-
enable
public void enable()
Description copied from interface:ListGroupItemView.PresenterUse this when click on grid' instance header. Call this method to show all the first-level data models enabled (i.e. double-clickable to map to an instance header/column) and their properties disabled (i.e. not double-clickable)- Specified by:
enablein interfaceListGroupItemView.Presenter
-
enable
public void enable(String filterTerm)
Description copied from interface:ListGroupItemView.PresenterUse this when click on grid' instance header. Call this method to show all the first-level data models enabled (i.e. double-clickable to map to an instance header/column) and their properties disabled (i.e. not double-clickable)- Specified by:
enablein interfaceListGroupItemView.Presenter
-
unselectAll
public void unselectAll()
- Specified by:
unselectAllin interfaceListGroupItemView.Presenter
-
showAll
public void showAll()
- Specified by:
showAllin interfaceListGroupItemView.Presenter
-
selectProperty
public void selectProperty(String factName, List<String> propertyParts)
Description copied from interface:ListGroupItemView.PresenterExpand the node and select the given property- Specified by:
selectPropertyin interfaceListGroupItemView.Presenter
-
hideProperty
public void hideProperty(String factName, List<String> propertyParts)
Description copied from interface:ListGroupItemView.PresenterHide the node of the given property- Specified by:
hidePropertyin interfaceListGroupItemView.Presenter
-
isInstanceAssigned
public boolean isInstanceAssigned(String factName)
- Specified by:
isInstanceAssignedin interfaceListGroupItemView.Presenter
-
setInstanceAssigned
public void setInstanceAssigned(String factName, boolean assigned)
- Specified by:
setInstanceAssignedin interfaceListGroupItemView.Presenter
-
disable
public void disable()
- Specified by:
disablein interfaceListGroupItemView.Presenter
-
init
public void init(TestToolsView.Presenter testToolsPresenter)
- Specified by:
initin interfaceListGroupItemView.Presenter
-
getDivElement
public com.google.gwt.dom.client.DivElement getDivElement(String factName, org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree factModelTree)
Description copied from interface:ListGroupItemView.PresenterThis method returns a top-levelDivElementrepresenting a complex (i.e. expandable) property, i.e. a class containing other properties- Specified by:
getDivElementin interfaceListGroupItemView.Presenter
-
getDivElement
public com.google.gwt.dom.client.DivElement getDivElement(List<String> fullPath, String factName, String factModelTreeClass)
Description copied from interface:ListGroupItemView.PresenterThis method returns a nestedDivElementrepresenting a complex (i.e. expandable) property, i.e. a class containing other properties- Specified by:
getDivElementin interfaceListGroupItemView.Presenter- Parameters:
fullPath- the parent pathfactName- the property' namefactModelTreeClass- the property' type
-
onToggleRowExpansion
public void onToggleRowExpansion(ListGroupItemView listGroupItemView, boolean currentlyShown)
- Specified by:
onToggleRowExpansionin interfaceListGroupItemView.Presenter
-
onSelectedElement
public void onSelectedElement(ListGroupItemView selected)
Description copied from interface:ListGroupItemView.PresenterMethod to set the "selected" information - use this to set the instance level header- Specified by:
onSelectedElementin interfaceListGroupItemView.Presenter
-
onSelectedElement
public void onSelectedElement(FieldItemView selected)
Description copied from interface:ListGroupItemView.PresenterMethod to set the "selected" information - use this to set the property level header- Specified by:
onSelectedElementin interfaceListGroupItemView.Presenter
-
reset
public void reset()
- Specified by:
resetin interfaceListGroupItemView.Presenter
-
getFilterTerm
public String getFilterTerm()
- Specified by:
getFilterTermin interfaceListGroupItemView.Presenter
-
populateListGroupItemView
protected void populateListGroupItemView(ListGroupItemView toPopulate, List<String> parentPath, String factName, org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree factModelTree)
Populate the "Assets" list. When- Parameters:
toPopulate-parentPath-factName-factModelTree- theFactModelTreewith all properties of a given type
-
populateListGroupItemView
protected void populateListGroupItemView(ListGroupItemView toPopulate, String factName, String factType)
Set the property' name (factName) and type (factModelTreeClass) of a givenListGroupItemView- Parameters:
toPopulate-factName- the property' namefactType- the property' type
-
commonGetListGroupItemView
protected ListGroupItemView commonGetListGroupItemView(List<String> parentPath, String factName, boolean toExpand)
- Parameters:
parentPath- the parent' path - empty for top-level elementsfactName-toExpand- Iftrue, ononToggleRowExpansion(ListGroupItemView, boolean)inner properties will be populated- Returns:
-
-