/ftr-gwt-library-date/src/main/java/eu/future/earth/gwt/client/date/weeklist/WeekListPanelDragController.java

http://ftr-gwt-library.googlecode.com/ · Java · 51 lines · 26 code · 10 blank · 15 comment · 0 complexity · acb94bca2284dc94a3002660499e36a7 MD5 · raw file

  1. /*
  2. * Copyright 2007 Future Earth, info@future-earth.eu
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package eu.future.earth.gwt.client.date.weeklist;
  17. import com.allen_sauer.gwt.dnd.client.PickupDragController;
  18. import com.google.gwt.user.client.DOM;
  19. import com.google.gwt.user.client.ui.AbsolutePanel;
  20. public class WeekListPanelDragController extends PickupDragController {
  21. public WeekListPanelDragController(AbsolutePanel boundaryPanel) {
  22. super(boundaryPanel, false);
  23. super.setBehaviorDragStartSensitivity(1);
  24. }
  25. public void dragMove() {
  26. DOM.scrollIntoView(context.draggable.getElement());
  27. super.dragMove();
  28. }
  29. @Override
  30. protected void restoreSelectedWidgetsLocation() {
  31. super.restoreSelectedWidgetsLocation();
  32. }
  33. @Override
  34. protected void restoreSelectedWidgetsStyle() {
  35. super.restoreSelectedWidgetsStyle();
  36. }
  37. @Override
  38. protected void saveSelectedWidgetsLocationAndStyle() {
  39. super.saveSelectedWidgetsLocationAndStyle();
  40. }
  41. }