name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
framework_CSSInjectWithColorpicker_createBackgroundColorSelect_rdh
/** * Creates a background color select dialog */ private Component createBackgroundColorSelect() { ColorPicker bgColor = new ColorPicker("Background", Color.WHITE); bgColor.setWidth("110px"); bgColor.setCaption("Background"); bgColor.addValueChangeListener(event -> { // Get the new backgroun...
3.26
framework_CSSInjectWithColorpicker_createFontSizeSelect_rdh
/** * Creates a font size selection control */ private Component createFontSizeSelect() { final ComboBox<Integer> select = new ComboBox<>(null, Arrays.asList(8, 9, 10, 12, 14, 16, 20, 25, 30, 40, 50)); select.setWidth("100px"); select.setValue(12); select.setPlaceholder("Font size"); select.setD...
3.26
framework_CSSInjectWithColorpicker_createFontSelect_rdh
/** * Creates a font family selection dialog */ private Component createFontSelect() { final ComboBox<String> select = new ComboBox<>(null, Arrays.asList("Arial", "Helvetica", "Verdana", "Courier", "Times", "sans-serif")); select.setValue("Arial"); select.setWidth("200px"); select.setPlaceholder("Font...
3.26
framework_DeclarativeCaptionGenerator_setCaption_rdh
/** * Sets a {@code caption} for the {@code item}. * * @param item * a data item * @param caption * a caption for the {@code item} */ protected void setCaption(T item, String caption) { f0.put(item, caption); }
3.26
framework_ClickEventHandler_m0_rdh
/** * Sends the click event based on the given native event. Delegates actual * sending to {@link #fireClick(MouseEventDetails)}. * * @param event * The native event that caused this click event */ @Override protected void m0(NativeEvent event) { MouseEventDetails mouseDetails = MouseEventDetailsBuilder.bui...
3.26
framework_ValidationException_getValidationErrors_rdh
/** * Gets both field and bean level validation errors. * * @return a list of all validation errors */ public List<ValidationResult> getValidationErrors() { List<ValidationResult> errors = getFieldValidationErrors().stream().map(s -> s.getResult().get()).collect(Collectors.toList()); errors.addAll(getBeanVa...
3.26
framework_RichTextArea_setValue_rdh
/** * Sets the value of this object. If the new value is not equal to * {@code getValue()}, fires a {@link ValueChangeEvent}. Throws * {@code NullPointerException} if the value is null. * * @param value * the new value, not {@code null} * @throws NullPointerException * if {@code value} is {@code null} */ @...
3.26
framework_DataGenerator_destroyAllData_rdh
/** * Informs the {@code DataGenerator} that all data has been dropped. This * method should clean up any unneeded information stored for items. */ public default void destroyAllData() { } /** * Informs the {@code DataGenerator}
3.26
framework_DataGenerator_destroyData_rdh
/** * Informs the {@code DataGenerator} that the given data item has been * dropped and is no longer needed. This method should clean up any unneeded * information stored for this item. * * @param item * the dropped data item */ public default void destroyData(T item) { }
3.26
framework_RenderInformation_updateSize_rdh
/** * Update the size of the widget. * * @param widget * @return true if the size has changed since last update * @since 7.2 */ public boolean updateSize(Element element) { return updateSize(DOM.asOld(element));}
3.26
framework_VTreeTable_m4_rdh
/** * For internal use only. May be removed or replaced in the future. */ @Override public boolean m4(int keycode, boolean ctrl, boolean shift) { if (collapseRequest || focusParentResponsePending) { // Enqueue the event if there might be pending content changes from // the server if (pendingNavigationEvents.size() < ...
3.26
framework_VTreeTable_buildCaptionHtmlSnippet_rdh
/** * Icons rendered into first actual column in TreeTable, not to row header * cell. */ @Overrideprotected String buildCaptionHtmlSnippet(UIDL uidl) { if (uidl.getTag().equals("column")) { return super.buildCaptionHtmlSnippet(uidl); } else { String s = uidl.getStringAttribute("caption"); return s; } }
3.26
framework_VTreeTable_addAndRemoveRows_rdh
/* Overridden to allow animation of expands and collapses of nodes. */ @Override public void addAndRemoveRows(UIDL partialRowAdditions) { if (partialRowAdditions == null) { return; } if (animationsEnabled) { if (partialRowAdditions.hasAttribute("hide")) { scrollBody.unlinkRowsA...
3.26
framework_MockApplicationConnection_getLastCsrfTokenSent_rdh
/** * Provide the last token sent to the server. <br/> * We added this to test the change done on CSRF token. * * @see CsrfTokenDisabled */ public String getLastCsrfTokenSent() { return getMessageSender().lastCsrfTokenSent; }
3.26
framework_MockApplicationConnection_getLastCsrfTokenReceiver_rdh
/** * Provide the last token received from the server. <br/> * We added this to test the change done on CSRF token. * * @see CsrfTokenDisabled */ public String getLastCsrfTokenReceiver() { return getMessageHandler().lastCsrfTokenReceiver; }
3.26
framework_BeanItemContainer_setBeanIdResolver_rdh
/** * Unsupported in BeanItemContainer. */ @Override protected void setBeanIdResolver(AbstractBeanContainer.BeanIdResolver<BEANTYPE, BEANTYPE> beanIdResolver) throws UnsupportedOperationException { throw new UnsupportedOperationException("BeanItemContainer always uses an IdentityBeanIdResolver"); }
3.26
framework_BeanItemContainer_addBean_rdh
/** * Adds the bean to the Container. * * The bean is used both as the item contents and as the item identifier. * * @see com.vaadin.v7.data.Container#addItem(Object) Container#addItem(Object) */@Override public BeanItem<BEANTYPE> addBean(BEANTYPE bean) { return addItem(bean);}
3.26
framework_BeanItemContainer_getBeanClassForCollection_rdh
/** * Internal helper method to support the deprecated {@link Collection} * container. * * @param <BT> * @param collection * @return * @throws IllegalArgumentException */ @SuppressWarnings("unchecked") @Deprecated private static <BT> Class<? extends BT> getBeanClassForCollection(Collection<? extends BT> collect...
3.26
framework_BeanItemContainer_addAll_rdh
/** * Adds all the beans from a {@link Collection} in one go. More efficient * than adding them one by one. * * @param collection * The collection of beans to add. Must not be null. */@Override public void addAll(Collection<? extends BEANTYPE> collection) { super.addAll(collection); }
3.26
framework_BeanItemContainer_addItemAt_rdh
/** * Adds a new bean at the given index. * * The bean is used both as the item contents and as the item identifier. * * @param index * Index at which the bean should be added. * @par...
3.26
framework_BeanItemContainer_addItem_rdh
/** * Adds the bean to the Container. * * The bean is used both as the item contents and as the item identifier. * * @see com.vaadin.v7.data.Container#addItem(Object) Container#addItem(Object) */ @Override @SuppressWarnings("unchecked") public BeanItem<BEANTYPE> addItem(Object itemId) { return super.addBean((...
3.26
framework_ErrorEvent_getThrowable_rdh
/** * Gets the contained throwable, the cause of the error. * * @return */ public Throwable getThrowable() { return throwable; }
3.26
framework_ErrorEvent_findErrorHandler_rdh
/** * Method for finding the error handler for the given session. * * @param session * The target session * @return An ErrorHandler for the session or null if none was found */ public static ErrorHandler findErrorHandler(VaadinSession session) { ...
3.26
framework_DefaultSQLGenerator_generateLimits_rdh
/** * Generates the LIMIT and OFFSET clause. * * @param sb * StringBuffer to which the clause is appended. * @param offset * Value for offset. * @param pagelength * Value for pagelength. * @return StringBuffer with LIMIT and OFFSET clause added. */ protected StringBuffer generateLimits(StringBuffer sb, ...
3.26
framework_DefaultSQLGenerator_generateOrderBy_rdh
/** * Generates sorting rules as an ORDER BY -clause. * * @param sb * StringBuffer to which the clause is appended. * @param o * OrderBy object to be added into the sb. * @param firstOrderBy * If true, this is the first OrderBy. * @return */ protected StringBuffer generateOrderBy(StringBuffer sb, Order...
3.26
framework_DefaultSQLGenerator_getStatementHelper_rdh
/** * Returns the statement helper for the generator. Override this to handle * platform specific data types. * * @see http://dev.vaadin.com/ticket/9148 * @return a new instance of the statement helper */ protected StatementHelper getStatementHelper() { if (statementHelperClass == null) { return new S...
3.26
framework_BasicEventResizeHandler_m0_rdh
/** * Set the start and end dates for the event. * * @param event * The event that the start and end dates should be set * @param start * The start date * @param end * The end date */ protected void m0(EditableCalendarEvent event, Date start, Date end) { event.setStart(start); event.setEnd(end);...
3.26
framework_TwinColSelectElement_getValue_rdh
/** * Return first selected item (item in the right part of component). * * @return the option text for the item */ public String getValue() { String value = ""; WebElement selectedElement = findElement(By.className("v-select-twincol-selections")); List<WebElement> optionElements = selectedElement.findE...
3.26
framework_TwinColSelectElement_selectByText_rdh
/** * Selects the option with the given option text, i.e. adds it to the right * side column. * * @param text * the text of the option to select */ public void selectByText(String text) { if (isReadOnly()) { throw new ReadOnlyException(); } options.deselectAll(); options.selectByVisibleT...
3.26
framework_TwinColSelectElement_getSelectionsElement_rdh
/** * Gets the right {@code <select>} element inside the component, containing * the selected options. * * @return the select element containing selection inside the component * @since 8.1.1 */ public WebElement getSelectionsElement() { return selectionsElement;}
3.26
framework_TwinColSelectElement_deselectByText_rdh
/** * Deselects the option with the given option text, i.e. removes it from the * right side column. * * @param text * the text of the option to deselect */ public void deselectByText(String text) { if (isReadOnly()) { throw new ReadOnlyException(); } selectedOptions.deselectAll(); selec...
3.26
framework_AriaHelper_ensureHasId_rdh
/** * Makes sure that the provided element has an id attribute. Adds a new * unique id if not. * * @param element * Element to check * @return String with the id of the element */ public static String ensureHasId(Element element) { assert element != null : "Valid Element required"; String v1 = element....
3.26
framework_AriaHelper_clearCaption_rdh
/** * Removes a binding to a caption added with bindCaption() from the provided * Widget. * * @param widget * Widget, that was bound to a caption before */ private static void clearCaption(Widget widget) { Roles.getTextboxRole().removeAriaLabelledbyProperty(widget.getElement()); }
3.26
framework_AriaHelper_setVisibleForAssistiveDevicesOnly_rdh
/** * Allows to move an element out of the visible area of the browser window. * * This makes it possible to have additional information for an assistive * device, that is not in the way for visual users. * * @param element * Element to move out of sight * @param assistiveOnly * {@code true} when element s...
3.26
framework_AriaHelper_bindCaption_rdh
/** * Binds a caption (label in HTML speak) to the form element as required by * WAI-ARIA specification. * * @param widget * Widget, that should be bound to the caption * @param captionElement * Element with of caption to bind */ public static void bindCaption(Widget widget, Element captionElement) { as...
3.26
framework_AriaHelper_handleInputInvalid_rdh
/** * Handles the required actions depending of the input element contains * unaccepted input. * * @param element * Element, typically an input Widget like TextField * @param invalid * boolean, true when the element input has an error */ public static void handleInputInvalid(Element element, boolean inval...
3.26
framework_AriaHelper_handleInputRequired_rdh
/** * Handles the required actions depending of the input element being * required or not. * * @param element * Element, typically from an input Widget like TextField * @param required * boolean, true when the element is required */ public static void handleInputRequired(Element element, boolean required) ...
3.26
framework_VEmbedded_createFlashEmbed_rdh
/** * Creates the Object and Embed tags for the Flash plugin so it works * cross-browser. * <p> * For internal use only. May be removed or replaced in the future. * * @param state * The EmbeddedState * @param src * The src attribute * @return Tags concatenated i...
3.26
framework_VEmbedded_getSrc_rdh
/** * Helper to return translated src-attribute from embedded's UIDL * <p> * For internal use only. May be removed or replaced in the future. * * @param src * the src attribute * @param client * the communication engine for this UI * @return the translated src-attribute or an empty String if not found */ ...
3.26
framework_VEmbedded_getParameters_rdh
/** * Returns a map (name -> value) of all parameters in the UIDL. * <p> * For internal use only. May be removed or replaced in the future. * * @param uidl * the UIDL to map * @return the parameter map */ public static Map<String, String> getParameters(UIDL uidl) { Map<String, String> parameters = new HashMap...
3.26
framework_CalendarTargetDetails_setHasDropTime_rdh
/** * Does the dropped item have a time associated with it. * * @param hasDropTime */ public void setHasDropTime(boolean hasDropTime) { this.hasDropTime = hasDropTime; }
3.26
framework_CalendarTargetDetails_getTargetCalendar_rdh
/** * * @return the {@link Calendar} instance which was the target of the drop */ public Calendar getTargetCalendar() { return ((Calendar) (getTarget())); }
3.26
framework_CalendarTargetDetails_getDropTime_rdh
/** * * @return the date where the drop happened */ public Date getDropTime() { if (hasDropTime) { return ((Date) (getData("dropTime"))); } else { return ((Date) (getData("dropDay"))); } }
3.26
framework_AbstractComponentConnector_unregisterTouchHandlers_rdh
/** * The new default behavior is for long taps to fire a contextclick event if * there's a contextclick listener attached to the component. * * If you do not want this in your component, override this with a blank * method to get rid of said behavior. * * @since 7.6 */ protected void unregisterTouchHandlers() ...
3.26
framework_AbstractComponentConnector_getWidget_rdh
/** * Returns the widget associated with this paintable. The widget returned by * this method must not changed during the life time of the paintable. * * @return The widget associated with this paintable */ @Override public Widget getWidget() { if (widget == null) { if (Profiler.isEnabled()) {Profiler....
3.26
framework_AbstractComponentConnector_onDropTargetAttached_rdh
/** * Invoked when a {@link DropTargetExtensionConnector} has been attached to * this component. * <p> * By default, does nothing. If you need to apply some changes to the * widget, override this method. * <p> * This is a framework internal method, and should not be invoked manually. * * @since 8.1 * @see #on...
3.26
framework_AbstractComponentConnector_registerTouchHandlers_rdh
/** * The new default behavior is for long taps to fire a contextclick event if * there's a contextclick listener attached to the component. * * If you do not want this in your component, override this with a blank * method to get rid of said behavior. * * Some Vaadin Components already handle the long tap as a ...
3.26
framework_AbstractComponentConnector_isSignificantMove_rdh
// mostly copy-pasted code from VScrollTable // TODO refactor main logic to a common class private boolean isSignificantMove(TouchMoveEvent event) { if (longTouchTimer == null) { // no touch start return false; }
3.26
framework_AbstractComponentConnector_updateWidgetStyleNames_rdh
/** * Updates the user defined, read-only and error style names for the widget * based the shared state. User defined style names are prefixed with the * primary style name of the widget returned by {@link #getWidget()} * <p> * This method can be overridden to provide additional style names for the * component, f...
3.26
framework_AbstractComponentConnector_createWidget_rdh
/** * Creates and returns the widget for this VPaintableWidget. This method * should only be called once when initializing the paintable. * <p> * You should typically not override this method since the framework by * default generates an implementation that uses {@li...
3.26
framework_AbstractComponentConnector_onDragSourceDetached_rdh
/** * Invoked when a {@link DragSourceExtensionConnector} has been removed from * this component. * <p> * By default, does nothing. * <p> * This is a framework internal method, and should not be invoked manually. * * @since 8.1 * @see #onDragSourceAttached() */ public void onDragSourceDetached() { }
3.26
framework_AbstractComponentConnector_updateComponentSize_rdh
/** * Updates the component size, invoking the {@link LayoutManager layout * manager} if necessary. * * @param newWidth * The new width as a CSS string. Cannot be null. * @param newHeight * The new height as a CSS string. Cannot be null. */ protected void updateComponentSize(String newWidth, String newHei...
3.26
framework_AbstractComponentConnector_updateWidgetSize_rdh
/** * Updates the DOM size of this connector's {@link #getWidget() widget}. * * @since 7.1.15 * @param newWidth * The new width as a CSS string. Cannot be null. * @param newHeight * The new height as a CSS string. Cannot be null. */ protected void updateWidgetSize(String newWidth, String newHeight) { ge...
3.26
framework_AbstractComponentConnector_sendContextClickEvent_rdh
/** * This method sends the context menu event to the server-side. Can be * overridden to provide extra information through an alternative RPC * interface. * * @since 7.6 * @param details * the mouse event details * @param eventTarget * the target of the event */ protected void sendContextClickEvent(Mouse...
3.26
framework_AbstractComponentConnector_getIcon_rdh
/** * Gets the icon set for this component. * * @return the icon, or <code>null</code> if no icon has been defined. */ protected Icon getIcon() { return getConnection().getIcon(getIconUri()); }
3.26
framework_AbstractComponentConnector_onDropTargetDetached_rdh
/** * Invoked when a {@link DropTargetExtensionConnector} has been removed from * this component. * <p> * By default, does nothing. * <p> * This is a framework internal method, and should not be invoked manually. * * @since 8.1 * @see #onDropTargetAttached() */
3.26
framework_AbstractComponentConnector_cancelTouchTimer_rdh
/** * If a long touch event timer is running, cancel it. * * @since 7.6 */ private void cancelTouchTimer() { WidgetUtil.setTextSelectionEnabled(getWidget().getElement(), true); if (longTouchTimer != null) { // Re-enable text selection longTouchTimer.cancel(); } }
3.26
framework_AbstractComponentConnector_cancelParentTouchTimers_rdh
/** * Cancel the timer recursively for parent components that have timers * running * * @since 7.6 */ private void cancelParentTouchTimers() { ServerConnector parent = getParent(); // we have to account for the parent being something other than an // abstractcomponent. getParent returns null for the ro...
3.26
framework_AbstractComponentConnector_setWidgetStyleName_rdh
/** * This is used to add / remove state related style names from the widget. * <p> * Override this method for example if the style name given here should be * updated in another widget in addition to the one returned by the * {@link #getWidget()}. * </p> * * @param styleName * the style name to be added or ...
3.26
framework_AbstractComponentConnector_onDragSourceAttached_rdh
/** * Invoked when a {@link DragSourceExtensionConnector} has been attached to * this component. * <p> * By default, does nothing. If you need to apply some changes to the * widget, override this method. * <p> * This is a framework internal method, and should not be invoked manually. * * @since 8.1 * @see #on...
3.26
framework_Table_getColumnHeaderMode_rdh
/** * Getter for property columnHeaderMode. * * @return the Value of property columnHeaderMode. */ public ColumnHeaderMode getColumnHeaderMode() { return columnHeaderMode; }
3.26
framework_Table_getColumnExpandRatio_rdh
/** * Gets the column expand ratio for a column. See * {@link #setColumnExpandRatio(Object, float)} * * @param propertyId * columns property id * @return the expandRatio used to divide excess space for this column */ public float getColumnExpandRatio(Object propertyId) { final Float width = columnExpandR...
3.26
framework_Table_setCellStyleGenerator_rdh
/** * Set cell style generator for Table. * * @param cellStyleGenerator * New cell style generator or null to remove generator. */ public void setCellStyleGenerator(CellStyleGenerator cellStyleGenerator) { this.cellStyleGenerator = cellStyleGenerator; // Assures the visual refresh. No need to reset the page bu...
3.26
framework_Table_addColumnCollapseListener_rdh
/** * Adds a column collapse listener to the Table. A column collapse listener * is called when the collapsed state of a column changes. * * @since 7.6 * @param listener * The listener to attach */ public void addColumnCollapseListener(ColumnCollapseListener listener) { addListener(TableConstants.COLUMN_COLLAP...
3.26
framework_Table_valueChange_rdh
/* Property value change listening support */ /** * Notifies this listener that the Property's value has changed. * * Also listens changes in rendered items to refresh content area. * * @see Property.ValueChangeListener#valueChange(Property.ValueChangeEvent) */@Override public void valueChange(Property.ValueChang...
3.26
framework_Table_getCacheRate_rdh
/** * * @see #setCacheRate(double) * @return the current cache rate value */ public double getCacheRate() { return cacheRate; }
3.26
framework_Table_removeGeneratedColumn_rdh
/** * Removes a generated column previously added with addGeneratedColumn. * * @param columnId * id of the generated column to remove * @return true if the column could be removed (existed in the Table) */public boolean removeGeneratedColumn(Object columnId) { if (col...
3.26
framework_Table_refreshRenderedCells_rdh
/** * Refreshes the rows in the internal cache. Only if * {@link #resetPageBuffer()} is called before this then all values are * guaranteed to be recreated. */ protected void refreshRenderedCells() { if (!isAttached()) { return; } if (!isContentRefreshesEnabled) { return; } // Collects the basic facts about the t...
3.26
framework_Table_isLastId_rdh
/** * Tests if the Item corresponding to the given Item ID is the last Item in * the Container. * * @see Container.Ordered#isLastId(java.lang.Object) */ @Override public boolean isLastId(Object itemId) { return ((Container.Ordered) (items)).isLastId(itemId); }
3.26
framework_Table_setVisibleColumns_rdh
/** * Sets the array of visible column property id:s. * * <p> * The columns are show in the order of their appearance in this array. * </p> * * @param visibleColumns * the Array of shown property id:s. */ public void setV...
3.26
framework_Table_getItemDescriptionGenerator_rdh
/** * Get the item description generator which generates tooltips for cells and * rows in the Table. */public ItemDescriptionGenerator getItemDescriptionGenerator() { return itemDescriptionGenerator; }
3.26
framework_Table_getPreviousWidth_rdh
/** * Get the width in pixels of the column before the resize event. * * @return Width in pixels */ public int getPreviousWidth() { return f4; }
3.26
framework_Table_getColumnAlignments_rdh
/** * Gets the array of column alignments. * * <p> * The items in the array must match the properties identified by * {@link #getVisibleColumns()}. The possible values for the alignments * include: * <ul> * <li>{@link Align#LEFT}: Left alignment</li> * <li>{@link Align#CENTER}: Centered</li> * <li>{@link Alig...
3.26
framework_Table_setFooterVisible_rdh
/** * Sets the footer visible in the bottom of the table. * <p> * The footer can be used to add column related data like sums to the bottom * of the Table using setColumnFooter(Object propertyId, String footer). * </p> * * @param visible * Should the footer be visible */ public void setFooterVisible(boolean ...
3.26
framework_Table_setContainerDataSource_rdh
/** * Sets the container data source and the columns that will be visible. * Columns are shown in the collection's iteration order. * <p> * Keeps propertyValueConverters if the corresponding id exists in the new * data source and is of a compatible type. * </p> * * @see Table#setContainerDataSource(Container) ...
3.26
framework_Table_removeFooterClickListener_rdh
/** * Removes a footer click listener. * * @param listener * The listener to remove. */ public void removeFooterClickListener(FooterClickListener listener) { removeListener(TableConstants.FOOTER_CLICK_EVENT_ID, Table.FooterClickEvent.class, listener); } /** * * @deprecated As of 7.0, replaced by {@link #remo...
3.26
framework_Table_firstItemId_rdh
/** * Gets the ID of the first Item in the Container. * * @see Container.Ordered#firstItemId() */ @Override public Object firstItemId() { return ((Container.Ordered) (items)).firstItemId();}
3.26
framework_Table_setCollapseMenuContent_rdh
/** * Sets whether only collapsible columns should be shown to the user in the * column collapse menu. The default is * {@link CollapseMenuContent#ALL_COLUMNS}. * * @since 7.6 * @param content * the desired collapsible menu content setting */ public void setCollapseMenuContent(CollapseMenuContent content) { ...
3.26
framework_Table_resetPageBuffer_rdh
/** * Clears the current page buffer. Call this before * {@link #refreshRenderedCells()} to ensure that all content is updated * from the properties. */ protected void resetPageBuffer() { firstToBeRenderedInClient = -1; lastToBeRenderedInClient = -1;reqFirstRowToPaint = -1; reqRowsToPaint = -1; page...
3.26
framework_Table_getPropertyId_rdh
/** * Gets the id of the column whose collapse state changed. * * @return the property id of the column */ public Object getPropertyId() { return propertyId; }
3.26
framework_Table_setSelectable_rdh
/** * Setter for property selectable. * * <p> * The table is not selectable until it's explicitly set as selectable via * this method or alternatively at least one {@link ValueChangeListener} is * added. * </p> * * @param selectable * the New value of property selectable. */ public void setSelectable(boole...
3.26
framework_Table_addColumnResizeListener_rdh
/** * Adds a column resize listener to the Table. A column resize listener is * called when a user resizes a columns width. * * @param listener * The listener to attach to the Table */ public void addColumnResizeListener(ColumnResizeListener listener) { addListener(TableConstants.COLUMN_RESIZE_EVENT_ID, Table.C...
3.26
framework_Table_handleSelectedItems_rdh
/** * Handles selection if selection is a multiselection * * @param variables * The variables */ private void handleSelectedItems(Map<String, Object> variables) { final String[] ka = ((String[]) (variables.get("selected"))); final String[] ranges = ((String[]) (variables.get("selectedRanges"))); ...
3.26
framework_Table_changeVariables_rdh
/* Component basics */ /** * Invoked when the value of a variable has changed. * * @see Select#changeVariables(java.lang.Object, java.util.Map) */ @Overridepublic void changeVariables(Object source, Map<String, Object> variables) { boolean clientNeedsContentRefresh = false; handleClickEvent(variables); ...
3.26
framework_Table_removeColumnCollapseListener_rdh
/** * Removes a column reorder listener from the Table. * * @since 7.6 * @param listener * The listener to remove */ public void removeColumnCollapseListener(ColumnCollapseListener listener) { removeListener(TableConstants.COLUMN_COLLAPSE_EVENT_ID, Table.ColumnCollapseEvent.class, listener); }
3.26
framework_Table_addItem_rdh
/** * Adds the new row to table and fill the visible cells (except generated * columns) with given values. * * @param cells * the Object array that is used for filling the visible cells * new row. The types must be settable to visible column property ...
3.26
framework_Table_getSortableContainerPropertyIds_rdh
/** * Gets the container property IDs, which can be used to sort the item. * <p> * Note that the {@link #isSortEnabled()} state affects what this method * returns. Disabling sorting causes this method to always return an empty * collection. * </p> * * @see Container.Sortable#getSortableContainerPropertyIds() *...
3.26
framework_Table_setSortAscending_rdh
/** * Internal method to set sort ascending. With doSort flag actual sort can * be bypassed. * * @param ascending * @param doSort */ private void setSortAscending(boolean ascending, boolean doSort) { if (sortAscending != ascending) { sortAscending = ascending; if (doSort) { sort(); // Assures the visual refresh. ...
3.26
framework_Table_setSortContainerPropertyId_rdh
/** * Sets the currently sorted column property id. * * @param propertyId * the Container property id of the currently sorted column. */ public void setSortContainerPropertyId(Object propertyId) {setSortContainerPropertyId(propertyId, true); }
3.26
framework_Table_setColumnCollapsed_rdh
/** * Sets whether the specified column is collapsed or not. * * @param propertyId * the propertyID identifying the column. * @param collapsed * the desired collapsedness. * @throws IllegalStateException * if column collapsing is not allowed * @throws IllegalArgumentException * if the property id does...
3.26
framework_Table_isMultiSelectTouchDetectionEnabled_rdh
/** * Returns if touch screen detection is used to toggle multi select mode. * * @return If touch screen detection for multi select is enabled */ public boolean isMultiSelectTouchDetectionEnabled() { return multiSelectTouchDetectionEnabled; }
3.26
framework_Table_typeIsCompatible_rdh
/** * Checks if class b can be safely assigned to class a. * * @param a * @param b * @return */ private boolean typeIsCompatible(Class<?> a, Class<?> b) { // TODO Implement this check properly // Basically we need to do a a.isAssignableFrom(b) // with special considerations for primitive types. re...
3.26
framework_Table_handleColumnResizeEvent_rdh
/** * Handles the column resize event sent by the client. * * @param variables */ private void handleColumnResizeEvent(Map<String, Object> variables) { if (variables.containsKey("columnResizeEventColumn")) { Object cid = variables.get("columnResizeEventColumn"); Object propertyId = null; ...
3.26
framework_Table_getColumnHeaders_rdh
/** * Gets the headers of the columns. * * <p> * The headers match the property id:s given by the set visible column * headers. The table must be set in either * {@link #COLUMN_HEADER_MODE_EXPLICIT} or * {@link #COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID} mode to show the * headers. In the defaults mode any nulls ...
3.26
framework_Table_getRowGenerator_rdh
/** * * @return the current row generator */ public RowGenerator getRowGenerator() { return rowGenerator; }
3.26
framework_Table_setColumnFooter_rdh
/** * Sets the column footer caption. The column footer caption is the text * displayed beneath the column if footers have been set visible. * * @param propertyId * The properyId of the column * @param footer * The caption of the footer */ public void setColumnFooter(Object propertyId, String footer) { if (...
3.26
framework_Table_setColumnIcons_rdh
/** * Sets the icons of the columns. * * <p> * The icons in headers match the property id:s given by the set visible * column headers. The table must be set in either * {@link #COLUMN_HEADER_MODE_EXPLICIT} or * {@link #COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID} mode to show the headers * with icons. * </p> * *...
3.26
framework_Table_removeColumnResizeListener_rdh
/** * Removes a column resize listener from the Table. * * @param listener * The listener to remove */ public void removeColumnResizeListener(ColumnResizeListener listener) { removeListener(TableConstants.COLUMN_RESIZE_EVENT_ID, Table.ColumnResizeEvent.class, listener); } /** * * @deprecated As of 7.0, replac...
3.26
framework_Table_rowHeadersAreEnabled_rdh
/** * Checks whether row headers are visible. * * @return {@code false} if row headers are hidden, {@code true} otherwise * @since 7.3.9 */ protected boolean rowHeadersAreEnabled() { return getRowHeaderMode() != RowHeaderMode.HIDDEN; }
3.26
framework_Table_setItemDescriptionGenerator_rdh
/** * Set the item description generator which generates tooltips for cells and * rows in the Table. * * @param generator * The generator to use or null to disable */ public void setItemDescriptionGenerator(ItemDescriptionGenerator generator) { if (generator != itemDescriptionGenerator) { itemDescriptionGenera...
3.26