/** * Add this extension to the target component. * * @param target * the component to attach this extension to */ public void extend(AbstractComponent target) { super.extend(target); }
@Override protected AbstractRendererState getState(boolean markAsDirty) { return (AbstractRendererState) super.getState(markAsDirty); } }
/** * Actually sets the parent and calls required listeners. * * @since 7.1 * @param parent * The parent to set */ private void internalSetParent(ClientConnector parent) { ClientConnector oldParent = getParent(); // Send a detach event if the component is currently attached if (isAttached()) { detach(); } // Connect to new parent this.parent = parent; // Send attach event if the component is now attached if (isAttached()) { attach(); } if (oldParent != null) { oldParent.markAsDirty(); } }
/** * Initially and in the case of a reset all data should be pushed to the * client. */ @Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); if (initial && getPushRows().isEmpty()) { // Make sure rows are pushed when component is attached. setPushRows(Range.withLength(0, getMinPushSize())); } sendDataToClient(initial); }
@Override public void remove() { super.remove(); // Remove listeners attached on construction dragStartListenerHandle.remove(); dragEndListenerHandle.remove(); }
@Override public void attach() { super.attach(); registerDragSourceRpc(); }
@Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); getState().listeners = actionListeners.size() > 0 || (stopListeners != null && stopListeners.size() > 0); }
@Override public void remove() { getParent().removeDataGenerator(this); super.remove(); }
@Override public void attach() { super.attach(); registerDropTargetRpc(); }
@Override protected JavaScriptManagerState getState() { return (JavaScriptManagerState) super.getState(); }
/** * Add this extension to the target component. * * @param target * the component to attach this extension to */ public void extend(AbstractComponent target) { super.extend(target); }
@Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); if (settings != null) { getState().json = serializer.serialize(settings); } }
@Override public void remove() { if (this instanceof DataGenerator) { getParentGrid().datasourceExtension .removeDataGenerator((DataGenerator) this); } super.remove(); }
@Override public void attach() { super.attach(); attachDataProviderListener(); }
@Override protected FileDownloaderState getState(boolean markAsDirty) { return (FileDownloaderState) super.getState(markAsDirty); }
/** * Creates a new extension instance that extends the provided connector. * * @since 7.4 * * @param target * the connector to extend */ public AbstractExtension(AbstractClientConnector target) { this(); extend(target); }
@Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); if (!initial) { HtmlAttributesClientRpc clientRpc = getRpcProxy(HtmlAttributesClientRpc.class); if (!removeDomAttributes.isEmpty()) { clientRpc.removeDomAttributes(removeDomAttributes); this.removeDomAttributes = Collections.emptySet(); } if (!removeCssProperties.isEmpty()) { clientRpc.removeCssProperties(removeCssProperties); this.removeCssProperties = Collections.emptySet(); } } } }
@Override public void attach() { super.attach(); if (uiProvider != null && !getSession().getUIProviders().contains(uiProvider)) { getSession().addUIProvider(uiProvider); } }
@Override protected ResponsiveState getState(boolean markAsDirty) { return (ResponsiveState) super.getState(markAsDirty); } }
/** * This method extends the given Grid with this Column. * * @param grid * the grid to extend */ private void extend(Grid<T> grid) { super.extend(grid); }