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

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

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

Table.refreshRenderedCells介绍

[英]Refreshes the rows in the internal cache. Only if #resetPageBuffer() is called before this then all values are guaranteed to be recreated.
[中]刷新内部缓存中的行。只有在此之前调用#resetPageBuffer(),才能保证重新创建所有值。

代码示例

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

  1. /**
  2. * Gets the cached visible table contents.
  3. *
  4. * @return the cached visible table contents.
  5. */
  6. private Object[][] getVisibleCells() {
  7. if (pageBuffer == null) {
  8. refreshRenderedCells();
  9. }
  10. return pageBuffer;
  11. }

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

  1. @Override
  2. public void refreshCellStyles() {
  3. super.refreshRenderedCells();
  4. }

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

  1. /**
  2. * Removes all action handlers.
  3. */
  4. public void removeAllActionHandlers() {
  5. actionHandlers = null;
  6. actionMapper = null;
  7. // Assures the visual refresh. No need to reset the page buffer
  8. // before as the content has not changed, only the action
  9. // handlers.
  10. refreshRenderedCells();
  11. }

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

  1. /**
  2. * Set cell style generator for Table.
  3. *
  4. * @param cellStyleGenerator
  5. * New cell style generator or null to remove generator.
  6. */
  7. public void setCellStyleGenerator(CellStyleGenerator cellStyleGenerator) {
  8. this.cellStyleGenerator = cellStyleGenerator;
  9. // Assures the visual refresh. No need to reset the page buffer
  10. // before as the content has not changed, only the style generators
  11. refreshRenderedCells();
  12. }

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

  1. /**
  2. * Set the item description generator which generates tooltips for cells and
  3. * rows in the Table.
  4. *
  5. * @param generator
  6. * The generator to use or null to disable
  7. */
  8. public void setItemDescriptionGenerator(
  9. ItemDescriptionGenerator generator) {
  10. if (generator != itemDescriptionGenerator) {
  11. itemDescriptionGenerator = generator;
  12. // Assures the visual refresh. No need to reset the page buffer
  13. // before as the content has not changed, only the descriptions
  14. refreshRenderedCells();
  15. }
  16. }

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

  1. /**
  2. * Sets whether column collapsing is allowed or not.
  3. *
  4. * @param collapsingAllowed
  5. * specifies whether column collapsing is allowed.
  6. */
  7. public void setColumnCollapsingAllowed(boolean collapsingAllowed) {
  8. columnCollapsingAllowed = collapsingAllowed;
  9. if (!collapsingAllowed) {
  10. collapsedColumns.clear();
  11. }
  12. // Assures the visual refresh. No need to reset the page buffer before
  13. // as the content has not changed, only the alignments.
  14. refreshRenderedCells();
  15. }

代码示例来源:origin: tepi/FilteringTable

  1. @Override
  2. protected void refreshRenderedCells() {
  3. super.refreshRenderedCells();
  4. // NOTE: 'visibleComponents' HashSet is (re)created by method getVisibleCellsNoCache(...)
  5. // But only when method refreshRenderedCells() calls it.
  6. try {
  7. java.lang.reflect.Field field = com.vaadin.v7.ui.Table.class.getDeclaredField("visibleComponents");
  8. field.setAccessible(true);
  9. _visibleComponents = (HashSet<Component>) field.get(this);
  10. } catch (Exception exception) {
  11. throw new IllegalArgumentException("Unable to get visibleComponents", exception);
  12. }
  13. }

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

  1. /**
  2. * Notifies the component that it is connected to an application.
  3. *
  4. * @see Component#attach()
  5. */
  6. @Override
  7. public void attach() {
  8. super.attach();
  9. refreshRenderedCells();
  10. }

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

  1. /**
  2. * Removes a previously registered action handler for the contents of this
  3. * container.
  4. *
  5. * @see com.vaadin.event.Action.Container#removeActionHandler(Action.Handler)
  6. */
  7. @Override
  8. public void removeActionHandler(Action.Handler actionHandler) {
  9. if (actionHandlers != null && actionHandlers.contains(actionHandler)) {
  10. actionHandlers.remove(actionHandler);
  11. if (actionHandlers.isEmpty()) {
  12. actionHandlers = null;
  13. actionMapper = null;
  14. }
  15. // Assures the visual refresh. No need to reset the page buffer
  16. // before as the content has not changed, only the action
  17. // handlers.
  18. refreshRenderedCells();
  19. }
  20. }

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

  1. /**
  2. * Sets the specified column's alignment.
  3. *
  4. * <p>
  5. * Throws IllegalArgumentException if the alignment is not one of the
  6. * following: {@link Align#LEFT}, {@link Align#CENTER} or
  7. * {@link Align#RIGHT}
  8. * </p>
  9. *
  10. * @param propertyId
  11. * the propertyID identifying the column.
  12. * @param alignment
  13. * the desired alignment.
  14. */
  15. public void setColumnAlignment(Object propertyId, Align alignment) {
  16. if (alignment == null || alignment == Align.LEFT) {
  17. columnAlignments.remove(propertyId);
  18. } else {
  19. columnAlignments.put(propertyId, alignment);
  20. }
  21. // Assures the visual refresh. No need to reset the page buffer before
  22. // as the content has not changed, only the alignments.
  23. refreshRenderedCells();
  24. }

代码示例来源: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. * Internal method to set sort ascending. With doSort flag actual sort can
  3. * be bypassed.
  4. *
  5. * @param ascending
  6. * @param doSort
  7. */
  8. private void setSortAscending(boolean ascending, boolean doSort) {
  9. if (sortAscending != ascending) {
  10. sortAscending = ascending;
  11. if (doSort) {
  12. sort();
  13. // Assures the visual refresh. This should not be necessary as
  14. // sort() calls refreshRowCache
  15. refreshRenderedCells();
  16. }
  17. }
  18. }

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

  1. /**
  2. * Registers a new action handler for this container.
  3. *
  4. * @see com.vaadin.event.Action.Container#addActionHandler(Action.Handler)
  5. */
  6. @Override
  7. public void addActionHandler(Action.Handler actionHandler) {
  8. if (actionHandler != null) {
  9. if (actionHandlers == null) {
  10. actionHandlers = new LinkedList<Handler>();
  11. actionMapper = new KeyMapper<Action>();
  12. }
  13. if (!actionHandlers.contains(actionHandler)) {
  14. actionHandlers.add(actionHandler);
  15. // Assures the visual refresh. No need to reset the page buffer
  16. // before as the content has not changed, only the action
  17. // handlers.
  18. refreshRenderedCells();
  19. }
  20. }
  21. }

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

  1. /**
  2. * Internal method to set currently sorted column property id. With doSort
  3. * flag actual sorting may be bypassed.
  4. *
  5. * @param propertyId
  6. * @param doSort
  7. */
  8. private void setSortContainerPropertyId(Object propertyId, boolean doSort) {
  9. if ((sortContainerPropertyId != null
  10. && !sortContainerPropertyId.equals(propertyId))
  11. || (sortContainerPropertyId == null && propertyId != null)) {
  12. sortContainerPropertyId = propertyId;
  13. if (doSort) {
  14. sort();
  15. // Assures the visual refresh. This should not be necessary as
  16. // sort() calls refreshRowCache
  17. refreshRenderedCells();
  18. }
  19. }
  20. }

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

  1. /**
  2. * Discards and recreates the internal row cache. Call this if you make
  3. * changes that affect the rows but the information about the changes are
  4. * not automatically propagated to the Table.
  5. * <p>
  6. * Do not call this e.g. if you have updated the data model through a
  7. * Property. These types of changes are automatically propagated to the
  8. * Table.
  9. * <p>
  10. * A typical case when this is needed is if you update a generator (e.g.
  11. * CellStyleGenerator) and want to ensure that the rows are redrawn with new
  12. * styles.
  13. * <p>
  14. * <i>Note that calling this method is not cheap so avoid calling it
  15. * unnecessarily.</i>
  16. *
  17. * @since 6.7.2
  18. */
  19. public void refreshRowCache() {
  20. resetPageBuffer();
  21. refreshRenderedCells();
  22. }

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

  1. refreshRenderedCells();

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

  1. refreshRenderedCells();

相关文章

Table类方法