I have tried adding a CustomAbstractDragController class which extends AbstractDragController.
I have set an override method for toggleSelection as follows...
@Override
public void toggleSelection(Widget draggable) {
assert draggable != null;
boolean multipleSelectionAllowed = true;
if (context.selectedWidgets.remove(draggable)) {
draggable.removeStyleName("selectedTool");
// draggable.removeStyleName(DragClientBundle.INSTANCE.css().selected());
} else if (multipleSelectionAllowed ) {
context.selectedWidgets.add(draggable);
draggable.addStyleName("selectedTool");
// draggable.addStyleName(DragClientBundle.INSTANCE.css().selected());
} else {
context.selectedWidgets.clear();
context.selectedWidgets.add(draggable);
}
}
However, the widgets are not toggled until dragged and they are not toggled off when unselecting the widget.
On Thursday, September 5, 2013 3:23:09 PM UTC-7, themr2driftking wrote:
-- I have set an override method for toggleSelection as follows...
@Override
public void toggleSelection(Widget draggable) {
assert draggable != null;
boolean multipleSelectionAllowed = true;
if (context.selectedWidgets.remove(draggable)) {
draggable.removeStyleName("selectedTool");
// draggable.removeStyleName(DragClientBundle.INSTANCE.css().selected());
} else if (multipleSelectionAllowed ) {
context.selectedWidgets.add(draggable);
draggable.addStyleName("selectedTool");
// draggable.addStyleName(DragClientBundle.INSTANCE.css().selected());
} else {
context.selectedWidgets.clear();
context.selectedWidgets.add(draggable);
}
}
However, the widgets are not toggled until dragged and they are not toggled off when unselecting the widget.
On Thursday, September 5, 2013 3:23:09 PM UTC-7, themr2driftking wrote:
Is there a way to change the selection style of the drag controller?I would like for a border to be added around a widget. Is this possible?Thanks
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment