@Templated public class CollectionViewImpl extends com.google.gwt.user.client.ui.FocusWidget implements HasCloseCompositeHandler, HasSaveEditorHandler, CollectionView
Collection editor
The overall architecture is:
this widget contains a series of elements
if this widget represent a list, each element will show a single item of it, represented by a ListEditorElementViewImpl
if this widget represent a map, each element will show a single entry (key/value) of it, represented by a MapEditorElementViewImpl
PropertyEditorViewImpl represents a single property (label with name and textbox for value)
each item/key/value could be a simple java object or a complex one
for complex java object, for each property a PropertyEditorViewImpl will be created
the presenter will be responsible to choose which kind of elements are to be populated
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledCollectionView.Presenter| Modifier and Type | Field and Description |
|---|---|
protected com.google.gwt.dom.client.ButtonElement |
addItemButton |
protected com.google.gwt.dom.client.SpanElement |
addItemButtonLabel |
protected com.google.gwt.dom.client.ButtonElement |
cancelButton |
protected com.google.gwt.dom.client.ButtonElement |
closeCollectionEditorButton |
protected com.google.gwt.dom.client.SpanElement |
collectionCreationCreateLabel |
protected com.google.gwt.dom.client.SpanElement |
collectionCreationCreateSpan |
protected com.google.gwt.dom.client.SpanElement |
collectionCreationDefineLabel |
protected com.google.gwt.dom.client.SpanElement |
collectionCreationDefineSpan |
protected com.google.gwt.dom.client.LabelElement |
collectionCreationModeLabel |
protected com.google.gwt.dom.client.DivElement |
collectionEditor |
protected com.google.gwt.dom.client.DivElement |
collectionEditorModalBody |
protected com.google.gwt.dom.client.DivElement |
createCollectionContainer |
protected com.google.gwt.dom.client.InputElement |
createCollectionRadio |
protected com.google.gwt.dom.client.LabelElement |
createLabel |
protected com.google.gwt.dom.client.DivElement |
defineCollectionContainer |
protected com.google.gwt.dom.client.InputElement |
defineCollectionRadio |
protected com.google.gwt.dom.client.HeadingElement |
editorTitle |
protected com.google.gwt.dom.client.UListElement |
elementsContainer |
protected com.google.gwt.dom.client.TextAreaElement |
expressionElement |
protected com.google.gwt.dom.client.SpanElement |
faAngleRight |
protected boolean |
listWidget
Flag to indicate if this
CollectionEditorViewImpl will manage a List or a Map. |
protected CollectionPresenter |
presenter |
protected com.google.gwt.dom.client.SpanElement |
propertyTitle |
protected com.google.gwt.dom.client.ButtonElement |
removeButton |
protected com.google.gwt.dom.client.SpanElement |
removeButtonSpanText |
protected com.google.gwt.dom.client.ButtonElement |
saveButton |
protected com.google.gwt.dom.client.SpanElement |
saveButtonSpanText |
protected org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type |
scenarioType
Flag to indicate if this
CollectionEditorViewImpl is opened in DMN or RULE scenario |
protected String |
value
The json representation of the values of this editor
|
| Constructor and Description |
|---|
CollectionViewImpl() |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addCloseCompositeEventHandler(CloseCompositeEventHandler handler)
Adds a
CloseCompositeEvent handler. |
com.google.gwt.event.shared.HandlerRegistration |
addSaveEditorEventHandler(SaveEditorEventHandler handler)
Adds a
SaveEditorEvent handler. |
void |
close()
Close the current
CollectionView |
protected void |
commonInit(org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type) |
protected void |
enableCreateCollectionContainer(boolean toEnable) |
void |
enableEditingMode(boolean isEditingMode)
It enable the view to Editing Mode of the Guided collection editor
|
protected void |
ensureExpressionSyntax() |
com.google.gwt.dom.client.HeadingElement |
getEditorTitle() |
com.google.gwt.dom.client.UListElement |
getElementsContainer() |
String |
getExpression() |
com.google.gwt.dom.client.SpanElement |
getPropertyTitle() |
String |
getValue()
Actual implementations are meant to call the
Presenter to retrieve the json representation of their contents |
protected void |
initAndRegisterHandlerForExpressionTextArea()
It inits and registers the native "input" , which is not managed by GWT
|
void |
initListStructure(String key,
Map<String,String> simplePropertiesMap,
Map<String,Map<String,String>> expandablePropertiesMap,
org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
Set the name of the property and the
Map to be used to create the skeleton of the current CollectionViewImpl editor
showing a List of elements |
void |
initMapStructure(String key,
Map<String,String> keyPropertyMap,
Map<String,String> valuePropertyMap,
org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
Set the name of the property and the
Map to be used to create the skeleton of the current CollectionViewImpl editor
showing a Map of elements |
boolean |
isExpressionWidget()
Returns
true if the current instance is managing an user defined expression. |
boolean |
isListWidget()
Returns
true if the current instance will manage a List,
false for a Map. |
protected boolean |
isShown() |
void |
onAddItemButton(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onCancelButtonClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onCloseCollectionEditorButtonClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onCreateCollectionClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onDefineCollectionClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onFaAngleRightClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onRemoveButtonClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onSaveButtonClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
setExpression(String expressionValue) |
void |
setFixedHeight(double value,
com.google.gwt.dom.client.Style.Unit unit) |
void |
setValue(String jsonString)
Actual implementations are meant to call the
Presenter to be populated by this json representation |
protected void |
showAddItemButton(boolean show) |
protected void |
showCreateCollectionContainer(boolean show) |
protected void |
showDefineCollectionContainer(boolean show) |
void |
toggleRowExpansion() |
protected void |
toggleRowExpansion(boolean toExpand) |
void |
updateRowExpansionStatus(boolean isShown)
Updates the expanded status of main collection container to reflect
the status of all contained items, when they have the same expanded status
|
void |
updateValue(String value)
Updates the json representation of the values shown by this editor
|
addBlurHandler, addClickHandler, addClickListener, addDoubleClickHandler, addDragEndHandler, addDragEnterHandler, addDragHandler, addDragLeaveHandler, addDragOverHandler, addDragStartHandler, addDropHandler, addFocusHandler, addFocusListener, addGestureChangeHandler, addGestureEndHandler, addGestureStartHandler, addKeyboardListener, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addMouseDownHandler, addMouseListener, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler, addMouseWheelListener, addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler, getFocusImpl, getTabIndex, isEnabled, onAttach, removeClickListener, removeFocusListener, removeKeyboardListener, removeMouseListener, removeMouseWheelListener, setAccessKey, setEnabled, setFocus, setTabIndexaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString@Inject protected CollectionPresenter presenter
@DataField(value="collectionEditor") protected com.google.gwt.dom.client.DivElement collectionEditor
@DataField(value="collectionEditorModalBody") protected com.google.gwt.dom.client.DivElement collectionEditorModalBody
@DataField(value="elementsContainer") protected com.google.gwt.dom.client.UListElement elementsContainer
@DataField(value="closeCollectionEditorButton") protected com.google.gwt.dom.client.ButtonElement closeCollectionEditorButton
@DataField(value="createCollectionRadio") protected com.google.gwt.dom.client.InputElement createCollectionRadio
@DataField(value="defineCollectionRadio") protected com.google.gwt.dom.client.InputElement defineCollectionRadio
@DataField(value="cancelButton") protected com.google.gwt.dom.client.ButtonElement cancelButton
@DataField(value="removeButton") protected com.google.gwt.dom.client.ButtonElement removeButton
@DataField(value="removeButtonSpanText") protected com.google.gwt.dom.client.SpanElement removeButtonSpanText
@DataField(value="saveButton") protected com.google.gwt.dom.client.ButtonElement saveButton
@DataField(value="saveButtonSpanText") protected com.google.gwt.dom.client.SpanElement saveButtonSpanText
@DataField(value="addItemButton") protected com.google.gwt.dom.client.ButtonElement addItemButton
@DataField(value="editorTitle") protected com.google.gwt.dom.client.HeadingElement editorTitle
@DataField(value="faAngleRight") protected com.google.gwt.dom.client.SpanElement faAngleRight
@DataField(value="propertyTitle") protected com.google.gwt.dom.client.SpanElement propertyTitle
@DataField(value="defineCollectionContainer") protected com.google.gwt.dom.client.DivElement defineCollectionContainer
@DataField(value="createCollectionContainer") protected com.google.gwt.dom.client.DivElement createCollectionContainer
@DataField(value="addItemButtonLabel") protected com.google.gwt.dom.client.SpanElement addItemButtonLabel
@DataField(value="createLabel") protected com.google.gwt.dom.client.LabelElement createLabel
@DataField(value="collectionCreationModeLabel") protected com.google.gwt.dom.client.LabelElement collectionCreationModeLabel
@DataField(value="collectionCreationCreateLabel") protected com.google.gwt.dom.client.SpanElement collectionCreationCreateLabel
@DataField(value="collectionCreationCreateSpan") protected com.google.gwt.dom.client.SpanElement collectionCreationCreateSpan
@DataField(value="collectionCreationDefineLabel") protected com.google.gwt.dom.client.SpanElement collectionCreationDefineLabel
@DataField(value="collectionCreationDefineSpan") protected com.google.gwt.dom.client.SpanElement collectionCreationDefineSpan
@DataField(value="expressionElement") protected com.google.gwt.dom.client.TextAreaElement expressionElement
protected boolean listWidget
CollectionEditorViewImpl will manage a List or a Map.protected org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type scenarioType
CollectionEditorViewImpl is opened in DMN or RULE scenarioprotected String value
public void initListStructure(String key, Map<String,String> simplePropertiesMap, Map<String,Map<String,String>> expandablePropertiesMap, org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
Map to be used to create the skeleton of the current CollectionViewImpl editor
showing a List of elementsinitListStructure in interface CollectionViewkey - The key representing the property, i.e Classname#propertyname (e.g Author#books)simplePropertiesMap - expandablePropertiesMap - type - public void initMapStructure(String key, Map<String,String> keyPropertyMap, Map<String,String> valuePropertyMap, org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
Map to be used to create the skeleton of the current CollectionViewImpl editor
showing a Map of elementsinitMapStructure in interface CollectionViewkey - The key representing the property, i.e Classname#propertyname (e.g Author#books)keyPropertyMap - valuePropertyMap - type - protected void commonInit(org.drools.scenariosimulation.api.model.ScenarioSimulationModel.Type type)
protected void initAndRegisterHandlerForExpressionTextArea()
public com.google.gwt.event.shared.HandlerRegistration addCloseCompositeEventHandler(CloseCompositeEventHandler handler)
HasCloseCompositeHandlerCloseCompositeEvent handler.addCloseCompositeEventHandler in interface HasCloseCompositeHandlerhandler - the handlerHandlerRegistration used to remove this handlerpublic com.google.gwt.event.shared.HandlerRegistration addSaveEditorEventHandler(SaveEditorEventHandler handler)
HasSaveEditorHandlerSaveEditorEvent handler.addSaveEditorEventHandler in interface HasSaveEditorHandlerhandler - the handlerHandlerRegistration used to remove this handlerpublic String getValue()
CollectionViewPresenter to retrieve the json representation of their contentsgetValue in interface CollectionViewpublic void setValue(String jsonString)
CollectionViewPresenter to be populated by this json representationsetValue in interface CollectionViewpublic boolean isExpressionWidget()
CollectionViewtrue if the current instance is managing an user defined expression.isExpressionWidget in interface CollectionViewpublic boolean isListWidget()
CollectionViewtrue if the current instance will manage a List,
false for a Map.isListWidget in interface CollectionViewpublic com.google.gwt.dom.client.UListElement getElementsContainer()
getElementsContainer in interface CollectionViewpublic com.google.gwt.dom.client.HeadingElement getEditorTitle()
getEditorTitle in interface CollectionViewpublic com.google.gwt.dom.client.SpanElement getPropertyTitle()
getPropertyTitle in interface CollectionViewpublic String getExpression()
getExpression in interface CollectionViewpublic void setExpression(String expressionValue)
setExpression in interface CollectionView@EventHandler(value="createCollectionRadio") public void onCreateCollectionClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="defineCollectionRadio") public void onDefineCollectionClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
protected void enableCreateCollectionContainer(boolean toEnable)
@EventHandler(value="closeCollectionEditorButton") public void onCloseCollectionEditorButtonClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="cancelButton") public void onCancelButtonClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="removeButton") public void onRemoveButtonClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="saveButton") public void onSaveButtonClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="addItemButton") public void onAddItemButton(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="faAngleRight") public void onFaAngleRightClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
public void toggleRowExpansion()
toggleRowExpansion in interface CollectionViewpublic void updateRowExpansionStatus(boolean isShown)
CollectionViewupdateRowExpansionStatus in interface CollectionViewisShown - the current expansion status of the collectionpublic void updateValue(String value)
CollectionViewupdateValue in interface CollectionViewpublic void close()
CollectionViewCollectionViewclose in interface CollectionViewpublic void setFixedHeight(double value,
com.google.gwt.dom.client.Style.Unit unit)
setFixedHeight in interface CollectionViewpublic void enableEditingMode(boolean isEditingMode)
CollectionViewenableEditingMode in interface CollectionViewprotected boolean isShown()
protected void toggleRowExpansion(boolean toExpand)
protected void ensureExpressionSyntax()
protected void showCreateCollectionContainer(boolean show)
protected void showDefineCollectionContainer(boolean show)
protected void showAddItemButton(boolean show)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.