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

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

本文整理了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

/**
 * Sets the drag start mode of the Table. Drag start mode controls how Table
 * behaves as a drag source.
 *
 * @param newDragMode
 */
public void setDragMode(TableDragMode newDragMode) {
  dragMode = newDragMode;
  markAsDirty();
}

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

/**
 * Sets whether column reordering is allowed or not.
 *
 * @param columnReorderingAllowed
 *            specifies whether column reordering is allowed.
 */
public void setColumnReorderingAllowed(boolean columnReorderingAllowed) {
  if (columnReorderingAllowed != this.columnReorderingAllowed) {
    this.columnReorderingAllowed = columnReorderingAllowed;
    markAsDirty();
  }
}

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

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

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

/**
 * Enables or disables sorting.
 * <p>
 * Setting this to false disallows sorting by the user. It is still possible
 * to call {@link #sort()}.
 * </p>
 *
 * @param sortEnabled
 *            true to allow the user to sort the table, false to disallow it
 */
public void setSortEnabled(boolean sortEnabled) {
  if (this.sortEnabled != sortEnabled) {
    this.sortEnabled = sortEnabled;
    markAsDirty();
  }
}

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

/**
 * 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 visible) {
  if (visible != columnFootersVisible) {
    columnFootersVisible = visible;
    markAsDirty();
  }
}

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

/**
 * Requests that the Table should be repainted as soon as possible.
 *
 * Note that a {@code Table} does not necessarily repaint its contents when
 * this method has been called. See {@link #refreshRowCache()} for forcing
 * an update of the contents.
 *
 * @deprecated As of 7.0, use {@link #markAsDirty()} instead
 */
@Deprecated
@Override
public void requestRepaint() {
  markAsDirty();
}

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

/**
 * Setter for property columnHeaderMode.
 *
 * @param columnHeaderMode
 *            the New value of property columnHeaderMode.
 */
public void setColumnHeaderMode(ColumnHeaderMode columnHeaderMode) {
  if (columnHeaderMode == null) {
    throw new IllegalArgumentException(
        "Column header mode can not be null");
  }
  if (columnHeaderMode != this.columnHeaderMode) {
    this.columnHeaderMode = columnHeaderMode;
    markAsDirty();
  }
}

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

/**
 * Sets the column header for the specified column.
 *
 * @param propertyId
 *            the propertyId identifying the column.
 * @param header
 *            the header to set.
 */
public void setColumnHeader(Object propertyId, String header) {
  if (header == null) {
    columnHeaders.remove(propertyId);
  } else {
    columnHeaders.put(propertyId, header);
  }
  markAsDirty();
}

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

/**
 * Sets the icon Resource for the specified column.
 * <p>
 * Throws IllegalArgumentException if the specified column is not visible.
 * </p>
 *
 * @param propertyId
 *            the propertyId identifying the column.
 * @param icon
 *            the icon Resource to set.
 */
public void setColumnIcon(Object propertyId, Resource icon) {
  if (icon == null) {
    columnIcons.remove(propertyId);
  } else {
    columnIcons.put(propertyId, icon);
  }
  markAsDirty();
}

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

/**
 * 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 (footer == null) {
    columnFooters.remove(propertyId);
  } else {
    columnFooters.put(propertyId, footer);
  }
  markAsDirty();
}

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

/**
 * This method adjusts a possible caching mechanism of table implementation.
 *
 * <p>
 * Table component may fetch and render some rows outside visible area. With
 * complex tables (for example containing layouts and components), the
 * client side may become unresponsive. Setting the value lower, UI will
 * become more responsive. With higher values scrolling in client will hit
 * server less frequently.
 *
 * <p>
 * The amount of cached rows will be cacheRate multiplied with pageLength (
 * {@link #setPageLength(int)} both below and above visible area..
 *
 * @param cacheRate
 *            a value over 0 (fastest rendering time). Higher value will
 *            cache more rows on server (smoother scrolling). Default value
 *            is 2.
 */
public void setCacheRate(double cacheRate) {
  if (cacheRate < 0) {
    throw new IllegalArgumentException(
        "cacheRate cannot be less than zero");
  }
  if (this.cacheRate != cacheRate) {
    this.cacheRate = cacheRate;
    markAsDirty();
  }
}

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

/**
 * Go to mode where content content refreshing has effect.
 *
 * @param refreshContent
 *            true if content refresh needs to be done
 */
protected void enableContentRefreshing(boolean refreshContent) {
  isContentRefreshesEnabled = true;
  if (refreshContent) {
    refreshRenderedCells();
    // Ensure that client gets a response
    markAsDirty();
  }
}

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

/**
 * Sets columns width (in pixels). Theme may not necessarily respect very
 * small or very big values. Setting width to -1 (default) means that theme
 * will make decision of width.
 *
 * <p>
 * Column can either have a fixed width or expand ratio. The latter one set
 * is used. See @link {@link #setColumnExpandRatio(Object, float)}.
 *
 * @param propertyId
 *            columns property id
 * @param width
 *            width to be reserved for columns content
 * @since 4.0.3
 */
public void setColumnWidth(Object propertyId, int width) {
  if (propertyId == null) {
    // Since propertyId is null, this is the row header. Use the magic
    // id to store the width of the row header.
    propertyId = ROW_HEADER_FAKE_PROPERTY_ID;
  }
  // Setting column width should remove any expand ratios as well
  columnExpandRatios.remove(propertyId);
  if (width < 0) {
    columnWidths.remove(propertyId);
  } else {
    columnWidths.put(propertyId, width);
  }
  markAsDirty();
}

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

/**
 * 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>
 *
 * @param columnIcons
 *            the Array of icons that match the {@link #getVisibleColumns()}
 *            .
 */
public void setColumnIcons(Resource... columnIcons) {
  if (columnIcons.length != visibleColumns.size()) {
    throw new IllegalArgumentException(
        "The length of the icons array must match the number of visible columns");
  }
  this.columnIcons.clear();
  int i = 0;
  for (final Object column : visibleColumns) {
    if (i >= columnIcons.length) {
      break;
    }
    this.columnIcons.put(column, columnIcons[i++]);
  }
  markAsDirty();
}

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

/**
 * 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(boolean selectable) {
  if (!SharedUtil.equals(this.selectable, selectable)) {
    this.selectable = selectable;
    markAsDirty();
  }
}

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

markAsDirty();

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

protected void applyPresentation(Presentation p) {
  if (presentations != null) {
    Element settingsElement = presentations.getSettings(p);
    applySettings(settingsElement);
    presentations.setCurrent(p);
    component.markAsDirty();
  }
}

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

&& (id == null || id == getNullSelectionItemId())) {
  markAsDirty();
} else if (id != null && containsId(id)) {
  newValue.add(id);
markAsDirty();
return;

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

/**
 * 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.ValueChangeEvent event) {
  if (equals(event.getProperty())
      || event.getProperty() == getPropertyDataSource()) {
    super.valueChange(event);
  } else {
    refreshRowCache();
    containerChangeToBeRendered = true;
  }
  markAsDirty();
}

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

markAsDirty();
maybeThrowCacheUpdateExceptions();

相关文章

微信公众号

最新文章

更多

Table类方法