Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need diable button #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,7 @@
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<id>findbugs check</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>


</plugins>
<resources>
Expand Down Expand Up @@ -178,11 +165,6 @@
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>findbugs</groupId>
<artifactId>annotations</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package com.googlecode.mgwt.dom.client.event.animation;

import com.google.gwt.event.dom.client.DomEvent;

import com.googlecode.mgwt.dom.client.event.EventTypesHolder;

/**
Expand All @@ -28,7 +29,6 @@ public class AnimationEndEvent extends DomEvent<AnimationEndHandler> {
/**
* Event type for animation end events.
*/
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "MS_PKGPROTECT", justification = "we need this for testing")
protected static Type<AnimationEndHandler> TYPE;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package com.googlecode.mgwt.dom.client.event.animation;

import com.google.gwt.event.dom.client.DomEvent;

import com.googlecode.mgwt.dom.client.event.EventTypesHolder;

/**
Expand All @@ -25,7 +26,6 @@
*/
public class TransitionEndEvent extends DomEvent<TransitionEndHandler> {

@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "MS_PKGPROTECT", justification = "we need this for testing")
protected static Type<TransitionEndHandler> TYPE;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public static void onTouchStart(int x, int y) {
hasValues = true;
}

@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "MS_EXPOSE_REP", justification = "we need this for testing")
public static int[] getTouchStart() {
return coordinates;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/googlecode/mgwt/ui/client/MGWT.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.RootPanel;

import com.googlecode.mgwt.dom.client.event.orientation.OrientationChangeEvent;
import com.googlecode.mgwt.dom.client.event.orientation.OrientationChangeEvent.ORIENTATION;
import com.googlecode.mgwt.dom.client.event.orientation.OrientationChangeHandler;
Expand Down Expand Up @@ -200,7 +201,6 @@ public static native boolean isFullScreen()/*-{
* fixIOSScrollIssueBlur
* </p>
*/
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "LI_LAZY_INIT_UPDATE_STATIC", justification = "no multithreading in gwt code")
public static void fixIOSScrollIssueBlur() {
if (!scrollingDisabled) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/googlecode/mgwt/ui/client/MGWTStyle.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.LinkElement;
import com.google.gwt.dom.client.NodeList;

import com.googlecode.mgwt.ui.client.theme.MGWTTheme;
import com.googlecode.mgwt.ui.client.theme.MGWTThemeBaseThemeStandardImpl;

Expand Down Expand Up @@ -34,7 +35,6 @@ public class MGWTStyle {
*
* @return the default bundle
*/
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "LI_LAZY_INIT_UPDATE_STATIC", justification = "no multithreading in gwt code")
public static final MGWTTheme getTheme() {
if (theme == null) {
theme = new MGWTThemeBaseThemeStandardImpl();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,145 +2,146 @@

import com.google.gwt.core.client.JsArrayInteger;
import com.google.gwt.user.client.Element;

import com.googlecode.mgwt.ui.client.MGWT;

public class WebkitCssUtilImpl implements CssUtilImpl {

private boolean has3d;
private boolean has3d;

public WebkitCssUtilImpl() {
has3d = _has3d();
}
public WebkitCssUtilImpl() {
has3d = _has3d();
}

@Override
public void translate(Element el, int x, int y) {
String cssText = null;
if (has3d() && !MGWT.getOsDetection().isDesktop()) {
cssText = "translate3d(" + x + "px, " + y + "px, 0px)";
} else {
cssText = "translate( " + x + "px, " + y + "px )";
}
@Override
public void translate(Element el, int x, int y) {
String cssText = null;
if (has3d() && !MGWT.getOsDetection().isDesktop()) {
cssText = "translate3d(" + x + "px, " + y + "px, 0px)";
} else {
cssText = "translate( " + x + "px, " + y + "px )";
}

_translate(el, cssText);
_translate(el, cssText);

}
}

@Override
public native void setDelay(Element el, int milliseconds) /*-{
@Override
public native void setDelay(Element el, int milliseconds) /*-{
el.style.webkitTransitionDelay = milliseconds + "ms";
}-*/;
}-*/;

@Override
public native void setOpacity(Element el, double opacity) /*-{
@Override
public native void setOpacity(Element el, double opacity) /*-{
el.style.opacity = opacity;

}-*/;
}-*/;

@Override
public native void setDuration(Element el, int time) /*-{
@Override
public native void setDuration(Element el, int time) /*-{
el.style.webkitTransitionDuration = time + "ms";

}-*/;
}-*/;

private native void _translate(Element el, String css)/*-{
private native void _translate(Element el, String css)/*-{
el.style.webkitTransform = css;
}-*/;

@Override
public void rotate(Element el, int degree) {
if (MGWT.getOsDetection().isAndroid()) {
el.getStyle().setProperty("WebkitTransform", "rotate(" + degree + "deg)");
// _translate(el, );
} else {
el.getStyle().setProperty("WebkitTransform", "rotate(" + degree + "deg) translateZ(0)");
// _translate(el,"rotate(" + degree + "deg) translateZ(0)");

}

}

@Override
public boolean hasTransform() {
// TODO maybe we need runtime checks for older devices, but for now this
// is okay!
return true;
}

@Override
public boolean hasTransistionEndEvent() {
// TODO this is okay for android from 2.1
// so we should be okay without a runtime check
return true;
}

@Override
public boolean has3d() {
return has3d;
}

private static native boolean _has3d()/*-{
}-*/;

@Override
public void rotate(Element el, int degree) {
if (MGWT.getOsDetection().isAndroid()) {
el.getStyle().setProperty("WebkitTransform", "rotate(" + degree + "deg)");
// _translate(el, );
} else {
el.getStyle().setProperty("WebkitTransform", "rotate(" + degree + "deg) translateZ(0)");
// _translate(el,"rotate(" + degree + "deg) translateZ(0)");

}

}

@Override
public boolean hasTransform() {
// TODO maybe we need runtime checks for older devices, but for now this
// is okay!
return true;
}

@Override
public boolean hasTransistionEndEvent() {
// TODO this is okay for android from 2.1
// so we should be okay without a runtime check
return true;
}

@Override
public boolean has3d() {
return has3d;
}

private static native boolean _has3d()/*-{
return ('WebKitCSSMatrix' in $wnd && 'm11' in new WebKitCSSMatrix())
}-*/;
}-*/;

@Override
public String getTransformProperty() {
return "-webkit-transform";
}
@Override
public String getTransformProperty() {
return "-webkit-transform";
}

@Override
public int[] getPositionFromTransForm(Element element) {
JsArrayInteger array = getPositionFromTransform(element);
return new int[] { array.get(0), array.get(1) };
}
@Override
public int[] getPositionFromTransForm(Element element) {
JsArrayInteger array = getPositionFromTransform(element);
return new int[] {array.get(0), array.get(1)};
}

private native JsArrayInteger getPositionFromTransform(Element el)/*-{
private native JsArrayInteger getPositionFromTransform(Element el)/*-{
var matrix = getComputedStyle(el, null)['webkitTransform'].replace(
/[^0-9-.,]/g, '').split(',');
var x = matrix[4] * 1;
var y = matrix[5] * 1;
return [ x, y ];
}-*/;
}-*/;

@Override
public native int getTopPositionFromCssPosition(Element element) /*-{
@Override
public native int getTopPositionFromCssPosition(Element element) /*-{
return getComputedStyle(element, null).top.replace(/[^0-9-]/g, '') * 1;
}-*/;
}-*/;

@Override
public native int getLeftPositionFromCssPosition(Element element)/*-{
@Override
public native int getLeftPositionFromCssPosition(Element element)/*-{
return getComputedStyle(element, null).left.replace(/[^0-9-]/g, '') * 1;
}-*/;
}-*/;

@Override
public native void resetTransform(Element el) /*-{
@Override
public native void resetTransform(Element el) /*-{
el.style.webkitTransform = "";
}-*/;
}-*/;

@Override
public native void setTransistionProperty(Element element, String string) /*-{
@Override
public native void setTransistionProperty(Element element, String string) /*-{
element.webkitTransitionProperty = string;
}-*/;
}-*/;

@Override
public native void setTransFormOrigin(Element el, int x, int y) /*-{
@Override
public native void setTransFormOrigin(Element el, int x, int y) /*-{
el.webkitTransformOrigin = x + " " + y;
}-*/;
}-*/;

@Override
public native void setTransistionTimingFunction(Element element, String string) /*-{
@Override
public native void setTransistionTimingFunction(Element element, String string) /*-{
el.webkitTransitionTimingFunction = string;
}-*/;

@Override
public void setTranslateAndZoom(Element el, int x, int y, double scale) {
String cssText = null;
if (MGWT.getOsDetection().isAndroid() || MGWT.getOsDetection().isDesktop()) {
cssText = "translate( " + x + "px, " + y + "px ) scale( + " + scale + ")";
} else {
cssText = "translate3d(" + x + "px, " + y + "px, 0px) scale( + " + scale + ")";
}
el.getStyle().setProperty("WebkitTransform", cssText);

}
}-*/;

@Override
public void setTranslateAndZoom(Element el, int x, int y, double scale) {
String cssText = null;
if (MGWT.getOsDetection().isAndroid() || MGWT.getOsDetection().isDesktop()) {
cssText = "translate( " + x + "px, " + y + "px ) scale(" + scale + ")";
} else {
cssText = "translate3d(" + x + "px, " + y + "px, 0px) scale(" + scale + ")";
}
el.getStyle().setProperty("WebkitTransform", cssText);

}

}
Loading