name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_VaadinService_storeSession_rdh
/** * Called when the VaadinSession should be stored. * <p> * By default stores the VaadinSession in the underlying HTTP session. * * @since 7.6 * @param session * the VaadinSession to store * @param wrappedSession * the underlying HTTP session */ protected void storeSession(VaadinSession session, Wrapp...
3.26
framework_VaadinService_setCurrent_rdh
/** * Sets the given Vaadin service as the current service. * * @param service */ public static void setCurrent(VaadinService service) { CurrentInstance.set(VaadinService.class, service); }
3.26
framework_VaadinService_writeToHttpSession_rdh
/** * Performs the actual write of the VaadinSession to the underlying HTTP * session after sanity checks have been performed. * <p> * Called by {@link #storeSession(VaadinSession, WrappedSession)} * * @since 7.6 * @param wrappedSession * the underlying HTTP session * @param session * the VaadinSession to...
3.26
framework_VaadinService_getLockAttributeName_rdh
/** * Returns the name used to store the lock in the HTTP session. * * @return The attribute name for the lock */ protected String getLockAttributeName() { return getServiceName() + ".lock"; }
3.26
framework_VaadinService_runPendingAccessTasks_rdh
/** * Purges the queue of pending access invocations enqueued with * {@link VaadinSession#access(Runnable)}. * <p> * This method is automatically run by the framework at appropriate * situations and is not intended to be used by application developers. * * @param session * the vaadin session to purge the queu...
3.26
framework_VaadinService_getDeploymentConfiguration_rdh
/** * Gets the deployment configuration. Should be overridden (or otherwise * intercepted) if the no-arg constructor is used in order to prevent NPEs. * * @return the deployment configuration */ public DeploymentConfiguration getDeploymentConfiguration() { return f0; }
3.26
framework_VaadinService_fireSessionDestroy_rdh
/** * Handles destruction of the given session. Internally ensures proper * locking is done. * * @param vaadinSession * The session to destroy */ public void fireSessionDestroy(VaadinSession vaadinSession) { final VaadinSession session = vaadinSession; session.access(() -> { if (session.getState...
3.26
framework_VaadinService_getRequestHandlers_rdh
/** * Returns the request handlers that are registered with this service. The * iteration order of the returned collection is the same as the order in * which the request handlers will be invoked when a request is handled. * * @return a collection of request handlers in the order they are invoked * @see #createRe...
3.26
framework_VaadinService_getSessionAttributeName_rdh
/** * Returns the name used for storing the VaadinSession in the underlying * HTTP session. * * @since 7.6 * @return the attribute name used for storing the VaadinSession */ protected String getSessionAttributeName() {return (VaadinSession.class.getName() + ".") + getServiceName(); }
3.26
framework_VaadinService_initConnectorIdGenerator_rdh
/** * Determines the connector id generator to use for the application. * <p> * The connector id generator creates a unique id for each connector * attached to a UI. * <p> * The framework collects generators from the {@link SessionInitEvent} where * session init listeners can add them. This method is called with...
3.26
framework_VaadinService_findUI_rdh
/** * Finds the {@link UI} that belongs to the provided request. This is * generally only supported for UIDL requests as other request types are not * related to any particular UI or have the UI information encoded in a * non-standard way. The returned UI is also set as the current UI ( * {@link UI#setCurrent(UI)}...
3.26
framework_VaadinService_closeInactiveUIs_rdh
/** * Closes those UIs in the given session for which {@link #isUIActive} * yields false. * * @since 7.0.0 */ private void closeInactiveUIs(VaadinSession session) { final String sessionId = session.getSession().getId(); for (final UI ui : session.getUIs()) { if ((!isUIActive(ui)) && (!ui.isClosing())) { ui.a...
3.26
framework_VaadinService_setSessionLock_rdh
/** * Associates the given lock with this service and the given wrapped * session. This method should not be called more than once when the lock is * initialized for the session. * * @see #getSessionLock(WrappedSession) * @param wrappedSession * The wrapped session the lock is associated with * @param lock *...
3.26
framework_VaadinService_unlockSession_rdh
/** * Releases the lock for the given session for this service instance. * Typically you want to call {@link VaadinSession#unlock()} instead of this * method. * <p> * Note: The method and its signature has been changed to get lock instance * as parameter in Vaadin 8.14.0. If you have overriden this method, you ne...
3.26
framework_VaadinService_getClassLoader_rdh
/** * Gets the class loader to use for loading classes loaded by name, e.g. * custom UI classes. This is by default the class loader that was used to * load the Servlet or Portlet class to which this service belongs. * * @return the class loader to use, or <code>null</code> * @see #setClassLoader(ClassLoader) */...
3.26
framework_VaadinService_writeUncachedStringResponse_rdh
/** * Writes the given string as a response with headers to prevent caching and * using the given content type. * * @param response * The response reference * @param contentType * The content type of the response * @param responseString * The actual response * @throws IOException * If an error occurr...
3.26
framework_VaadinService_getApplicationUrl_rdh
/** * Get the base URL that should be used for sending requests back to this * service. * <p> * This is only used to support legacy cases. * * @param request * @return * @throws MalformedURLException * @deprecated As of 7.0. Only used to support {@link LegacyApplication}. */ @Deprecated protected URL getAppli...
3.26
framework_VaadinService_setDefaultClassLoader_rdh
/** * Tries to acquire default class loader and sets it as a class loader for * this {@link VaadinService} if found. If current security policy disallows * acquiring class loader instance it will log a message and re-throw * {@link SecurityException} * * @throws SecurityException * If current security policy f...
3.26
framework_VaadinService_requestStart_rdh
/** * Called before the framework starts handling a request. * * @param request * The request * @param response * The response */ public void requestStart(VaadinRequest request, VaadinResponse response) { if (!initialized) { throw new IllegalStateException("Can not process requests before init() has been...
3.26
framework_VaadinService_isAtmosphereAvailable_rdh
/** * Checks whether Atmosphere is available for use. * * @since 7.6 * @return true if Atmosphere is available, false otherwise */ protected boolean isAtmosphereAvailable() { if (atmosphereAvailable == null) { atmosphereAvailable = checkAtmosphereSupport(); } return atmosphereAvailable; }
3.26
framework_VaadinService_doFindOrCreateVaadinSession_rdh
/** * Finds or creates a Vaadin session. Assumes necessary synchronization has * been done by the caller to ensure this is not called simultaneously by * several threads. * * @param request * @param requestCanCreateSession * @return * @throws SessionExpiredException * @throws ServiceException */ private Vaadi...
3.26
framework_VaadinService_removeSession_rdh
/** * Called when the VaadinSession should be removed from the underlying HTTP * session. * * @since 7.6 * @param wrappedSession * the underlying HTTP session */ public void removeSession(WrappedSession wrappedSession) { assert VaadinSession.hasLock(this, wrappedSession); removeFromHttpSession(wrappedSession);...
3.26
framework_VaadinService_removeFromHttpSession_rdh
/** * Performs the actual removal of the VaadinSession from the underlying HTTP * session after sanity checks have been performed. * * @since 7.6 * @param wrappedSession * the underlying HTTP session */ protected void removeFromHttpSession(WrappedSession wrappedSession) { wrappedSession.removeAttribute(getSess...
3.26
framework_VaadinService_createAndRegisterSession_rdh
/** * Creates and registers a new VaadinSession for this service. Assumes * proper locking has been taken care of by the caller. * * @param request * The request which triggered session creation. * @return A new VaadinSession instance * @throws ServiceException */ private VaadinSession createAndRegisterSessio...
3.26
framework_VaadinService_reinitializeSession_rdh
/** * Discards the current session and creates a new session with the same * contents. The purpose of this is to introduce a new session key in order * to avoid session fixation attacks. * <p> * Please note that this method makes certain assumptions about how data is * stored in the underlying session and may thu...
3.26
framework_VaadinService_requestEnd_rdh
/** * Called after the framework has handled a request and the response has * been written. * * @param request * The request object * @param response * The response object * @param session * The session which was used during the request or null if the * request did not use a session */ public void re...
3.26
framework_VaadinService_handleSessionExpired_rdh
/** * Called when the session has expired and the request handling is therefore * aborted. * * @param request * The request * @param response * The response * @throws ServiceException * Thrown if there was any problem handling the expiration of * the session */ protected void handleSessionExpired(Vaa...
3.26
framework_VaadinService_closeSession_rdh
/** * Sets the given session to be closed and all its UI state to be discarded * at the end of the current request, or at the end of the next request if * there is no ongoing one. * <p> * After the session has been discarded, any UIs that have been left open * will give a Session Expired error and a new session w...
3.26
framework_VaadinService_cleanupSession_rdh
/** * Closes inactive UIs in the given session, removes closed UIs from the * session, and closes the session if it is itself inactive. This operation * should not be performed without first acquiring the session lock. By * default called at the end of each request, after sending the response. * * @param session ...
3.26
framework_VaadinService_setCurrentInstances_rdh
/** * Sets the this Vaadin service as the current service and also sets the * current Vaadin request and Vaadin response. This method is used by the * framework to set the current instances when a request related to the * service is processed and they are cleared when the request has been * processed. * <p> * Th...
3.26
framework_VaadinService_init_rdh
/** * Initializes this service. The service should be initialized before it is * used. * * @since 7.1 * @throws ServiceException * if a problem occurs when creating the service */ public void init() throws ServiceException { List<RequestHandler> handlers = createRequestHandlers();ServiceInitEvent event = n...
3.26
framework_VaadinService_getSystemMessagesProvider_rdh
/** * Gets the system messages provider currently defined for this service. * <p> * By default, the {@link DefaultSystemMessagesProvider} which always * provides the built-in default {@link SystemMessages} is used. * </p> * * @see #setSystemMessagesProvider(SystemMessagesProvider) * @see SystemMessagesProvider ...
3.26
framework_VaadinService_m1_rdh
/** * Gets the lock instance used to lock the VaadinSession associated with the * given wrapped session. * <p> * This method uses the wrapped session instead of VaadinSession to be able * to lock even before the VaadinSession has been initialized. * </p> * * @param wrappedSession * The wrapped session * @re...
3.26
framework_VaadinService_handleRequest_rdh
/** * Handles the incoming request and writes the response into the response * object. Uses {@link #getRequestHandlers()} for handling the request. * <p> * If a session expiration is detected during request handling then each * {@link RequestHandler request handler} has an opportunity to handle the * expiration e...
3.26
framework_VaadinService_addSessionDestroyListener_rdh
/** * Adds a listener that gets notified when a Vaadin service session that has * been initialized for this service is destroyed. * <p> * The session being destroyed is locked and its UIs have been removed when * the listeners are called. * * @see #addSessionInitListener(SessionInitListener) * @param listener ...
3.26
framework_GridKeyPressEvent_getCharCode_rdh
/** * Gets the char code for this event. * * @return the char code */ public char getCharCode() { return ((char) (m0())); }
3.26
framework_GridKeyPressEvent_m0_rdh
/** * Gets the Unicode char code (code point) for this event. * * @return the Unicode char code */ public int m0() {return getNativeEvent().getCharCode(); }
3.26
framework_DownloadStream_writeResponse_rdh
/** * Writes this download stream to a Vaadin response. This takes care of * setting response headers according to what is defined in this download * stream ({@link #getContentType()}, {@link #getCacheTime()}, * {@link #getFileName()}) and transferring the data from the stream ( * {@link #getStream()}) to the resp...
3.26
framework_DownloadStream_getContentDispositionFilename_rdh
/** * Returns the filename formatted for inclusion in a Content-Disposition * header. Includes both a plain version of the name and a UTF-8 version * * @since 7.4.8 * @param filename * The filename to include * @return A value for inclusion in a Content-Disposition header */ public static String getContentDis...
3.26
framework_DownloadStream_setFileName_rdh
/** * Sets the file name. * * @param fileName * the file name to set. */ public void setFileName(String fileName) { this.fileName = fileName; }
3.26
framework_DownloadStream_setContentType_rdh
/** * Sets stream content type. * * @param contentType * the contentType to set */ public void setContentType(String contentType) { this.contentType = contentType; }
3.26
framework_DownloadStream_setStream_rdh
/** * Sets the stream. * * @param stream * The stream to set */ public void setStream(InputStream stream) { this.stream = stream; }
3.26
framework_DownloadStream_setBufferSize_rdh
/** * Sets the size of the download buffer. * * @param bufferSize * the size of the buffer in bytes. * @since 7.0 */ public void setBufferSize(int bufferSize) { this.bufferSize = bufferSize; }
3.26
framework_DownloadStream_m0_rdh
/** * Sets a parameter for download stream. Parameters are optional information * about the downloadable stream and their meaning depends on the used * adapter. For example in WebAdapter they are interpreted as HTTP response * headers. * * If the parameters by this name exists, the old value is replaced. * * @p...
3.26
framework_DownloadStream_getParameter_rdh
/** * Gets a paramater for download stream. Parameters are optional information * about the downloadable stream and their meaning depends on the used * adapter. For example in WebAdapter they are interpreted as HTTP response * headers. * * @param name * the Name of the parameter to set. * @return Value of the...
3.26
framework_DownloadStream_setCacheTime_rdh
/** * Sets length of cache expiration time. This gives the adapter the * possibility cache streams sent to the client. The caching may be made in * adapter or at the client if the client supports caching. Zero or negative * value disables the caching of this stream. * * @param cacheTime * the cache time in mil...
3.26
framework_DownloadStream_tryToCloseStream_rdh
/** * Helper method that tries to close an input stream and ignores any * exceptions. * * @param in * the input stream to close, <code>null</code> is also supported */ static void tryToCloseStream(InputStream in) { try { // try to close output stream (e.g. file handle) if (in != null) { ...
3.26
framework_DownloadStream_getParameterNames_rdh
/** * Gets the names of the parameters. * * @return Iterator of names or null if no parameters are set. */ public Iterator<String> getParameterNames() { if (params != null) { return params.keySet().iterator(); } return null; }
3.26
framework_DownloadStream_getStream_rdh
/** * Gets downloadable stream. * * @return output stream. */ public InputStream getStream() { return stream;}
3.26
framework_EditorHandler_failure_rdh
/** * Informs Grid that an error occurred while trying to process the * request. This method is a short-hand for calling {@link #failure()} * and {@link Editor#setEditorError(String, Collection)} * * @param errorMessage * and error message to show to the user, or * <code>null</code> to not show any message. ...
3.26
framework_EditorHandler_getWidget_rdh
/** * Returns the editor widget used to edit the values of the given * column. * * @param column * the column whose widget to get * @return the widget related to the column */ public Widget getWidget(Grid.Column<?, T> column) { }
3.26
framework_AbstractListingConnector_getRowData_rdh
/** * Returns the data of the given data row. * * @param row * the row * @return the row data */ protected static JsonValue getRowData(JsonObject row) { return row.get(DataCommunicatorConstants.DATA); }
3.26
framework_AbstractListingConnector_isRowSelected_rdh
/** * Returns whether the given row is selected. * * @param row * the row * @return {@code true} if the row is selected, {@code false} otherwise */ protected boolean isRowSelected(JsonObject row) { return row.hasKey(DataCommunicatorConstants.SELECTED); }
3.26
framework_AbstractListingConnector_getRowKey_rdh
/** * Returns the key of the given data row. * * @param row * the row * @return the row key */ protected static String getRowKey(JsonObject row) { return row.getString(DataCommunicatorConstants.KEY); }
3.26
framework_ServiceInitEvent_addDependencyFilter_rdh
/** * Adds a new dependency filter that will be used by this service. * * @param dependencyFilter * the dependency filter to add, not <code>null</code> * @since 8.1 */ public void addDependencyFilter(DependencyFilter dependencyFilter) { Objects.requireNonNull(dependencyFilter, "Dependency filter cannot be n...
3.26
framework_ServiceInitEvent_getAddedDependencyFilters_rdh
/** * Gets an unmodifiable list of all dependency filters that have been added * for the service. * * @return the current list of added dependency filters. * @since 8.1 */ public List<DependencyFilter> getAddedDependencyFilters() {return Collections.unmodifiableList(addedDependencyFilters); }
3.26
framework_ServiceInitEvent_addRequestHandler_rdh
/** * Adds a new request handler that will be used by this service. The added * handler will be run before any of the framework's own request handlers, * but the ordering relative to other custom handlers is not guaranteed. * * @param requestHandler * the request handler to add, not <code>null</code> */ public...
3.26
framework_ServiceInitEvent_getAddedConnectorIdGenerators_rdh
/** * Gets an unmodifiable list of all connector id generators that have been * added for the service. * * @return the current list of added connector id generators * @since 8.1 */ public List<ConnectorIdGenerator> getAddedConnectorIdGenerators() { return Collections.unmodifiableList(addedConnectorIdGener...
3.26
framework_ServiceInitEvent_addConnectorIdGenerator_rdh
/** * Adds as connector id generator to be used by this service. By default, * the service will fail to deploy if more than one connector id generator * has been registered. * * @param connectorIdGenerator * the connector id generator to add, not <code>null</code> * @since 8.1 */public void addConnectorIdGene...
3.26
framework_ConnectorTypeWriter_write_rdh
/** * Writes a JSON object containing connector-ID-to-type-ID mappings for each * dirty Connector in the given UI. * * @param ui * The {@link UI} containing dirty connectors * @param writer * The {@link Writer} used to write the JSON. * @param target * The paint target containing the connector type IDs. ...
3.26
framework_Compare_compareEquals_rdh
/** * Checks if the this value equals the given value. Favors Comparable over * equals to better support e.g. BigDecimal where equals is stricter than * compareTo. * * @param otherValue * The value to compare to * @return true if the values are equal, false otherwise */ private boolean compareEquals(Object ot...
3.26
framework_Compare_getValue_rdh
/** * Returns the value to compare the property against. * * @return comparison reference value */ public Object getValue() { return value; }
3.26
framework_VTwinColSelect_updateCaptions_rdh
/** * Updates the captions above the left (options) and right (selections) * columns. {code null} value clear the caption. * * @param leftCaption * the left caption to set, or {@code null} to clear * @param rightCaption * the right caption to set, or {@code null} to clear */ public void updateCaptions(Strin...
3.26
framework_VTwinColSelect_clearInternalWidths_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void clearInternalWidths() { String colWidth = DEFAULT_COLUMN_COUNT + "em"; String containerWidth = ((2 * DEFAULT_COLUMN_COUNT) + 4) + "em"; ...
3.26
framework_VTwinColSelect_setTabIndex_rdh
/** * Sets the tab index. * * @param tabIndex * the tab index to set */ public void setTabIndex(int tabIndex) { optionsListBox.setTabIndex(tabIndex); selectionsListBox.setTabIndex(tabIndex);addItemsLeftToRightButton.setTabIndex(tabIndex); removeItemsRightToLeftButton.setTabIndex(tabIndex);}
3.26
framework_VTwinColSelect_clearInternalHeights_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void clearInternalHeights() { selectionsListBox.setHeight(""); optionsListBox.setHeight(""); }
3.26
framework_VTwinColSelect_getNavigationSelectKey_rdh
/** * Get the key that selects an item in the table. By default it is the Enter * key but by overriding this you can change the key to whatever you want. * * @return the key that selects an item */ protected int getNavigationSelectKey() { return KeyCodes.KEY_ENTER; }
3.26
framework_VTwinColSelect_getOptionsCaption_rdh
/** * Gets the options caption HTML Widget. * * @return the options caption widget */ protected HTML getOptionsCaption() { if (optionsCaption == null) { optionsCaption = new HTML(); optionsCaption.setStyleName(CLASSNAME + "-caption-left"); optionsCaption.getElement().getStyle().setFloat...
3.26
framework_VTwinColSelect_m0_rdh
/** * Returns the number of visible items for the list boxes. * * @return the number of items to show * @see ListBox#setVisibleItemCount(int) */ public int m0() { return rows; }
3.26
framework_VTwinColSelect_setRows_rdh
/** * Sets the number of visible items for the list boxes. * * @param rows * the number of items to show * @see ListBox#setVisibleItemCount(int) */ public void setRows(int rows) { if (this.rows != rows) { this.rows = rows; optionsListBox.setVisibleItemCount(rows); selectionsListBox.s...
3.26
framework_VTwinColSelect_setInternalWidths_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void setInternalWidths() { getElement().getStyle().setPosition(Position.RELATIVE); int bordersAndPaddings = WidgetUtil.measureHorizontalPaddingAndBorder(buttons.getElement(), 0); int buttonWidth = WidgetUtil.getRequiredWidt...
3.26
framework_VTwinColSelect_setInternalHeights_rdh
/** * For internal use only. May be removed or replaced in the future. */ public void setInternalHeights() { int captionHeight = WidgetUtil.getRequiredHeight(captionWrapper);int totalHeight = getOffsetHeight(); String selectHeight = (totalHeight - captionHeight) + "px"; selectionsListBox.setHeight(select...
3.26
framework_VTwinColSelect_isReadOnly_rdh
/** * Returns {@code true} if this twin column select is in read only mode, * {@code false} if not. * * @return {@code true} for read only, {@code false} for not read only */public boolean isReadOnly() { return readOnly; }
3.26
framework_VTwinColSelect_getCaptionWrapper_rdh
/** * For internal use only. May be removed or replaced in the future. * * @return the caption wrapper widget */ public Widget getCaptionWrapper() { return captionWrapper; }
3.26
framework_VTwinColSelect_setReadOnly_rdh
/** * Sets this twin column select as read only, meaning selection cannot be * changed. * * @param readOnly * {@code true} for read only, {@code false} for not read only */ public void setReadOnly(boolean readOnly) {...
3.26
framework_AbstractComponent_setRequiredIndicatorVisible_rdh
/** * Sets the visibility of the required indicator. <strong>NOTE: Does not * apply for all components!</strong>. * <p> * If the component supports the required indicator (state extends * {@link AbstractFieldState}), then expose this method and * {@link #isRequiredIndicatorVisible()} as {@code public} in the comp...
3.26
framework_AbstractComponent_hasEqualHeight_rdh
/** * Test if the given component has equal height with this instance * * @param component * the component for the height comparison ...
3.26
framework_AbstractComponent_setDescription_rdh
/** * Sets the component's description using given content {@code mode}. See * {@link #getDescription()} for more information on what the description * is. * <p> * If the content {@code mode} is {@literal ContentMode.HTML} the * description is displayed as HTML in tooltips or directly in certain * components so ...
3.26
framework_AbstractComponent_fireComponentErrorEvent_rdh
/** * Emits the component error event. It is transmitted to all registered * listeners interested in such events. */ protected void fireComponentErrorEvent() { fireEvent(new Component.ErrorEvent(getComponentError(), this)); }
3.26
framework_AbstractComponent_focus_rdh
/** * Sets the focus for this component if the component is {@link Focusable}. */ protected void focus() { if (this instanceof Focusable) { ...
3.26
framework_AbstractComponent_getActionManager_rdh
/* Actions */ /** * Gets the {@link ActionManager} used to manage the * {@link ShortcutListener}s added to this component. * * @return the ActionManager in use */ protected ActionManager getActionManager() { if (actionManager == null) { actionManager = new ConnectorActionManager(this); setActio...
3.26
framework_AbstractComponent_readSize_rdh
/** * Reads the size of this component from the given design attributes. If the * attributes do not contain relevant size information, defaults is * consulted. ...
3.26
framework_AbstractComponent_setComponentError_rdh
/** * Sets the component's error message. The message may contain certain XML * tags, for more information see * * @link Component.ErrorMessage#ErrorMessage(String, int) * @param componentError * the new <code>ErrorMessage</code> of the component. */ public void setComponentError(ErrorMessage componentError) {...
3.26
framework_AbstractComponent_setActionManagerViewer_rdh
/** * Set a viewer for the action manager to be the parent sub window (if the * component is in a window) or the UI (otherwise). This is still a * simplification of the real case as this should be handled by the parent * VOverlay (on the client side) if the component is inside an VOverlay * component. */ private ...
3.26
framework_AbstractComponent_hasEqualSize_rdh
/** * Test if the given components has equal size with this instance * * @param component * the component for the size comparison * @return true ...
3.26
framework_AbstractComponent_fireComponentEvent_rdh
/** * Emits the component event. It is transmitted to all registered listeners * interested in such events. */ protected void fireComponentEvent() {fireEvent(new Component.Event(this)); }
3.26
framework_AbstractComponent_getState_rdh
/** * Returns the shared state bean with information to be sent from the server * to the client. * * Subclasses should override this method and set any relevant fields of the * state returned by super.getState(). * * @since 7.0 * @return updated component shared state */ @Override protected AbstractComponentSt...
3.26
framework_AbstractComponent_setIcon_rdh
/** * Sets the component's icon. * * @param icon * the icon to be shown with the component's caption. */ @Override public void setIcon(Resource icon) { setResource(ComponentConstants.ICON_RESOURCE, icon); }
3.26
framework_AbstractComponent_writeSize_rdh
/** * Writes the size related attributes for the component if they differ from * the defaults * * @param attributes * the attribute map where the attribute are written * @param defaultInstance * the default instance of the class for fetching the default * values */ private void writeSize(Attributes attr...
3.26
framework_AbstractComponent_isRequiredIndicatorVisible_rdh
/** * Checks whether the required indicator is visible or not. <strong>NOTE: * Does not apply for all components!</strong>. * <p> * This method will throw a...
3.26
framework_AbstractComponent_setResponsive_rdh
/** * Toggles responsiveness of this component. * * @since 7.5.0 * @param responsive * boolean enables responsiveness, false disables */ public void setResponsive(boolean responsive) { if (responsive) { // make responsive if necessary if (!isResponsive()) { Responsive.makeResp...
3.26
framework_AbstractComponent_isOrHasAncestor_rdh
/** * Determine whether a <code>content</code> component is equal to, or the * ancestor of this component. * * @param content * the potential ancestor element * @return <code>true</code> if the relationship holds */ protected boolean isOrHasAncestor(Component content) { if (content instanceof HasComponents...
3.26
framework_AbstractComponent_isResponsive_rdh
/** * Returns true if the component is responsive. * * @since 7.5.0 * @return true if the component is responsive */ public boolean isResponsive() { for (Extension e : getExtensions()) { if (e instanceof Responsive) { return true; } } return false; }
3.26
framework_AbstractComponent_getDebugId_rdh
/** * * @deprecated As of 7.0. Use {@link #getId()} */ @Deprecated public String getDebugId() { return getId(); }
3.26
framework_AbstractComponent_setCaptionAsHtml_rdh
/** * Sets whether the caption is rendered as HTML. * <p> * If set to true, the captions are rendered in the browser as HTML and the * developer is responsible for ensuring no harmful HTML is used. If set to * false, the caption is rendered in the browser as plain text. * <p> * The default is false, i.e. to rend...
3.26
framework_AbstractComponent_setLocale_rdh
/** * Sets the locale of this component. * * <pre> * // Component for which the locale is meaningful * InlineDateField date = new InlineDateField(&quot;Datum&quot;); * * // German language specified with ISO 639-1 language * // code and ISO 3166-1 alpha-2 country code. * date.setLocale(new Locale(&quot;de&quot...
3.26
framework_AbstractComponent_getComponentError_rdh
/** * Gets the component's error message. * * @link Terminal.ErrorMessage#ErrorMessage(String, int) * @return the component's error message. */ public ErrorMessage getComponentError() { return componentError; }
3.26
framework_AbstractComponent_setData_rdh
/** * Sets the data object, that can be used for any application specific data. * The component does not use or modify this data. * * @param data * the Application specific data. * @since 3.1 */ public void setData(Object data) { applicationData = data; }
3.26
framework_AbstractComponent_setDebugId_rdh
/** * * @deprecated As of 7.0. Use {@link #setId(String)} */ @Deprecated public void setDebugId(String id) { setId(id); }
3.26
framework_AbstractComponent_setReadOnly_rdh
/** * Sets the read-only status in the state of this {@code AbstractComponent}. * This method should be made public in {@link Component Components} that * implement {@link HasValue}. * * @param readOnly * a boolean value specifying whether the component is put * read-only mode or not */ protected void setRe...
3.26