本文整理了Java中com.vaadin.v7.ui.Table.refreshRenderedCells()
方法的一些代码示例,展示了Table.refreshRenderedCells()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.refreshRenderedCells()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.Table
类名称: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
/**
* Gets the cached visible table contents.
*
* @return the cached visible table contents.
*/
private Object[][] getVisibleCells() {
if (pageBuffer == null) {
refreshRenderedCells();
}
return pageBuffer;
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets
@Override
public void refreshCellStyles() {
super.refreshRenderedCells();
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Removes all action handlers.
*/
public void removeAllActionHandlers() {
actionHandlers = null;
actionMapper = null;
// Assures the visual refresh. No need to reset the page buffer
// before as the content has not changed, only the action
// handlers.
refreshRenderedCells();
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* 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 buffer
// before as the content has not changed, only the style generators
refreshRenderedCells();
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* 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) {
itemDescriptionGenerator = generator;
// Assures the visual refresh. No need to reset the page buffer
// before as the content has not changed, only the descriptions
refreshRenderedCells();
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Sets whether column collapsing is allowed or not.
*
* @param collapsingAllowed
* specifies whether column collapsing is allowed.
*/
public void setColumnCollapsingAllowed(boolean collapsingAllowed) {
columnCollapsingAllowed = collapsingAllowed;
if (!collapsingAllowed) {
collapsedColumns.clear();
}
// Assures the visual refresh. No need to reset the page buffer before
// as the content has not changed, only the alignments.
refreshRenderedCells();
}
代码示例来源:origin: tepi/FilteringTable
@Override
protected void refreshRenderedCells() {
super.refreshRenderedCells();
// NOTE: 'visibleComponents' HashSet is (re)created by method getVisibleCellsNoCache(...)
// But only when method refreshRenderedCells() calls it.
try {
java.lang.reflect.Field field = com.vaadin.v7.ui.Table.class.getDeclaredField("visibleComponents");
field.setAccessible(true);
_visibleComponents = (HashSet<Component>) field.get(this);
} catch (Exception exception) {
throw new IllegalArgumentException("Unable to get visibleComponents", exception);
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Notifies the component that it is connected to an application.
*
* @see Component#attach()
*/
@Override
public void attach() {
super.attach();
refreshRenderedCells();
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Removes a previously registered action handler for the contents of this
* container.
*
* @see com.vaadin.event.Action.Container#removeActionHandler(Action.Handler)
*/
@Override
public void removeActionHandler(Action.Handler actionHandler) {
if (actionHandlers != null && actionHandlers.contains(actionHandler)) {
actionHandlers.remove(actionHandler);
if (actionHandlers.isEmpty()) {
actionHandlers = null;
actionMapper = null;
}
// Assures the visual refresh. No need to reset the page buffer
// before as the content has not changed, only the action
// handlers.
refreshRenderedCells();
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Sets the specified column's alignment.
*
* <p>
* Throws IllegalArgumentException if the alignment is not one of the
* following: {@link Align#LEFT}, {@link Align#CENTER} or
* {@link Align#RIGHT}
* </p>
*
* @param propertyId
* the propertyID identifying the column.
* @param alignment
* the desired alignment.
*/
public void setColumnAlignment(Object propertyId, Align alignment) {
if (alignment == null || alignment == Align.LEFT) {
columnAlignments.remove(propertyId);
} else {
columnAlignments.put(propertyId, alignment);
}
// Assures the visual refresh. No need to reset the page buffer before
// as the content has not changed, only the alignments.
refreshRenderedCells();
}
代码示例来源: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
/**
* 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. This should not be necessary as
// sort() calls refreshRowCache
refreshRenderedCells();
}
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Registers a new action handler for this container.
*
* @see com.vaadin.event.Action.Container#addActionHandler(Action.Handler)
*/
@Override
public void addActionHandler(Action.Handler actionHandler) {
if (actionHandler != null) {
if (actionHandlers == null) {
actionHandlers = new LinkedList<Handler>();
actionMapper = new KeyMapper<Action>();
}
if (!actionHandlers.contains(actionHandler)) {
actionHandlers.add(actionHandler);
// Assures the visual refresh. No need to reset the page buffer
// before as the content has not changed, only the action
// handlers.
refreshRenderedCells();
}
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Internal method to set currently sorted column property id. With doSort
* flag actual sorting may be bypassed.
*
* @param propertyId
* @param doSort
*/
private void setSortContainerPropertyId(Object propertyId, boolean doSort) {
if ((sortContainerPropertyId != null
&& !sortContainerPropertyId.equals(propertyId))
|| (sortContainerPropertyId == null && propertyId != null)) {
sortContainerPropertyId = propertyId;
if (doSort) {
sort();
// Assures the visual refresh. This should not be necessary as
// sort() calls refreshRowCache
refreshRenderedCells();
}
}
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
/**
* Discards and recreates the internal row cache. Call this if you make
* changes that affect the rows but the information about the changes are
* not automatically propagated to the Table.
* <p>
* Do not call this e.g. if you have updated the data model through a
* Property. These types of changes are automatically propagated to the
* Table.
* <p>
* A typical case when this is needed is if you update a generator (e.g.
* CellStyleGenerator) and want to ensure that the rows are redrawn with new
* styles.
* <p>
* <i>Note that calling this method is not cheap so avoid calling it
* unnecessarily.</i>
*
* @since 6.7.2
*/
public void refreshRowCache() {
resetPageBuffer();
refreshRenderedCells();
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
refreshRenderedCells();
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
refreshRenderedCells();
内容来源于网络,如有侵权,请联系作者删除!