name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_Embedded_setCodetype_rdh
/** * This attribute specifies the content type of data expected when * downloading the object specified by classid. This attribute is optional * but recommended when classid is specified since it allows the user agent * to avoid loading information for unsupported content types. When absent, * it defaults to the ...
3.26
framework_Embedded_setClassId_rdh
/** * This attribute may be used to specify the location of an object's * implementation via a URI. * * @param classId * the classId to set. */ public void setClassId(String classId) { String oldClassId = getClassId(); if ((classId != oldClassId) || ((classId != null) && (!classId.equals(oldClassId)))) { getSta...
3.26
framework_Embedded_getParameterNames_rdh
/** * Gets the embedded object parameter names. * * @return the Iterator of parameters names. */ public Iterator<String> getParameterNames() { return m2(false).parameters.keySet().iterator(); }
3.26
framework_Embedded_removeParameter_rdh
/** * Removes an object parameter from the list. * * @param name * the name of the parameter to remove. */ public void removeParameter(String name) { getState().parameters.remove(name); }
3.26
framework_Embedded_getStandby_rdh
/** * This attribute specifies a message that a user agent may render while * loading the object's implementation and data. * * @return The text displayed when loading */ public String getStandby() { return m2(false).standby; }
3.26
framework_Embedded_setMimeType_rdh
/** * Sets the mimeType, the MIME-Type of the object. * * @param mimeType * the mimeType to set. */ public void setMimeType(String mimeType) { String oldMimeType = getMimeType(); if ((mimeType != oldMimeType) || ((mimeType != null) && (!mimeType.equals(oldMimeType)))) { getState().mimeType = mimeType; if ("app...
3.26
framework_Embedded_getClassId_rdh
/** * This attribute may be used to specify the location of an object's * implementation via a URI. * * @return the classid. */ public String getClassId() { return m2(false).classId; }
3.26
framework_Embedded_getParameter_rdh
/** * Gets the value of an object parameter. Parameters are optional * information, and they are passed to the instantiated object. Parameters * are are stored as name value pairs. * * @return the Value of parameter or null if not found. */ public String getParameter(String name) { return m2(false).parameters...
3.26
framework_Embedded_setAlternateText_rdh
/** * Sets this component's "alt-text", that is, an alternate text that can be * presented instead of this component's normal content, for accessibility * purposes. Does not work when {@link #setType(int)} has been called with * {@link #TYPE_BROWSER}. * * @param altText * A shor...
3.26
framework_Embedded_setSource_rdh
/** * Sets the object source resource. The dimensions are assumed if possible. * The type is guessed from resource. * * @param source * the source to set. */ public void setSource(Resource source) { if ((source != null) && (!source.equals(getSource()))) { setResource("src", source); final String mt = source.ge...
3.26
framework_Embedded_setParameter_rdh
/** * Sets an object parameter. Parameters are optional information, and they * are passed to the instantiated object. Parameters are are stored as name * value pairs. This overrides the previous value assigned to this * parameter. * * @param name * the name of the parameter. * @param value * the value of ...
3.26
framework_Embedded_setCodebase_rdh
/** * This attribute specifies the base path used to resolve relative URIs * specified by the classid, data, and archive attributes. When absent, its * default value is the base URI of the current document. * * @param codebase * The base path */ public void setCodebase(String codebase) { String oldCodebase = g...
3.26
framework_Embedded_setType_rdh
/** * Sets the object type. * <p> * This can be one of the following: * <ul> * <li>{@link #TYPE_OBJECT} <i>(This is the default)</i> * <li>{@link #TYPE_IMAGE} <i>(Deprecated)</i> * <li>{@link #TYPE_BROWSER} <i>(Deprecated)</i> * </ul> * </p> * * @param type * the type to set. */ public void setType(int t...
3.26
framework_Embedded_getCodetype_rdh
/** * Gets the MIME-Type of the code. * * @return the MIME-Type of the code. */ public String getCodetype() { return m2(false).codetype; }
3.26
framework_Embedded_getSource_rdh
/** * Gets the resource contained in the embedded object. * * @return the Resource */ public Resource getSource() { return getResource("src"); }
3.26
framework_Embedded_getMimeType_rdh
/** * Gets the MIME-Type of the object. * * @return the MIME-Type of the object. */ public String getMimeType() { return m2(false).mimeType; }
3.26
framework_Embedded_m0_rdh
/** * This attribute may be used to specify a space-separated list of URIs for * archives containing resources relevant to the object, which may include * the resources specified by the classid and data attributes. Preloading * archives will generally result in reduced load times for objects. * Archives specified ...
3.26
framework_Embedded_addClickListener_rdh
/** * Add a click listener to the component. The listener is called whenever * the user clicks inside the component. Depending on the content the event * may be blocked and in that case no event is fired. * * @see Registration * @param listener * The listener to add * @return a registration object for removin...
3.26
framework_Embedded_getType_rdh
/** * Gets the type of the embedded object. * <p> * This can be one of the following: * <ul> * <li>TYPE_OBJECT <i>(This is the default)</i> * <li>TYPE_IMAGE * </ul> * </p> * * @return the type. */ public int getType() { return m2(false).type; }
3.26
framework_Embedded_getAlternateText_rdh
/** * Gets this component's "alt-text". * * @see #setAlternateText(String) */ public String getAlternateText() { return m2(false).altText; }
3.26
framework_ComponentStateUtil_addRegisteredEventListener_rdh
/** * Adds an event listener id. * * @param eventListenerId * The event identifier to add * @return a registration object for removing the listener * @since 8.0 */ public static final Registration addRegisteredEventListener(SharedState state, String eventListenerId) { if (state.registeredEventListeners == null...
3.26
framework_DisabledLabel_setup_rdh
/** * Test UI for disbaled label. * * @author Vaadin Ltd */ public class DisabledLabel extends AbstractTestUI { @Overrideprotected void setup(VaadinRequest request) { Label v0 = new Label("enabled"); v0.addStyleName("my-enabled"); addComponent(v0); Label disabled = new Label(...
3.26
framework_CustomLayoutDemo_setBody_rdh
/** * Set body panel caption, remove all existing components and add given * custom layout in it. */ public void setBody(String customLayout) { VerticalLayout bodyLayout = new VerticalLayout(); bodyLayout.setMargin(true); bodyLayout.addComponent(new CustomLayout(customLayout)); bodyPanel.setContent(...
3.26
framework_CustomLayoutDemo_init_rdh
/** * Initialize Application. Demo components are added to main window. */ @Override public void init() { final LegacyWindow mainWindow = new LegacyWindow("CustomLayout demo"); setMainWindow(mainWindow); // set the application to use example -theme setTheme("tests-components"); // Create custom la...
3.26
framework_CustomLayoutDemo_loginClicked_rdh
/** * Login button clicked. Hide login components and replace username * component with "Welcome user Username" message. */ public void loginClicked() { username.setVisible(false); loginPwd.setVisible(false); if (username.getValue().length() < 1) { username.setValue("Anonymous"); } main...
3.26
framework_CustomLayoutDemo_componentEvent_rdh
/** * Handle all menu events. Updates body panel contents if menu item is * clicked. */ @Override public void componentEvent(Event event) { // Check if event occurred at fsTree component if (event.getSource() == menu) { // Check if event is about changing value if (event.getClass() == ...
3.26
framework_RegexpValidator_isValid_rdh
/** * Returns whether the given string matches the regular expression. * * @param value * the string to match * @return true if the string matched, false otherwise */ protected boolean isValid(String value) { if (value == null) { return true; } ...
3.26
framework_RegexpValidator_getMatcher_rdh
/** * Returns a new or reused matcher for the pattern. * * @param value * the string to find matches in * @return a matcher for the string */ private Matcher getMatcher(String value) { if (matcher == null) { matcher = pattern.matcher(value); } else { matcher.reset(value); } retur...
3.26
framework_StringToIntegerConverter_getFormat_rdh
/** * A converter that converts from {@link String} to {@link Integer} and back. * Uses the given locale and a {@link NumberFormat} instance for formatting and * parsing. * <p> * Override and overwrite {@link #getFormat(Locale)} to use a different format. * </p> * * @author Vaadin Ltd * @since 7.0 */ @Depreca...
3.26
framework_SessionInitEvent_getRequest_rdh
/** * Gets the request that triggered the initialization. * * @return the request */ public VaadinRequest getRequest() {return request; }
3.26
framework_SessionInitEvent_m0_rdh
/** * Gets the Vaadin service from which this event originates. * * @return the Vaadin service instance */ public VaadinService m0() { return getSource(); }
3.26
framework_SessionInitEvent_getSession_rdh
/** * Gets the Vaadin service session that has been initialized. * * @return the Vaadin service session */ public VaadinSession getSession() { return session; }
3.26
framework_WindowConnector_updateWindowPosition_rdh
/** * Initializes or updates position from state. */ protected void updateWindowPosition() { VWindow window = getWidget(); WindowState state = getState(); if (state.windowMode == WindowMode.NORMAL) { // if centered, position handled in postLayout() if ((!state.centered) && ((state.positionX >= 0) || (state.position...
3.26
framework_WindowConnector_setWindowOrderAndPosition_rdh
/** * Gives the WindowConnector an order number. As a side effect, moves the * window according to its order number so the windows are stacked. This * method should be called for each window in the order they should appear. */ public void setWindowOrderAndPosition() { getWidget().setWindowOrderAndPosition(); }
3.26
framework_WindowConnector_onMaximizeRestore_rdh
/** * Maximizes or restores the window depending on the current mode. */ protected void onMaximizeRestore() { WindowState state = getState(); if (state.resizable) { if (state.windowMode == WindowMode.MAXIMIZED) { state.windowMode = WindowMode.NORMAL; } else { state.windowMode = WindowMode.MAXIMIZED; } updateWindowMod...
3.26
framework_WindowConnector_updateWindowMode_rdh
/** * Updates the window state to match the current mode. */ protected void updateWindowMode() { VWindow window = getWidget(); WindowState state = getState(); // update draggable on widget window.setDraggable(state.draggable && (state.windowMode == WindowMode.NORMAL)); // update resizable on widget window.setResizabl...
3.26
framework_UnsupportedBrowserHandler_writeBrowserTooOldPage_rdh
/** * Writes a page encouraging the user to upgrade to a more current browser. * * @param request * @param response * @throws IOException */ protected void writeBrowserTooOldPage(VaadinRequest request, VaadinResponse response) throws IOException { try (Writer page = response.getWriter()) { WebBrowser...
3.26
framework_GridKeyUpEvent_isArrow_rdh
/** * Does the key code represent an arrow key? * * @param keyCode * the key code * @return if it is an arrow key code */ public static boolean isArrow(int keyCode) { switch (keyCode) { case KeyCodes.KEY_DOWN :case KeyCodes.KEY_RIGHT : case KeyCodes.KEY_UP : case KeyCodes.KEY_LEFT :r...
3.26
framework_GridKeyUpEvent_isLeftArrow_rdh
/** * Is this a left arrow? * * @return whether this is a left arrow key event */ public boolean isLeftArrow() { return getNativeKeyCode() == KeyCodes.KEY_LEFT; }
3.26
framework_Cell_getColumn_rdh
/** * Returns the index of the column the cell resides in. * * @return the column index */ public int getColumn() { return column;}
3.26
framework_Cell_getRow_rdh
/** * Returns the index of the row the cell resides in. * * @return the row index */ public int getRow() { return row; }
3.26
framework_Label_getPropertyDataSource_rdh
/** * Gets the viewing data-source property. * * @return the data source property. * @see Property.Viewer#getPropertyDataSource() */ @Override public Property getPropertyDataSource() { return dataSource; }
3.26
framework_Label_setContentMode_rdh
/** * Sets the content mode of the Label. * * @param contentMode * the New content mode of the label. * @see ContentMode */ public void setContentMode(ContentMode contentMode) { if (contentMode == null) { throw new IllegalArgumentException("Content mode can not be null"); } getState().conten...
3.26
framework_Label_getValue_rdh
/** * Gets the value of the label. * <p> * The value of the label is the text that is shown to the end user. * Depending on the {@link ContentMode} it is plain text or markup. * </p> * * @return the value of the label. */ @Override public String getValue() { if (getPropertyDataSource() == null) { ...
3.26
framework_Label_getDataSourceValue_rdh
/** * Returns the current value of the data source converted using the current * locale. * * @return */ private String getDataSourceValue() { return ConverterUtil.convertFromModel(getPropertyDataSource().getValue(), String.class, getConverter(), getLocale()); }
3.26
framework_Label_stripTags_rdh
/** * Strips the tags from the XML. * * @param xml * the String containing a XML snippet. * @return the original XML without tags. */ private String stripTags(String xml) { ...
3.26
framework_Label_addValueChangeListener_rdh
/** * Adds the value change listener. * * @param listener * the Listener to be added. * @see Property.ValueChangeNotifier#addListener(Property.ValueChangeListener) */ @Override public void addValueChangeListener(Property.ValueChangeListener listener) { addListener(Label.ValueChangeEvent.class, listener, VAL...
3.26
framework_Label_getContentMode_rdh
/** * Gets the content mode of the Label. * * @return the Content mode of the label. * @see ContentMode */ public ContentMode getContentMode() { return getState(false).contentMode;}
3.26
framework_Label_getProperty_rdh
/** * Gets the Property that has been modified. * * @see Property.ValueChangeEvent#getProperty() */ @Override public Property getProperty() { return ((Property) (getSource())); }
3.26
framework_Label_setValue_rdh
/** * Set the value of the label. Value of the label is the XML contents of the * label. Since Vaadin 7.2, changing the value of Label instance with that * method will fire ValueChangeEvent. * * @param newStringValue * the New value of the label. */ @Override public void setValue(String newStringValue) { i...
3.26
framework_Label_fireValueChange_rdh
/** * Emits the options change event. */ protected void fireValueChange() { // Set the error message fireEvent(new Label.ValueChangeEvent(this)); }
3.26
framework_Label_setConverter_rdh
/** * Sets the converter used to convert the label value to the property data * source type. The converter must have a presentation type of String. * * @param converter * The new converter to use. */ public void setConverter(Converter<String, ?> converter) { this.converter = ((Converter<String, Object>) (...
3.26
framework_Label_removeValueChangeListener_rdh
/** * Removes the value change listener. * * @param listener * the Listener to be removed. * @see Property.ValueChangeNotifier#removeListener(Property.ValueChangeListener) */ @Override public void removeValueChangeListener(Property.ValueChangeListener listener) { removeListener(Label.ValueChangeEvent....
3.26
framework_Label_setPropertyDataSource_rdh
/** * Sets the property as data-source for viewing. Since Vaadin 7.2 a * ValueChangeEvent is fired if the new value is different from previous. * * @param newDataSource * the new data source Property * @see Property.Viewer#setPropertyDataSource(Property) */ @Override public void setPropertyDataSource(Property ...
3.26
framework_DesignAttributeHandler_readAttribute_rdh
/** * Reads the given attribute from a set of attributes. * * @param attribute * the attribute key * @param attributes * the set of attributes to read from * @param outputType * the output type for the attribute * @return the attribute value or null */ public static <T> T readAttribute(String attribute,...
3.26
framework_DesignAttributeHandler_resolveSupportedAttributes_rdh
/** * Resolves the supported attributes and corresponding getters and setters * for the class using introspection. After resolving, the information is * cached internally by this class * * @param clazz * the class to resolve the supported attributes for */ private static void resolveSupportedAttributes(Class<?...
3.26
framework_DesignAttributeHandler_m0_rdh
/** * Replaces subsequent UPPERCASE strings of length 2 or more followed either * by another uppercase letter or an end of string. This is to generalise * handling of method names like <tt>showISOWeekNumbers</tt>. * * @param param * Input string. * @return Input string with sequences of UPPERCASE turned into N...
3.26
framework_DesignAttributeHandler_writeAlignment_rdh
/** * Writes the alignment to the given child element attributes. * * @since 7.6.4 * @param childElement * the child element * @param alignment * the component alignment */ public static void writeAlignment(Element childElement, Alignment alignment) { if (alignment.isMiddle()) { childElement.att...
3.26
framework_DesignAttributeHandler_clearElement_rdh
/** * Clears the children and attributes of the given element. * * @param design * the element to be cleared */ public static void clearElement(Element design) {Attributes attr = design.attributes(); for (Attribute a : attr.asList()) { attr.remove(a.getKey()); } List<Node> children = new...
3.26
framework_DesignAttributeHandler_getFormatter_rdh
/** * Returns the currently used formatter. All primitive types and all types * needed by Vaadin components are handled by that formatter. * * @return An instance of the formatter. */ public static DesignFormatter getFormatter() { return FORMATTER; }
3.26
framework_DesignAttributeHandler_writeAttribute_rdh
/** * Writes the given attribute value to a set of attributes if it differs * from the default attribute value. * * @param attribute * the attribute key * @param attributes * the set of attributes where the new attribute is written * @param value * the attribute value * @param defaultValue * the defa...
3.26
framework_DesignAttributeHandler_toAttributeValue_rdh
/** * Serializes the given value to valid design attribute representation * * @param sourceType * the type of the value * @param value * the value to be serialized * @return the given value as design attribute representation */ private static String toAttributeValue(Class<?> sourceType, Object value) { ...
3.26
framework_DesignAttributeHandler_findGetterForAttribute_rdh
/** * Returns a getter that can be used for reading the given design attribute * value from the class * * @param clazz * the class that is scanned for getters * @param attribute * the design attribute to find getter for * @return the getter method or null if not found */ private static Method findGetterFor...
3.26
framework_DesignAttributeHandler_findSetterForAttribute_rdh
/** * Returns a setter that can be used for assigning the given design * attribute to the class * * @param clazz * the class that is scanned for setters * @param attribute * the design attribute to find setter for * @return the setter method or null if not found */ private static Method findSetterForAttrib...
3.26
framework_DesignAttributeHandler_toAttributeName_rdh
/** * Returns the design attribute name corresponding the given method name. * For example given a method name <code>setPrimaryStyleName</code> the * return value would be <code>primary-style-name</code> * * @param propertyName * the property name returned by {@link Introspector} ...
3.26
framework_DesignAttributeHandler_getSupportedAttributes_rdh
/** * Searches for supported setter and getter types from the specified class * and returns the list of corresponding design attributes. * * @param clazz * the class scanned for setters * @return the list of supported design attributes */ public static Collection<String> getSupportedAttributes(Class<?> clazz) ...
3.26
framework_DesignAttributeHandler_assignValue_rdh
/** * Assigns the specified design attribute to the given component. * * @param target * the target to which the attribute should be set * @param attribute * the name of the attribute to be set * @param value * the string value of the attribute * @return true on success */ public static boolean assignVa...
3.26
framework_VFilterSelect_getSelectedCaption_rdh
/** * This method is meant for internal use and may change in future versions. * * @since 7.7 * @return the caption of selected item, if "scroll to page" is disabled */public String getSelectedCaption() { return explicitSelectedCaption; }
3.26
framework_VFilterSelect_setPromptingOn_rdh
/** * Turns prompting on. When prompting is turned on a command prompt is shown * in the text box if nothing has been entered. */ public void setPromptingOn() { debug("VFS: setPromptingOn()"); if (!prompting) { prompting = true; addStyleDependentName(CLASSNAME_PROMPT); } setTextboxText(inputPrompt); }
3.26
framework_VFilterSelect_setNextButtonActive_rdh
/** * Should the next page button be visible to the user? * * @param active */ private void setNextButtonActive(boolean active) { if (enableDebug) { debug(("VFS.SP: setNextButtonActive(" + active) + ")"); } if (active) { DOM.sinkEvents(down, Event.ONCLICK); down.setClassN...
3.26
framework_VFilterSelect_doPostFilterSelectedItemAction_rdh
/** * Triggered after a selection has been made. */ public void doPostFilterSelectedItemAction() { debug("VFS.SM: doPostFilterSelectedItemAction()"); final MenuItem item = getSelectedItem(); final String enteredItemValue = tb.getText();updateSelectionWhenReponseIsReceived = false; // check for exact match in menu int...
3.26
framework_VFilterSelect_selectPrevPage_rdh
/* Show the prev page. */ private void selectPrevPage() {if (currentPage > 0) { filterOptions(currentPage - 1, lastFilter); selectPopupItemWhenResponseIsReceived = Select.LAST; } }
3.26
framework_VFilterSelect_setPagingEnabled_rdh
/** * Should paging be enabled. If paging is enabled then only a certain * amount of items are visible at a time and a scrollbar or buttons are * visible to change page. If paging is turned of then all options are * rendered into the popup menu. * * @param paging * Should the paging be turned on? */ public vo...
3.26
framework_VFilterSelect_m1_rdh
/** * Turns prompting off. When prompting is turned on a command prompt is * shown in the text box if nothing has been entered. * <p> * For internal use only. May be removed or replaced in the future. * * @param text * The text the text box should contain. */ public void m1(String text) { debug("VFS: setPromp...
3.26
framework_VFilterSelect_selectPrevItem_rdh
/** * Selects the previous item in the filtered selections. */ public void selectPrevItem() { debug("VFS.SP: selectPrevItem()"); final int index = menu.getSelectedIndex() - 1; if (index > (-1)) { selectItem(menu.getItems().get(index)); } else if (index == (-1)) { selectPrevPage(); ...
3.26
framework_VFilterSelect_updateSuggestionPopupMinWidth_rdh
/** * Update minimum width for FilterSelect textarea based on input prompt and * suggestions. * <p> * For internal use only. May be removed or replaced in the future. */ public void updateSuggestionPopupMinWidth() { // used only to calculate minimum width String v87 = WidgetUtil.escapeHTML(inputPrompt);for (Filter...
3.26
framework_VFilterSelect_afterUpdateClientVariables_rdh
/* Anything that should be set after the client updates the server. */ private void afterUpdateClientVariables() { // We need this here to be consistent with the all the calls. // Then set your specific selection type only after // client.updateVariable() method call. selectPopupItemWhenResponseIsReceived = Select.NON...
3.26
framework_VFilterSelect_setSelectedCaption_rdh
/** * Sets the caption of selected item, if "scroll to page" is disabled. This * method is meant for internal use and may change in future versions. * * @since 7.7 * @param selectedCaption * the caption of selected item */public void setSelectedCaption(String selectedCaption) { explicitSelectedCaption = selec...
3.26
framework_VFilterSelect_setSelectionRange_rdh
/** * Overridden to avoid selecting text when text input is disabled. */ @Override public void setSelectionRange(int pos, int length) { if (textInputEnabled) { /* set selection range with a backwards direction: anchor at the back, focus at the front. This means that items that are too long to display will display...
3.26
framework_VFilterSelect_selectLastItem_rdh
/** * * @deprecated use {@link SuggestionPopup#selectLastItem()} instead. */ @Deprecated public void selectLastItem() { debug("VFS.SM: selectLastItem()"); List<MenuItem> items = getItems();MenuItem lastItem = items.get(items.size() - 1); selectItem(lastItem); }
3.26
framework_VFilterSelect_updateMenuWidth_rdh
/** * Adds in-line CSS rules to the DOM according to the * suggestionPopupWidth field * * @param desiredWidth * @param naturalMenuWidth */ private void updateMenuWidth(final int desiredWidth, int naturalMenuWidth) { /** * Three different width modes for the suggestion pop-up: * * 1. Legacy "null"-mode: width ...
3.26
framework_VFilterSelect_setTdWidth_rdh
/** * Descends to child elements until finds TD elements and sets their * width in pixels. Can be used to workaround IE8 & 9 TD element * display: block issues * * @param parent * @param width */ private void setTdWidth(Node parent, int width) { for (int i = 0; i < parent.getChildCount(); i++) { Node child = p...
3.26
framework_VFilterSelect_isrelativeUnits_rdh
/** * * @since 7.7 * @param suggestionPopupWidth * @return */ private boolean isrelativeUnits(String suggestionPopupWidth) { return suggestionPopupWidth.trim().endsWith("%"); }
3.26
framework_VFilterSelect_createTextBox_rdh
/** * This method will create the TextBox used by the VFilterSelect instance. * It is invoked during the Constructor and should only be overridden if a * custom TextBox shall be used. The overriding method cannot use any * instance variables. * * @since 7.1.5 * @return TextBox instance used by this VFilterSelect...
3.26
framework_VFilterSelect_handleMouseDownEvent_rdh
/** * Handles special behavior of the mouse down event * * @param event */ private void handleMouseDownEvent(Event event) { /* Prevent the keyboard focus from leaving the textfield by preventing the default behavior of the browser. Fixes #4285. */ if (event.getTypeInt() == Event.ONMOUSEDOWN) { event.preventDefault...
3.26
framework_VFilterSelect_isJustClosed_rdh
/** * Was the popup just closed? * * @return true if popup was just closed */ public boolean isJustClosed() { debug("VFS.SP: justClosed()"); final long v48 = new Date().getTime(); return (lastAutoClosed > 0) && ((v48 - lastAutoClosed) < 200); }
3.26
framework_VFilterSelect_selectFirstItem_rdh
/** * * @deprecated use {@link SuggestionPopup#selectFirstItem()} instead. */ @Deprecated public void selectFirstItem() { debug("VFS.SM: selectFirstItem()"); MenuItem firstItem = getItems().get(0); selectItem(firstItem); }
3.26
framework_VFilterSelect_execute_rdh
/** * Executes a selection of this item. */ @Overridepublic void execute() { onSuggestionSelected(this); }
3.26
framework_VFilterSelect_selectItem_rdh
/* Sets the selected item in the popup menu. */ private void selectItem(final MenuItem newSelectedItem) { menu.selectItem(newSelectedItem); // Set the icon. FilterSelectSuggestion suggestion = ((FilterSelectSuggestion) (newSelectedItem.getCommand())); setSelectedItemIcon(suggestion.getIconUri()); /...
3.26
framework_VFilterSelect_filterOptions_rdh
/** * Filters the options at certain page using the given filter. * * @param page * The page to filter * @param filter * The filter to apply to the components */ public void filterOptions(int page, String filter) { filterOptions(page, filter, true); }
3.26
framework_VFilterSelect_getIconUri_rdh
/** * Get the URI of the icon. Used when constructing the displayed option. * * @return */ public String getIconUri() { return client.translateVaadinUri(untranslatedIconUri); } /** * Gets the style set for this suggestion item. Styles are typically set * by a server-side {@link com.vaadin.ui.ComboBox.ItemSty...
3.26
framework_VFilterSelect_updateSelectedIconPosition_rdh
/** * Positions the icon vertically in the middle. Should be called after the * icon has loaded */ private void updateSelectedIconPosition() { // Position icon vertically to middle int availableHeight = 0; availableHeight = getOffsetHeight(); int iconHeight = WidgetUtil.getRequiredHeight(selectedItemIcon); int margi...
3.26
framework_VFilterSelect_onKeyUp_rdh
/** * Triggered when a key was depressed. * * @param event * The KeyUpEvent of the key depressed */ @Override public void onKeyUp(KeyUpEvent event) { if (enableDebug) { debug(("VFS: onKeyUp(" + event.getNativeKeyCode()) + ")"); } if (enabled && (!readonly)) { switch (event.getNativeKeyCode()) { case KeyCodes.KE...
3.26
framework_VFilterSelect_fixHeightTo_rdh
/** * Fixes menus height to use same space as full page would use. Needed * to avoid height changes when quickly "scrolling" to last page. */ public void fixHeightTo(int pageItemsCount) {setHeight(getPreferredHeight(pageItemsCount)); }
3.26
framework_VFilterSelect_showSuggestions_rdh
/** * Shows the popup where the user can see the filtered options. * * @param currentSuggestions * The filtered suggestions * @param currentPage * The current page number * @param totalSuggestions * The total amount of suggestions */ public void showSuggestions(final Collection<FilterSelectSuggestion> cu...
3.26
framework_VFilterSelect_getItemOffsetHeight_rdh
/* Gets the height of one menu item. */ int getItemOffsetHeight() { List<MenuItem> items = getItems(); return (items != null) && (!items.isEmpty()) ? items.get(0).getOffsetHeight() : 0; }
3.26
framework_VFilterSelect_selectNextPage_rdh
/* Show the next page. */ private void selectNextPage() { if (hasNextPage()) { filterOptions(currentPage + 1, lastFilter); selectPopupItemWhenResponseIsReceived = Select.FIRST; } }
3.26
framework_VFilterSelect_updateStyleNames_rdh
/** * Updates style names in suggestion popup to help theme building. * * @param uidl * UIDL for the whole combo box * @param componentState * shared state of the combo box */ public void updateStyleNames(UIDL uidl, AbstractComponentState componentState) { debug("VFS.SP: updateStyleNames()"); setStyleName(VF...
3.26
framework_VFilterSelect_popupKeyDown_rdh
/** * Triggered when a key was pressed in the suggestion popup. * * @param event * The KeyDownEvent of the key */ private void popupKeyDown(KeyDownEvent event) { if (enableDebug) { debug(("VFS: popupKeyDown(" + event.getNativeKeyCode()) + ")");} // Propagation of handled events is stopped so other handlers such ...
3.26
framework_VFilterSelect_updateRootWidth_rdh
/** * Calculates the width of the select if the select has undefined width. * Should be called when the width changes or when the icon changes. * <p> * For internal use only. May be removed or replaced in the future. */ public void updateRootWidth() { ComponentConnector paintable = ConnectorMap.get(client).getConn...
3.26