com.vaadin.v7.ui.Table.markAsDirty()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(8.7k)|赞(0)|评价(0)|浏览(649)

本文整理了Java中com.vaadin.v7.ui.Table.markAsDirty()方法的一些代码示例,展示了Table.markAsDirty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.markAsDirty()方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称:Table
方法名:markAsDirty

Table.markAsDirty介绍

[英]Requests that the Table should be repainted as soon as possible. Note that a Table does not necessarily repaint its contents when this method has been called. See #refreshRowCache() for forcing an update of the contents.
[中]要求尽快重新粉刷桌子。请注意,调用此方法后,表不一定要重新绘制其内容。有关强制更新内容的信息,请参见#refreshRowCache()。

代码示例

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Sets the drag start mode of the Table. Drag start mode controls how Table
  3. * behaves as a drag source.
  4. *
  5. * @param newDragMode
  6. */
  7. public void setDragMode(TableDragMode newDragMode) {
  8. dragMode = newDragMode;
  9. markAsDirty();
  10. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Sets whether column reordering is allowed or not.
  3. *
  4. * @param columnReorderingAllowed
  5. * specifies whether column reordering is allowed.
  6. */
  7. public void setColumnReorderingAllowed(boolean columnReorderingAllowed) {
  8. if (columnReorderingAllowed != this.columnReorderingAllowed) {
  9. this.columnReorderingAllowed = columnReorderingAllowed;
  10. markAsDirty();
  11. }
  12. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Sets the behavior of how the multi-select mode should behave when the
  3. * table is both selectable and in multi-select mode.
  4. * <p>
  5. * Note, that on some clients the mode may not be respected. E.g. on touch
  6. * based devices CTRL/SHIFT base selection method is invalid, so touch based
  7. * browsers always use the {@link MultiSelectMode#SIMPLE}.
  8. *
  9. * @param mode
  10. * The select mode of the table
  11. */
  12. public void setMultiSelectMode(MultiSelectMode mode) {
  13. multiSelectMode = mode;
  14. markAsDirty();
  15. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Enables or disables sorting.
  3. * <p>
  4. * Setting this to false disallows sorting by the user. It is still possible
  5. * to call {@link #sort()}.
  6. * </p>
  7. *
  8. * @param sortEnabled
  9. * true to allow the user to sort the table, false to disallow it
  10. */
  11. public void setSortEnabled(boolean sortEnabled) {
  12. if (this.sortEnabled != sortEnabled) {
  13. this.sortEnabled = sortEnabled;
  14. markAsDirty();
  15. }
  16. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Sets the footer visible in the bottom of the table.
  3. * <p>
  4. * The footer can be used to add column related data like sums to the bottom
  5. * of the Table using setColumnFooter(Object propertyId, String footer).
  6. * </p>
  7. *
  8. * @param visible
  9. * Should the footer be visible
  10. */
  11. public void setFooterVisible(boolean visible) {
  12. if (visible != columnFootersVisible) {
  13. columnFootersVisible = visible;
  14. markAsDirty();
  15. }
  16. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Requests that the Table should be repainted as soon as possible.
  3. *
  4. * Note that a {@code Table} does not necessarily repaint its contents when
  5. * this method has been called. See {@link #refreshRowCache()} for forcing
  6. * an update of the contents.
  7. *
  8. * @deprecated As of 7.0, use {@link #markAsDirty()} instead
  9. */
  10. @Deprecated
  11. @Override
  12. public void requestRepaint() {
  13. markAsDirty();
  14. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Setter for property columnHeaderMode.
  3. *
  4. * @param columnHeaderMode
  5. * the New value of property columnHeaderMode.
  6. */
  7. public void setColumnHeaderMode(ColumnHeaderMode columnHeaderMode) {
  8. if (columnHeaderMode == null) {
  9. throw new IllegalArgumentException(
  10. "Column header mode can not be null");
  11. }
  12. if (columnHeaderMode != this.columnHeaderMode) {
  13. this.columnHeaderMode = columnHeaderMode;
  14. markAsDirty();
  15. }
  16. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Sets the column header for the specified column.
  3. *
  4. * @param propertyId
  5. * the propertyId identifying the column.
  6. * @param header
  7. * the header to set.
  8. */
  9. public void setColumnHeader(Object propertyId, String header) {
  10. if (header == null) {
  11. columnHeaders.remove(propertyId);
  12. } else {
  13. columnHeaders.put(propertyId, header);
  14. }
  15. markAsDirty();
  16. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Sets the icon Resource for the specified column.
  3. * <p>
  4. * Throws IllegalArgumentException if the specified column is not visible.
  5. * </p>
  6. *
  7. * @param propertyId
  8. * the propertyId identifying the column.
  9. * @param icon
  10. * the icon Resource to set.
  11. */
  12. public void setColumnIcon(Object propertyId, Resource icon) {
  13. if (icon == null) {
  14. columnIcons.remove(propertyId);
  15. } else {
  16. columnIcons.put(propertyId, icon);
  17. }
  18. markAsDirty();
  19. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Sets the column footer caption. The column footer caption is the text
  3. * displayed beneath the column if footers have been set visible.
  4. *
  5. * @param propertyId
  6. * The properyId of the column
  7. *
  8. * @param footer
  9. * The caption of the footer
  10. */
  11. public void setColumnFooter(Object propertyId, String footer) {
  12. if (footer == null) {
  13. columnFooters.remove(propertyId);
  14. } else {
  15. columnFooters.put(propertyId, footer);
  16. }
  17. markAsDirty();
  18. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * This method adjusts a possible caching mechanism of table implementation.
  3. *
  4. * <p>
  5. * Table component may fetch and render some rows outside visible area. With
  6. * complex tables (for example containing layouts and components), the
  7. * client side may become unresponsive. Setting the value lower, UI will
  8. * become more responsive. With higher values scrolling in client will hit
  9. * server less frequently.
  10. *
  11. * <p>
  12. * The amount of cached rows will be cacheRate multiplied with pageLength (
  13. * {@link #setPageLength(int)} both below and above visible area..
  14. *
  15. * @param cacheRate
  16. * a value over 0 (fastest rendering time). Higher value will
  17. * cache more rows on server (smoother scrolling). Default value
  18. * is 2.
  19. */
  20. public void setCacheRate(double cacheRate) {
  21. if (cacheRate < 0) {
  22. throw new IllegalArgumentException(
  23. "cacheRate cannot be less than zero");
  24. }
  25. if (this.cacheRate != cacheRate) {
  26. this.cacheRate = cacheRate;
  27. markAsDirty();
  28. }
  29. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Go to mode where content content refreshing has effect.
  3. *
  4. * @param refreshContent
  5. * true if content refresh needs to be done
  6. */
  7. protected void enableContentRefreshing(boolean refreshContent) {
  8. isContentRefreshesEnabled = true;
  9. if (refreshContent) {
  10. refreshRenderedCells();
  11. // Ensure that client gets a response
  12. markAsDirty();
  13. }
  14. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Sets columns width (in pixels). Theme may not necessarily respect very
  3. * small or very big values. Setting width to -1 (default) means that theme
  4. * will make decision of width.
  5. *
  6. * <p>
  7. * Column can either have a fixed width or expand ratio. The latter one set
  8. * is used. See @link {@link #setColumnExpandRatio(Object, float)}.
  9. *
  10. * @param propertyId
  11. * columns property id
  12. * @param width
  13. * width to be reserved for columns content
  14. * @since 4.0.3
  15. */
  16. public void setColumnWidth(Object propertyId, int width) {
  17. if (propertyId == null) {
  18. // Since propertyId is null, this is the row header. Use the magic
  19. // id to store the width of the row header.
  20. propertyId = ROW_HEADER_FAKE_PROPERTY_ID;
  21. }
  22. // Setting column width should remove any expand ratios as well
  23. columnExpandRatios.remove(propertyId);
  24. if (width < 0) {
  25. columnWidths.remove(propertyId);
  26. } else {
  27. columnWidths.put(propertyId, width);
  28. }
  29. markAsDirty();
  30. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Sets the icons of the columns.
  3. *
  4. * <p>
  5. * The icons in headers match the property id:s given by the set visible
  6. * column headers. The table must be set in either
  7. * {@link #COLUMN_HEADER_MODE_EXPLICIT} or
  8. * {@link #COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID} mode to show the headers
  9. * with icons.
  10. * </p>
  11. *
  12. * @param columnIcons
  13. * the Array of icons that match the {@link #getVisibleColumns()}
  14. * .
  15. */
  16. public void setColumnIcons(Resource... columnIcons) {
  17. if (columnIcons.length != visibleColumns.size()) {
  18. throw new IllegalArgumentException(
  19. "The length of the icons array must match the number of visible columns");
  20. }
  21. this.columnIcons.clear();
  22. int i = 0;
  23. for (final Object column : visibleColumns) {
  24. if (i >= columnIcons.length) {
  25. break;
  26. }
  27. this.columnIcons.put(column, columnIcons[i++]);
  28. }
  29. markAsDirty();
  30. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Setter for property selectable.
  3. *
  4. * <p>
  5. * The table is not selectable until it's explicitly set as selectable via
  6. * this method or alternatively at least one {@link ValueChangeListener} is
  7. * added.
  8. * </p>
  9. *
  10. * @param selectable
  11. * the New value of property selectable.
  12. */
  13. public void setSelectable(boolean selectable) {
  14. if (!SharedUtil.equals(this.selectable, selectable)) {
  15. this.selectable = selectable;
  16. markAsDirty();
  17. }
  18. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. markAsDirty();

代码示例来源:origin: com.haulmont.cuba/cuba-web

  1. protected void applyPresentation(Presentation p) {
  2. if (presentations != null) {
  3. Element settingsElement = presentations.getSettings(p);
  4. applySettings(settingsElement);
  5. presentations.setCurrent(p);
  6. component.markAsDirty();
  7. }
  8. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. && (id == null || id == getNullSelectionItemId())) {
  2. markAsDirty();
  3. } else if (id != null && containsId(id)) {
  4. newValue.add(id);
  5. markAsDirty();
  6. return;

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. /**
  2. * Notifies this listener that the Property's value has changed.
  3. *
  4. * Also listens changes in rendered items to refresh content area.
  5. *
  6. * @see Property.ValueChangeListener#valueChange(Property.ValueChangeEvent)
  7. */
  8. @Override
  9. public void valueChange(Property.ValueChangeEvent event) {
  10. if (equals(event.getProperty())
  11. || event.getProperty() == getPropertyDataSource()) {
  12. super.valueChange(event);
  13. } else {
  14. refreshRowCache();
  15. containerChangeToBeRendered = true;
  16. }
  17. markAsDirty();
  18. }

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

  1. markAsDirty();
  2. maybeThrowCacheUpdateExceptions();

相关文章

Table类方法