public class PropertyPresenter extends Object implements PropertyView.Presenter
Modifier and Type | Field and Description |
---|---|
protected Map<String,com.google.gwt.dom.client.SpanElement> |
propertySpanElementMap
Map to pair a given property with the SpanElement showing its value |
protected Map<String,List<PropertyView>> |
propertyViewMap
Map to pair a given itemId with its PropertyEditorView s |
protected ViewsProvider |
viewsProvider |
Constructor and Description |
---|
PropertyPresenter() |
Modifier and Type | Method and Description |
---|---|
void |
deleteProperties(String itemId)
Remove all the properties belonging to the given baseNodeId from both
DOM and internal Map |
protected void |
deletePropertyView(PropertyView toDelete) |
void |
editProperties(String itemId)
Show the
InputElement s to edit the properties shown at the given baseNodeId and hide their SpanElement s |
com.google.gwt.dom.client.LIElement |
getEditingPropertyFields(String itemId,
String propertyName,
String propertyValue) |
com.google.gwt.dom.client.LIElement |
getPropertyFields(String itemId,
String propertyName,
String propertyValue) |
String |
getPropertyValue(String propertyName)
Get the text shown in the property value
|
Map<String,String> |
getSimpleProperties(String itemId)
Retrieve the simple properties shown at the given itemId
|
void |
onToggleRowExpansion(String itemId,
boolean isShown) |
protected void |
startEditPropertyView(PropertyView toEdit)
Enable editing a property
|
protected Map<String,String> |
stopEdit(String itemId,
boolean toUpdate) |
void |
stopEditProperties(String itemId)
Show the
SpanElement s of the properties shown at the given baseNodeId without change their values, and and hide their InputElement s |
protected void |
stopEditPropertyView(Map<String,String> toPopulate,
PropertyView toStopEdit,
boolean toUpdate)
Disable editing a property and put its value in given
Map |
Map<String,String> |
updateProperties(String itemId)
Show the
SpanElement s of the properties shown at the given baseNodeId with the value of their InputElement s, and hide the latters |
@Inject protected ViewsProvider viewsProvider
protected Map<String,com.google.gwt.dom.client.SpanElement> propertySpanElementMap
Map
to pair a given property with the SpanElement
showing its valueprotected Map<String,List<PropertyView>> propertyViewMap
Map
to pair a given itemId with its PropertyEditorView
spublic String getPropertyValue(String propertyName) throws Exception
PropertyView.Presenter
getPropertyValue
in interface PropertyView.Presenter
propertyName
- the property fro which we are retrieving the valueException
- if the given property value is not foundpublic void editProperties(String itemId)
PropertyView.Presenter
InputElement
s to edit the properties shown at the given baseNodeId and hide their SpanElement
seditProperties
in interface PropertyView.Presenter
itemId
- the id of the item containing the LIElement
public void stopEditProperties(String itemId)
PropertyView.Presenter
SpanElement
s of the properties shown at the given baseNodeId without change their values, and and hide their InputElement
sstopEditProperties
in interface PropertyView.Presenter
itemId
- the id of the item containing the LIElement
public Map<String,String> updateProperties(String itemId)
PropertyView.Presenter
SpanElement
s of the properties shown at the given baseNodeId with the value of their InputElement
s, and hide the lattersupdateProperties
in interface PropertyView.Presenter
itemId
- the id of the item containing the LIElement
public Map<String,String> getSimpleProperties(String itemId)
PropertyView.Presenter
getSimpleProperties
in interface PropertyView.Presenter
itemId
- the id of the item containing the LIElement
public com.google.gwt.dom.client.LIElement getPropertyFields(String itemId, String propertyName, String propertyValue)
getPropertyFields
in interface PropertyView.Presenter
itemId
- the id of the item containing the LIElement
LIElement
containing the property' fieldspublic com.google.gwt.dom.client.LIElement getEditingPropertyFields(String itemId, String propertyName, String propertyValue)
getEditingPropertyFields
in interface PropertyView.Presenter
itemId
- the id of the item containing the LIElement
LIElement
containing the property' fields in editing modepublic void onToggleRowExpansion(String itemId, boolean isShown)
onToggleRowExpansion
in interface PropertyView.Presenter
itemId
- the id of the item containing the LIElement
isShown
- true
it the item is currently shownpublic void deleteProperties(String itemId)
PropertyView.Presenter
DOM
and internal Map
deleteProperties
in interface PropertyView.Presenter
itemId
- the id of the item containing the LIElement
protected void startEditPropertyView(PropertyView toEdit)
toEdit
- protected void stopEditPropertyView(Map<String,String> toPopulate, PropertyView toStopEdit, boolean toUpdate)
Map
toPopulate
- toStopEdit
- toUpdate
- protected void deletePropertyView(PropertyView toDelete)
Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.