@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.ButtonElement |
cancelButton |
protected com.google.gwt.dom.client.ButtonElement |
closeCollectionEditorButton |
protected com.google.gwt.dom.client.DivElement |
collectionEditor |
protected com.google.gwt.dom.client.DivElement |
collectionEditorModalBody |
protected com.google.gwt.dom.client.DivElement |
collectionEditorModalDialog |
protected com.google.gwt.dom.client.HeadingElement |
editorTitle |
protected com.google.gwt.dom.client.UListElement |
elementsContainer |
protected com.google.gwt.dom.client.SpanElement |
faAngleRight |
protected double |
left |
protected com.google.gwt.dom.client.Style.Unit |
leftUnit |
protected boolean |
listWidget
Flag to indicate if this
CollectionEditorViewImpl will manage a List or a Map. |
protected com.google.gwt.dom.client.LIElement |
objectSeparator |
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.ButtonElement |
saveButton |
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 |
com.google.gwt.dom.client.ButtonElement |
getAddItemButton() |
com.google.gwt.dom.client.ButtonElement |
getCancelButton() |
com.google.gwt.dom.client.HeadingElement |
getEditorTitle() |
com.google.gwt.dom.client.UListElement |
getElementsContainer() |
com.google.gwt.dom.client.LIElement |
getObjectSeparator() |
com.google.gwt.dom.client.SpanElement |
getPropertyTitle() |
com.google.gwt.dom.client.ButtonElement |
getRemoveButton() |
com.google.gwt.dom.client.ButtonElement |
getSaveButton() |
String |
getValue()
Actual implementations are meant to call the
Presenter to retrieve the json representation of their contents |
void |
initListStructure(String key,
Map<String,String> simplePropertiesMap,
Map<String,Map<String,String>> expandablePropertiesMap)
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)
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 |
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 |
onCollectionEditorClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onCollectionEditorModalDialogClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onEditorTitleClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onElementsContainerClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onFaAngleRightClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onObjectSeparatorClick(com.google.gwt.event.dom.client.ClickEvent clickEvent) |
void |
onPropertyTitleClick(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 |
setFixedHeight(double value,
com.google.gwt.dom.client.Style.Unit unit) |
void |
setListWidget(boolean listWidget) |
void |
setValue(String jsonString)
Actual implementations are meant to call the
Presenter to be populated by this json representation |
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="collectionEditorModalDialog") protected com.google.gwt.dom.client.DivElement collectionEditorModalDialog
@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="objectSeparator") protected com.google.gwt.dom.client.LIElement objectSeparator
@DataField(value="cancelButton") protected com.google.gwt.dom.client.ButtonElement cancelButton
@DataField(value="removeButton") protected com.google.gwt.dom.client.ButtonElement removeButton
@DataField(value="saveButton") protected com.google.gwt.dom.client.ButtonElement saveButton
@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
protected boolean listWidget
CollectionEditorViewImpl will manage a List or a Map.protected String value
protected double left
protected com.google.gwt.dom.client.Style.Unit leftUnit
public void setListWidget(boolean listWidget)
setListWidget in interface CollectionViewlistWidget - set to true if the current instance will manage a List,
false for a Map.public void initListStructure(String key, Map<String,String> simplePropertiesMap, Map<String,Map<String,String>> expandablePropertiesMap)
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 - public void initMapStructure(String key, Map<String,String> keyPropertyMap, Map<String,String> valuePropertyMap)
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 - 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 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.LIElement getObjectSeparator()
getObjectSeparator 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 com.google.gwt.dom.client.ButtonElement getAddItemButton()
getAddItemButton in interface CollectionViewpublic com.google.gwt.dom.client.ButtonElement getCancelButton()
getCancelButton in interface CollectionViewpublic com.google.gwt.dom.client.ButtonElement getRemoveButton()
getRemoveButton in interface CollectionViewpublic com.google.gwt.dom.client.ButtonElement getSaveButton()
getSaveButton in interface CollectionView@EventHandler(value="collectionEditor") public void onCollectionEditorClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="collectionEditorModalDialog") public void onCollectionEditorModalDialogClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="editorTitle") public void onEditorTitleClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="elementsContainer") public void onElementsContainerClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@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)
@EventHandler(value="propertyTitle") public void onPropertyTitleClick(com.google.gwt.event.dom.client.ClickEvent clickEvent)
@EventHandler(value="objectSeparator") public void onObjectSeparatorClick(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 CollectionViewprotected boolean isShown()
protected void toggleRowExpansion(boolean toExpand)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.