单击时如何禁用单个单元格选择?示例
我就是这么做的:
class CustomDefaultSelectionBindings extends DefaultSelectionBindings {
@Override
protected void configureBodyMouseClickBindings(final UiBindingRegistry uiBindingRegistry) {
//do nothing
}
}
class CustomDefaultSelectionLayerConfiguration extends DefaultSelectionLayerConfiguration {
@Override
protected void addSelectionUIBindings() {
addConfiguration(new CustomDefaultSelectionBindings());
}
}
final SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
selectionLayer.addConfiguration(new CustomDefaultSelectionLayerConfiguration());提前谢谢。
发布于 2017-02-15 10:49:17
您需要在没有默认配置的情况下创建SelectionLayer
final SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer, false);
selectionLayer.addConfiguration(new CustomDefaultSelectionLayerConfiguration());但是有了上面的解决方案,你仍然可以选择身体,因为身体鼠标拖动模式。最简单的方法是无论如何不要使用SelectionLayer。不确定您有哪些其他要求。
https://stackoverflow.com/questions/42246995
复制相似问题