/** * Adds a filename change event listener. * * @param listener * the Listener to add, not null */ public void addChangeListener(ChangeListener listener) { super.addListener(EventId.CHANGE, ChangeEvent.class, listener, ChangeListener.FILENAME_CHANGED); }
/** * {@inheritDoc} */ @Override public void focus() { super.focus(); }
@Override protected UploadState getState() { return (UploadState) super.getState(); } }
@Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); getState().immediate = isImmediate(); }
@Override protected Collection<String> getCustomAttributes() { Collection<String> result = super.getCustomAttributes(); result.add("color"); result.add("position"); result.add("popup-style"); return result; } }
@Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); // Hide the error indicator if needed getState().hideErrors = shouldHideErrors(); }
@Override public void attach() { super.attach(); localeMightHaveChanged(); }
@Override public Collection<?> getListeners(Class<?> eventType) { if (StreamingProgressEvent.class.isAssignableFrom(eventType)) { if (progressListeners == null) { return Collections.EMPTY_LIST; } else { return Collections.unmodifiableCollection(progressListeners); } } return super.getListeners(eventType); }
@Override public void detach() { super.detach(); // Stop listening to data source events on detach to avoid a potential // memory leak. See #6155. removePropertyListeners(); }
@Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); AbstractLegacyComponent def = designContext.getDefaultInstance(this); Attributes attr = design.attributes(); // handle immediate if (explicitImmediateValue != null) { DesignAttributeHandler.writeAttribute("immediate", attr, explicitImmediateValue, def.isImmediate(), Boolean.class, designContext); } }
final ErrorMessage superError = super.getErrorMessage();
@Override protected Collection<String> getCustomAttributes() { Collection<String> attributes = super.getCustomAttributes(); attributes.add("readonly"); // must be handled by subclasses attributes.add("value"); attributes.add("converted-value"); return attributes; }
@Override public void beforeClientResponse(boolean initial) { super.beforeClientResponse(initial); initCalendarWithLocale(); getState().format24H = TimeFormat.Format24H == getTimeFormat(); setupDaysAndActions(); setupCalendarEvents(); rpc.scroll(scrollTop); }
/** * Notifies the component that it is connected to an application. * * @see com.vaadin.ui.Component#attach() */ @Override public void attach() { super.attach(); localeMightHaveChanged(); if (!isListeningToPropertyEvents) { addPropertyListeners(); if (!isModified() && !isBuffered()) { // Update value from data source updateValueFromDataSource(); } } }
@Override protected AbstractFieldState getState(boolean markAsDirty) { return (AbstractFieldState) super.getState(markAsDirty); }
@Override protected Collection<String> getCustomAttributes() { Collection<String> customAttributes = super.getCustomAttributes(); customAttributes.add("time-format"); customAttributes.add("start-date"); customAttributes.add("end-date"); return customAttributes; }
/** * {@inheritDoc} */ @Override public void focus() { super.focus(); }
/** * Sets the component's immediate mode to the specified status. * <p> * Since Vaadin 8, the default mode is immediate. * * @param immediate * the boolean value specifying if the component should be in the * immediate mode after the call. */ public void setImmediate(boolean immediate) { explicitImmediateValue = immediate; getState().immediate = immediate; }
@Override protected Collection<String> getCustomAttributes() { Collection<String> result = super.getCustomAttributes(); result.add("value"); result.add("content-mode"); result.add("plain-text"); return result; }
@Override protected CalendarState getState(boolean markAsDirty) { return (CalendarState) super.getState(markAsDirty); }