mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-22 20:13:52 +00:00
Light grey border removed while selecting a cell in filter table. Default cursor added while text hovering.
This commit is contained in:
1 parent
71bb4cb591
commit
64097b5c91
4 files changed
+34
-10
No files matched your search
+6
-8
@@ -10,9 +10,7 @@ import com.google.gwt.view.client.ProvidesKey;
|
||||
import com.google.gwt.view.client.SelectionChangeEvent;
|
||||
|
||||
/**
|
||||
* A multi selection model, that allows to block the selection change notifications.<br>
|
||||
* This is a copy of {@link MultiSelectionModel}, because the implementation of <code>MultiSelectionModel</code>
|
||||
* wasn't open enough.
|
||||
* A multi selection model, that allows to block the selection change notifications.
|
||||
* @author Lennart Hensler (D054527)
|
||||
*/
|
||||
public class ControllableMultiSelectionModel<T> extends MultiSelectionModel<T> {
|
||||
@@ -77,13 +75,13 @@ public class ControllableMultiSelectionModel<T> extends MultiSelectionModel<T> {
|
||||
*/
|
||||
@Override
|
||||
public Set<T> getSelectedSet() {
|
||||
resolveChanges();
|
||||
determineChanges();
|
||||
return new HashSet<T>(selectedSet.values());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelected(T item) {
|
||||
resolveChanges();
|
||||
determineChanges();
|
||||
return selectedSet.containsKey(getKey(item));
|
||||
}
|
||||
|
||||
@@ -98,7 +96,7 @@ public class ControllableMultiSelectionModel<T> extends MultiSelectionModel<T> {
|
||||
if (!blockNotifications) {
|
||||
super.scheduleSelectionChangeEvent();
|
||||
} else {
|
||||
resolveChanges();
|
||||
determineChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,10 +105,10 @@ public class ControllableMultiSelectionModel<T> extends MultiSelectionModel<T> {
|
||||
if (isEventScheduled()) {
|
||||
setEventCancelled(true);
|
||||
}
|
||||
resolveChanges();
|
||||
determineChanges();
|
||||
}
|
||||
|
||||
private void resolveChanges() {
|
||||
private void determineChanges() {
|
||||
if (selectionChanges.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
.cellTableCell {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.cellTableFirstColumn {
|
||||
width: 1px;
|
||||
padding: 2px 0 2px 3px;
|
||||
}
|
||||
|
||||
.cellTableHoveredRow {
|
||||
cursor: default;
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.sap.sailing.gwt.ui.datamining.selection.filter;
|
||||
|
||||
import com.google.gwt.user.cellview.client.CellTable;
|
||||
|
||||
public interface FilterTableResources extends CellTable.Resources {
|
||||
|
||||
@Source({ CellTable.Style.DEFAULT_CSS, "FilterTable.css" })
|
||||
FilterTableStyle cellTableStyle();
|
||||
|
||||
interface FilterTableStyle extends CellTable.Style {
|
||||
}
|
||||
}
|
||||
+4
-2
@@ -7,6 +7,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.gwt.cell.client.CheckboxCell;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.dom.client.BrowserEvents;
|
||||
import com.google.gwt.dom.client.NativeEvent;
|
||||
import com.google.gwt.user.cellview.client.CellTable;
|
||||
@@ -43,7 +44,8 @@ public class FilterableSelectionTable<ContentType extends Serializable> {
|
||||
|
||||
allData = new ArrayList<ContentType>();
|
||||
|
||||
table = new BaseCelltable<>(Integer.MAX_VALUE);
|
||||
FilterTableResources tableRes = GWT.create(FilterTableResources.class);
|
||||
table = new BaseCelltable<>(Integer.MAX_VALUE, tableRes);
|
||||
table.setWidth("100%");
|
||||
table.setAutoHeaderRefreshDisabled(true);
|
||||
table.setAutoFooterRefreshDisabled(true);
|
||||
@@ -72,7 +74,7 @@ public class FilterableSelectionTable<ContentType extends Serializable> {
|
||||
}
|
||||
});
|
||||
dataProvider.addDataDisplay(table);
|
||||
|
||||
|
||||
table.addColumn(checkColumn);
|
||||
table.addColumn(contentColumn);
|
||||
|
||||
|
||||
Reference in new issue
Block a user