001/* 002 * #%L 003 * GwtMaterial 004 * %% 005 * Copyright (C) 2015 - 2017 GwtMaterialDesign 006 * %% 007 * Licensed under the Apache License, Version 2.0 (the "License"); 008 * you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 * #L% 019 */ 020package gwt.material.design.client.jquery; 021 022import com.google.gwt.dom.client.Element; 023import gwt.material.design.jquery.client.api.Event; 024import gwt.material.design.jquery.client.api.Functions; 025import gwt.material.design.jquery.client.api.JQueryElement; 026import jsinterop.annotations.JsType; 027 028@JsType(name = "jQuery", isNative = true) 029public class JQueryExtElement extends JQueryElement { 030 031 public native JQueryExtElement forceRedraw(); 032 033 public native JQueryExtElement insertAt(int index, Element element); 034 035 public native JQueryExtElement longpress(Functions.MouseEventFunc longCallback, Functions.MouseEventFunc shortCallback, int duration); 036 037 public native boolean hasVerticalScrollBar(); 038 039 public native boolean hasHorizontalScrollBar(); 040 041 public native boolean hasScrollBar(); 042 043 public native boolean isScrollStart(); 044 045 public native boolean isScrollEnd(); 046 047 public native boolean scrollHandler(Object dir, String name, Functions.FuncRet2<Event, String> handler); 048 049 public native boolean smartScroll(String name, Functions.FuncRet2<Event, String> handler); 050 051 public native boolean scrollY(String name, Functions.FuncRet2<Event, String> handler); 052 053 public native boolean scrollX(String name, Functions.FuncRet2<Event, String> handler); 054 055 public native boolean onScrollUp(String name, Functions.FuncRet2<Event, String> handler); 056 057 public native boolean onScrollDown(String name, Functions.FuncRet2<Event, String> handler); 058 059 public native boolean onScrollLeft(String name, Functions.FuncRet2<Event, String> handler); 060 061 public native boolean onScrollRight(String name, Functions.FuncRet2<Event, String> handler); 062}