com.google.gwt.dom.client.Element.setDraggable()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(243)

本文整理了Java中com.google.gwt.dom.client.Element.setDraggable()方法的一些代码示例,展示了Element.setDraggable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.setDraggable()方法的具体详情如下:
包路径:com.google.gwt.dom.client.Element
类名称:Element
方法名:setDraggable

Element.setDraggable介绍

[英]Changes the draggable attribute to one of #DRAGGABLE_AUTO, #DRAGGABLE_FALSE, or #DRAGGABLE_TRUE.
[中]将draggable属性更改为#draggable_AUTO、#draggable_FALSE或#draggable_TRUE中的一个。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

  1. @Override
  2. public R draggable(String draggable) {
  3. assertCanAddAttribute().setDraggable(draggable);
  4. return getReturnBuilder();
  5. }

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

  1. @Override
  2. public R draggable(String draggable) {
  3. assertCanAddAttribute().setDraggable(draggable);
  4. return getReturnBuilder();
  5. }

代码示例来源:origin: net.wetheinter/gwt-user

  1. @Override
  2. public R draggable(String draggable) {
  3. assertCanAddAttribute().setDraggable(draggable);
  4. return getReturnBuilder();
  5. }

代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit

  1. @Override
  2. protected void removeDraggable(Element element) {
  3. if (getDragSourceWidget() instanceof TableWidget) {
  4. TableWidget widget = (TableWidget) getDragSourceWidget();
  5. List<Widget> list = widget.getRenderedRows();
  6. for (Widget row : list) {
  7. Element rowElement = row.getElement();
  8. rowElement.setDraggable(Element.DRAGGABLE_FALSE);
  9. String primaryDragSourceStyle = getStylePrimaryName(getDraggableElement()) + STYLE_SUFFIX_DRAGSOURCE;
  10. rowElement.removeClassName(primaryDragSourceStyle);
  11. rowElement.removeClassName(getStyleNameDraggable());
  12. }
  13. }
  14. }

代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit

  1. protected void initDraggableRows() {
  2. TableWidget tableWidget = getTableWidget();
  3. if (tableWidget != null) {
  4. List<Widget> list = tableWidget.getRenderedRows();
  5. for (Widget row : list) {
  6. Element rowElement = row.getElement();
  7. rowElement.setDraggable(Element.DRAGGABLE_TRUE);
  8. String primaryDragSourceStyle = getStylePrimaryName(getDraggableElement()) + STYLE_SUFFIX_DRAGSOURCE;
  9. if (!isElementContainsClass(rowElement, primaryDragSourceStyle)) {
  10. rowElement.addClassName(primaryDragSourceStyle);
  11. }
  12. if (!isElementContainsClass(rowElement, getStyleNameDraggable())) {
  13. rowElement.addClassName(getStyleNameDraggable());
  14. }
  15. }
  16. }
  17. }

相关文章

Element类方法