mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 19:57:36 +08:00
Repair Table ColumnCollapseListener #PL-5097
This commit is contained in:
parent
b76654dc77
commit
da4d461bd9
@ -517,7 +517,7 @@ public abstract class WebAbstractTable<T extends com.vaadin.ui.Table & CubaEnhan
|
||||
});
|
||||
|
||||
// vaadin7
|
||||
component.addColumnCollapseListener(new CubaEnhancedTable.CollapseListener() {
|
||||
component.addColumnCollapseListener(new CubaEnhancedTable.ColumnCollapseListener() {
|
||||
@Override
|
||||
public void columnCollapsed(Object columnId, boolean collapsed) {
|
||||
final Column collapsedColumn = getColumn(columnId.toString());
|
||||
|
@ -52,11 +52,11 @@ public interface CubaEnhancedTable extends AggregationContainer {
|
||||
boolean isShowTotalAggregation();
|
||||
void setShowTotalAggregation(boolean showTotalAggregation);
|
||||
|
||||
void addColumnCollapseListener(CollapseListener listener);
|
||||
void addColumnCollapseListener(ColumnCollapseListener listener);
|
||||
|
||||
void removeColumnCollapseListener(CollapseListener listener);
|
||||
void removeColumnCollapseListener(ColumnCollapseListener listener);
|
||||
|
||||
interface CollapseListener {
|
||||
interface ColumnCollapseListener {
|
||||
void columnCollapsed(Object columnId, boolean collapsed);
|
||||
}
|
||||
}
|
@ -46,7 +46,7 @@ public class CubaTable extends com.vaadin.ui.Table implements TableContainer, Cu
|
||||
|
||||
protected boolean aggregatable = false;
|
||||
|
||||
protected List<CollapseListener> columnCollapseListeners = new ArrayList<>();
|
||||
protected List<ColumnCollapseListener> columnCollapseListeners = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected CubaTableState getState() {
|
||||
@ -265,18 +265,18 @@ public class CubaTable extends com.vaadin.ui.Table implements TableContainer, Cu
|
||||
}
|
||||
}
|
||||
|
||||
public void addColumnCollapseListener(CollapseListener listener) {
|
||||
public void addColumnCollapseListener(ColumnCollapseListener listener) {
|
||||
columnCollapseListeners.add(listener);
|
||||
}
|
||||
|
||||
public void removeColumnCollapseListener(CollapseListener listener) {
|
||||
public void removeColumnCollapseListener(ColumnCollapseListener listener) {
|
||||
columnCollapseListeners.remove(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setColumnCollapsed(Object propertyId, boolean collapsed) throws IllegalStateException {
|
||||
if (isColumnCollapsed(propertyId) != collapsed) {
|
||||
for (CollapseListener listener : columnCollapseListeners) {
|
||||
for (ColumnCollapseListener listener : columnCollapseListeners) {
|
||||
listener.columnCollapsed(propertyId, collapsed);
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ public class CubaTreeTable extends com.vaadin.ui.TreeTable implements TreeTableC
|
||||
|
||||
protected boolean aggregatable = false;
|
||||
|
||||
protected List<CollapseListener> columnCollapseListeners = new ArrayList<>();
|
||||
protected List<ColumnCollapseListener> columnCollapseListeners = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected CubaTreeTableState getState() {
|
||||
@ -209,18 +209,18 @@ public class CubaTreeTable extends com.vaadin.ui.TreeTable implements TreeTableC
|
||||
}
|
||||
}
|
||||
|
||||
public void addColumnCollapseListener(CollapseListener listener) {
|
||||
public void addColumnCollapseListener(ColumnCollapseListener listener) {
|
||||
columnCollapseListeners.add(listener);
|
||||
}
|
||||
|
||||
public void removeColumnCollapseListener(CollapseListener listener) {
|
||||
public void removeColumnCollapseListener(ColumnCollapseListener listener) {
|
||||
columnCollapseListeners.remove(listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setColumnCollapsed(Object propertyId, boolean collapsed) throws IllegalStateException {
|
||||
if (isColumnCollapsed(propertyId) != collapsed) {
|
||||
for (CollapseListener listener : columnCollapseListeners) {
|
||||
for (ColumnCollapseListener listener : columnCollapseListeners) {
|
||||
listener.columnCollapsed(propertyId, collapsed);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user