Class PropertyPresenter

    • Field Detail

      • propertySpanElementMap

        protected Map<String,​com.google.gwt.dom.client.SpanElement> propertySpanElementMap
        Map to pair a given property with the SpanElement showing its value
      • propertyViewMap

        protected Map<String,​List<PropertyView>> propertyViewMap
        Map to pair a given itemId with its PropertyEditorViews
    • Constructor Detail

      • PropertyPresenter

        public PropertyPresenter()
    • Method Detail

      • editProperties

        public void editProperties​(String itemId)
        Description copied from interface: PropertyView.Presenter
        Show the InputElements to edit the properties shown at the given baseNodeId and hide their SpanElements
        Specified by:
        editProperties in interface PropertyView.Presenter
        Parameters:
        itemId - the id of the item containing the LIElement
      • stopEditProperties

        public void stopEditProperties​(String itemId)
        Description copied from interface: PropertyView.Presenter
        Show the SpanElements of the properties shown at the given baseNodeId without change their values, and and hide their InputElements
        Specified by:
        stopEditProperties in interface PropertyView.Presenter
        Parameters:
        itemId - the id of the item containing the LIElement
      • updateProperties

        public Map<String,​String> updateProperties​(String itemId)
        Description copied from interface: PropertyView.Presenter
        Show the SpanElements of the properties shown at the given baseNodeId with the value of their InputElements, and hide the latters
        Specified by:
        updateProperties in interface PropertyView.Presenter
        Parameters:
        itemId - the id of the item containing the LIElement
        Returns:
        the map with updated values
      • getPropertyFields

        public com.google.gwt.dom.client.LIElement getPropertyFields​(String itemId,
                                                                     String propertyName,
                                                                     String propertyValue)
        Specified by:
        getPropertyFields in interface PropertyView.Presenter
        Parameters:
        itemId - the id of the item containing the LIElement
        Returns:
        the LIElement containing the property' fields
      • getEditingPropertyFields

        public com.google.gwt.dom.client.LIElement getEditingPropertyFields​(String itemId,
                                                                            String propertyName,
                                                                            String propertyValue)
        Specified by:
        getEditingPropertyFields in interface PropertyView.Presenter
        Parameters:
        itemId - the id of the item containing the LIElement
        Returns:
        the LIElement containing the property' fields in editing mode
      • onToggleRowExpansion

        public void onToggleRowExpansion​(String itemId,
                                         boolean isShown)
        Specified by:
        onToggleRowExpansion in interface PropertyView.Presenter
        Parameters:
        itemId - the id of the item containing the LIElement
        isShown - true it the item is currently shown
      • deleteProperties

        public void deleteProperties​(String itemId)
        Description copied from interface: PropertyView.Presenter
        Remove all the properties belonging to the given baseNodeId from both DOM and internal Map
        Specified by:
        deleteProperties in interface PropertyView.Presenter
        Parameters:
        itemId - the id of the item containing the LIElement
      • startEditPropertyView

        protected void startEditPropertyView​(PropertyView toEdit)
        Enable editing a property
        Parameters:
        toEdit -
      • stopEditPropertyView

        protected void stopEditPropertyView​(Map<String,​String> toPopulate,
                                            PropertyView toStopEdit,
                                            boolean toUpdate)
        Disable editing a property and put its value in given Map
        Parameters:
        toPopulate -
        toStopEdit -
        toUpdate -
      • deletePropertyView

        protected void deletePropertyView​(PropertyView toDelete)