Minor update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@102198 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
a212ad3b69
commit
cd696cde7a
|
@ -1,13 +1,6 @@
|
|||
package org.gcube.portlets.user.tdwx.client.config;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.dom.client.EventTarget;
|
||||
import com.google.gwt.user.client.Event;
|
||||
import com.sencha.gxt.core.client.GXTLogConfiguration;
|
||||
import com.sencha.gxt.data.shared.ListStore;
|
||||
import com.sencha.gxt.messages.client.DefaultMessages;
|
||||
import com.sencha.gxt.widget.core.client.event.LiveGridViewUpdateEvent;
|
||||
import com.sencha.gxt.widget.core.client.grid.LiveGridView;
|
||||
|
||||
/**
|
||||
|
@ -19,17 +12,17 @@ import com.sencha.gxt.widget.core.client.grid.LiveGridView;
|
|||
*/
|
||||
public class ExtendedLiveGridView<M> extends LiveGridView<M> {
|
||||
|
||||
private boolean isLoading;
|
||||
private boolean isMasked;
|
||||
//private boolean isLoading;
|
||||
//private boolean isMasked;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private int viewIndexReload = -1;
|
||||
|
||||
private int lastViewIndex = -1;
|
||||
private int lastScrollDirection = 0;
|
||||
private int rowHeightAdjust;
|
||||
private boolean measureRowHeight = true;
|
||||
private boolean ignoreScroll;
|
||||
//private int lastViewIndex = -1;
|
||||
//private int lastScrollDirection = 0;
|
||||
//private int rowHeightAdjust;
|
||||
//private boolean measureRowHeight = true;
|
||||
//private boolean ignoreScroll;
|
||||
|
||||
// private boolean adjustScrollHeight;
|
||||
|
||||
|
@ -60,7 +53,8 @@ public class ExtendedLiveGridView<M> extends LiveGridView<M> {
|
|||
* height.
|
||||
*
|
||||
* @return the visible row count
|
||||
*/
|
||||
|
||||
|
||||
@Override
|
||||
public int getVisibleRowCount() {
|
||||
int rh = getRowHeight();
|
||||
|
@ -75,11 +69,6 @@ public class ExtendedLiveGridView<M> extends LiveGridView<M> {
|
|||
calcHeight = rh * result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Log.debug("GetVisibleRowCount(): row height: " + rh +
|
||||
* " visibleHeight: " + visibleHeight + " visible rows: " + result +
|
||||
* " calcHeight: " + calcHeight);
|
||||
*/
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -102,11 +91,19 @@ public class ExtendedLiveGridView<M> extends LiveGridView<M> {
|
|||
} else if (type == Event.ONSCROLL && liveScroller.isOrHasChild(target)) {
|
||||
ge.stopPropagation();
|
||||
ge.preventDefault();
|
||||
Log.debug("HandleComponentEvent: scrollTop:"+liveScroller.getScrollTop()+", rowHeight:"+getRowHeight()+", newIndex:"+(int) Math.ceil((double) liveScroller.getScrollTop()
|
||||
/ getRowHeight()));
|
||||
updateRows(
|
||||
(int) Math.ceil((double) liveScroller.getScrollTop()
|
||||
/ getRowHeight()), false);
|
||||
|
||||
int newIndex = (int) Math.ceil((double) liveScroller.getScrollTop()
|
||||
/ getRowHeight());
|
||||
|
||||
|
||||
Log.debug("HandleComponentEvent: totalCount:" + totalCount
|
||||
+ ", scrollHeight:" + liveScroller.getScrollHeight()
|
||||
+ ", scrollTop:" + liveScroller.getScrollTop()
|
||||
+ ", rowHeight:" + getRowHeight() + ", newIndex:"
|
||||
+ newIndex);
|
||||
|
||||
updateRows(newIndex, false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,14 +114,13 @@ public class ExtendedLiveGridView<M> extends LiveGridView<M> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the rows based on the new index.
|
||||
*
|
||||
* @param newIndex
|
||||
* the new index
|
||||
* @param reload
|
||||
* true to reload the data
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected void updateRows(int newIndex, boolean reload) {
|
||||
Log.debug("updateRows(): newIndex: " + newIndex + " reload:" + reload);
|
||||
|
@ -238,5 +234,5 @@ public class ExtendedLiveGridView<M> extends LiveGridView<M> {
|
|||
totalCount, getVisibleRowCount()));
|
||||
lastViewIndex = viewIndex;
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
|
@ -231,18 +231,18 @@ public class GridAndCellSelectionModel<M> extends GridSelectionModel<M> {
|
|||
|
||||
@Override
|
||||
public void refresh() {
|
||||
Log.debug("Selection Model Called Refresh()");
|
||||
//Log.debug("Selection Model Called Refresh()");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onClear(StoreClearEvent<M> event) {
|
||||
Log.debug("Selection Model Called OnClear()");
|
||||
//Log.debug("Selection Model Called OnClear()");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRemove(M model) {
|
||||
Log.debug("Selection Model Called OnRemove(): ");
|
||||
//Log.debug("Selection Model Called OnRemove(): ");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue