/ftr-gwt-library-date/src/main/java/eu/future/earth/gwt/client/date/weeklist/WeekListPanelDragController.java
Java | 51 lines | 26 code | 10 blank | 15 comment | 0 complexity | acb94bca2284dc94a3002660499e36a7 MD5 | raw file
Possible License(s): Apache-2.0
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 17package eu.future.earth.gwt.client.date.weeklist; 18 19import com.allen_sauer.gwt.dnd.client.PickupDragController; 20import com.google.gwt.user.client.DOM; 21import com.google.gwt.user.client.ui.AbsolutePanel; 22 23public class WeekListPanelDragController extends PickupDragController { 24 25 public WeekListPanelDragController(AbsolutePanel boundaryPanel) { 26 super(boundaryPanel, false); 27 super.setBehaviorDragStartSensitivity(1); 28 } 29 30 public void dragMove() { 31 DOM.scrollIntoView(context.draggable.getElement()); 32 super.dragMove(); 33 34 } 35 36 @Override 37 protected void restoreSelectedWidgetsLocation() { 38 super.restoreSelectedWidgetsLocation(); 39 } 40 41 @Override 42 protected void restoreSelectedWidgetsStyle() { 43 super.restoreSelectedWidgetsStyle(); 44 } 45 46 @Override 47 protected void saveSelectedWidgetsLocationAndStyle() { 48 super.saveSelectedWidgetsLocationAndStyle(); 49 } 50 51}