com.vaadin.client.connectors.grid.

Class GridConnector

    • Constructor Detail

      • GridConnector

        public GridConnector()
    • Method Detail

      • getColumnId

        public String getColumnId​(Grid.Column<?,​?> column)

        Gets the string identifier of the given column in this grid.

        Parameters:

        column - the column whose id to get

        Returns:

        the string id of the column

      • getColumn

        public ColumnConnector.CustomColumn getColumn​(String columnId)

        Gets the column corresponding to the given string identifier.

        Parameters:

        columnId - the id of the column to get

        Returns:

        the column with the given id

      • getWidget

        public Grid<elemental.json.JsonObject> getWidget()

        Description copied from class: AbstractComponentConnector

        Returns the widget associated with this paintable. The widget returned by this method must not changed during the life time of the paintable.

        Specified by:

        getWidget in interface HasWidget

        Overrides:

        getWidget in class AbstractComponentConnector

        Returns:

        The widget associated with this paintable

      • detailsRefreshed

        protected void detailsRefreshed​(boolean detailsShown)

        Method called for a row details refresh. Runs all callbacks if any details were shown and clears the callbacks.

        Parameters:

        detailsShown - True if any details were set visible

      • singleDetailsOpened

        protected void singleDetailsOpened​(int rowIndex)

        Method target for when one single details has been updated and we might need to scroll it into view.

        Parameters:

        rowIndex - index of updated row

      • init

        protected void init()

        Description copied from class: AbstractConnector

        Called when the connector has been initialized. Override this method to perform initialization of the connector.

        Overrides:

        init in class AbstractConnector

      • addColumn

        public void addColumn​(ColumnConnector.CustomColumn column,
                              String id)

        Adds a column to the Grid widget. For each column a communication id stored for client to server communication.

        Parameters:

        column - column to add

        id - communication id

      • updateColumns

        protected void updateColumns()

        Updates the widgets columns to match the map in this connector.

      • removeColumnMapping

        public void removeColumnMapping​(ColumnConnector.CustomColumn column)

        Removes the given column from mappings in this Connector.

        Parameters:

        column - column to remove from the mapping

      • onColumnRendererChanged

        public void onColumnRendererChanged​(ColumnConnector.CustomColumn column)

        Method called by CustomColumn when its renderer changes. This method is used to maintain hierarchical renderer wrap in TreeGrid.

        Parameters:

        column - the column which now has a new renderer

        Since:

        8.1

      • isWorkPending

        public boolean isWorkPending()

        Description copied from interface: DeferredWorker

        Checks whether there are operations pending for this widget or connector that must be executed before reaching a steady state.

        Specified by:

        isWorkPending in interface DeferredWorker

      • updateCaption

        public void updateCaption​(ComponentConnector connector)

        Description copied from interface: HasComponentsConnector

        Update child components caption, description and error message.

        Each component is responsible for maintaining its caption, description and error message. In most cases components doesn't want to do that and those elements reside outside of the component. Because of this layouts must provide service for it's childen to show those elements for them.

        Specified by:

        updateCaption in interface HasComponentsConnector

        Parameters:

        connector - Child component for which service is requested.

      • hasTooltip

        public boolean hasTooltip()

        Description copied from interface: ComponentConnector

        Check whether there might be a tooltip for this component. The framework will only add event listeners for automatically handling tooltips (using ComponentConnector.getTooltipInfo(Element)) if this method returns true.

        This is only done to optimize performance, so in cases where the status is not known, it's safer to return true so that there will be a tooltip handler even though it might not be needed in all cases.

        Specified by:

        hasTooltip in interface ComponentConnector

        Overrides:

        hasTooltip in class AbstractComponentConnector

        Returns:

        true if some part of the component might have a tooltip, otherwise false

      • sendContextClickEvent

        protected void sendContextClickEvent​(MouseEventDetails details,
                                             com.google.gwt.dom.client.EventTarget eventTarget)

        Description copied from class: AbstractComponentConnector

        This method sends the context menu event to the server-side. Can be overridden to provide extra information through an alternative RPC interface.

        Overrides:

        sendContextClickEvent in class AbstractComponentConnector

        Parameters:

        details - the mouse event details

        eventTarget - the target of the event