From 6509f1a1e595b4d804aff9cee2262366ff63ff97 Mon Sep 17 00:00:00 2001 From: Daniel Kurka Date: Sat, 30 Aug 2014 21:19:32 +0200 Subject: [PATCH 01/40] [maven-release-plugin] prepare release 2.0.0-rc2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66aef213a..be2f1bcf4 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.googlecode.mgwt mgwt - 2.0.0-SNAPSHOT + 2.0.0-rc2 jar mgwt From 13d22a9561b0b6f8037d0434aca1ea0f39f979fc Mon Sep 17 00:00:00 2001 From: Daniel Kurka Date: Sat, 30 Aug 2014 21:19:36 +0200 Subject: [PATCH 02/40] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index be2f1bcf4..66aef213a 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.googlecode.mgwt mgwt - 2.0.0-rc2 + 2.0.0-SNAPSHOT jar mgwt From 68362f7a0c350fe2eb6fbd0aed5235c56942ee76 Mon Sep 17 00:00:00 2001 From: Katharina Fahnenbruck Date: Sun, 31 Aug 2014 21:01:24 +0200 Subject: [PATCH 03/40] Add more editor support --- .../ui/client/editor/MValueBoxEditor.java | 112 ++++++++ .../editor/MValueBoxEditorDecorator.java | 241 +++++++++--------- .../ui/client/widget/input/MDoubleBox.java | 12 +- .../ui/client/widget/input/MIntegerBox.java | 12 +- .../mgwt/ui/client/widget/input/MLongBox.java | 12 +- 5 files changed, 262 insertions(+), 127 deletions(-) create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/editor/MValueBoxEditor.java diff --git a/src/main/java/com/googlecode/mgwt/ui/client/editor/MValueBoxEditor.java b/src/main/java/com/googlecode/mgwt/ui/client/editor/MValueBoxEditor.java new file mode 100644 index 000000000..c840d79ee --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/editor/MValueBoxEditor.java @@ -0,0 +1,112 @@ +/* + * Copyright 2014 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.ui.client.editor; + +import java.text.ParseException; + +import com.google.gwt.editor.client.EditorDelegate; +import com.google.gwt.editor.client.HasEditorDelegate; +import com.google.gwt.editor.client.adapters.TakesValueEditor; +import com.google.gwt.user.client.ui.ValueBoxBase; +import com.googlecode.mgwt.ui.client.widget.base.MValueBoxBase; + +/** + * Adapts the {@link ValueBoxBase} interface to the Editor framework. This + * adapter uses {@link ValueBoxBase#getValueOrThrow()} to report parse errors to + * the Editor framework. + * + * @param + * the type of value to be edited + */ +public class MValueBoxEditor extends TakesValueEditor implements + HasEditorDelegate { + + /** + * Returns a new TakesValueEditor that adapts a {@link ValueBoxBase} instance. + * + * @param valueBox + * a {@link ValueBoxBase} instance to adapt + * @return a ValueBoxEditor instance of the same type as the adapted + * {@link ValueBoxBase} instance + */ + public static MValueBoxEditor of(MValueBoxBase valueBox) { + return new MValueBoxEditor(valueBox); + } + + private EditorDelegate delegate; + private final MValueBoxBase peer; + private T value; + + /** + * Constructs a new ValueBoxEditor that adapts a {@link ValueBoxBase} peer + * instance. + * + * @param peer + * a {@link ValueBoxBase} instance of type T + */ + protected MValueBoxEditor(MValueBoxBase peer) { + super(peer); + this.peer = peer; + } + + /** + * Returns the {@link EditorDelegate} for this instance. + * + * @return an {@link EditorDelegate}, or {@code null} + * @see #setDelegate(EditorDelegate) + */ + public EditorDelegate getDelegate() { + return delegate; + } + + /** + * Calls {@link ValueBoxBase#getValueOrThrow()}. If a {@link ParseException} + * is thrown, it will be available through + * {@link com.google.gwt.editor.client.EditorError#getUserData() + * EditorError.getUserData()}. + * + * @return a value of type T + * @see #setValue(Object) + */ + @Override + public T getValue() { + try { + value = peer.getValueOrThrow(); + } catch (ParseException e) { + // TODO i18n + getDelegate().recordError("Bad value (" + peer.getText() + ")", + peer.getText(), e); + } + return value; + } + + /** + * Sets the {@link EditorDelegate} for this instance. This method is only + * called by the driver. + * + * @param delegate + * an {@link EditorDelegate}, or {@code null} + * @see #getDelegate() + */ + public void setDelegate(EditorDelegate delegate) { + this.delegate = delegate; + } + + @Override + public void setValue(T value) { + peer.setValue(this.value = value); + } +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/editor/MValueBoxEditorDecorator.java b/src/main/java/com/googlecode/mgwt/ui/client/editor/MValueBoxEditorDecorator.java index a5ef8cc84..8007a6353 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/editor/MValueBoxEditorDecorator.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/editor/MValueBoxEditorDecorator.java @@ -1,5 +1,17 @@ -/** - * +/* + * Copyright 2014 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. */ package com.googlecode.mgwt.ui.client.editor; @@ -27,7 +39,7 @@ * This MValueBoxEditorDecorator is more or less a copy clone of * {@link ValueBoxEditor} and is needed to do JSR-303 BeanValidation. Only * difference is the child added here must be of type {@link MValueBoxBase}. - * + * *

*

Use in UiBinder Templates

*

@@ -35,12 +47,12 @@ * <e:valuebox> child tag. *

* For example: - * + * *

  * @UiField
  * MValueBoxEditorDecorator<String> name;
  * 
- * + * *
  * <e:MValueBoxEditorDecorator ui:field='name'>
  *   <e:mvaluebox>
@@ -48,123 +60,122 @@
  *   </e:mvaluebox>
  * </e:MValueBoxEditorDecorator>
  * 
- * + * * @param * the type which is edited, i.e. String for {@link MTextBox}. - * + * * @author Christoph Guse - * + * */ public class MValueBoxEditorDecorator extends Composite implements - HasEditorErrors, IsEditor> { - - interface Binder extends UiBinder> { - Binder BINDER = GWT.create(Binder.class); - } - - private ValueBoxEditor editor; - - @UiField - SimplePanel contents; - - @UiField - DivElement errorLabel; - - /** - * Constructs a ValueBoxEditorDecorator, UI is taken from - * MValueBoxEditorDecorator.ui.xml. - */ - @UiConstructor - public MValueBoxEditorDecorator() { - initWidget(Binder.BINDER.createAndBindUi(this)); - } - - /** - * Constructs a ValueBoxEditorDecorator using a {@link ValueBoxBase} widget - * and a {@link ValueBoxEditor} editor. - * - * @param widget - * the widget - * @param editor - * the editor - */ - public MValueBoxEditorDecorator(MValueBoxBase widget, - ValueBoxEditor editor) { - this(); - contents.add(widget); - this.editor = editor; - } - - /** - * Returns the associated {@link ValueBoxEditor}. - * - * @return a {@link ValueBoxEditor} instance - * @see #setEditor(ValueBoxEditor) - */ - @Override - public ValueBoxEditor asEditor() { - return editor; - } - - /** - * Sets the associated {@link ValueBoxEditor}. - * - * @param editor - * a {@link ValueBoxEditor} instance - * @see #asEditor() - */ - public void setEditor(ValueBoxEditor editor) { - this.editor = editor; - } - - /** - * Set the widget that the EditorPanel will display. This method will - * automatically call {@link #setEditor}. - * - * @param widget - * a {@link ValueBoxBase} widget - */ - @UiChild(limit = 1, tagname = "mvaluebox") - public void setMValueBox(MValueBoxBase widget) { - contents.add(widget); - setEditor(widget.asEditor()); - } - - /** - * The default implementation will display, but not consume, received errors - * whose {@link EditorError#getEditor() getEditor()} method returns the - * Editor passed into {@link #setEditor}. - * - * @param errors - * a List of {@link EditorError} instances - */ - @Override - public void showErrors(List errors) { - StringBuilder sb = new StringBuilder(); - for (EditorError error : errors) { - if (error.getEditor().equals(editor)) { - sb.append("\n").append(error.getMessage()); - } - } - - if (sb.length() == 0) { - errorLabel.setInnerText(""); - errorLabel.getStyle().setDisplay(Display.NONE); - return; - } - - errorLabel.setInnerText(sb.substring(1)); - errorLabel.getStyle().setDisplay(Display.INLINE_BLOCK); + HasEditorErrors, IsEditor> { + + interface Binder extends UiBinder> { + Binder BINDER = GWT.create(Binder.class); + } + + private ValueBoxEditor editor; + + @UiField + SimplePanel contents; + + @UiField + DivElement errorLabel; + + /** + * Constructs a ValueBoxEditorDecorator, UI is taken from + * MValueBoxEditorDecorator.ui.xml. + */ + @UiConstructor + public MValueBoxEditorDecorator() { + initWidget(Binder.BINDER.createAndBindUi(this)); + } + + /** + * Constructs a ValueBoxEditorDecorator using a {@link ValueBoxBase} widget + * and a {@link ValueBoxEditor} editor. + * + * @param widget + * the widget + * @param editor + * the editor + */ + public MValueBoxEditorDecorator(MValueBoxBase widget, + ValueBoxEditor editor) { + this(); + contents.add(widget); + this.editor = editor; + } + + /** + * Returns the associated {@link ValueBoxEditor}. + * + * @return a {@link ValueBoxEditor} instance + * @see #setEditor(ValueBoxEditor) + */ + @Override + public ValueBoxEditor asEditor() { + return editor; + } + + /** + * Sets the associated {@link ValueBoxEditor}. + * + * @param editor + * a {@link ValueBoxEditor} instance + * @see #asEditor() + */ + public void setEditor(ValueBoxEditor editor) { + this.editor = editor; + } + + /** + * Set the widget that the EditorPanel will display. This method will + * automatically call {@link #setEditor}. + * + * @param widget + * a {@link ValueBoxBase} widget + */ + @UiChild(limit = 1, tagname = "mvaluebox") + public void setMValueBox(MValueBoxBase widget) { + contents.add(widget); + setEditor(widget.asEditor()); + } + + /** + * The default implementation will display, but not consume, received errors + * whose {@link EditorError#getEditor() getEditor()} method returns the Editor + * passed into {@link #setEditor}. + * + * @param errors + * a List of {@link EditorError} instances + */ + @Override + public void showErrors(List errors) { + StringBuilder sb = new StringBuilder(); + for (EditorError error : errors) { + if (error.getEditor().equals(editor)) { + sb.append("\n").append(error.getMessage()); + } } - /** - * Shows the given error message. - * - * @param errorMessage - */ - public void showError(String errorMessage) { - errorLabel.setInnerText(errorMessage); - errorLabel.getStyle().setDisplay(Display.INLINE_BLOCK); + if (sb.length() == 0) { + errorLabel.setInnerText(""); + errorLabel.getStyle().setDisplay(Display.NONE); + return; } + errorLabel.setInnerText(sb.substring(1)); + errorLabel.getStyle().setDisplay(Display.INLINE_BLOCK); + } + + /** + * Shows the given error message. + * + * @param errorMessage + */ + public void showError(String errorMessage) { + errorLabel.setInnerText(errorMessage); + errorLabel.getStyle().setDisplay(Display.INLINE_BLOCK); + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDoubleBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDoubleBox.java index b0bf7ff4e..93d4daf56 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDoubleBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDoubleBox.java @@ -1,12 +1,12 @@ /* * Copyright 2011 Daniel Kurka - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -22,7 +22,7 @@ /** * A input box that accepts doubles - * + * * @author Daniel Kurka */ public class MDoubleBox extends MValueBoxBase { @@ -31,6 +31,10 @@ private static class SDoubleBox extends DoubleBox implements HasSource { private Object source; + public SDoubleBox() { + setStylePrimaryName("gwt-DoubleBox"); + } + @Override protected HandlerManager createHandlerManager() { return new HandlerManager(source); diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MIntegerBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MIntegerBox.java index 8c7cd1175..961900098 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MIntegerBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MIntegerBox.java @@ -1,12 +1,12 @@ /* * Copyright 2011 Daniel Kurka - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -22,7 +22,7 @@ /** * An input element that handles integers - * + * * @author Daniel Kurka */ public class MIntegerBox extends MValueBoxBase { @@ -31,6 +31,10 @@ private static class SIntegerBox extends IntegerBox implements HasSource { private Object source; + public SIntegerBox() { + setStylePrimaryName("gwt-IntegerBox"); + } + @Override protected HandlerManager createHandlerManager() { return new HandlerManager(source); diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MLongBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MLongBox.java index 66ae4313a..08dc1a709 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MLongBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MLongBox.java @@ -1,12 +1,12 @@ /* * Copyright 2011 Daniel Kurka - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -22,7 +22,7 @@ /** * An input element that handles longs - * + * * @author Daniel Kurka */ public class MLongBox extends MValueBoxBase { @@ -30,6 +30,10 @@ public class MLongBox extends MValueBoxBase { private static class SLongBox extends LongBox implements HasSource { private Object source; + public SLongBox() { + setStylePrimaryName("gwt-LongBox"); + } + @Override public void setSource(Object source) { this.source = source; From a64ba6d467ac5fddcb80af70c9126544b050848e Mon Sep 17 00:00:00 2001 From: Daniel Kurka Date: Mon, 1 Sep 2014 22:08:51 +0200 Subject: [PATCH 04/40] [maven-release-plugin] prepare release 2.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66aef213a..f06313030 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.googlecode.mgwt mgwt - 2.0.0-SNAPSHOT + 2.0.0 jar mgwt From 7e46ed4e0b12cb7ddb6ab95acc3060e1a2b24b21 Mon Sep 17 00:00:00 2001 From: Daniel Kurka Date: Mon, 1 Sep 2014 22:09:39 +0200 Subject: [PATCH 05/40] [maven-release-plugin] rollback the release of 2.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f06313030..66aef213a 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.googlecode.mgwt mgwt - 2.0.0 + 2.0.0-SNAPSHOT jar mgwt From f6f11ea2d2535d95bfc063b1792ba4da5b1a910b Mon Sep 17 00:00:00 2001 From: Daniel Kurka Date: Mon, 1 Sep 2014 22:13:29 +0200 Subject: [PATCH 06/40] [maven-release-plugin] prepare release 2.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66aef213a..f06313030 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.googlecode.mgwt mgwt - 2.0.0-SNAPSHOT + 2.0.0 jar mgwt From 933f1c82d6b55510de20cbaff5ab81c0c3f51e8e Mon Sep 17 00:00:00 2001 From: Daniel Kurka Date: Mon, 1 Sep 2014 22:13:34 +0200 Subject: [PATCH 07/40] [maven-release-plugin] prepare for next development iteration --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f06313030..0e62cbf2c 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.googlecode.mgwt mgwt - 2.0.0 + 2.0.1-SNAPSHOT jar mgwt From 4b207e2f111f2a6f9b278243d33130e1c8bb0790 Mon Sep 17 00:00:00 2001 From: Andrei Volgin Date: Tue, 2 Sep 2014 00:09:52 -0400 Subject: [PATCH 08/40] Fixed spelling error in the word "appearance". --- ...InputApperanceHolder.java => InputAppearanceHolder.java} | 6 +++--- .../googlecode/mgwt/ui/client/widget/input/MDateBox.java | 2 +- .../googlecode/mgwt/ui/client/widget/input/MDoubleBox.java | 2 +- .../mgwt/ui/client/widget/input/MEmailTextBox.java | 2 +- .../googlecode/mgwt/ui/client/widget/input/MIntegerBox.java | 2 +- .../googlecode/mgwt/ui/client/widget/input/MLongBox.java | 2 +- .../mgwt/ui/client/widget/input/MNumberTextBox.java | 2 +- .../mgwt/ui/client/widget/input/MPasswordTextBox.java | 2 +- .../mgwt/ui/client/widget/input/MPhoneNumberTextBox.java | 2 +- .../googlecode/mgwt/ui/client/widget/input/MTextArea.java | 2 +- .../googlecode/mgwt/ui/client/widget/input/MTextBox.java | 2 +- .../googlecode/mgwt/ui/client/widget/input/MUrlTextBox.java | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) rename src/main/java/com/googlecode/mgwt/ui/client/widget/input/{InputApperanceHolder.java => InputAppearanceHolder.java} (80%) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/InputApperanceHolder.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/InputAppearanceHolder.java similarity index 80% rename from src/main/java/com/googlecode/mgwt/ui/client/widget/input/InputApperanceHolder.java rename to src/main/java/com/googlecode/mgwt/ui/client/widget/input/InputAppearanceHolder.java index 2bdc8f96e..a013fbd54 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/InputApperanceHolder.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/InputAppearanceHolder.java @@ -17,9 +17,9 @@ import com.google.gwt.core.shared.GWT; -public class InputApperanceHolder { +public class InputAppearanceHolder { - public static final InputAppearance DEFAULT_APPERAERANCE = GWT.create(InputAppearance.class); + public static final InputAppearance DEFAULT_APPEARANCE = GWT.create(InputAppearance.class); - private InputApperanceHolder() {} + private InputAppearanceHolder() {} } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDateBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDateBox.java index ee5507eb1..de73d5928 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDateBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDateBox.java @@ -154,7 +154,7 @@ public Date parse(CharSequence text) throws ParseException { private DateTimeFormat format; public MDateBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MDateBox(InputAppearance appearance) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDoubleBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDoubleBox.java index 93d4daf56..2c11cf0d6 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDoubleBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MDoubleBox.java @@ -46,7 +46,7 @@ public void setSource(Object source) { } public MDoubleBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MDoubleBox(InputAppearance appearance) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MEmailTextBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MEmailTextBox.java index 2a3c55d04..1aabba361 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MEmailTextBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MEmailTextBox.java @@ -24,7 +24,7 @@ public class MEmailTextBox extends MTextBox { public MEmailTextBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MIntegerBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MIntegerBox.java index 961900098..89ca8a12f 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MIntegerBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MIntegerBox.java @@ -48,7 +48,7 @@ public void setSource(Object source) { } public MIntegerBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MIntegerBox(InputAppearance appearance) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MLongBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MLongBox.java index 08dc1a709..e68c2743f 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MLongBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MLongBox.java @@ -47,7 +47,7 @@ protected HandlerManager createHandlerManager() { } public MLongBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MLongBox(InputAppearance appearance) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MNumberTextBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MNumberTextBox.java index d1ca04ef1..58e0af7d3 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MNumberTextBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MNumberTextBox.java @@ -24,7 +24,7 @@ public class MNumberTextBox extends MTextBox { public MNumberTextBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MNumberTextBox(InputAppearance appearance) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MPasswordTextBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MPasswordTextBox.java index e6b40f2c1..5da10c999 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MPasswordTextBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MPasswordTextBox.java @@ -40,7 +40,7 @@ protected HandlerManager createHandlerManager() { } public MPasswordTextBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MPasswordTextBox(InputAppearance appearance) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MPhoneNumberTextBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MPhoneNumberTextBox.java index 1fb01c792..74ed25421 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MPhoneNumberTextBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MPhoneNumberTextBox.java @@ -24,7 +24,7 @@ public class MPhoneNumberTextBox extends MTextBox { public MPhoneNumberTextBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MPhoneNumberTextBox(InputAppearance appearance) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MTextArea.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MTextArea.java index bf2fc00e3..8730984f8 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MTextArea.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MTextArea.java @@ -45,7 +45,7 @@ protected HandlerManager createHandlerManager() { } public MTextArea() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MTextArea(InputAppearance appearance) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MTextBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MTextBox.java index 79633f6e7..b3ddb7e5b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MTextBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MTextBox.java @@ -43,7 +43,7 @@ protected HandlerManager createHandlerManager() { } public MTextBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MTextBox(InputAppearance appearance) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MUrlTextBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MUrlTextBox.java index 4dbfb4bc2..5e7639276 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MUrlTextBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/MUrlTextBox.java @@ -21,7 +21,7 @@ */ public class MUrlTextBox extends MTextBox { public MUrlTextBox() { - this(InputApperanceHolder.DEFAULT_APPERAERANCE); + this(InputAppearanceHolder.DEFAULT_APPEARANCE); } public MUrlTextBox(InputAppearance appearance) { From 30c78c0e4692890c1119d4e6f57f57a04e8deca1 Mon Sep 17 00:00:00 2001 From: Andrei Volgin Date: Thu, 4 Sep 2014 00:09:06 -0400 Subject: [PATCH 09/40] Added "space-around" option to Justification. I see no reason to leave it out. --- .gitignore | 1 + .../mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0b9bf2965..57dab39f9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ mgwt.iml gwt-unitCache war/ www-test/ +/bin diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java index 4c71034e9..f729fe76b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java @@ -38,7 +38,7 @@ private String getCssValue() { } public static enum Justification { - START("flex-start"), END("flex-end"), CENTER("center"), SPACE_BETWEEN("space-between"); + START("flex-start"), END("flex-end"), CENTER("center"), SPACE_BETWEEN("space-between"), SPACE_AROUND("space-around"); private final String cssValue; @@ -148,6 +148,9 @@ public static void setJustification(Element el, Justification value) { case SPACE_BETWEEN: el.getStyle().setProperty("WebkitBoxPack", "justify"); break; + case SPACE_AROUND: + el.getStyle().setProperty("WebkitBoxPack", "justify"); + break; default: throw new RuntimeException(); } From 5075c0a76c37ff6c68fff26068b50dcd72bfc9b7 Mon Sep 17 00:00:00 2001 From: Andrei Volgin Date: Sat, 6 Sep 2014 03:23:40 -0400 Subject: [PATCH 10/40] Fixed spelling error. --- .../googlecode/mgwt/ui/generator/DeviceDensityGenerator.java | 2 +- .../com/googlecode/mgwt/ui/generator/FormFactorGenerator.java | 2 +- .../googlecode/mgwt/ui/generator/OsDetectionGenerator.java | 2 +- .../com/googlecode/mgwt/ui/generator/RebindingGenerator.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/generator/DeviceDensityGenerator.java b/src/main/java/com/googlecode/mgwt/ui/generator/DeviceDensityGenerator.java index d6083d7e1..5d2064059 100644 --- a/src/main/java/com/googlecode/mgwt/ui/generator/DeviceDensityGenerator.java +++ b/src/main/java/com/googlecode/mgwt/ui/generator/DeviceDensityGenerator.java @@ -31,7 +31,7 @@ */ public class DeviceDensityGenerator extends RebindingGenerator { - protected void writeImplementatioon(TreeLogger logger, SelectionProperty property, SourceWriter writer) { + protected void writeImplementation(TreeLogger logger, SelectionProperty property, SourceWriter writer) { writer.println("public boolean isMidDPI() {"); writer.println("return " + property.getCurrentValue().equals("mid") + ";"); writer.println("}"); diff --git a/src/main/java/com/googlecode/mgwt/ui/generator/FormFactorGenerator.java b/src/main/java/com/googlecode/mgwt/ui/generator/FormFactorGenerator.java index fb339bf02..fe2244ed4 100644 --- a/src/main/java/com/googlecode/mgwt/ui/generator/FormFactorGenerator.java +++ b/src/main/java/com/googlecode/mgwt/ui/generator/FormFactorGenerator.java @@ -32,7 +32,7 @@ public class FormFactorGenerator extends RebindingGenerator { @Override - protected void writeImplementatioon(TreeLogger logger, SelectionProperty property, + protected void writeImplementation(TreeLogger logger, SelectionProperty property, SourceWriter writer) { writer.println("public boolean isPhone() {"); writer.println("return " + property.getCurrentValue().equals("phone") + ";"); diff --git a/src/main/java/com/googlecode/mgwt/ui/generator/OsDetectionGenerator.java b/src/main/java/com/googlecode/mgwt/ui/generator/OsDetectionGenerator.java index ea51be5d7..9eacff4b5 100644 --- a/src/main/java/com/googlecode/mgwt/ui/generator/OsDetectionGenerator.java +++ b/src/main/java/com/googlecode/mgwt/ui/generator/OsDetectionGenerator.java @@ -30,7 +30,7 @@ public class OsDetectionGenerator extends RebindingGenerator { @Override - protected void writeImplementatioon(TreeLogger logger, SelectionProperty property, + protected void writeImplementation(TreeLogger logger, SelectionProperty property, SourceWriter writer) { writer.println("public boolean isAndroid() {"); writer.println("return isAndroidTablet() || isAndroidPhone();"); diff --git a/src/main/java/com/googlecode/mgwt/ui/generator/RebindingGenerator.java b/src/main/java/com/googlecode/mgwt/ui/generator/RebindingGenerator.java index 1ba9636d1..6891b54eb 100644 --- a/src/main/java/com/googlecode/mgwt/ui/generator/RebindingGenerator.java +++ b/src/main/java/com/googlecode/mgwt/ui/generator/RebindingGenerator.java @@ -71,13 +71,13 @@ public String generate(TreeLogger logger, GeneratorContext context, String typeN // start writing the implementation SourceWriter writer = writeHolder.composer.createSourceWriter(context, writeHolder.printWriter); - writeImplementatioon(logger, property, writer); + writeImplementation(logger, property, writer); return writeHolder.fullName; } protected abstract String getSelectionPropertyName(); - protected abstract void writeImplementatioon(TreeLogger logger, SelectionProperty property, SourceWriter writer); + protected abstract void writeImplementation(TreeLogger logger, SelectionProperty property, SourceWriter writer); private JClassType getClassType(TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException { From 87b6344379641715fabde792e9cddbe8ab3c140d Mon Sep 17 00:00:00 2001 From: Katharina Fahnenbruck Date: Tue, 16 Sep 2014 21:34:37 -0700 Subject: [PATCH 11/40] Fixed CSS typos in FlexPropertyHelper. --- .../mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java index f729fe76b..79ed4a360 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java @@ -84,13 +84,13 @@ public static void setFlex(Element el, double flex) { private static void setFlexProperty(Element el, String name, String value) { setStyleProperty(el, "MozFlex" + name, value); - setStyleProperty(el, "webkitFlex" + name, value); + setStyleProperty(el, "WebkitFlex" + name, value); setStyleProperty(el, "flex" + name, value); } private static void setProperty(Element el, String name, String value) { setStyleProperty(el, "Moz" + name, value); - setStyleProperty(el, "webkit" + name, value); + setStyleProperty(el, "Webkit" + name, value); setStyleProperty(el, name, value); } From 772855d547e6a36a7e6d1ca247aa584e0de2d87b Mon Sep 17 00:00:00 2001 From: Katharina Fahnenbruck Date: Thu, 18 Sep 2014 21:11:42 -0700 Subject: [PATCH 12/40] Added missing ensureInjected calls. --- .../client/theme/platform/header/HeaderAndroidAppearance.java | 1 + .../list/celllist/GroupingCellListAndroidAppearance.java | 1 + .../platform/list/celllist/GroupingCellListIOSAppearance.java | 2 +- .../widget/list/celllist/GroupingCellListDefaultAppearance.java | 1 + .../ui/client/widget/panel/pull/PullPanelDefaultAppearance.java | 1 - 5 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/header/HeaderAndroidAppearance.java b/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/header/HeaderAndroidAppearance.java index 9d69cd8c4..df3e99aef 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/header/HeaderAndroidAppearance.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/header/HeaderAndroidAppearance.java @@ -9,6 +9,7 @@ public class HeaderAndroidAppearance extends HeaderAbstractAppearance { static { Resources.INSTANCE.cssPanel().ensureInjected(); + Resources.INSTANCE.cssTitle().ensureInjected(); } interface CssPanel extends HeaderPanelCss {} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/list/celllist/GroupingCellListAndroidAppearance.java b/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/list/celllist/GroupingCellListAndroidAppearance.java index 5b427aefc..e6acd2ecb 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/list/celllist/GroupingCellListAndroidAppearance.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/list/celllist/GroupingCellListAndroidAppearance.java @@ -10,6 +10,7 @@ public class GroupingCellListAndroidAppearance extends GroupingCellListAbstractA static { Resources.INSTANCE.css().ensureInjected(); + Resources.INSTANCE.groupCss().ensureInjected(); } interface Css extends CellListCss {} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/list/celllist/GroupingCellListIOSAppearance.java b/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/list/celllist/GroupingCellListIOSAppearance.java index 3f31b0031..8bb359ae9 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/list/celllist/GroupingCellListIOSAppearance.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/list/celllist/GroupingCellListIOSAppearance.java @@ -3,13 +3,13 @@ import com.google.gwt.core.shared.GWT; import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.DataResource; - import com.googlecode.mgwt.ui.client.widget.list.celllist.GroupingCellListAbstractAppearance; public class GroupingCellListIOSAppearance extends GroupingCellListAbstractAppearance { static { Resources.INSTANCE.css().ensureInjected(); + Resources.INSTANCE.groupCss().ensureInjected(); } interface Css extends CellListCss {} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/GroupingCellListDefaultAppearance.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/GroupingCellListDefaultAppearance.java index 9e96d5e3f..aff53525b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/GroupingCellListDefaultAppearance.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/GroupingCellListDefaultAppearance.java @@ -23,6 +23,7 @@ public class GroupingCellListDefaultAppearance extends GroupingCellListAbstractA static { Resources.INSTANCE.css().ensureInjected(); + Resources.INSTANCE.groupCss().ensureInjected(); } interface Resources extends ClientBundle { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/PullPanelDefaultAppearance.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/PullPanelDefaultAppearance.java index 3728a911e..59e7346b5 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/PullPanelDefaultAppearance.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/PullPanelDefaultAppearance.java @@ -37,7 +37,6 @@ interface Resources extends ClientBundle { @Source("error.png") ImageResource errorImage(); - } @Override From 3fd1752fb34429f43637fc29c577d1a75a1d6f7a Mon Sep 17 00:00:00 2001 From: Katharina Fahnenbruck Date: Mon, 29 Sep 2014 21:14:05 -0700 Subject: [PATCH 13/40] Changed mgwt to work with GWT 2.7 --- .../com/googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java index 503fdc1d7..95bb61353 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java @@ -254,7 +254,6 @@ public void setSelectionRange(int pos, int length) { box.setSelectionRange(pos, length); } - @Override public void setText(String text) { box.setText(text); } From 791d23886740e1c557c6baa0e327a02473f22811 Mon Sep 17 00:00:00 2001 From: Andrei Volgin Date: Fri, 24 Oct 2014 19:29:30 -0400 Subject: [PATCH 14/40] Replaced flex-flow with flex-direction to avoid conflicts when flex-direction property is set using setOrientation. --- .../googlecode/mgwt/ui/client/widget/carousel/carousel.css | 2 +- .../com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css | 4 ++-- .../com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css index b912d0e36..45a99122e 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css @@ -18,7 +18,7 @@ .mgwt-Carousel { position: relative; flex:1; - flex-flow: column; + flex-direction: column; overflow: visible; } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css index c481f710c..b8c2c57b5 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css @@ -7,7 +7,7 @@ display: -webkit-box; /* iOS < 7 && Android < 4.4*/ display: -webkit-flex; -webkit-box-orient: vertical; /* iOS < 7 && Android < 4.4*/ - -webkit-flex-flow: column; + -webkit-flex-direction: column; } } @@ -19,7 +19,7 @@ .mgwt-FlexPanel { display: flex; - flex-flow: column; + flex-direction: column; } .mgwt-RootFlexPanel { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css index ad760ced3..37a563a97 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css @@ -21,7 +21,7 @@ .mgwt-TabPanel { display: flex; flex: 1; - flex-flow: column; + flex-direction: column; } @if user.agent safari { From de4deab712460f7941307f182563316284dffebc Mon Sep 17 00:00:00 2001 From: Andreas Kohn Date: Thu, 30 Oct 2014 10:18:58 +0100 Subject: [PATCH 15/40] Add HasText to the implemented interfaces of MValueBoxBase This restores compatibility with GWT 2.6, where HasText came from AutoDirectionHandler.Target. Note that this reverts 3fd1752fb34429f43637fc29c577d1a75a1d6f7a again. --- .../googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java index 95bb61353..b1514792f 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/base/MValueBoxBase.java @@ -44,6 +44,7 @@ import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HasEnabled; import com.google.gwt.user.client.ui.HasName; +import com.google.gwt.user.client.ui.HasText; import com.google.gwt.user.client.ui.HasValue; import com.google.gwt.user.client.ui.ValueBoxBase; import com.google.gwt.user.client.ui.ValueBoxBase.TextAlignment; @@ -66,7 +67,7 @@ public class MValueBoxBase extends Composite implements AutoDirectionHandler.Target, HasAllKeyHandlers, HasAutoCapitalize, HasAutoCorrect, HasBlurHandlers, HasChangeHandlers, HasDirectionEstimator, HasEnabled, HasFocusHandlers, HasName, HasPlaceHolder, HasTouchHandlers, - HasValue, IsEditor> { + HasText, HasValue, IsEditor> { public interface HasSource { public void setSource(Object source); @@ -254,6 +255,7 @@ public void setSelectionRange(int pos, int length) { box.setSelectionRange(pos, length); } + @Override public void setText(String text) { box.setText(text); } From 500875eb10550cc9941a757863f18512f20bb0a4 Mon Sep 17 00:00:00 2001 From: Paul French Date: Fri, 28 Nov 2014 16:39:00 +0000 Subject: [PATCH 16/40] First draft of WP8/WP8.1 (desktop IE10, mobile IE10) support. Includes fix for emulated icon handling. --- .../gwt/user/client/impl/DOMImplIE10.java | 50 ++++ .../rebind/UserAgentPropertyGenerator.java | 106 +++++++++ .../java/com/googlecode/mgwt/dom/DOM.gwt.xml | 17 ++ .../event/pointer/MsPointerCancelEvent.java | 59 +++++ .../event/pointer/MsPointerCancelHandler.java | 31 +++ .../event/pointer/MsPointerDownEvent.java | 59 +++++ .../event/pointer/MsPointerDownHandler.java | 31 +++ .../client/event/pointer/MsPointerEvent.java | 39 +++ .../event/pointer/MsPointerMoveEvent.java | 59 +++++ .../event/pointer/MsPointerMoveHandler.java | 31 +++ .../event/pointer/MsPointerUpEvent.java | 59 +++++ .../event/pointer/MsPointerUpHandler.java | 31 +++ .../client/event/pointer/SimulatedTouch.java | 60 +++++ .../pointer/SimulatedTouchCancelEvent.java | 12 + .../event/pointer/SimulatedTouchEndEvent.java | 65 +++++ .../pointer/SimulatedTouchMoveEvent.java | 66 ++++++ .../pointer/SimulatedTouchStartEvent.java | 67 ++++++ .../TouchCancelToMsPointerCancelHandler.java | 35 +++ .../pointer/TouchEndToMsPointerUpHandler.java | 35 +++ .../TouchMoveToMsPointerMoveHandler.java | 53 +++++ .../TouchStartToMsPointerDownHandler.java | 38 +++ .../mgwt/image/client/ImageConverter.java | 98 +++++--- .../image/client/ImageConverterCallback.java | 8 + .../mgwt/image/client/LoadImageCallback.java | 8 + .../java/com/googlecode/mgwt/ui/UI.gwt.xml | 17 +- .../com/googlecode/mgwt/ui/client/MGWT.java | 22 ++ .../mgwt/ui/client/OsDetection.java | 6 + .../ui/client/OsDetectionRuntimeImpl.java | 11 + .../mgwt/ui/client/util/IconHandler.java | 32 ++- .../ui/client/util/impl/CssUtilIE10Impl.java | 117 +++++++++ .../widget/animation/bundle/dissolve.css | 34 +++ .../client/widget/animation/bundle/fade.css | 33 +++ .../client/widget/animation/bundle/flip.css | 46 ++++ .../ui/client/widget/animation/bundle/pop.css | 46 ++++ .../widget/animation/bundle/slide-up.css | 48 ++++ .../client/widget/animation/bundle/slide.css | 52 ++++ .../client/widget/animation/bundle/swap.css | 83 +++++++ .../animation/impl/animation-display.css | 22 ++ .../ui/client/widget/button/ButtonBase.java | 120 ++++++---- .../ui/client/widget/button/imagebutton.css | 4 +- .../ui/client/widget/buttonbar/buttonbar.css | 11 +- .../ui/client/widget/carousel/carousel.css | 13 + .../widget/dialog/options/options-dialog.css | 6 + .../widget/dialog/panel/dialog-button.css | 7 + .../ui/client/widget/dialog/panel/dialog.css | 31 ++- .../mgwt/ui/client/widget/form/form.css | 23 +- .../client/widget/input/checkbox/checkbox.css | 50 +++- .../mgwt/ui/client/widget/input/input.css | 9 + .../client/widget/input/listbox/mlistbox.css | 7 + .../widget/input/radio/mradiobutton.css | 19 ++ .../client/widget/input/search/searchbox.css | 108 +++++++-- .../ui/client/widget/input/slider/Slider.java | 6 +- .../client/widget/list/celllist/celllist.css | 6 + .../list/celllist/grouping-celllist.css | 19 ++ .../widget/list/widgetlist/widgetlist.css | 6 + .../mgwt/ui/client/widget/main/main.css | 73 ++++-- .../mgwt/ui/client/widget/main/selection.css | 24 ++ .../widget/menu/overlay/overlay-menu.css | 17 +- .../client/widget/menu/swipe/swipe-menu.css | 9 + .../widget/panel/flex/FlexPanel.gwt.xml | 26 ++ .../widget/panel/flex/FlexPropertyHelper.java | 185 +++++---------- .../panel/flex/FlexPropertyHelperIE10.java | 147 ++++++++++++ .../panel/flex/FlexPropertyHelperMoz.java | 142 +++++++++++ .../flex/FlexPropertyHelperStandard.java | 142 +++++++++++ .../panel/flex/FlexPropertyHelperWebkit.java | 165 +++++++++++++ .../mgwt/ui/client/widget/panel/flex/flex.css | 13 + .../ui/client/widget/panel/pull/pullpanel.css | 26 ++ .../widget/panel/scroll/scrollpanel.css | 27 +++ .../ui/client/widget/progress/progressbar.css | 25 +- .../widget/progress/progressindicator.css | 36 +++ .../widget/progress/progressspinner.css | 222 +++++++++++++----- .../ui/client/widget/tabbar/tabbar-button.css | 21 +- .../mgwt/ui/client/widget/tabbar/tabbar.css | 37 ++- .../ui/client/widget/touch/TouchWidget.java | 15 +- .../client/widget/touch/TouchWidgetImpl.java | 117 +-------- .../widget/touch/TouchWidgetPointerImpl.java | 57 +++++ .../widget/touch/TouchWidgetStandardImpl.java | 86 +++++++ .../widget/touch/TouchWidgetTouchImpl.java | 47 ++++ .../client/ImageConverterGwtTestCase.java | 24 +- 79 files changed, 3332 insertions(+), 482 deletions(-) create mode 100644 src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java create mode 100644 src/main/java/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerCancelEvent.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerCancelHandler.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerDownEvent.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerDownHandler.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerEvent.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerMoveEvent.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerMoveHandler.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerUpEvent.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerUpHandler.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouch.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchCancelEvent.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchEndEvent.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchMoveEvent.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchStartEvent.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchCancelToMsPointerCancelHandler.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchEndToMsPointerUpHandler.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchMoveToMsPointerMoveHandler.java create mode 100644 src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchStartToMsPointerDownHandler.java create mode 100644 src/main/java/com/googlecode/mgwt/image/client/ImageConverterCallback.java create mode 100644 src/main/java/com/googlecode/mgwt/image/client/LoadImageCallback.java create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/util/impl/CssUtilIE10Impl.java create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetPointerImpl.java create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetStandardImpl.java create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetTouchImpl.java diff --git a/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java b/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java new file mode 100644 index 000000000..444abe1c0 --- /dev/null +++ b/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.google.gwt.user.client.impl; + +import com.google.gwt.core.client.JavaScriptObject; + + +/** + * IE10 implementation of {@link com.google.gwt.user.client.impl.DOMImplStandard}. + */ +public class DOMImplIE10 extends DOMImplIE9 { + + static + { + DOMImplStandard.addCaptureEventDispatchers(getCaptureEventDispatchers()); + DOMImplStandard.addBitlessEventDispatchers(getBitlessEventDispatchers()); + } + + public static native JavaScriptObject getCaptureEventDispatchers() /*-{ + return { + MSPointerDown: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent(*), + MSPointerUp: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent(*), + MSPointerMove: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent(*), + MSPointerCancel: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent(*) + }; + }-*/; + + public static native JavaScriptObject getBitlessEventDispatchers() /*-{ + return { + MSPointerDown: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent(*), + MSPointerUp: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent(*), + MSPointerMove: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent(*), + MSPointerCancel: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent(*) + }; + }-*/; + +} diff --git a/src/main/java/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java b/src/main/java/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java new file mode 100644 index 000000000..64f4b6d5b --- /dev/null +++ b/src/main/java/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java @@ -0,0 +1,106 @@ + +package com.google.gwt.useragent.rebind; + +import com.google.gwt.core.ext.TreeLogger; +import com.google.gwt.core.ext.linker.ConfigurationProperty; +import com.google.gwt.core.ext.linker.PropertyProviderGenerator; +import com.google.gwt.user.rebind.SourceWriter; +import com.google.gwt.user.rebind.StringSourceWriter; + +import java.util.HashSet; +import java.util.Set; +import java.util.SortedSet; + +/** + * Generator which writes out the JavaScript for determining the value of the + * user.agent selection property. + */ +public class UserAgentPropertyGenerator implements PropertyProviderGenerator { + + /** + * The list of {@code user.agent} values listed here should be kept in sync with + * {@code UserAgent.gwt.xml}. + *

Note that the order of enums matter as the script selection is based on running + * these predicates in order and matching the first one that returns {@code true}. + *

Also note that, {@code docMode < 11} in predicates for older IEs exists to + * ensures we never choose them for IE11 (we know that they will not work for IE11). + */ + private enum UserAgent { + safari("return (ua.indexOf('webkit') != -1);"), + ie10("return (ua.indexOf('msie') != -1 && (docMode >= 10 && docMode < 11)) || " + + "(ua.indexOf('iemobile') != -1 && (docMode >= 10 && docMode < 11)) || " + + "(ua.indexOf('msie') != -1 && (docMode >= 11 && docMode < 12)) || " + + "(ua.indexOf('iemobile') != -1 && (docMode >= 11 && docMode < 12));"), + ie9("return (ua.indexOf('msie') != -1 && (docMode >= 9 && docMode < 11));"), + ie8("return (ua.indexOf('msie') != -1 && (docMode >= 8 && docMode < 11));"), + gecko1_8("return (ua.indexOf('gecko') != -1 || docMode >= 11);"); + + private final String predicateBlock; + + private UserAgent(String predicateBlock) { + this.predicateBlock = predicateBlock; + } + + private static Set getKnownAgents() { + HashSet userAgents = new HashSet(); + for (UserAgent userAgent : values()) { + userAgents.add(userAgent.name()); + } + return userAgents; + } + } + + /** + * Writes out the JavaScript function body for determining the value of the + * user.agent selection property. This method is used to create + * the selection script and by {@link UserAgentGenerator} to assert at runtime + * that the correct user agent permutation is executing. + */ + static void writeUserAgentPropertyJavaScript(SourceWriter body, + SortedSet possibleValues, String fallback) { + + // write preamble + body.println("var ua = navigator.userAgent.toLowerCase();"); + body.println("var docMode = $doc.documentMode;"); + + for (UserAgent userAgent : UserAgent.values()) { + // write only selected user agents + if (possibleValues.contains(userAgent.name())) { + body.println("if ((function() { "); + body.indentln(userAgent.predicateBlock); + body.println("})()) return '%s';", userAgent.name()); + } + } + + // default return + if (fallback == null) { + fallback = "unknown"; + } + body.println("return '" + fallback + "';"); + } + + @Override + public String generate(TreeLogger logger, SortedSet possibleValues, String fallback, + SortedSet configProperties) { + assertUserAgents(logger, possibleValues); + + StringSourceWriter body = new StringSourceWriter(); + body.println("{"); + body.indent(); + writeUserAgentPropertyJavaScript(body, possibleValues, fallback); + body.outdent(); + body.println("}"); + + return body.toString(); + } + + private static void assertUserAgents(TreeLogger logger, SortedSet possibleValues) { + HashSet unknownValues = new HashSet(possibleValues); + unknownValues.removeAll(UserAgent.getKnownAgents()); + if (!unknownValues.isEmpty()) { + logger.log(TreeLogger.WARN, "Unrecognized " + UserAgentGenerator.PROPERTY_USER_AGENT + + " values " + unknownValues + ", possibly due to UserAgent.gwt.xml and " + + UserAgentPropertyGenerator.class.getName() + " being out of sync."); + } + } +} diff --git a/src/main/java/com/googlecode/mgwt/dom/DOM.gwt.xml b/src/main/java/com/googlecode/mgwt/dom/DOM.gwt.xml index 707540f71..abba2a2c9 100644 --- a/src/main/java/com/googlecode/mgwt/dom/DOM.gwt.xml +++ b/src/main/java/com/googlecode/mgwt/dom/DOM.gwt.xml @@ -50,6 +50,8 @@ }else{ return "tablet"; } + } else if (ua.indexOf("windows phone 8") != -1) { + return "phone"; } // Everything else is a desktop. @@ -78,4 +80,19 @@ + + + + + + + + + + + + + + + diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerCancelEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerCancelEvent.java new file mode 100644 index 000000000..89568c2bd --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerCancelEvent.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.DomEvent; + +/** + * Represents a native MsPointerCancelEvent. + */ +public class MsPointerCancelEvent extends MsPointerEvent { + + /** + * Event type for MsPointerCancelEvent. Represents the meta-data associated with + * this event. + */ + private static final Type TYPE = new Type( + MsPointerEvent.MSPOINTERCANCEL, new MsPointerCancelEvent()); + + /** + * Gets the event type associated with pointer cancel events. + * + * @return the handler type + */ + public static Type getType() { + return TYPE; + } + + /** + * Protected constructor, use + * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} + * to fire pointer up events. + */ + protected MsPointerCancelEvent() { + } + + @Override + public final Type getAssociatedType() { + return TYPE; + } + + @Override + protected void dispatch(MsPointerCancelHandler handler) { + handler.onPointerCancel(this); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerCancelHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerCancelHandler.java new file mode 100644 index 000000000..f94cc3500 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerCancelHandler.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.shared.EventHandler; + +/** + * Handler interface for {@link MsPointerCancelEvent} events. + */ +public interface MsPointerCancelHandler extends EventHandler { + + /** + * Called when MsPointerCancelEvent is fired. + * + * @param event the {@link MsPointerCancelEvent} that was fired + */ + void onPointerCancel(MsPointerCancelEvent event); +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerDownEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerDownEvent.java new file mode 100644 index 000000000..1c043a725 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerDownEvent.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.DomEvent; + +/** + * Represents a native MsPointerDownEvent. + */ +public class MsPointerDownEvent extends MsPointerEvent { + + /** + * Event type for MsPointerDownEvent. Represents the meta-data associated with + * this event. + */ + private static final Type TYPE = new Type( + MsPointerEvent.MSPOINTERDOWN, new MsPointerDownEvent()); + + /** + * Gets the event type associated with MsPointerDownEvent events. + * + * @return the handler type + */ + public static Type getType() { + return TYPE; + } + + /** + * Protected constructor, use + * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} + * to fire pointer down events. + */ + protected MsPointerDownEvent() { + } + + @Override + public final Type getAssociatedType() { + return TYPE; + } + + @Override + protected void dispatch(MsPointerDownHandler handler) { + handler.onPointerDown(this); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerDownHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerDownHandler.java new file mode 100644 index 000000000..f57d6cc01 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerDownHandler.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.shared.EventHandler; + +/** + * Handler interface for {@link MsPointerDownEvent} events. + */ +public interface MsPointerDownHandler extends EventHandler { + + /** + * Called when MsPointerDownEvent is fired. + * + * @param event the {@link MsPointerDownEvent} that was fired + */ + void onPointerDown(MsPointerDownEvent event); +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerEvent.java new file mode 100644 index 000000000..c944e77de --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerEvent.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.MouseEvent; +import com.google.gwt.event.shared.EventHandler; + +/** + * Abstract class representing MsPointer events. + * + * @param handler type + * + */ +public abstract class MsPointerEvent extends MouseEvent { + + public static final String MSPOINTERDOWN = "MSPointerDown"; + public static final String MSPOINTERMOVE = "MSPointerMove"; + public static final String MSPOINTEROUT = "MSPointerOut"; + public static final String MSPOINTEROVER = "MSPointerOver"; + public static final String MSPOINTERUP = "MSPointerUp"; + public static final String MSPOINTERCANCEL = "MSPointerCancel"; + + public final native int getPointerId() /*-{ + var e = this.@com.google.gwt.event.dom.client.DomEvent::nativeEvent; + return e.pointerId; + }-*/; + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerMoveEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerMoveEvent.java new file mode 100644 index 000000000..beabbe74b --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerMoveEvent.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.DomEvent; + +/** + * Represents a native MsPointerMoveEvent event. + */ +public class MsPointerMoveEvent extends MsPointerEvent { + + /** + * Event type for MsPointerMoveEvent. Represents the meta-data associated with + * this event. + */ + private static final Type TYPE = new Type( + MsPointerEvent.MSPOINTERMOVE, new MsPointerMoveEvent()); + + /** + * Gets the event type associated with MsPointerMoveEvent. + * + * @return the handler type + */ + public static Type getType() { + return TYPE; + } + + /** + * Protected constructor, use + * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} + * to fire pointer down events. + */ + protected MsPointerMoveEvent() { + } + + @Override + public final Type getAssociatedType() { + return TYPE; + } + + @Override + protected void dispatch(MsPointerMoveHandler handler) { + handler.onPointerMove(this); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerMoveHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerMoveHandler.java new file mode 100644 index 000000000..1bf66801a --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerMoveHandler.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.shared.EventHandler; + +/** + * Handler interface for {@link MsPointerMoveEvent} events. + */ +public interface MsPointerMoveHandler extends EventHandler { + + /** + * Called when MsPointerMoveEvent is fired. + * + * @param event the {@link MsPointerMoveEvent} that was fired + */ + void onPointerMove(MsPointerMoveEvent event); +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerUpEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerUpEvent.java new file mode 100644 index 000000000..d3bee93c2 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerUpEvent.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.DomEvent; + +/** + * Represents a native MsPointerUpEvent. + */ +public class MsPointerUpEvent extends MsPointerEvent { + + /** + * Event type for MsPointerUpEvent. Represents the meta-data associated with + * this event. + */ + private static final Type TYPE = new Type( + MsPointerEvent.MSPOINTERUP, new MsPointerUpEvent()); + + /** + * Gets the event type associated with MsPointerUpEvent. + * + * @return the handler type + */ + public static Type getType() { + return TYPE; + } + + /** + * Protected constructor, use + * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} + * to fire pointer down events. + */ + protected MsPointerUpEvent() { + } + + @Override + public final Type getAssociatedType() { + return TYPE; + } + + @Override + protected void dispatch(MsPointerUpHandler handler) { + handler.onPointerUp(this); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerUpHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerUpHandler.java new file mode 100644 index 000000000..4f3268b96 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/MsPointerUpHandler.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.shared.EventHandler; + +/** + * Handler interface for {@link MsPointerUpEvent} events. + */ +public interface MsPointerUpHandler extends EventHandler { + + /** + * Called when MsPointerUpEvent is fired. + * + * @param event the {@link MsPointerUpEvent} that was fired + */ + void onPointerUp(MsPointerUpEvent event); +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouch.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouch.java new file mode 100644 index 000000000..e7279cf69 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouch.java @@ -0,0 +1,60 @@ +/* + * Copyright 2014 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.core.client.JsArray; +import com.google.gwt.dom.client.Touch; + +public class SimulatedTouch extends Touch { + + public static native SimulatedTouch createTouch() /*-{ + // need to native for GwtMockito to work + return {}; + }-*/; + + public native static JsArray createTouchArray() /*-{ + return []; + }-*/; + + protected SimulatedTouch() { + } + + public final native void setClientX(int clientX) /*-{ + this.clientX = clientX; + }-*/; + + public final native void setClientY(int clientY) /*-{ + this.clientY = clientY; + }-*/; + + public final native void setPageX(int pageX) /*-{ + this.pageX = pageX; + }-*/; + + public final native void setPageY(int pageY) /*-{ + this.pageY = pageY; + }-*/; + + public final native void setScreenX(int screenX) /*-{ + this.screenX = screenX; + }-*/; + + public final native void setScreenY(int screenY) /*-{ + this.screenY = screenY; + }-*/; + + public final native void setId(int touchId) /*-{ + this.identifier = touchId + }-*/; +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchCancelEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchCancelEvent.java new file mode 100644 index 000000000..8b10b189b --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchCancelEvent.java @@ -0,0 +1,12 @@ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.TouchCancelEvent; + +public class SimulatedTouchCancelEvent extends TouchCancelEvent +{ + public SimulatedTouchCancelEvent(MsPointerCancelEvent event) { + setNativeEvent(event.getNativeEvent()); + setSource(event.getSource()); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchEndEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchEndEvent.java new file mode 100644 index 000000000..7f0245862 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchEndEvent.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.core.client.JsArray; +import com.google.gwt.dom.client.Touch; +import com.google.gwt.event.dom.client.TouchEndEvent; + +/** + * A simulated TouchEndEvent is really a MsPointerUpEvent + */ +public class SimulatedTouchEndEvent extends TouchEndEvent { + + private final int clientX; + private final int clientY; + private final int pageX; + private final int pageY; + private int touchId; + + /** + * Construct a simulated TouchEndEvent from a {@link MsPointerUpEvent} + * + * @param pointerUpEvent the data for the simulated event; + * @param multiTouch + */ + public SimulatedTouchEndEvent(MsPointerUpEvent pointerUpEvent, int touchId) { + clientX = pointerUpEvent.getClientX(); + clientY = pointerUpEvent.getClientY(); + this.touchId = touchId; + pageX = pointerUpEvent.getScreenX(); + pageY = pointerUpEvent.getScreenY(); + setNativeEvent(pointerUpEvent.getNativeEvent()); + setSource(pointerUpEvent.getSource()); + } + + @Override + public JsArray getChangedTouches() { + JsArray array = SimulatedTouch.createTouchArray(); + SimulatedTouch touch = SimulatedTouch.createTouch(); + touch.setClientX(clientX); + touch.setClientY(clientY); + touch.setPageX(pageX); + touch.setPageY(pageY); + touch.setId(touchId); + array.push(touch); + return array; + } + + @Override + public JsArray getTouches() { + return SimulatedTouch.createTouchArray(); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchMoveEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchMoveEvent.java new file mode 100644 index 000000000..054f159c1 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchMoveEvent.java @@ -0,0 +1,66 @@ +/* + * Copyright 2010 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.core.client.JsArray; +import com.google.gwt.dom.client.Touch; +import com.google.gwt.event.dom.client.TouchMoveEvent; + +/** + * A simulated TouchMoveEvent is really a MS Pointer move event + */ +public class SimulatedTouchMoveEvent extends TouchMoveEvent { + + private final int clientX; + private final int clientY; + private final int pageX; + private final int pageY; + private int touchId; + + public SimulatedTouchMoveEvent(MsPointerMoveEvent event, int touchId) { + this.touchId = touchId; + clientX = event.getClientX(); + clientY = event.getClientY(); + pageX = event.getScreenX(); + pageY = event.getScreenY(); + setNativeEvent(event.getNativeEvent()); + setSource(event.getSource()); + } + + @Override + public JsArray getChangedTouches() { + JsArray array = SimulatedTouch.createTouchArray(); + SimulatedTouch touch = SimulatedTouch.createTouch(); + touch.setClientX(clientX); + touch.setClientY(clientY); + touch.setPageX(pageX); + touch.setPageY(pageY); + touch.setId(touchId); + array.push(touch); + return array; + } + + @Override + public JsArray getTouches() { + JsArray array = SimulatedTouch.createTouchArray(); + SimulatedTouch touch = SimulatedTouch.createTouch(); + touch.setClientX(clientX); + touch.setClientY(clientY); + touch.setPageX(pageX); + touch.setPageY(pageY); + touch.setId(touchId); + array.push(touch); + return array; + } +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchStartEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchStartEvent.java new file mode 100644 index 000000000..bef61f00f --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchStartEvent.java @@ -0,0 +1,67 @@ +/* + * Copyright 2010 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.core.client.JsArray; +import com.google.gwt.dom.client.Touch; +import com.google.gwt.event.dom.client.TouchStartEvent; + +/** + * A simulated TouchStartEvent is really a MS Pointer down event + */ +public class SimulatedTouchStartEvent extends TouchStartEvent { + + private final int clientX; + private final int clientY; + private final int pageX; + private final int pageY; + private int touchId; + + public SimulatedTouchStartEvent(MsPointerDownEvent event, int touchId) { + this.touchId = touchId; + clientX = event.getClientX(); + clientY = event.getClientY(); + pageX = event.getScreenX(); + pageY = event.getScreenY(); + setNativeEvent(event.getNativeEvent()); + setSource(event.getSource()); + } + + @Override + public JsArray getChangedTouches() { + JsArray array = SimulatedTouch.createTouchArray(); + SimulatedTouch touch = SimulatedTouch.createTouch(); + touch.setClientX(clientX); + touch.setClientY(clientY); + touch.setPageX(pageX); + touch.setPageY(pageY); + touch.setId(touchId); + array.push(touch); + return array; + } + + @Override + public JsArray getTouches() { + JsArray array = SimulatedTouch.createTouchArray(); + SimulatedTouch touch = SimulatedTouch.createTouch(); + touch.setClientX(clientX); + touch.setClientY(clientY); + touch.setPageX(pageX); + touch.setPageY(pageY); + touch.setId(touchId); + array.push(touch); + return array; + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchCancelToMsPointerCancelHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchCancelToMsPointerCancelHandler.java new file mode 100644 index 000000000..6ca0470d6 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchCancelToMsPointerCancelHandler.java @@ -0,0 +1,35 @@ +/* + * Copyright 2010 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.TouchCancelHandler; + +/** + * Convert TouchCancelHandlers to MSPointer cancel handlers + */ +public class TouchCancelToMsPointerCancelHandler implements MsPointerCancelHandler { + + private final TouchCancelHandler handler; + + public TouchCancelToMsPointerCancelHandler(TouchCancelHandler handler) { + this.handler = handler; + } + + @Override + public void onPointerCancel(MsPointerCancelEvent event) { + SimulatedTouchCancelEvent simulatedTouchCancelEvent = new SimulatedTouchCancelEvent(event); + handler.onTouchCancel(simulatedTouchCancelEvent); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchEndToMsPointerUpHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchEndToMsPointerUpHandler.java new file mode 100644 index 000000000..9a9db8bf4 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchEndToMsPointerUpHandler.java @@ -0,0 +1,35 @@ +/* + * Copyright 2010 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.TouchEndHandler; + +/** + * Convert TouchEndHandlers to MsPointerUpHandlers + */ +public class TouchEndToMsPointerUpHandler implements MsPointerUpHandler { + private final TouchEndHandler handler; + + public TouchEndToMsPointerUpHandler(TouchEndHandler handler) { + this.handler = handler; + } + + /** {@inheritDoc} */ + @Override + public void onPointerUp(MsPointerUpEvent event) { + SimulatedTouchEndEvent simulatedTouchEndEvent = new SimulatedTouchEndEvent(event, TouchStartToMsPointerDownHandler.lastTouchId); + handler.onTouchEnd(simulatedTouchEndEvent); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchMoveToMsPointerMoveHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchMoveToMsPointerMoveHandler.java new file mode 100644 index 000000000..6ef42930d --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchMoveToMsPointerMoveHandler.java @@ -0,0 +1,53 @@ +/* + * Copyright 2010 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.TouchMoveHandler; + +/** + * Convert TouchMoveHandlers to MsPointerMoveHandlers for pointer devices + * + */ +public class TouchMoveToMsPointerMoveHandler implements MsPointerMoveHandler, MsPointerDownHandler, MsPointerUpHandler { + + private boolean ignoreEvent; + private final TouchMoveHandler touchMoveHandler; + + public TouchMoveToMsPointerMoveHandler(TouchMoveHandler touchMoveHandler) { + this.touchMoveHandler = touchMoveHandler; + ignoreEvent = true; + } + + @Override + public void onPointerMove(MsPointerMoveEvent event) { + if (ignoreEvent) + return; + touchMoveHandler.onTouchMove(new SimulatedTouchMoveEvent(event, TouchStartToMsPointerDownHandler.lastTouchId)); + } + + @Override + public void onPointerUp(MsPointerUpEvent event) + { + ignoreEvent = true; + } + + @Override + public void onPointerDown(MsPointerDownEvent event) + { + ignoreEvent = false; + } + +} diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchStartToMsPointerDownHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchStartToMsPointerDownHandler.java new file mode 100644 index 000000000..3389df24f --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchStartToMsPointerDownHandler.java @@ -0,0 +1,38 @@ +/* + * Copyright 2010 Daniel Kurka + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package com.googlecode.mgwt.dom.client.event.pointer; + +import com.google.gwt.event.dom.client.TouchStartHandler; + +/** + * Convert TouchStartHandlers to MSPointer down handlers + */ +public class TouchStartToMsPointerDownHandler implements MsPointerDownHandler { + + private final TouchStartHandler handler; + + public static int lastTouchId = 0; + + public TouchStartToMsPointerDownHandler(TouchStartHandler handler) { + this.handler = handler; + } + + @Override + public void onPointerDown(MsPointerDownEvent event) { + lastTouchId++; + SimulatedTouchStartEvent simulatedTouchStartEvent = new SimulatedTouchStartEvent(event, lastTouchId); + handler.onTouchStart(simulatedTouchStartEvent); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/image/client/ImageConverter.java b/src/main/java/com/googlecode/mgwt/image/client/ImageConverter.java index 2db64d1df..7ca637c00 100644 --- a/src/main/java/com/googlecode/mgwt/image/client/ImageConverter.java +++ b/src/main/java/com/googlecode/mgwt/image/client/ImageConverter.java @@ -100,7 +100,7 @@ public boolean isAnimated() { } } - public ImageResource convert(ImageResource resource, String color) { + public void convert(final ImageResource resource, String color, final ImageConverterCallback imageConverterCallback) { if (color == null) { throw new IllegalArgumentException(); @@ -110,49 +110,71 @@ public ImageResource convert(ImageResource resource, String color) { throw new IllegalArgumentException(); } - int hexColor = Integer.parseInt(color.substring(1), 16); - - int red = hexColor >> 16 & 0xFF; - int green = hexColor >> 8 & 0xFF; - int blue = hexColor & 0xFF; - - int height = resource.getHeight(); - int width = resource.getWidth(); - - ImageElement imageElement = loadImage(resource.getSafeUri().asString(), - width, height); - - Canvas canvas = Canvas.createIfSupported(); - canvas.getElement().setPropertyInt("height", height); - canvas.getElement().setPropertyInt("width", width); - - Context2d context = canvas.getContext2d(); - context.drawImage(imageElement, 0, 0); - ImageData imageData = context.getImageData(0, 0, width, - height); - - CanvasPixelArray canvasPixelArray = imageData.getData(); - - for (int i = 0; i < canvasPixelArray.getLength(); i += 4) { - canvasPixelArray.set(i, red); - canvasPixelArray.set(i + 1, green); - canvasPixelArray.set(i + 2, blue); - canvasPixelArray.set(i + 3, - canvasPixelArray.get(i + 3)); - } - context.putImageData(imageData, 0, 0); - + final int hexColor = Integer.parseInt(color.substring(1), 16); + + final int red = hexColor >> 16 & 0xFF; + final int green = hexColor >> 8 & 0xFF; + final int blue = hexColor & 0xFF; + + final int height = resource.getHeight(); + final int width = resource.getWidth(); + + loadImage(resource.getSafeUri().asString(), width, height, new LoadImageCallback() { + @Override + public void onFailure(Throwable caught) + { + imageConverterCallback.onFailure(caught); + } + + @Override + public void onSuccess(ImageElement imageElement) + { + try + { + Canvas canvas = Canvas.createIfSupported(); + canvas.getElement().setPropertyInt("height", height); + canvas.getElement().setPropertyInt("width", width); + + Context2d context = canvas.getContext2d(); + context.drawImage(imageElement, 0, 0); + ImageData imageData = context.getImageData(0, 0, width, height); + + CanvasPixelArray canvasPixelArray = imageData.getData(); + + for (int i = 0; i < canvasPixelArray.getLength(); i += 4) { + canvasPixelArray.set(i, red); + canvasPixelArray.set(i + 1, green); + canvasPixelArray.set(i + 2, blue); + canvasPixelArray.set(i + 3, + canvasPixelArray.get(i + 3)); + } + context.putImageData(imageData, 0, 0); + imageConverterCallback.onSuccess(new ConvertedImageResource( + canvas.toDataUrl("image/png"), resource.getWidth(), + resource.getHeight())); + } + catch(Throwable e) + { + this.onFailure(e); + } + } + }); - return new ConvertedImageResource( - canvas.toDataUrl("image/png"), resource.getWidth(), - resource.getHeight()); } - protected native ImageElement loadImage(String dataUrl, int width, int height) /*-{ + protected native void loadImage(String dataUrl, int width, int height, LoadImageCallback callback) /*-{ var img = new Image(); img.width = width; img.height = height; img.src = dataUrl; - return img; + img.onload = $entry(function(){ + callback.@com.googlecode.mgwt.image.client.LoadImageCallback::onSuccess(Lcom/google/gwt/dom/client/ImageElement;)(img); + }); + img.onerror = $entry(function(e){ + callback.@com.googlecode.mgwt.image.client.LoadImageCallback::onFailure(Ljava/lang/Throwable;)(e); + }); + img.onabort = $entry(function(e){ + callback.@com.googlecode.mgwt.image.client.LoadImageCallback::onFailure(Ljava/lang/Throwable;)(e); + }); }-*/; } diff --git a/src/main/java/com/googlecode/mgwt/image/client/ImageConverterCallback.java b/src/main/java/com/googlecode/mgwt/image/client/ImageConverterCallback.java new file mode 100644 index 000000000..6a5754627 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/image/client/ImageConverterCallback.java @@ -0,0 +1,8 @@ +package com.googlecode.mgwt.image.client; + +import com.google.gwt.resources.client.ImageResource; + +public interface ImageConverterCallback{ + public void onSuccess(ImageResource imageResource); + public void onFailure(Throwable e); +} diff --git a/src/main/java/com/googlecode/mgwt/image/client/LoadImageCallback.java b/src/main/java/com/googlecode/mgwt/image/client/LoadImageCallback.java new file mode 100644 index 000000000..aafdb1dda --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/image/client/LoadImageCallback.java @@ -0,0 +1,8 @@ +package com.googlecode.mgwt.image.client; + +import com.google.gwt.dom.client.ImageElement; + +public interface LoadImageCallback{ + public void onSuccess(ImageElement imageElement); + public void onFailure(Throwable e); +} diff --git a/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml b/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml index 00b36e544..8b2bbc4b1 100644 --- a/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml +++ b/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml @@ -65,16 +65,23 @@ under * the License. - + - + + + + + + + + @@ -103,6 +110,12 @@ under * the License. + + + + + + diff --git a/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java b/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java index c940e96cf..5795f13c7 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java @@ -151,6 +151,24 @@ public static void applySettings(MGWTSettings settings) { } scrollingDisabled = settings.isPreventScrolling(); + + if (MGWT.getOsDetection().isWindowsPhone()) + { + MetaElement ieCompatible = Document.get().createMetaElement(); + ieCompatible.setHttpEquiv("IE=10"); + head.appendChild(ieCompatible); + + MetaElement tapHighlight = Document.get().createMetaElement(); + tapHighlight.setName("msapplication-tap-highlight"); + tapHighlight.setContent("no"); + head.appendChild(tapHighlight); + + if (settings.isPreventScrolling()) { + BodyElement body = Document.get().getBody(); + setupPreventScrollingIE10(body); + } + } + if (settings.isPreventScrolling() && getOsDetection().isIOs()) { BodyElement body = Document.get().getBody(); setupPreventScrolling(body); @@ -305,6 +323,10 @@ private static native void setupPreventScrolling(Element el)/*-{ }-*/; + private static void setupPreventScrollingIE10(Element el) { + el.setAttribute("style", "-ms-touch-action: none;"); + } + /** * A utility method to hide the soft keyboard */ diff --git a/src/main/java/com/googlecode/mgwt/ui/client/OsDetection.java b/src/main/java/com/googlecode/mgwt/ui/client/OsDetection.java index 0c6e3580f..47655359a 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/OsDetection.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/OsDetection.java @@ -124,6 +124,12 @@ public interface OsDetection { */ public boolean isPhone(); + /** + * Are we running on Windows Phone 8/8.1 + * @return + */ + public boolean isWindowsPhone(); + /** * Are we running on a blackberry device * diff --git a/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java index 5118feade..091a80df9 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java @@ -81,6 +81,16 @@ public boolean isPhone() { return isIPhone() || isRetina() || isAndroidPhone(); } + @Override + public boolean isWindowsPhone() + { + String userAgent = getUserAgent(); + if (userAgent.contains("windows phone 8")) { + return true; + } + return false; + } + @Override public boolean isBlackBerry() { return false; @@ -140,4 +150,5 @@ public boolean isAndroid4_3_orLower() { return false; } + } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/util/IconHandler.java b/src/main/java/com/googlecode/mgwt/ui/client/util/IconHandler.java index a5fa29d9a..edbd0329d 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/util/IconHandler.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/util/IconHandler.java @@ -19,8 +19,8 @@ import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.resources.client.ImageResource; - import com.googlecode.mgwt.image.client.ImageConverter; +import com.googlecode.mgwt.image.client.ImageConverterCallback; import com.googlecode.mgwt.ui.client.MGWT; public class IconHandler { @@ -86,20 +86,30 @@ private static class IconHandlerEmulatedImpl extends IconHandlerNativeImpl { private static final ImageConverter converter = new ImageConverter(); @Override - public void setIcons(Element element, ImageResource icon, String color) { + public void setIcons(final Element element, ImageResource icon, String color) { if (icon == null) { return; } - element.getStyle().setBackgroundColor("transparent"); - ImageResource convertImageResource = converter.convert(icon, color); - Dimension dimensions = calculateDimensions(convertImageResource); - element.getStyle().setWidth(dimensions.width, Unit.PX); - element.getStyle().setHeight(dimensions.height, Unit.PX); - element.getStyle().setBackgroundImage( - "url(" + convertImageResource.getSafeUri().asString() + ")"); - element.getStyle().setProperty("backgroundSize", - dimensions.width + "px " + dimensions.height + "px"); + converter.convert(icon, color, new ImageConverterCallback() { + + @Override + public void onFailure(Throwable caught) { + } + + @Override + public void onSuccess(ImageResource convertImageResource) { + element.getStyle().setBackgroundColor("transparent"); + Dimension dimensions = calculateDimensions(convertImageResource); + element.getStyle().setWidth(dimensions.width, Unit.PX); + element.getStyle().setHeight(dimensions.height, Unit.PX); + element.getStyle().setBackgroundImage( + "url(" + convertImageResource.getSafeUri().asString() + ")"); + element.getStyle().setProperty("backgroundSize", + dimensions.width + "px " + dimensions.height + "px"); + } + + }); } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/util/impl/CssUtilIE10Impl.java b/src/main/java/com/googlecode/mgwt/ui/client/util/impl/CssUtilIE10Impl.java new file mode 100644 index 000000000..d9c8f67f5 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/util/impl/CssUtilIE10Impl.java @@ -0,0 +1,117 @@ +package com.googlecode.mgwt.ui.client.util.impl; + +import com.google.gwt.core.client.JsArrayInteger; +import com.google.gwt.dom.client.Element; + +public class CssUtilIE10Impl implements CssUtilImpl { + + public CssUtilIE10Impl() { + } + + @Override + public void translate(Element el, int x, int y) { + String cssText = "translate3d(" + x + "px, " + y + "px, 0px)"; + _translate(el, cssText); + } + + @Override + public native void setDelay(Element el, int milliseconds) /*-{ + el.style.transitionDelay = milliseconds + "ms"; + }-*/; + + @Override + public native void setOpacity(Element el, double opacity) /*-{ + el.style.opacity = opacity; + }-*/; + + @Override + public native void setDuration(Element el, int time) /*-{ + el.style.transitionDuration = time + "ms"; + }-*/; + + private native void _translate(Element el, String css)/*-{ + el.style.transform = css; + }-*/; + + @Override + public void rotate(Element el, int degree) { + el.getStyle().setProperty("transform", "rotateZ(" + degree + "deg)"); + } + + @Override + public boolean hasTransform() { + return true; + } + + @Override + public boolean hasTransistionEndEvent() { + return true; + } + + @Override + public boolean has3d() { + return true; + } + + @Override + public String getTransformProperty() { + return "transform"; + } + + @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)/*-{ + var matrix = getComputedStyle(el, null)['transform'].replace( + /[^0-9-.,]/g, '').split(','); + var x = matrix[12] * 1; + var y = matrix[13] * 1; + return [ x, y ]; + }-*/; + + @Override + public native int getTopPositionFromCssPosition(Element element) /*-{ + return getComputedStyle(element, null).top.replace(/[^0-9-]/g, '') * 1; + }-*/; + + @Override + public native int getLeftPositionFromCssPosition(Element element)/*-{ + return getComputedStyle(element, null).left.replace(/[^0-9-]/g, '') * 1; + }-*/; + + @Override + public native void resetTransform(Element el) /*-{ + el.style.transform = ""; + }-*/; + + @Override + public native void setTransistionProperty(Element element, String string) /*-{ + element.transitionProperty = string; + }-*/; + + @Override + public native void setTransFormOrigin(Element el, int x, int y) /*-{ + el.transformOrigin = x + " " + y; + }-*/; + + @Override + public native void setTransistionTimingFunction(Element element, String string) /*-{ + el.transitionTimingFunction = string; + }-*/; + + @Override + public void setTranslateAndZoom(Element el, int x, int y, double scale) { + String cssText = "translate3d(" + x + "px, " + y + "px, 0px) scale(" + scale + ")"; + el.getStyle().setProperty("transform", cssText); + } + + @Override + public void translatePercent(Element el, double x, double y) { + String cssText = "translate3d(" + x + "%, " + y + "%, 0px)"; + _translate(el, cssText); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css index ee13eed55..3d98ad071 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css @@ -29,3 +29,37 @@ from { opacity: 0; } to { opacity: 1; } } + +@if user.agent ie10 { + .in, .out { + animation-timing-function: ease-in-out; + animation-duration: 300ms; + animation-fill-mode: both; + } + + .in { + animation-name: appear; + } + + .out { + animation-name: dissolve; + } + + .in.reverse { + animation-name: appear; + } + + .out.reverse { + animation-name: dissolve; + } + + @keyframes dissolve { + from { opacity: 1; } + to { opacity: 0; } + } + + @keyframes appear { + from { opacity: 0; } + to { opacity: 1; } + } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css index 602c79db9..9195e2902 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css @@ -28,3 +28,36 @@ from { opacity: 1; } to { opacity: 0; } } + +@if user.agent ie10 { + .in, .out { + animation-timing-function: ease-in-out; + animation-duration: 300ms; + animation-fill-mode: both; + } + + .in { + animation-name: fadein; + } + .out { + animation-name: fadeout; + } + + .in.reverse { + animation-name: fadein; + } + + .out.reverse { + animation-name: fadeout; + } + + @keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } + } + + @keyframes fadeout { + from { opacity: 1; } + to { opacity: 0; } + } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css index cb9df89f4..03a89e4bc 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css @@ -41,3 +41,49 @@ from { -webkit-transform: rotateY(0) scale(1); } to { -webkit-transform: rotateY(180deg) scale(.8); } } + +@if user.agent ie10 { + .in, .out { + animation-timing-function: ease-in-out; + animation-duration: 300ms; + animation-fill-mode: both; + animation-duration: .65s; + backface-visibility: hidden; + } + + .in { + animation-name: flipinfromleft; + } + + .out { + animation-name: flipouttoleft; + } + + .in.reverse { + animation-name: flipinfromright; + } + + .out.reverse { + animation-name: flipouttoright; + } + + @keyframes flipinfromright { + from { transform: rotateY(-180deg) scale(.8); } + to { transform: rotateY(0) scale(1); } + } + + @keyframes flipinfromleft { + from { transform: rotateY(180deg) scale(.8); } + to { transform: rotateY(0) scale(1); } + } + + @keyframes flipouttoleft { + from { transform: rotateY(0) scale(1); } + to { transform: rotateY(-180deg) scale(.8); } + } + + @keyframes flipouttoright { + from { transform: rotateY(0) scale(1); } + to { transform: rotateY(180deg) scale(.8); } + } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css index 58689fa58..3940d9233 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css @@ -41,3 +41,49 @@ opacity: 0; } } + +@if user.agent ie10 { + .in, .out { + animation-timing-function: ease-in-out; + animation-duration: 300ms; + animation-fill-mode: both; + } + + .in { + animation-name: popin; + } + + .out { + animation-name: popout; + } + + .in.reverse { + animation-name: popin; + } + + .out.reverse { + animation-name: popout; + } + + @keyframes popin { + from { + transform: scale(.3); + opacity: 0; + } + to { + transform: scale(1); + opacity: 1; + } + } + + @keyframes popout { + from { + transform: scale(1); + opacity: 1; + } + to { + transform: scale(.3); + opacity: 0; + } + } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css index 9fc0ea77e..5be436cfd 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css @@ -43,3 +43,51 @@ from { -webkit-transform: translateY(-100%); } to { -webkit-transform: translateY(0%); } } + +@if user.agent ie10 { + .in, .out { + animation-timing-function: ease-in-out; + animation-duration: 300ms; + animation-fill-mode: both; + } + + .in { + animation-name: slideupfrombottom; + z-index: 10; + } + + .out { + animation-name: slideupfrommiddle; + z-index: 0; + } + + .out.reverse { + z-index: 10; + animation-name: slidedownfrommiddle; + } + + .in.reverse { + z-index: 0; + animation-name: slidedownfromtop; + } + + @keyframes slideupfrombottom { + from { transform: translateY(100%); } + to { transform: translateY(0); } + } + + @keyframes slidedownfrommiddle { + from { transform: translateY(0); } + to { transform: translateY(100%); } + } + + @keyframes slideupfrommiddle { + from { transform: translateY(0); } + to { transform: translateY(-100%); } + } + + @keyframes slidedownfromtop { + from { transform: translateY(-100%); } + to { transform: translateY(0%); } + } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css index 407ff7c55..0acb66232 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css @@ -47,3 +47,55 @@ from { -webkit-transform: translateX(0); } to { -webkit-transform: translateX(100%); } } + +@if user.agent ie10 { + .in, .out { + animation-timing-function: ease-in-out; + animation-duration: 300ms; + animation-fill-mode: both; + } + + .in { + z-index:10; + } + + .out{ + z-index: 0 !important; + } + + .in { + animation-name: slideinfromright; + } + + .out { + animation-name: slideouttoleft; + } + + .in.reverse { + animation-name: slideinfromleft; + } + + .out.reverse { + animation-name: slideouttoright; + } + + @keyframes slideinfromright { + from { transform: translateX(100%); } + to { transform: translateX(0); } + } + + @keyframes slideinfromleft { + from { transform: translateX(-100%); } + to { transform: translateX(0); } + } + + @keyframes slideouttoleft { + from { transform: translateX(0); } + to { transform: translateX(-100%); } + } + + @keyframes slideouttoright { + from { transform: translateX(0); } + to { transform: translateX(100%); } + } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css index 18d2e6db5..8f4f7e0ba 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css @@ -79,3 +79,86 @@ -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg); } } + +@if user.agent ie10 { + .in, .out { + animation-timing-function: ease-in-out; + animation-fill-mode: both; + transform: perspective(800); + animation-duration: .7s; + } + + .out { + animation-name: swapouttoleft; + } + .in { + animation-name: swapinfromright; + } + .out.reverse { + animation-name: swapouttoright; + } + .in.reverse { + animation-name: swapinfromleft; + } + + + @keyframes swapouttoright { + 0% { + transform: translate3d(0px, 0px, 0px) rotateY(0deg); + animation-timing-function: ease-in-out; + } + 50% { + transform: translate3d(-180px, 0px, -400px) rotateY(20deg); + animation-timing-function: ease-in; + opacity: 0.8; + } + 100% { + transform: translate3d(0px, 0px, -800px) rotateY(70deg); + opacity: 0; + } + } + + @keyframes swapouttoleft { + 0% { + transform: translate3d(0px, 0px, 0px) rotateY(0deg); + animation-timing-function: ease-in-out; + } + 50% { + transform: translate3d(180px, 0px, -400px) rotateY(-20deg); + animation-timing-function: ease-in; + opacity: 0.8; + } + 100% { + transform: translate3d(0px, 0px, -800px) rotateY(-70deg); + opacity: 0; + } + } + + @keyframes swapinfromright { + 0% { + transform: translate3d(0px, 0px, -800px) rotateY(70deg); + animation-timing-function: ease-out; + } + 50% { + transform: translate3d(-180px, 0px, -400px) rotateY(20deg); + animation-timing-function: ease-in-out; + } + 100% { + transform: translate3d(0px, 0px, 0px) rotateY(0deg); + } + } + + @keyframes swapinfromleft { + 0% { + transform: translate3d(0px, 0px, -800px) rotateY(-70deg); + animation-timing-function: ease-out; + } + 50% { + transform: translate3d(180px, 0px, -400px) rotateY(-20deg); + animation-timing-function: ease-in-out; + } + 100% { + transform: translate3d(0px, 0px, 0px) rotateY(0deg); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css index 7ad9c9954..41b2bf904 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css @@ -18,3 +18,25 @@ -webkit-transform: translate3d(0,0,0) rotate(0) scale(1); -webkit-perspective: 800; } + +@if user.agent ie10 { + .displayContainer { + position: absolute; + width: 100%; + height: 100%; + overflow:hidden; + backface-visibility: hidden; + } + + .display { + position: absolute; + top: 0px; + left: 0px; + right: 0px; + bottom: 0px; + overflow:hidden; + backface-visibility: hidden; + transform: translate3d(0,0,0) rotate(0) scale(1); + perspective: 800; + } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java index d838e6570..5bb04786b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java @@ -18,8 +18,8 @@ import com.google.gwt.event.dom.client.TouchMoveEvent; import com.google.gwt.event.dom.client.TouchStartEvent; import com.google.gwt.user.client.DOM; +import com.google.gwt.user.client.Element; import com.google.gwt.user.client.ui.HasText; - import com.googlecode.mgwt.dom.client.event.tap.TapEvent; import com.googlecode.mgwt.dom.client.event.tap.TapHandler; import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; @@ -32,7 +32,11 @@ public abstract class ButtonBase extends TouchWidget implements HasText { private boolean active; - + // a temp fix where we no longer add the default touch handlers to the button + // until a call is made to set the element for the widget. This is required since + // it is not possible to add a bitless dom handler until the element has been set + private boolean defaultHandlersAdded; + private final ButtonBaseAppearance baseAppearance; /** @@ -43,56 +47,6 @@ public abstract class ButtonBase extends TouchWidget implements HasText { */ public ButtonBase(ButtonBaseAppearance appearance) { this.baseAppearance = appearance; - - addTouchHandler(new TouchHandler() { - - @Override - public void onTouchCancel(TouchCancelEvent event) { - event.stopPropagation(); - event.preventDefault(); - removeStyleName(ButtonBase.this.baseAppearance.css().active()); - if (MGWT.getFormFactor().isDesktop()) { - DOM.releaseCapture(getElement()); - } - active = false; - } - - @Override - public void onTouchEnd(TouchEndEvent event) { - event.stopPropagation(); - event.preventDefault(); - removeStyleName(ButtonBase.this.baseAppearance.css().active()); - if (MGWT.getFormFactor().isDesktop()) { - DOM.releaseCapture(getElement()); - } - active = false; - } - - @Override - public void onTouchMove(TouchMoveEvent event) { - event.preventDefault(); - event.stopPropagation(); - } - - @Override - public void onTouchStart(TouchStartEvent event) { - event.stopPropagation(); - event.preventDefault(); - addStyleName(ButtonBase.this.baseAppearance.css().active()); - if (MGWT.getFormFactor().isDesktop()) { - DOM.setCapture(getElement()); - } - active = true; - } - }); - - addTapHandler(new TapHandler() { - - @Override - public void onTap(TapEvent event) { - removeStyleName(ButtonBase.this.baseAppearance.css().active()); - } - }); } @Override @@ -108,4 +62,66 @@ public void setText(String text) { public boolean isActive() { return active; } + + @Override + protected void setElement(Element elem) + { + super.setElement(elem); + + if (!defaultHandlersAdded) + { + addTouchHandler(new TouchHandler() { + + @Override + public void onTouchCancel(TouchCancelEvent event) { + event.stopPropagation(); + event.preventDefault(); + removeStyleName(ButtonBase.this.baseAppearance.css().active()); + if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { + DOM.releaseCapture(getElement()); + } + active = false; + } + + @Override + public void onTouchEnd(TouchEndEvent event) { + event.stopPropagation(); + event.preventDefault(); + removeStyleName(ButtonBase.this.baseAppearance.css().active()); + if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { + DOM.releaseCapture(getElement()); + } + active = false; + } + + @Override + public void onTouchMove(TouchMoveEvent event) { + event.preventDefault(); + event.stopPropagation(); + } + + @Override + public void onTouchStart(TouchStartEvent event) { + event.stopPropagation(); + event.preventDefault(); + addStyleName(ButtonBase.this.baseAppearance.css().active()); + if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { + DOM.setCapture(getElement()); + } + active = true; + } + }); + + addTapHandler(new TapHandler() { + + @Override + public void onTap(TapEvent event) { + removeStyleName(ButtonBase.this.baseAppearance.css().active()); + } + }); + defaultHandlersAdded = true; + } + } + + } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/imagebutton.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/imagebutton.css index a8ada1935..5a7844fd2 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/imagebutton.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/imagebutton.css @@ -14,9 +14,9 @@ } } -@if user.agent gecko1_8 { +@if user.agent ie10 { .mgwt-ImageButton { - display: -moz-box; + display: -ms-flexbox; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/buttonbar/buttonbar.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/buttonbar/buttonbar.css index 936a6c2a9..fd0e425b7 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/buttonbar/buttonbar.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/buttonbar/buttonbar.css @@ -26,12 +26,19 @@ } } -@if user.agent ie9 ie10 { +@if user.agent ie9 { .mgwt-ButtonBar { display: table; } } +@if user.agent ie10 { + .mgwt-ButtonBar { + display: -ms-flexbox; + -ms-flex-direction: horizontal; + } +} + .mgwt-ButtonBar { display: flex; align-items: center; @@ -46,7 +53,7 @@ font-weight: bold; } -@if user.agent ie9 ie10 { +@if user.agent ie9 { .mgwt-ButtonBar-text { display: table-cell; vertical-align: middle; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css index 45a99122e..04a3495a8 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css @@ -15,6 +15,13 @@ } } +@if user.agent ie10 { + .mgwt-Carousel { + display: -ms-flexbox; + -ms-flex: 1; + } +} + .mgwt-Carousel { position: relative; flex:1; @@ -29,6 +36,12 @@ } } +@if user.agent ie10 { + .mgwt-Carousel-Scroller, .mgwt-Carousel-Container { + -ms-flex: 1; + } +} + .mgwt-Carousel-Scroller { flex: 1 } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/options/options-dialog.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/options/options-dialog.css index 25e727cc2..fea2b8593 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/options/options-dialog.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/options/options-dialog.css @@ -11,4 +11,10 @@ background-image: literal('-webkit-gradient(linear, 0% 0, 0% 100%, from(rgba(50, 74, 103, 0.9)), color-stop(0.02, rgba(20, 25, 35, 0.9) ), to(rgba(0, 0, 0, 0.0) ) )'); border-top: 1px solid #030506; padding: 10px; +} + +@if user.agent ie10 { + .mgwt-OptionsDialog { + background-image: linear-gradient(to bottom, rgba(50, 74, 103, 0.9) 0%, rgba(20, 25, 35, 0.9) 2%, rgba(0, 0, 0, 0.0) 100%); + } } \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css index dfb2020ae..1010b6c95 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css @@ -3,6 +3,7 @@ @external mgwt-DialogButton-cancel, mgwt-DialogButton-active; } .mgwt-DialogButton { + -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; padding: 9px 13px; @@ -23,6 +24,12 @@ } } +@if user.agent ie10 { + .mgwt-DialogButton { + -ms-flex: 1; + } +} + .mgwt-DialogButton-ok, .mgwt-DialogButton-cancel { margin-top: 10px; margin-right: 5px; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog.css index 8b45fc404..7c89bac5b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog.css @@ -33,15 +33,32 @@ text-align: center; } +@if user.agent ie10 { + .mgwt-DialogPanel-footer { + display: -ms-flexbox; + -ms-flex-pack: center; + } +} + +@if user.agent safari { + .mgwt-DialogPanel-footer { + display: -webkit-box; /* iOS < 7 && Android < 4.4*/ + display: -webkit-flex; + -webkit-box-pack: center; /* iOS < 7 && Android < 4.4*/ + -webkit-justify-content: center; + } +} + +@if user.agent gecko1_8 { + .mgwt-DialogPanel-footer { + display: -moz-box; + -moz-justify-content: center; + } +} + .mgwt-DialogPanel-footer { margin-top: 10px; - display: -webkit-box; /* iOS < 7 && Android < 4.4*/ - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; display: flex; - -webkit-box-pack: center; /* iOS < 7 && Android < 4.4*/ - -webkit-justify-content: center; - -moz-justify-content: center; justify-content: center; } + diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css index cfe769c52..3d7f3d75f 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css @@ -27,12 +27,18 @@ } } +@if user.agent ie10 { + .mgwt-Form-Entry { + display: -ms-flexbox; + -ms-box-pack: center; + } +} + @if user.agent gecko1_8 { .mgwt-Form-Entry { width: 100%; -moz-justify-content: center; display: -moz-box; - display: -ms-flexbox; /* IE is in FF permutation */ } } @@ -57,6 +63,13 @@ } } +@if user.agent ie10 { + .mgwt-Form-Entry-label { + width: 30%; + display: -ms-flexbox; + } +} + @if user.agent gecko1_8 { .mgwt-Form-Entry-label { width: 30%; @@ -81,6 +94,14 @@ } } +@if user.agent ie10 { + .mgwt-Form-Entry-container { + -ms-flex: 1; + -ms-flex-pack: end; + display: -ms-flexbox; + } +} + @if user.agent gecko1_8 { .mgwt-Form-Entry-container { -moz-box-flex: 1; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/checkbox.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/checkbox.css index 648fe6eba..19238862c 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/checkbox.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/checkbox.css @@ -41,6 +41,12 @@ } } +@if user.agent ie10 { + .mgwt-CheckBox-middle { + transition: all 0.1s ease-in-out; + } +} + @if user.agent gecko1_8 { .mgwt-CheckBox-middle { -moz-transition: all 0.1s ease-in-out; @@ -63,6 +69,12 @@ } } +@if user.agent ie10 { + .mgwt-CheckBox-middle-content { + box-sizing: border-box; + } +} + @if user.agent gecko1_8 { .mgwt-CheckBox-middle-content { -moz-box-sizing: border-box; @@ -85,6 +97,12 @@ } } +@if user.agent ie10 { + .mgwt-CheckBox-on { + transition: all 0.1s ease-in-out; + } +} + @if user.agent gecko1_8 { .mgwt-CheckBox-on { -moz-transition: all 0.1s ease-in-out; @@ -108,6 +126,12 @@ } } +@if user.agent ie10 { + .mgwt-CheckBox-off { + transition: all 0.1s ease-in-out; + } +} + @if user.agent gecko1_8 { .mgwt-CheckBox-off { -moz-transition: all 0.1s ease-in-out; @@ -138,6 +162,30 @@ } } +@if user.agent ie10 { + .mgwt-CheckBox-important .mgwt-CheckBox-on { + background-color: #fe9c12; + } + .mgwt-CheckBox-notchecked .mgwt-CheckBox-middle { + transform: translate3d(-41px,0,0); + } + .mgwt-CheckBox-checked .mgwt-CheckBox-middle { + transform: translate3d(0px,0,0); + } + .mgwt-CheckBox-notchecked .mgwt-CheckBox-off { + transform: translate3d(-41px,0,0); + } + .mgwt-CheckBox-checked .mgwt-CheckBox-off { + transform: translate3d(10px,0,0); + } + .mgwt-CheckBox-notchecked .mgwt-CheckBox-on { + transform: translate3d(-81px,0,0); + } + .mgwt-CheckBox-checked .mgwt-CheckBox-on { + transform: translate3d(0px,0,0); + } +} + @if user.agent gecko1_8 { .mgwt-CheckBox-important .mgwt-CheckBox-on { border: solid 1px #d87101; @@ -164,7 +212,7 @@ } /*TODO add browser....*/ -@if user.agent ie8 ie9 ie10 { +@if user.agent ie8 ie9 { .mgwt-CheckBox-important .mgwt-CheckBox-on {} .mgwt-CheckBox-notchecked .mgwt-CheckBox-middle {} .mgwt-CheckBox-checked .mgwt-CheckBox-middle {} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css index 56a30e7e6..3e1efa339 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css @@ -17,6 +17,15 @@ } } +@if user.agent ie10 { + .mgwt-TextBox, .mgwt-InputBox-box, .mgwt-PasswordTextBox, + .mgwt-InputBox-box, .mgwt-TextArea, .mgwt-InputBox-box { + display: -ms-flexbox; + -ms-flex: 1; + -ms-user-select: text; + } +} + @if user.agent gecko1_8 { .mgwt-TextBox, .mgwt-InputBox-box, .mgwt-PasswordTextBox, .mgwt-InputBox-box, .mgwt-TextArea, .mgwt-InputBox-box { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css index 600144b7a..57a3d1c29 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css @@ -16,6 +16,13 @@ } } +@if user.agent ie10 { + .mgwt-ListBox { + display: -ms-flexbox; + -ms-user-select: text; + } +} + @if user.agent gecko1_8 { .mgwt-ListBox { display: -moz-box; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css index c2eff4c5a..cc0933056 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css @@ -29,6 +29,18 @@ } } +@if user.agent ie10 { + .mgwt-RadioButton { + display: -ms-flexbox; + -ms-flex-direction: row; + -ms-flex: 1; + } + .mgwt-RadioButton-label { + display: -ms-flexbox; + -ms-flex: 1; + } +} + @if user.agent gecko1_8 { .mgwt-RadioButton { display: -moz-box; @@ -83,6 +95,13 @@ } } +@if user.agent ie10 { + .mgwt-RadioButton-input { + } + .mgwt-RadioButton-input:CHECKED { + } +} + @if user.agent gecko1_8 { .mgwt-RadioButton-input { -moz-appearance: none !important; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css index 4947d2f9a..b5e3208fc 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css @@ -7,7 +7,9 @@ @external mgwt-SearchBox-icon; } -::-webkit-search-cancel-button { -webkit-appearance: none; } +@if user.agent safari { + ::-webkit-search-cancel-button { -webkit-appearance: none; } +} .mgwt-SearchBox { height: 44px; @@ -38,6 +40,12 @@ } } +@if user.agent ie10 { + .mgwt-SearchBox-input { + width: literal("calc(100% - 47px)"); + } +} + @if user.agent gecko1_8 { .mgwt-SearchBox-input { width: literal("-moz-calc(100% - 47px);"); @@ -52,6 +60,12 @@ } } +@if user.agent ie10 { + .mgwt-SearchBox-input { + -ms-user-select: text; + } +} + @if user.agent gecko1_8 { .mgwt-SearchBox-input { top: 5px; @@ -61,7 +75,7 @@ } } -@if user.agent ie9 ie10 { +@if user.agent ie9 { .mgwt-SearchBox-input { top: 5px; } @@ -93,6 +107,13 @@ } } +@if user.agent ie10 { + .mgwt-SearchBox-icon { + background-image: searchImage; + background-repeat: no-repeat; + } +} + .mgwt-SearchBox-icon { position: relative; top: 7px; @@ -102,19 +123,20 @@ background-color: #78787E; } -@if mgwt.density high { - .mgwt-SearchBox-icon { - -webkit-mask-size: 17px 17px; - } -} - -@if mgwt.density xhigh { - .mgwt-SearchBox-icon { - -webkit-mask-size: 12px 12px; - } -} - @if user.agent safari { + + @if mgwt.density high { + .mgwt-SearchBox-icon { + -webkit-mask-size: 17px 17px; + } + } + + @if mgwt.density xhigh { + .mgwt-SearchBox-icon { + -webkit-mask-size: 12px 12px; + } + } + .mgwt-SearchBox-clear { -webkit-mask-image: clearImage; -webkit-mask-position: center center; @@ -122,6 +144,28 @@ } } +@if user.agent ie10 { + + @if mgwt.density high { + .mgwt-SearchBox-icon { + background-size: 17px 17px; + } + } + + @if mgwt.density xhigh { + .mgwt-SearchBox-icon { + background-size: 12px 12px; + } + } + + .mgwt-SearchBox-clear { + background-image: clearImage; + background-position: center center; + background-repeat: no-repeat; + } +} + + .mgwt-SearchBox-clear { position: absolute; top: -2px; @@ -131,14 +175,32 @@ background-color: #78787E; } -@if mgwt.density high { - .mgwt-SearchBox-clear { - -webkit-mask-size: 19px 19px; - } -} +@if user.agent safari { -@if mgwt.density xhigh { - .mgwt-SearchBox-clear { - -webkit-mask-size: 14px 14px; - } + @if mgwt.density high { + .mgwt-SearchBox-clear { + -webkit-mask-size: 19px 19px; + } + } + + @if mgwt.density xhigh { + .mgwt-SearchBox-clear { + -webkit-mask-size: 14px 14px; + } + } +} + +@if user.agent ie10 { + + @if mgwt.density high { + .mgwt-SearchBox-clear { + background-size: 19px 19px; + } + } + + @if mgwt.density xhigh { + .mgwt-SearchBox-clear { + background-size: 14px 14px; + } + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java index fbfac2043..6a0be4dc8 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java @@ -48,7 +48,7 @@ private class SliderTouchHandler implements TouchHandler { @Override public void onTouchStart(TouchStartEvent event) { setValueContrained(event.getTouches().get(0).getClientX()); - if (MGWT.getFormFactor().isDesktop()) { + if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { DOM.setCapture(getElement()); } event.stopPropagation(); @@ -65,7 +65,7 @@ public void onTouchMove(TouchMoveEvent event) { @Override public void onTouchEnd(TouchEndEvent event) { - if (MGWT.getFormFactor().isDesktop()) { + if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { DOM.releaseCapture(getElement()); } event.stopPropagation(); @@ -74,7 +74,7 @@ public void onTouchEnd(TouchEndEvent event) { @Override public void onTouchCancel(TouchCancelEvent event) { - if (MGWT.getFormFactor().isDesktop()) { + if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { DOM.releaseCapture(getElement()); } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/celllist.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/celllist.css index 605fcc0e2..6ec315966 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/celllist.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/celllist.css @@ -71,6 +71,12 @@ } } +@if user.agent ie10 { + .mgwt-List-Head-Element, .mgwt-List > .mgwt-List-Head-Element { + background-color: #288ede; + } +} + @if user.agent gecko1_8 { .mgwt-List-Head-Element, .mgwt-List > .mgwt-List-Head-Element { background-color: #288ede; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css index e43c31bd5..1ecf37ef8 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css @@ -9,6 +9,12 @@ } } +@if user.agent ie10 { + .mgwt-GroupingList { + display: -ms-flexbox; + } +} + @if user.agent gecko1_8 { .mgwt-GroupingList { display: -moz-box; @@ -45,6 +51,13 @@ } } +@if user.agent ie10 { + .mgwt-GroupingList-Selection-Bar { + display: -ms-flexbox; + -ms-flex-direction: column; + } +} + @if user.agent gecko1_8 { .mgwt-GroupingList-Selection-Bar { display: -moz-box; @@ -69,6 +82,12 @@ } } +@if user.agent ie10 { + .mgwt-GroupingList-Selection-Bar > li{ + -ms-flex: 1; + } +} + @if user.agent gecko1_8 { .mgwt-GroupingList-Selection-Bar > li{ -moz-box-flex: 1; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/widgetlist/widgetlist.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/widgetlist/widgetlist.css index c735fefe3..59f3e036d 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/widgetlist/widgetlist.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/widgetlist/widgetlist.css @@ -43,6 +43,12 @@ } } +@if user.agent safari { + .mgwt-WidgetList-Entry { + display: -ms-flexbox; + } +} + @if user.agent gecko1_8 { .mgwt-WidgetList-Entry { width: 100%; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css index a13553213..4c69ed857 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css @@ -1,39 +1,39 @@ @external body, *; + * { - -webkit-text-size-adjust: none; - -webkit-touch-callout: none; - -webkit-text-size-adjust: none; margin: 0px; padding: 0px; font-family: Helvetica, sans-serif; } +@if user.agent safari { +* { + -webkit-text-size-adjust: none; + -webkit-touch-callout: none; + -webkit-text-size-adjust: none; + -webkit-user-select: none; + } -body { - margin: 0; - padding: 0; - background: #dfe2e2; - color: #000; - font-weight: 400; - -webkit-perspective: 800; - -webkit-transform-style: preserve-3d; - position: absolute; - width: 100%; - height: 100%; -} - -:focus { - outline-color: transparent; - outline-style: none; + input , textarea{ + -webkit-user-select: text; + } } -@if user.agent gecko1_8 { +@if user.agent ie10 { * { - -webkit-user-select: none; + -ms-user-select: none; + -ms-text-size-adjust: none; + -ms-touch-select: none; + -ms-touch-action: none; + -ms-flex: 0 1 auto; + } + + input , textarea{ + -ms-user-select: text; } - input, textarea { - -webkit-user-select: text; + a img { + border: none; } } @@ -47,6 +47,33 @@ body { } } + +@if user.agent safari { +body { + -webkit-perspective: 800; + -webkit-transform-style: preserve-3d; + } +} + +body { + margin: 0; + padding: 0; + background: #dfe2e2; + color: #000; + font-weight: 400; + position: absolute; + width: 100%; + height: 100%; + perspective: 800; + transform-style: preserve-3d; +} + + +:focus { + outline-color: transparent; + outline-style: none; +} + input:FOCUS,button:FOCUS { outline: none; } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/selection.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/selection.css index 7d6f24c66..b150c90b0 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/selection.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/selection.css @@ -8,6 +8,12 @@ } } +@if user.agent ie10 { + .userSelectNone { + -ms-user-select: none; + } +} + @if user.agent gecko1_8 { .userSelectNone { -moz-user-select: none; @@ -26,6 +32,12 @@ } } +@if user.agent ie10 { + .userSelectText { + -ms-user-select: text; + } +} + @if user.agent gecko1_8 { .userSelectText { -moz-user-select: text; @@ -44,6 +56,12 @@ } } +@if user.agent ie10 { + .userSelectAll { + -ms-user-select: all; + } +} + @if user.agent gecko1_8 { .userSelectAll { -moz-user-select: all; @@ -62,6 +80,12 @@ } } +@if user.agent ie10 { + .userSelectElement { + -ms-user-select: element; + } +} + @if user.agent gecko1_8 { .userSelectElement { -moz-user-select: element; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/overlay/overlay-menu.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/overlay/overlay-menu.css index 616dd80fb..2df185205 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/overlay/overlay-menu.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/overlay/overlay-menu.css @@ -39,18 +39,27 @@ @if user.agent safari { .mgwt-OverlayMenu-nav { - -webkit-transform-property: opacity; + -webkit-transition-property: opacity; } .mgwt-OverlayMenu-main { - -webkit-transform-property: left; + -webkit-transition-property: left; + } +} + +@if user.agent ie10 { + .mgwt-OverlayMenu-nav { + transition-property: opacity; + } + .mgwt-OverlayMenu-main { + transition-property: left; } } @if user.agent gecko1_8 { .mgwt-OverlayMenu-nav { - -moz-transform-property: opacity; + -moz-transition-property: opacity; } .mgwt-OverlayMenu-main { - -moz-transform-property: left; + -moz-transition-property: left; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/swipe/swipe-menu.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/swipe/swipe-menu.css index 0733b6fa3..529097fc7 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/swipe/swipe-menu.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/swipe/swipe-menu.css @@ -40,6 +40,15 @@ } } +@if user.agent ie10 { + .opened { + transform: translate3d(0, 0, 0); + } + .closed { + transform: translate3d(-40%, 0, 0); + } +} + @if user.agent gecko1_8 { .opened { -moz-transform: translate3d(0, 0, 0); diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanel.gwt.xml b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanel.gwt.xml index d3e37785d..064ea73d9 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanel.gwt.xml +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanel.gwt.xml @@ -15,4 +15,30 @@ under * the License. + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java index 79ed4a360..c4c9208d9 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java @@ -15,160 +15,97 @@ */ package com.googlecode.mgwt.ui.client.widget.panel.flex; +import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.Element; -public final class FlexPropertyHelper { +public abstract class FlexPropertyHelper { + private static final FlexPropertyHelper impl = GWT.create(FlexPropertyHelper.class); + public static enum Alignment { - START("flex-start"), END("flex-end"), CENTER("center"), STRETCH("stretch"), BASELINE("baseline"); - - private final String cssValue; - - private Alignment(String cssValue) { - this.cssValue = cssValue; - } - - private static String getCssProperty() { - return "AlignItems"; - } + START, END, CENTER, STRETCH, BASELINE, NONE; + } - private String getCssValue() { - return cssValue; - } + public static enum AlignmentSelf { + START, END, CENTER, STRETCH, BASELINE, AUTO; } public static enum Justification { - START("flex-start"), END("flex-end"), CENTER("center"), SPACE_BETWEEN("space-between"), SPACE_AROUND("space-around"); - - private final String cssValue; - - private Justification(String cssValue) { - this.cssValue = cssValue; - } - - private static String getCssProperty() { - return "JustifyContent"; - } - - private String getCssValue() { - return cssValue; - } + START, END, CENTER, SPACE_BETWEEN, SPACE_AROUND, NONE; } - + public static enum Orientation { - HORIZONTAL("row"), VERTICAL("column"); - - private final String cssValue; + HORIZONTAL, VERTICAL; + } - private Orientation(String cssValue) { - this.cssValue = cssValue; + public static void setElementAsFlexContainer(Element el) + { + setElementAsFlexContainer(el, null); + } + + public static void setElementAsFlexContainer(Element el, Orientation orientation) + { + if (orientation == null) + { + orientation = Orientation.HORIZONTAL; // the default } + impl._setElementAsFlexContainer(el, orientation); + } - private static String getCssProperty() { - return "Direction"; - } + public static void setFlex(Element el, double grow) { + setFlex(el, grow, "0%"); + } - private String getCssValue() { - return cssValue; - } + public static void setFlex(Element el, double grow, double shrink) { + setFlex(el, grow, shrink, "0%"); } - public static void setFlex(Element el, double flex) { - /* iOS < 7 && Android < 4.4*/ - el.getStyle().setProperty("WebkitBoxFlex", Double.toString(flex)); + public static void setFlex(Element el, double grow, double shrink, String basis) { + impl._setFlex(el, grow, shrink, basis); + } - el.getStyle().setProperty("MozFlex", Double.toString(flex)); - el.getStyle().setProperty("WebkitFlex", Double.toString(flex)); - el.getStyle().setProperty("flex", Double.toString(flex)); + public static void setFlex(Element el, double grow, String basis) { + impl._setFlex(el, grow, basis); } - private static void setFlexProperty(Element el, String name, String value) { - setStyleProperty(el, "MozFlex" + name, value); - setStyleProperty(el, "WebkitFlex" + name, value); - setStyleProperty(el, "flex" + name, value); + public static void setFlexOrder(Element el, int order) { + impl._setFlexOrder(el, order); } - private static void setProperty(Element el, String name, String value) { - setStyleProperty(el, "Moz" + name, value); - setStyleProperty(el, "Webkit" + name, value); - setStyleProperty(el, name, value); + public static void setAlignment(Element el, Alignment alignment) { + impl._setAlignmentProperty(el, alignment); } - public static void setOrientation(Element el, Orientation value) { - // iOS6 & Android < 4.4 - switch (value) { - case HORIZONTAL: - el.getStyle().setProperty("WebkitBoxOrient", "horizontal"); - break; - case VERTICAL: - el.getStyle().setProperty("WebkitBoxOrient", "vertical"); - break; - default: - throw new RuntimeException(); - } - setFlexProperty(el, Orientation.getCssProperty(), value.getCssValue()); - } - - public static void setAlignment(Element el, Alignment value) { - // iOS6 & Android < 4.4 - switch (value) { - case START: - el.getStyle().setProperty("WebkitBoxAlign", "start"); - break; - case CENTER: - el.getStyle().setProperty("WebkitBoxAlign", "center"); - break; - case END: - el.getStyle().setProperty("WebkitBoxAlign", "end"); - break; - case BASELINE: - el.getStyle().setProperty("WebkitBoxAlign", "baseline"); - break; - case STRETCH: - el.getStyle().setProperty("WebkitBoxAlign", "stretch"); - break; - default: - throw new RuntimeException(); - } - setProperty(el, Alignment.getCssProperty(), value.getCssValue()); - } - - public static void setJustification(Element el, Justification value) { - // iOS6 & Android < 4.4 - switch (value) { - case START: - el.getStyle().setProperty("WebkitBoxPack", "start"); - break; - case CENTER: - el.getStyle().setProperty("WebkitBoxPack", "center"); - break; - case END: - el.getStyle().setProperty("WebkitBoxPack", "end"); - break; - case SPACE_BETWEEN: - el.getStyle().setProperty("WebkitBoxPack", "justify"); - break; - case SPACE_AROUND: - el.getStyle().setProperty("WebkitBoxPack", "justify"); - break; - default: - throw new RuntimeException(); - } - setProperty(el, Justification.getCssProperty(), value.getCssValue()); + public static void setAlignmentSelf(Element el, AlignmentSelf alignmentSelf) { + impl._setAlignmentSelfProperty(el, alignmentSelf); } - private static void setStyleProperty(Element el, String property, String value) { - el.getStyle().setProperty(property, value); + public static void setOrientation(Element el, Orientation orientation) { + impl._setOrientationProperty(el, orientation); } - private FlexPropertyHelper() { + public static void setJustification(Element el, Justification justification) { + impl._setJustificationProperty(el, justification); } - public static void clearAlignment(Element element) { - setProperty(element, Alignment.getCssProperty(), ""); + public static void clearAlignment(Element el) { + impl._setAlignmentProperty(el,Alignment.NONE); } - public static void clearJustification(Element element) { - setProperty(element, Justification.getCssProperty(), ""); + public static void clearJustification(Element el) { + impl._setJustificationProperty(el,Justification.NONE); } + + protected void setStyleProperty(Element el, String property, String value) { + el.getStyle().setProperty(property, value); + } + + protected abstract void _setElementAsFlexContainer(Element el, Orientation orientation); + protected abstract void _setFlex(Element el, double grow, String basis); + protected abstract void _setFlex(Element el, double grow, double shrink, String basis); + protected abstract void _setFlexOrder(Element el, int order); + protected abstract void _setAlignmentProperty(Element el, Alignment alignment); + protected abstract void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf); + protected abstract void _setOrientationProperty(Element el, Orientation orientation); + protected abstract void _setJustificationProperty(Element el, Justification justification); } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java new file mode 100644 index 000000000..5a047207e --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java @@ -0,0 +1,147 @@ +package com.googlecode.mgwt.ui.client.widget.panel.flex; + +import com.google.gwt.dom.client.Element; + +/** + * Unbelievable - IE10 does not obey the camel case rule correctly + * @author pfrench + * + */ +public class FlexPropertyHelperIE10 extends FlexPropertyHelper { + + @Override + public void _setAlignmentProperty(Element el, Alignment alignment) { + String value; + switch (alignment) { + case START: { + value = "start"; + break; + } + case END: { + value = "end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case STRETCH: { + value = "stretch"; + break; + } + case BASELINE: { + value = "baseline"; + break; + } + default: { + value = ""; + } + } + setStyleProperty(el, "msFlexAlign", value); + } + + @Override + public void _setOrientationProperty(Element el, Orientation orientation) { + String value; + switch (orientation) { + case HORIZONTAL: { + value = "row"; + break; + } + case VERTICAL: { + value = "column"; + break; + } + default: { + value = ""; + break; + } + } + setStyleProperty(el, "msFlexDirection", value); + } + + @Override + public void _setJustificationProperty(Element el, Justification justification) { + String value; + switch (justification) { + case START: { + value = "start"; + break; + } + case END: { + value = "end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case SPACE_AROUND: { + value = "distribute"; + break; + } + case SPACE_BETWEEN: { + value = "justify"; + break; + } + default: { + value = ""; + } + } + setStyleProperty(el, "msFlexPack", value); + } + + @Override + protected void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf) + { + String value; + switch (alignmentSelf) { + case START: { + value = "start"; + break; + } + case END: { + value = "end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case STRETCH: { + value = "stretch"; + break; + } + case BASELINE: { + value = "baseline"; + break; + } + default: { + value = "auto"; + } + } + setStyleProperty(el, "msFlexItemAlign", value); + } + + @Override + protected void _setFlex(Element el, double grow, String basis) { + setStyleProperty(el,"msFlex", Double.toString(grow)+" "+(basis == null ? "0%" : basis)); + } + + @Override + protected void _setFlex(Element el, double grow, double shrink, String basis) { + setStyleProperty(el,"msFlex", Double.toString(grow)+" "+Double.toString(shrink)+" "+(basis == null ? "0%" : basis)); + } + + @Override + public void _setFlexOrder(Element el, int order) { + setStyleProperty(el,"msFlexOrder", Integer.toString(order)); + } + + @Override + protected void _setElementAsFlexContainer(Element el, Orientation orientation) { + setStyleProperty(el,"display", "-ms-flexbox"); + _setOrientationProperty(el,orientation); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java new file mode 100644 index 000000000..d8aac7664 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java @@ -0,0 +1,142 @@ +package com.googlecode.mgwt.ui.client.widget.panel.flex; + +import com.google.gwt.dom.client.Element; + +public class FlexPropertyHelperMoz extends FlexPropertyHelper { + + @Override + public void _setAlignmentProperty(Element el, Alignment alignment) { + String value; + switch (alignment) { + case START: { + value = "flex-start"; + break; + } + case END: { + value = "flex-end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case STRETCH: { + value = "stretch"; + break; + } + case BASELINE: { + value = "baseline"; + break; + } + default: { + value = ""; + } + } + setStyleProperty(el, "MozAlignItems", value); + } + + @Override + public void _setOrientationProperty(Element el, Orientation orientation) { + String value; + switch (orientation) { + case HORIZONTAL: { + value = "row"; + break; + } + case VERTICAL: { + value = "column"; + break; + } + default: { + value = ""; + break; + } + } + setStyleProperty(el, "MozFlexDirection", value); + } + + @Override + public void _setJustificationProperty(Element el, Justification justification) { + String value; + switch (justification) { + case START: { + value = "flex-start"; + break; + } + case END: { + value = "flex-end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case SPACE_AROUND: { + value = "space-around"; + break; + } + case SPACE_BETWEEN: { + value = "space-between"; + break; + } + default: { + value = ""; + } + } + setStyleProperty(el, "MozJustifyContent", value); + } + + @Override + protected void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf) + { + String value; + switch (alignmentSelf) { + case START: { + value = "flex-start"; + break; + } + case END: { + value = "flex-end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case STRETCH: { + value = "stretch"; + break; + } + case BASELINE: { + value = "baseline"; + break; + } + default: { + value = "auto"; + } + } + setStyleProperty(el, "alignSelf", value); + } + + @Override + protected void _setFlex(Element el, double grow, String basis) { + setStyleProperty(el,"MozFlex", Double.toString(grow)+" "+(basis == null ? "0%" : basis)); + } + + @Override + protected void _setFlex(Element el, double grow, double shrink, String basis) { + setStyleProperty(el,"MozFlex", Double.toString(grow)+" "+Double.toString(shrink)+" "+(basis == null ? "0%" : basis)); + } + + @Override + public void _setFlexOrder(Element el, int order) { + setStyleProperty(el,"MozOrder", Integer.toString(order)); + } + + @Override + protected void _setElementAsFlexContainer(Element el, Orientation orientation) { + setStyleProperty(el,"display", "-moz-flex"); + _setOrientationProperty(el,orientation); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java new file mode 100644 index 000000000..343694cf4 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java @@ -0,0 +1,142 @@ +package com.googlecode.mgwt.ui.client.widget.panel.flex; + +import com.google.gwt.dom.client.Element; + +public class FlexPropertyHelperStandard extends FlexPropertyHelper { + + @Override + public void _setAlignmentProperty(Element el, Alignment alignment) { + String value; + switch (alignment) { + case START: { + value = "flex-start"; + break; + } + case END: { + value = "flex-end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case STRETCH: { + value = "stretch"; + break; + } + case BASELINE: { + value = "baseline"; + break; + } + default: { + value = ""; + } + } + setStyleProperty(el, "alignItems", value); + } + + @Override + public void _setOrientationProperty(Element el, Orientation orientation) { + String value; + switch (orientation) { + case HORIZONTAL: { + value = "row"; + break; + } + case VERTICAL: { + value = "column"; + break; + } + default: { + value = ""; + break; + } + } + setStyleProperty(el, "flexDirection", value); + } + + @Override + public void _setJustificationProperty(Element el, Justification justification) { + String value; + switch (justification) { + case START: { + value = "flex-start"; + break; + } + case END: { + value = "flex-end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case SPACE_AROUND: { + value = "space-around"; + break; + } + case SPACE_BETWEEN: { + value = "space-between"; + break; + } + default: { + value = ""; + } + } + setStyleProperty(el, "justifyContent", value); + } + + @Override + protected void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf) + { + String value; + switch (alignmentSelf) { + case START: { + value = "flex-start"; + break; + } + case END: { + value = "flex-end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case STRETCH: { + value = "stretch"; + break; + } + case BASELINE: { + value = "baseline"; + break; + } + default: { + value = "auto"; + } + } + setStyleProperty(el, "alignSelf", value); + } + + @Override + protected void _setFlex(Element el, double grow, String basis) { + setStyleProperty(el,"flex", Double.toString(grow)+" "+(basis == null ? "0%" : basis)); + } + + @Override + protected void _setFlex(Element el, double grow, double shrink, String basis) { + setStyleProperty(el,"flex", Double.toString(grow)+" "+Double.toString(shrink)+" "+(basis == null ? "0%" : basis)); + } + + @Override + public void _setFlexOrder(Element el, int order) { + setStyleProperty(el,"order", Integer.toString(order)); + } + + @Override + protected void _setElementAsFlexContainer(Element el, Orientation orientation) { + setStyleProperty(el,"display", "flex"); + _setOrientationProperty(el,orientation); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java new file mode 100644 index 000000000..73341f66c --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java @@ -0,0 +1,165 @@ +package com.googlecode.mgwt.ui.client.widget.panel.flex; + +import com.google.gwt.dom.client.Element; + +public class FlexPropertyHelperWebkit extends FlexPropertyHelper { + + @Override + public void _setAlignmentProperty(Element el, Alignment alignment) { + String alignItemOldSyntax, alignItemNewSyntax; + switch (alignment) { + case START: { + alignItemOldSyntax = "start"; + alignItemNewSyntax = "flex-start"; + break; + } + case END: { + alignItemOldSyntax = "end"; + alignItemNewSyntax = "flex-end"; + break; + } + case CENTER: { + alignItemOldSyntax = "center"; + alignItemNewSyntax = "center"; + break; + } + case STRETCH: { + alignItemOldSyntax = ""; // not implemented + alignItemNewSyntax = "stretch"; + break; + } + case BASELINE: { + alignItemOldSyntax = ""; // not implemented + alignItemNewSyntax = "baseline"; + break; + } + default: { + alignItemOldSyntax = ""; + alignItemNewSyntax = ""; + } + } + setStyleProperty(el, "WebkitBoxAlign", alignItemOldSyntax); + setStyleProperty(el, "WebkitAlignItems", alignItemNewSyntax); + } + + @Override + public void _setOrientationProperty(Element el, Orientation orientation) { + String orientationOldSyntax, orientationNewSyntax; + switch (orientation) { + case HORIZONTAL: { + orientationOldSyntax = "horizontal"; + orientationNewSyntax = "row"; + break; + } + case VERTICAL: { + orientationOldSyntax = "vertical"; + orientationNewSyntax = "column"; + break; + } + default: { + orientationOldSyntax = ""; + orientationNewSyntax = ""; + break; + } + } + setStyleProperty(el, "WebkitBoxOrient", orientationOldSyntax); + setStyleProperty(el, "WebkitFlexDirection", orientationNewSyntax); + } + + @Override + public void _setJustificationProperty(Element el, Justification justification) { + String justificationOldSyntax, justificationNewSyntax; + switch (justification) { + case START: { + justificationOldSyntax = "start"; + justificationNewSyntax = "flex-start"; + break; + } + case END: { + justificationOldSyntax = "end"; + justificationNewSyntax = "flex-end"; + break; + } + case CENTER: { + justificationOldSyntax = "center"; + justificationNewSyntax = "center"; + break; + } + case SPACE_AROUND: { + justificationOldSyntax = ""; // not implemented + justificationNewSyntax = "space-around"; + break; + } + case SPACE_BETWEEN: { + justificationOldSyntax = "justify"; + justificationNewSyntax = "space-between"; + break; + } + default: { + justificationOldSyntax = ""; + justificationNewSyntax = ""; + } + } + setStyleProperty(el, "WebkitBoxPack", justificationOldSyntax); + setStyleProperty(el, "WebkitJustifyContent", justificationNewSyntax); + } + + @Override + protected void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf) + { + String value; + switch (alignmentSelf) { + case START: { + value = "flex-start"; + break; + } + case END: { + value = "flex-end"; + break; + } + case CENTER: { + value = "center"; + break; + } + case STRETCH: { + value = "stretch"; + break; + } + case BASELINE: { + value = "baseline"; + break; + } + default: { + value = "auto"; + } + } + setStyleProperty(el, "WebkitAlignSelf", value); + } + + @Override + public void _setFlex(Element el, double grow, String basis) { + setStyleProperty(el,"WebkitBoxFlex", Double.toString(grow)); + setStyleProperty(el,"WebkitFlex", Double.toString(grow)+(basis == null ? "0%" : basis)); + } + + @Override + protected void _setFlex(Element el, double grow, double shrink, String basis) { + setStyleProperty(el,"WebkitBoxFlex", Double.toString(grow)); // shrink and basis not supported + setStyleProperty(el,"WebkitFlex", Double.toString(grow)+" "+Double.toString(shrink)+" "+(basis == null ? "0%" : basis)); + } + + @Override + public void _setFlexOrder(Element el, int order) { + setStyleProperty(el,"WebkitBoxOrdinalGroup", Integer.toString(order)); + setStyleProperty(el,"WebkitOrder", Integer.toString(order)); + } + + + @Override + protected void _setElementAsFlexContainer(Element el, Orientation orientation) { + setStyleProperty(el,"display", "-webkit-box"); + setStyleProperty(el,"display", "-webkit-flex"); + _setOrientationProperty(el,orientation); + } + +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css index b8c2c57b5..86e53675a 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css @@ -17,6 +17,13 @@ } } +@if user.agent ie10 { + .mgwt-FlexPanel { + display: -ms-flexbox; + -ms-flex-direction: column; + } +} + .mgwt-FlexPanel { display: flex; flex-direction: column; @@ -37,6 +44,12 @@ } } +@if user.agent ie10 { + .mgwt-FlexPanel-flex { + -ms-flex: 1; + } +} + @if user.agent gecko1_8 { .mgwt-FlexPanel-flex { -moz-flex: 1; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css index 58ccf23bb..20b699012 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css @@ -5,11 +5,31 @@ @external mgwt-PullToRefresh-text, .mgwt-PullToRefresh-arrowFooter; } +@if user.agent safari { + .mgwt-PullPanel { + -webkit-box-flex: 1; /* iOS < 7 && Android < 4.4*/ + -webkit-flex: 1; + } +} + +@if user.agent ie10 { + .mgwt-PullPanel { + -ms-flex: 1; + } +} + +@if user.agent gecko1_8 { + .mgwt-PullPanel { + -moz-flex: 1; + } +} + .mgwt-PullPanel { flex: 1; overflow: hidden; } + .mgwt-PullPanel-container{} .mgwt-PullPanel-main{} @@ -41,6 +61,12 @@ } } +@if user.agent ie10 { + .mgwt-PullToRefresh-arrow { + transform-origin: 12px 9px; + } +} + @if user.agent gecko1_8 { .mgwt-PullToRefresh-arrow { -moz-transform-origin: 12px 9px; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/scrollpanel.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/scrollpanel.css index 21e49a97f..991661198 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/scrollpanel.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/scrollpanel.css @@ -21,6 +21,13 @@ } } +@if user.agent ie10 { + .mgwt-ScrollPanel-container { + transition-property: transform; + transition-timing-function: cubic-bezier(0, 0, 0.25, 1); + } +} + @if user.agent gecko1_8 { .mgwt-ScrollPanel-container { -moz-transition-property: literal('-moz-transform'); @@ -44,6 +51,14 @@ } } +@if user.agent ie10 { + .mgwt-Scrollbar { + transition-duration: 300ms; + transition-delay: 0ms; + transition-property: opacity; + } +} + @if user.agent gecko1_8 { .mgwt-Scrollbar { -moz-transition-duration: 300ms; @@ -86,6 +101,18 @@ } } +@if user.agent ie10 { + .mgwt-Scrollbar-Bar { + background-clip:padding-box; + box-sizing:border-box; + border-radius:3px; + transition-property:transform; + transition-timing-function:cubic-bezier(0.33,0.66,0.66,1); + transform: translate3d('0,0, 0'); + transition-duration:0; + } +} + @if user.agent gecko1_8 { .mgwt-Scrollbar-Bar { -moz-background-clip:padding-box; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressbar.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressbar.css index 8eab117bd..716b4eadb 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressbar.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressbar.css @@ -28,6 +28,20 @@ } } +@if user.agent ie10 { + .mgwt-ProgressBar { + animation-duration: 9s; + animation-name: anmiateProgressBar; + animation-iteration-count: infinite; + animation-timing-function: linear; + } + + @keyframes anmiateProgressBar { + 0% { background-position-x: 0%; } + 100% { background-position-x: 100%; } + } +} + @if user.agent gecko1_8 { .mgwt-ProgressBar { -moz-animation-duration: 9s; @@ -57,6 +71,15 @@ } } +@if user.agent ie10 { + .mgwt-ProgressBar { + background-size: 25px 15px; + box-shadow: 0 3px 3px rgba(0, 0, 0, 0.5); + box-sizing: border-box; + background-image: linear-gradient(60deg, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0.7) 30%, rgba(255, 255, 255, 1) 30%, rgba(255, 255, 255, 1) 70%, rgba(255, 255, 255, 0.7) 70%, rgba(255, 255, 255, 0) 80%), linear-gradient(to bottom, rgba(0, 0, 0, .2) 5%, rgba(255, 255, 255, .8) 6%, rgba(255, 255, 255, .05) 40%, rgba(0, 0, 0, .05) 60%, rgba(0, 0, 0, .2) 90%, rgba(0, 0, 0, .5) 98%), linear-gradient(to bottom, transparent 20%, rgba(255, 255, 255, .5) 20%, rgba(255, 255, 255, .5) 50%, transparent 50%); + } +} + @if user.agent gecko1_8 { .mgwt-ProgressBar { background-size: 25px 15px; @@ -66,7 +89,7 @@ } } -@if user.agent ie9 ie10 { +@if user.agent ie9 { .mgwt-ProgressBar { -ms-background-size: 25px 15px; -ms-box-shadow: 0 3px 3px rgba(0, 0, 0, 0.5); diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressindicator.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressindicator.css index 4848ee5f5..f8c70cbbf 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressindicator.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressindicator.css @@ -21,6 +21,7 @@ -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; -webkit-animation-name: progressIndicatorAnimation; + -webkit-transform: scale(0.25); } .mgwt-ProgressIndicator > span:nth-child\(2\) { @@ -48,12 +49,47 @@ } } +@if user.agent ie10 { + .mgwt-ProgressIndicator > span { + animation-duration: 1s; + animation-iteration-count: infinite; + animation-timing-function: linear; + animation-name: progressIndicatorAnimation; + transform: scale(0.25); + } + + .mgwt-ProgressIndicator > span:nth-child\(2\) { + animation-delay: 0.33s; + } + .mgwt-ProgressIndicator > span:nth-child\(3\) { + animation-delay: 0.66s; + } + + @keyframes progressIndicatorAnimation { + 0% { + transform: scale(0.25); + background-color: #1e7dc8; + } + 16% { + transform: scale(1.0); + background-color: #1e7dc8; + } + 33% { + transform: scale(0.25); + } + 100% { + transform: scale(0.25); + } + } +} + @if user.agent gecko1_8 { .mgwt-ProgressIndicator > span { -moz-animation-duration: 1s; -moz-animation-iteration-count: infinite; -moz-animation-timing-function: linear; -moz-animation-name: progressIndicatorAnimation; + -moz-transform: scale(0.25); } .mgwt-ProgressIndicator > span:nth-child\(2\) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressspinner.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressspinner.css index 7e3865f52..22cfc0538 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressspinner.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressspinner.css @@ -20,63 +20,62 @@ border-radius: 2px; } -.mgwt-ProgressSpinner > span:nth-child\(1\) { - -webkit-transform: translate3d(0, -10px, 0); -} - -.mgwt-ProgressSpinner > span:nth-child\(2\) { - -webkit-transform: translate3d(5px, -8.66px, 0) rotate(30deg); -} - -.mgwt-ProgressSpinner > span:nth-child\(3\) { - -webkit-transform: translate3d(8.66px, -5px, 0) rotate(60deg); -} - -.mgwt-ProgressSpinner > span:nth-child\(4\) { - -webkit-transform: translate3d(10px, 0, 0) rotate(90deg); -} - -.mgwt-ProgressSpinner > span:nth-child\(5\) { - -webkit-transform: translate3d(8.66px, 5px, 0) rotate(120deg); -} - -.mgwt-ProgressSpinner > span:nth-child\(6\) { - -webkit-transform: translate3d(5px, 8.66px, 0) rotate(150deg); -} - -.mgwt-ProgressSpinner > span:nth-child\(7\) { - -webkit-transform: translate3d(0px, 10px, 0); -} - -.mgwt-ProgressSpinner > span:nth-child\(8\) { - -webkit-transform: translate3d(-5px, 8.66px, 0) rotate(210deg); -} - -.mgwt-ProgressSpinner > span:nth-child\(9\) { - -webkit-transform: translate3d(-8.66px, 5px, 0) rotate(240deg); -} - -.mgwt-ProgressSpinner > span:nth-child\(10\) { - -webkit-transform: translate3d(-10px, 0, 0) rotate(90deg);; -} - -.mgwt-ProgressSpinner > span:nth-child\(11\) { - -webkit-transform: translate3d(-8.66px, -5px, 0) rotate(300deg); -} - -.mgwt-ProgressSpinner > span:nth-child\(12\) { - -webkit-transform: translate3d(-5px, -8.66px, 0) rotate(330deg); -} - - -.mgwt-ProgressSpinner > span { - -webkit-animation-iteration-count: infinite; - -webkit-animation-timing-function: linear; - -webkit-animation-duration: ANIMATION_DURATION; - -webkit-animation-name: animationProgressSpinner; -} - @if user.agent safari { + .mgwt-ProgressSpinner > span:nth-child\(1\) { + -webkit-transform: translate3d(0, -10px, 0); + } + + .mgwt-ProgressSpinner > span:nth-child\(2\) { + -webkit-transform: translate3d(5px, -8.66px, 0) rotate(30deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(3\) { + -webkit-transform: translate3d(8.66px, -5px, 0) rotate(60deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(4\) { + -webkit-transform: translate3d(10px, 0, 0) rotate(90deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(5\) { + -webkit-transform: translate3d(8.66px, 5px, 0) rotate(120deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(6\) { + -webkit-transform: translate3d(5px, 8.66px, 0) rotate(150deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(7\) { + -webkit-transform: translate3d(0px, 10px, 0); + } + + .mgwt-ProgressSpinner > span:nth-child\(8\) { + -webkit-transform: translate3d(-5px, 8.66px, 0) rotate(210deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(9\) { + -webkit-transform: translate3d(-8.66px, 5px, 0) rotate(240deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(10\) { + -webkit-transform: translate3d(-10px, 0, 0) rotate(90deg);; + } + + .mgwt-ProgressSpinner > span:nth-child\(11\) { + -webkit-transform: translate3d(-8.66px, -5px, 0) rotate(300deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(12\) { + -webkit-transform: translate3d(-5px, -8.66px, 0) rotate(330deg); + } + + .mgwt-ProgressSpinner > span { + -webkit-animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; + -webkit-animation-duration: ANIMATION_DURATION; + -webkit-animation-name: animationProgressSpinner; + } + @-webkit-keyframes animationProgressSpinner { 0% { background: transparent;} 8% { background: #464F5D;} @@ -92,9 +91,7 @@ 92% { background: #DCDCE4;} 100% { background: transparent;} } -} -@if user.agent safari { .mgwt-ProgressSpinner > span:nth-child\(2\) { -webkit-animation-delay: 0.08s; } @@ -129,3 +126,112 @@ -webkit-animation-delay: 0.92s; } } + +@if user.agent ie10 { + .mgwt-ProgressSpinner > span:nth-child\(1\) { + transform: translate3d(0, -10px, 0); + } + + .mgwt-ProgressSpinner > span:nth-child\(2\) { + transform: translate3d(5px, -8.66px, 0) rotate(30deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(3\) { + transform: translate3d(8.66px, -5px, 0) rotate(60deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(4\) { + transform: translate3d(10px, 0, 0) rotate(90deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(5\) { + transform: translate3d(8.66px, 5px, 0) rotate(120deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(6\) { + transform: translate3d(5px, 8.66px, 0) rotate(150deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(7\) { + transform: translate3d(0px, 10px, 0); + } + + .mgwt-ProgressSpinner > span:nth-child\(8\) { + transform: translate3d(-5px, 8.66px, 0) rotate(210deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(9\) { + transform: translate3d(-8.66px, 5px, 0) rotate(240deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(10\) { + transform: translate3d(-10px, 0, 0) rotate(90deg);; + } + + .mgwt-ProgressSpinner > span:nth-child\(11\) { + transform: translate3d(-8.66px, -5px, 0) rotate(300deg); + } + + .mgwt-ProgressSpinner > span:nth-child\(12\) { + transform: translate3d(-5px, -8.66px, 0) rotate(330deg); + } + + .mgwt-ProgressSpinner > span { + animation-iteration-count: infinite; + animation-timing-function: linear; + animation-duration: ANIMATION_DURATION; + animation-name: animationProgressSpinner; + } + + @keyframes animationProgressSpinner { + 0% { background: transparent;} + 8% { background: #464F5D;} + 17% { background: #59606C;} + 25% { background: #656C78;} + 33% { background: #747B85;} + 41% { background: #828791;} + 50% { background: #8D929B;} + 58% { background: #A0A4AD;} + 67% { background: #ADB0BA;} + 75% { background: #BCBEC7;} + 83% { background: #CDCED5;} + 92% { background: #DCDCE4;} + 100% { background: transparent;} + } + + .mgwt-ProgressSpinner > span:nth-child\(2\) { + animation-delay: 0.08s; + } + .mgwt-ProgressSpinner > span:nth-child\(3\) { + animation-delay: 0.17s; + } + .mgwt-ProgressSpinner > span:nth-child\(4\) { + animation-delay: 0.25s; + } + .mgwt-ProgressSpinner > span:nth-child\(5\) { + animation-delay: 0.33s; + } + .mgwt-ProgressSpinner > span:nth-child\(6\) { + animation-delay: 0.41s; + } + .mgwt-ProgressSpinner > span:nth-child\(7\) { + animation-delay: 0.5s; + } + .mgwt-ProgressSpinner > span:nth-child\(8\) { + animation-delay: 0.58s; + } + .mgwt-ProgressSpinner > span:nth-child\(9\) { + animation-delay: 0.67s; + } + .mgwt-ProgressSpinner > span:nth-child\(10\) { + animation-delay: 0.75s; + } + .mgwt-ProgressSpinner > span:nth-child\(11\) { + animation-delay: 0.83s; + } + .mgwt-ProgressSpinner > span:nth-child\(12\) { + animation-delay: 0.92s; + } +} + + diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar-button.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar-button.css index a0a5475c1..6e0342902 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar-button.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar-button.css @@ -12,22 +12,37 @@ @if user.agent safari { .mgwt-TabBar-Button { + display: -webkit-box; /* iOS < 7 && Android < 4.4*/ + display: -webkit-flex; + -webkit-box-orient: vertical; /* iOS < 7 && Android < 4.4*/ + -webkit-flex-direction: column; + -webkit-box-flex: 1; /* iOS < 7 && Android < 4.4*/ + -webkit-flex: 1; -webkit-appearance: none; - -webkit-box-flex: 1; + } +} + +@if user.agent ie10 { + .mgwt-TabBar-Button { + display: -ms-flexbox; + -ms-flex-direction: column; + -ms-flex: 1; } } @if user.agent gecko1_8 { .mgwt-TabBar-Button { - -moz-appearance: none; + display: -moz-box; + -moz-flex-direction: column; -moz-box-flex: 1; + -moz-appearance: none; } } .mgwt-TabBar-Button { display: flex; - flex: 1; flex-direction: column; + flex: 1; min-width: 60px; background-color: transparent; height: 39px; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css index 37a563a97..37c264746 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css @@ -5,14 +5,25 @@ @if user.agent safari { .mgwt-TabPanel { display: -webkit-box; + display: -webkit-flex; -webkit-box-flex: 1; + -webkit-flex: 1; -webkit-box-orient: vertical; + -webkit-flex-direction: column; + } +} + +@if user.agent ie10 { + .mgwt-TabPanel { + display: -ms-flexbox; + -ms-flex: 1; + -ms-flex-direction: column; } } @if user.agent gecko1_8 { .mgwt-TabPanel { - display: -webkit-box; + display: -moz-box; -moz-box-flex: 1; -moz-box-orient: vertical; } @@ -27,14 +38,25 @@ @if user.agent safari { .mgwt-TabPanel-container { display: -webkit-box; + display: -webkit-flex; -webkit-box-flex: 1; + -webkit-flex: 1; -webkit-box-orient: vertical; + -webkit-flex-direction: column; + } +} + +@if user.agent ie10 { + .mgwt-TabPanel-container { + display: -ms-flexbox; + -ms-flex: 1; + -ms-flex-direction: column; } } @if user.agent gecko1_8 { .mgwt-TabPanel-container { - display: -webkit-box; + display: -moz-box; -moz-box-flex: 1; -moz-box-orient: vertical; } @@ -44,14 +66,25 @@ overflow: hidden; display: flex; flex:1; + flex-direction: column; } @if user.agent safari { .mgwt-TabBar { display: -webkit-box; + display: -webkit-flex; -webkit-box-orient: horizontal; + -webkit-flex-direction: row; } } + +@if user.agent ie10 { + .mgwt-TabBar { + display: -ms-flexbox; + -ms-flex-direction: row; + } +} + @if user.agent gecko1_8 { .mgwt-TabBar { display: -moz-box; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidget.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidget.java index 14f576ecf..524c6cd53 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidget.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidget.java @@ -83,13 +83,14 @@ public HandlerRegistration addTouchEndHandler(TouchEndHandler handler) { @Override public HandlerRegistration addTouchHandler(TouchHandler handler) { - HandlerRegistrationCollection handlerRegistrationCollection = new HandlerRegistrationCollection(); - - handlerRegistrationCollection.addHandlerRegistration(addTouchCancelHandler(handler)); - handlerRegistrationCollection.addHandlerRegistration(addTouchStartHandler(handler)); - handlerRegistrationCollection.addHandlerRegistration(addTouchEndHandler(handler)); - handlerRegistrationCollection.addHandlerRegistration(addTouchMoveHandler(handler)); - return handlerRegistrationCollection; + return impl.addTouchHandler(this, handler); +// HandlerRegistrationCollection handlerRegistrationCollection = new HandlerRegistrationCollection(); +// +// handlerRegistrationCollection.addHandlerRegistration(addTouchCancelHandler(handler)); +// handlerRegistrationCollection.addHandlerRegistration(addTouchStartHandler(handler)); +// handlerRegistrationCollection.addHandlerRegistration(addTouchEndHandler(handler)); +// handlerRegistrationCollection.addHandlerRegistration(addTouchMoveHandler(handler)); +// return handlerRegistrationCollection; } @Override diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetImpl.java index feb8b2ff4..0eabd2476 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetImpl.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetImpl.java @@ -15,26 +15,13 @@ */ package com.googlecode.mgwt.ui.client.widget.touch; -import com.google.gwt.event.dom.client.MouseDownEvent; -import com.google.gwt.event.dom.client.MouseMoveEvent; -import com.google.gwt.event.dom.client.MouseUpEvent; -import com.google.gwt.event.dom.client.TouchCancelEvent; import com.google.gwt.event.dom.client.TouchCancelHandler; -import com.google.gwt.event.dom.client.TouchEndEvent; import com.google.gwt.event.dom.client.TouchEndHandler; -import com.google.gwt.event.dom.client.TouchMoveEvent; import com.google.gwt.event.dom.client.TouchMoveHandler; -import com.google.gwt.event.dom.client.TouchStartEvent; import com.google.gwt.event.dom.client.TouchStartHandler; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.ui.Widget; - -import com.googlecode.mgwt.dom.client.event.mouse.HandlerRegistrationCollection; -import com.googlecode.mgwt.dom.client.event.mouse.TouchEndToMouseUpHandler; -import com.googlecode.mgwt.dom.client.event.mouse.TouchMoveToMouseMoveHandler; -import com.googlecode.mgwt.dom.client.event.mouse.TouchStartToMouseDownHandler; import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; -import com.googlecode.mgwt.ui.client.util.NoopHandlerRegistration; /** * The touch widget interface is used to abstract implementation details for @@ -42,109 +29,7 @@ * * @author Daniel Kurka */ -public abstract class TouchWidgetImpl { - - private static class TouchWidgetMobileImpl extends TouchWidgetImpl { - - @Override - public HandlerRegistration addTouchStartHandler(Widget w, TouchStartHandler handler) { - return w.addDomHandler(handler, TouchStartEvent.getType()); - } - - @Override - public HandlerRegistration addTouchMoveHandler(Widget w, TouchMoveHandler handler) { - return w.addDomHandler(handler, TouchMoveEvent.getType()); - } - - @Override - public HandlerRegistration addTouchCancelHandler(Widget w, TouchCancelHandler handler) { - return w.addDomHandler(handler, TouchCancelEvent.getType()); - } - - @Override - public HandlerRegistration addTouchEndHandler(Widget w, TouchEndHandler handler) { - return w.addDomHandler(handler, TouchEndEvent.getType()); - } - - @Override - public HandlerRegistration addTouchHandler(Widget w, TouchHandler handler) { - HandlerRegistrationCollection hrc = new HandlerRegistrationCollection(); - hrc.addHandlerRegistration(addTouchStartHandler(w, handler)); - hrc.addHandlerRegistration(addTouchMoveHandler(w, handler)); - hrc.addHandlerRegistration(addTouchEndHandler(w, handler)); - hrc.addHandlerRegistration(addTouchCancelHandler(w, handler)); - return hrc; - } - } - - // Used with deffered binding - @SuppressWarnings("unused") - private static class TouchWidgetRuntimeImpl extends TouchWidgetImpl { - private static boolean hasTouchSupport; - private static TouchWidgetImpl delegate; - - static { - hasTouchSupport = hasTouch(); - if (hasTouchSupport) { - delegate = new TouchWidgetMobileImpl(); - } - } - - private static native boolean hasTouch() /*-{ - return 'ontouchstart' in $doc.documentElement; - }-*/; - - - @Override - public HandlerRegistration addTouchStartHandler(Widget w, TouchStartHandler handler) { - if (hasTouchSupport) { - return delegate.addTouchStartHandler(w, handler); - } - return w.addDomHandler(new TouchStartToMouseDownHandler(handler), MouseDownEvent.getType()); - } - - @Override - public HandlerRegistration addTouchMoveHandler(Widget w, TouchMoveHandler handler) { - if (hasTouchSupport) { - return delegate.addTouchMoveHandler(w, handler); - } - TouchMoveToMouseMoveHandler touchMoveToMouseMoveHandler = new TouchMoveToMouseMoveHandler(handler); - HandlerRegistrationCollection handlerRegistrationCollection = new HandlerRegistrationCollection(); - handlerRegistrationCollection.addHandlerRegistration(w.addDomHandler(touchMoveToMouseMoveHandler, MouseDownEvent.getType())); - handlerRegistrationCollection.addHandlerRegistration(w.addDomHandler(touchMoveToMouseMoveHandler, MouseUpEvent.getType())); - handlerRegistrationCollection.addHandlerRegistration(w.addDomHandler(touchMoveToMouseMoveHandler, MouseMoveEvent.getType())); - return handlerRegistrationCollection; - } - - @Override - public HandlerRegistration addTouchCancelHandler(Widget w, TouchCancelHandler handler) { - if (hasTouchSupport) { - return delegate.addTouchCancelHandler(w, handler); - } - return new NoopHandlerRegistration(); - } - - @Override - public HandlerRegistration addTouchEndHandler(Widget w, TouchEndHandler handler) { - if (hasTouchSupport) { - return delegate.addTouchEndHandler(w, handler); - } - return w.addDomHandler(new TouchEndToMouseUpHandler(handler), MouseUpEvent.getType()); - } - - @Override - public HandlerRegistration addTouchHandler(Widget w, TouchHandler handler) { - if (hasTouchSupport) { - return delegate.addTouchHandler(w, handler); - } - HandlerRegistrationCollection hrc = new HandlerRegistrationCollection(); - hrc.addHandlerRegistration(addTouchStartHandler(w, handler)); - hrc.addHandlerRegistration(addTouchMoveHandler(w, handler)); - hrc.addHandlerRegistration(addTouchEndHandler(w, handler)); - hrc.addHandlerRegistration(addTouchCancelHandler(w, handler)); - return hrc; - } - } +public interface TouchWidgetImpl { /** * Add a touch start handler to a widget diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetPointerImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetPointerImpl.java new file mode 100644 index 000000000..2f5ecb767 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetPointerImpl.java @@ -0,0 +1,57 @@ +package com.googlecode.mgwt.ui.client.widget.touch; + +import com.google.gwt.event.dom.client.TouchCancelHandler; +import com.google.gwt.event.dom.client.TouchEndHandler; +import com.google.gwt.event.dom.client.TouchMoveHandler; +import com.google.gwt.event.dom.client.TouchStartHandler; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.user.client.ui.Widget; +import com.googlecode.mgwt.dom.client.event.mouse.HandlerRegistrationCollection; +import com.googlecode.mgwt.dom.client.event.pointer.MsPointerCancelEvent; +import com.googlecode.mgwt.dom.client.event.pointer.MsPointerDownEvent; +import com.googlecode.mgwt.dom.client.event.pointer.MsPointerMoveEvent; +import com.googlecode.mgwt.dom.client.event.pointer.MsPointerUpEvent; +import com.googlecode.mgwt.dom.client.event.pointer.TouchCancelToMsPointerCancelHandler; +import com.googlecode.mgwt.dom.client.event.pointer.TouchEndToMsPointerUpHandler; +import com.googlecode.mgwt.dom.client.event.pointer.TouchMoveToMsPointerMoveHandler; +import com.googlecode.mgwt.dom.client.event.pointer.TouchStartToMsPointerDownHandler; +import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; + +public class TouchWidgetPointerImpl implements TouchWidgetImpl +{ + @Override + public HandlerRegistration addTouchStartHandler(Widget w, TouchStartHandler handler) { + return w.addBitlessDomHandler(new TouchStartToMsPointerDownHandler(handler), MsPointerDownEvent.getType()); + } + + @Override + public HandlerRegistration addTouchMoveHandler(Widget w, TouchMoveHandler handler) { + TouchMoveToMsPointerMoveHandler touchMoveToMsPointerMoveHandler = new TouchMoveToMsPointerMoveHandler(handler); + HandlerRegistrationCollection handlerRegistrationCollection = new HandlerRegistrationCollection(); + handlerRegistrationCollection.addHandlerRegistration(w.addBitlessDomHandler(touchMoveToMsPointerMoveHandler, MsPointerDownEvent.getType())); + handlerRegistrationCollection.addHandlerRegistration(w.addBitlessDomHandler(touchMoveToMsPointerMoveHandler, MsPointerUpEvent.getType())); + handlerRegistrationCollection.addHandlerRegistration(w.addBitlessDomHandler(touchMoveToMsPointerMoveHandler, MsPointerMoveEvent.getType())); + return handlerRegistrationCollection; + } + + @Override + public HandlerRegistration addTouchCancelHandler(Widget w, TouchCancelHandler handler) { + return w.addBitlessDomHandler(new TouchCancelToMsPointerCancelHandler(handler), MsPointerCancelEvent.getType()); + } + + @Override + public HandlerRegistration addTouchEndHandler(Widget w, TouchEndHandler handler) { + return w.addBitlessDomHandler(new TouchEndToMsPointerUpHandler(handler), MsPointerUpEvent.getType()); + } + + @Override + public HandlerRegistration addTouchHandler(Widget w, TouchHandler handler) { + HandlerRegistrationCollection hrc = new HandlerRegistrationCollection(); + hrc.addHandlerRegistration(addTouchStartHandler(w, handler)); + hrc.addHandlerRegistration(addTouchMoveHandler(w, handler)); + hrc.addHandlerRegistration(addTouchEndHandler(w, handler)); + hrc.addHandlerRegistration(addTouchCancelHandler(w, handler)); + return hrc; + } + +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetStandardImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetStandardImpl.java new file mode 100644 index 000000000..0a5988bc1 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetStandardImpl.java @@ -0,0 +1,86 @@ +package com.googlecode.mgwt.ui.client.widget.touch; + +import com.google.gwt.event.dom.client.MouseDownEvent; +import com.google.gwt.event.dom.client.MouseMoveEvent; +import com.google.gwt.event.dom.client.MouseUpEvent; +import com.google.gwt.event.dom.client.TouchCancelHandler; +import com.google.gwt.event.dom.client.TouchEndHandler; +import com.google.gwt.event.dom.client.TouchMoveHandler; +import com.google.gwt.event.dom.client.TouchStartHandler; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.user.client.ui.Widget; +import com.googlecode.mgwt.dom.client.event.mouse.HandlerRegistrationCollection; +import com.googlecode.mgwt.dom.client.event.mouse.TouchEndToMouseUpHandler; +import com.googlecode.mgwt.dom.client.event.mouse.TouchMoveToMouseMoveHandler; +import com.googlecode.mgwt.dom.client.event.mouse.TouchStartToMouseDownHandler; +import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; +import com.googlecode.mgwt.ui.client.util.NoopHandlerRegistration; + +public class TouchWidgetStandardImpl implements TouchWidgetImpl +{ + private static boolean hasTouchSupport; + private static TouchWidgetImpl delegate; + + static { + hasTouchSupport = hasTouch(); + if (hasTouchSupport) { + delegate = new TouchWidgetTouchImpl(); + } + } + + private static native boolean hasTouch() /*-{ + return 'ontouchstart' in $doc.documentElement; + }-*/; + + + @Override + public HandlerRegistration addTouchStartHandler(Widget w, TouchStartHandler handler) { + if (hasTouchSupport) { + return delegate.addTouchStartHandler(w, handler); + } + return w.addDomHandler(new TouchStartToMouseDownHandler(handler), MouseDownEvent.getType()); + } + + @Override + public HandlerRegistration addTouchMoveHandler(Widget w, TouchMoveHandler handler) { + if (hasTouchSupport) { + return delegate.addTouchMoveHandler(w, handler); + } + TouchMoveToMouseMoveHandler touchMoveToMouseMoveHandler = new TouchMoveToMouseMoveHandler(handler); + HandlerRegistrationCollection handlerRegistrationCollection = new HandlerRegistrationCollection(); + handlerRegistrationCollection.addHandlerRegistration(w.addDomHandler(touchMoveToMouseMoveHandler, MouseDownEvent.getType())); + handlerRegistrationCollection.addHandlerRegistration(w.addDomHandler(touchMoveToMouseMoveHandler, MouseUpEvent.getType())); + handlerRegistrationCollection.addHandlerRegistration(w.addDomHandler(touchMoveToMouseMoveHandler, MouseMoveEvent.getType())); + return handlerRegistrationCollection; + } + + @Override + public HandlerRegistration addTouchCancelHandler(Widget w, TouchCancelHandler handler) { + if (hasTouchSupport) { + return delegate.addTouchCancelHandler(w, handler); + } + return new NoopHandlerRegistration(); + } + + @Override + public HandlerRegistration addTouchEndHandler(Widget w, TouchEndHandler handler) { + if (hasTouchSupport) { + return delegate.addTouchEndHandler(w, handler); + } + return w.addDomHandler(new TouchEndToMouseUpHandler(handler), MouseUpEvent.getType()); + } + + @Override + public HandlerRegistration addTouchHandler(Widget w, TouchHandler handler) { + if (hasTouchSupport) { + return delegate.addTouchHandler(w, handler); + } + HandlerRegistrationCollection hrc = new HandlerRegistrationCollection(); + hrc.addHandlerRegistration(addTouchStartHandler(w, handler)); + hrc.addHandlerRegistration(addTouchMoveHandler(w, handler)); + hrc.addHandlerRegistration(addTouchEndHandler(w, handler)); + hrc.addHandlerRegistration(addTouchCancelHandler(w, handler)); + return hrc; + } + +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetTouchImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetTouchImpl.java new file mode 100644 index 000000000..23b10a387 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidgetTouchImpl.java @@ -0,0 +1,47 @@ +package com.googlecode.mgwt.ui.client.widget.touch; + +import com.google.gwt.event.dom.client.TouchCancelEvent; +import com.google.gwt.event.dom.client.TouchCancelHandler; +import com.google.gwt.event.dom.client.TouchEndEvent; +import com.google.gwt.event.dom.client.TouchEndHandler; +import com.google.gwt.event.dom.client.TouchMoveEvent; +import com.google.gwt.event.dom.client.TouchMoveHandler; +import com.google.gwt.event.dom.client.TouchStartEvent; +import com.google.gwt.event.dom.client.TouchStartHandler; +import com.google.gwt.event.shared.HandlerRegistration; +import com.google.gwt.user.client.ui.Widget; +import com.googlecode.mgwt.dom.client.event.mouse.HandlerRegistrationCollection; +import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; + +public class TouchWidgetTouchImpl implements TouchWidgetImpl +{ + @Override + public HandlerRegistration addTouchStartHandler(Widget w, TouchStartHandler handler) { + return w.addDomHandler(handler, TouchStartEvent.getType()); + } + + @Override + public HandlerRegistration addTouchMoveHandler(Widget w, TouchMoveHandler handler) { + return w.addDomHandler(handler, TouchMoveEvent.getType()); + } + + @Override + public HandlerRegistration addTouchCancelHandler(Widget w, TouchCancelHandler handler) { + return w.addDomHandler(handler, TouchCancelEvent.getType()); + } + + @Override + public HandlerRegistration addTouchEndHandler(Widget w, TouchEndHandler handler) { + return w.addDomHandler(handler, TouchEndEvent.getType()); + } + + @Override + public HandlerRegistration addTouchHandler(Widget w, TouchHandler handler) { + HandlerRegistrationCollection hrc = new HandlerRegistrationCollection(); + hrc.addHandlerRegistration(addTouchStartHandler(w, handler)); + hrc.addHandlerRegistration(addTouchMoveHandler(w, handler)); + hrc.addHandlerRegistration(addTouchEndHandler(w, handler)); + hrc.addHandlerRegistration(addTouchCancelHandler(w, handler)); + return hrc; + } +} diff --git a/src/test/java/com/googlecode/mgwt/image/client/ImageConverterGwtTestCase.java b/src/test/java/com/googlecode/mgwt/image/client/ImageConverterGwtTestCase.java index 2c7759636..66f2f7819 100644 --- a/src/test/java/com/googlecode/mgwt/image/client/ImageConverterGwtTestCase.java +++ b/src/test/java/com/googlecode/mgwt/image/client/ImageConverterGwtTestCase.java @@ -40,9 +40,29 @@ public String getModuleName() { @DoNotRunWith(Platform.HtmlUnitUnknown) public void testConvert_withKnownImage() { ImageConverter imageConverter = new ImageConverter(); - ImageResource convertedResource = imageConverter.convert( - ImageConverterTestBundle.INSTANCE.knownImage(), "#0000F1"); + ImageResource convertedResource = null; + + ImageConverterCallback callback = new ImageConverterCallback() + { + public ImageResource convertedResource = null; + + @Override + public void onFailure(Throwable caught) + { + } + @Override + public void onSuccess(ImageResource convertedResource) + { + this.convertedResource = convertedResource; + } + + }; + + imageConverter.convert(ImageConverterTestBundle.INSTANCE.knownImage(), "#0000F1", callback); + + delayTestFinish(200); + /* * Dirty hack to test, should be improved. */ From 57c9cd2e1d946a4cd423b65be530362073a2a753 Mon Sep 17 00:00:00 2001 From: Paul French Date: Wed, 3 Dec 2014 10:22:33 +0000 Subject: [PATCH 17/40] Capture pointer events by default so we get the same behaviour as IOS. We call setPointerCapture on the element that receives the pointer down event. Added FlexPropertyHelper enhancements to support IE10 --- .../gwt/user/client/impl/DOMImplIE10.java | 11 +- .../java/com/googlecode/mgwt/ui/UI.gwt.xml | 22 +++- .../com/googlecode/mgwt/ui/client/MGWT.java | 2 +- .../mgwt/ui/client/TouchSupport.java | 100 ++++++++++++++++++ .../ui/client/widget/button/ButtonBase.java | 8 +- .../widget/input/checkbox/MCheckBox.java | 9 +- .../ui/client/widget/input/slider/Slider.java | 9 +- .../widget/panel/flex/FlexPropertyHelper.java | 2 +- .../panel/flex/FlexPropertyHelperIE10.java | 13 ++- .../panel/flex/FlexPropertyHelperMoz.java | 8 ++ .../flex/FlexPropertyHelperStandard.java | 8 ++ .../panel/flex/FlexPropertyHelperWebkit.java | 12 +++ 12 files changed, 182 insertions(+), 22 deletions(-) create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/TouchSupport.java diff --git a/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java b/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java index 444abe1c0..e7a80d115 100644 --- a/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java +++ b/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java @@ -25,9 +25,18 @@ public class DOMImplIE10 extends DOMImplIE9 { static { - DOMImplStandard.addCaptureEventDispatchers(getCaptureEventDispatchers()); + //DOMImplStandard.addCaptureEventDispatchers(getCaptureEventDispa DOMImplStandard.addBitlessEventDispatchers(getBitlessEventDispatchers()); + capturePointerEvents(); } + + /** + * Lets have the same behaviour as IOS where the target element continues to receive pointer events + * even when the pointer has moved off the element up until pointer up has occured + */ + private native static void capturePointerEvents() /*-{ + $wnd.addEventListener('MSPointerDown',function(evt){evt.target.msSetPointerCapture(evt.pointerId);}, true); + }-*/; public static native JavaScriptObject getCaptureEventDispatchers() /*-{ return { diff --git a/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml b/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml index 8b2bbc4b1..b40a8e7e8 100644 --- a/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml +++ b/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml @@ -53,10 +53,6 @@ under * the License. - - - - @@ -120,6 +116,24 @@ under * the License. + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java b/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java index 5795f13c7..1bbf753f2 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java @@ -152,7 +152,7 @@ public static void applySettings(MGWTSettings settings) { scrollingDisabled = settings.isPreventScrolling(); - if (MGWT.getOsDetection().isWindowsPhone()) + if (TouchSupport.isTouchEventsEmulatedUsingPointerEvents()) { MetaElement ieCompatible = Document.get().createMetaElement(); ieCompatible.setHttpEquiv("IE=10"); diff --git a/src/main/java/com/googlecode/mgwt/ui/client/TouchSupport.java b/src/main/java/com/googlecode/mgwt/ui/client/TouchSupport.java new file mode 100644 index 000000000..cf70e7c73 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/TouchSupport.java @@ -0,0 +1,100 @@ +package com.googlecode.mgwt.ui.client; + +import com.google.gwt.core.shared.GWT; + +public abstract class TouchSupport { + + private static TouchSupport impl = GWT.create(TouchSupport.class); + + protected abstract boolean _isTouchEventsEmulatedUsingMouseEvents(); + + protected abstract boolean _isTouchEventsEmulatedUsingPointerEvents(); + + protected abstract boolean _isTouchEventsSupported(); + + public static boolean isTouchEventsEmulatedUsingMouseEvents() { + return impl._isTouchEventsEmulatedUsingMouseEvents(); + } + + public static boolean isTouchEventsEmulatedUsingPointerEvents() { + return impl._isTouchEventsEmulatedUsingPointerEvents(); + } + + public static boolean isTouchEventsSupported() { + return impl._isTouchEventsSupported(); + } + + public static class TouchSupportStandard extends TouchSupport { + + private static boolean hasTouchSupport; + private static TouchSupport delegate; + + static { + hasTouchSupport = hasTouch(); + if (hasTouchSupport) { + delegate = new TouchSupportNative(); + } + } + + private static native boolean hasTouch() /*-{ + return 'ontouchstart' in $doc.documentElement; + }-*/; + + + @Override + protected boolean _isTouchEventsEmulatedUsingMouseEvents() { + if (hasTouchSupport) { + return delegate._isTouchEventsEmulatedUsingMouseEvents(); + } + return true; + } + + @Override + protected boolean _isTouchEventsEmulatedUsingPointerEvents() { + return false; + } + + @Override + protected boolean _isTouchEventsSupported() { + if (hasTouchSupport) { + return delegate._isTouchEventsSupported(); + } + return false; + } + } + + public static class TouchSupportEmulatedPointer extends TouchSupport { + @Override + protected boolean _isTouchEventsEmulatedUsingMouseEvents() { + return false; + } + + @Override + protected boolean _isTouchEventsEmulatedUsingPointerEvents() { + return true; + } + + @Override + protected boolean _isTouchEventsSupported() { + return false; + } + } + + public static class TouchSupportNative extends TouchSupport { + @Override + protected boolean _isTouchEventsEmulatedUsingMouseEvents() { + return false; + } + + @Override + protected boolean _isTouchEventsEmulatedUsingPointerEvents() { + return false; + } + + @Override + protected boolean _isTouchEventsSupported() { + return true; + } + } + +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java index 5bb04786b..146230f9a 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java @@ -23,7 +23,7 @@ import com.googlecode.mgwt.dom.client.event.tap.TapEvent; import com.googlecode.mgwt.dom.client.event.tap.TapHandler; import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; -import com.googlecode.mgwt.ui.client.MGWT; +import com.googlecode.mgwt.ui.client.TouchSupport; import com.googlecode.mgwt.ui.client.widget.touch.TouchWidget; /** @@ -77,7 +77,7 @@ public void onTouchCancel(TouchCancelEvent event) { event.stopPropagation(); event.preventDefault(); removeStyleName(ButtonBase.this.baseAppearance.css().active()); - if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { DOM.releaseCapture(getElement()); } active = false; @@ -88,7 +88,7 @@ public void onTouchEnd(TouchEndEvent event) { event.stopPropagation(); event.preventDefault(); removeStyleName(ButtonBase.this.baseAppearance.css().active()); - if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { DOM.releaseCapture(getElement()); } active = false; @@ -105,7 +105,7 @@ public void onTouchStart(TouchStartEvent event) { event.stopPropagation(); event.preventDefault(); addStyleName(ButtonBase.this.baseAppearance.css().active()); - if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { DOM.setCapture(getElement()); } active = true; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/MCheckBox.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/MCheckBox.java index a479b7788..f24fb1bbc 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/MCheckBox.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/MCheckBox.java @@ -31,9 +31,8 @@ import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.HasValue; - import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; -import com.googlecode.mgwt.ui.client.MGWT; +import com.googlecode.mgwt.ui.client.TouchSupport; import com.googlecode.mgwt.ui.client.util.CssUtil; import com.googlecode.mgwt.ui.client.widget.touch.TouchWidget; @@ -59,7 +58,7 @@ public void onTouchCancel(TouchCancelEvent event) { } event.stopPropagation(); event.preventDefault(); - if (MGWT.getFormFactor().isDesktop()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { DOM.releaseCapture(getElement()); } setValue(getValue()); @@ -73,7 +72,7 @@ public void onTouchEnd(TouchEndEvent event) { event.stopPropagation(); event.preventDefault(); - if (MGWT.getFormFactor().isDesktop()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { DOM.releaseCapture(getElement()); } @@ -120,7 +119,7 @@ public void onTouchStart(TouchStartEvent event) { } event.stopPropagation(); event.preventDefault(); - if (MGWT.getFormFactor().isDesktop()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { DOM.setCapture(getElement()); } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java index 6a0be4dc8..ccb6ccebc 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java @@ -30,9 +30,8 @@ import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.HasValue; import com.google.gwt.user.client.ui.Widget; - import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; -import com.googlecode.mgwt.ui.client.MGWT; +import com.googlecode.mgwt.ui.client.TouchSupport; import com.googlecode.mgwt.ui.client.util.CssUtil; import com.googlecode.mgwt.ui.client.widget.touch.TouchWidgetImpl; @@ -48,7 +47,7 @@ private class SliderTouchHandler implements TouchHandler { @Override public void onTouchStart(TouchStartEvent event) { setValueContrained(event.getTouches().get(0).getClientX()); - if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { DOM.setCapture(getElement()); } event.stopPropagation(); @@ -65,7 +64,7 @@ public void onTouchMove(TouchMoveEvent event) { @Override public void onTouchEnd(TouchEndEvent event) { - if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { DOM.releaseCapture(getElement()); } event.stopPropagation(); @@ -74,7 +73,7 @@ public void onTouchEnd(TouchEndEvent event) { @Override public void onTouchCancel(TouchCancelEvent event) { - if (MGWT.getFormFactor().isDesktop() || MGWT.getOsDetection().isWindowsPhone()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { DOM.releaseCapture(getElement()); } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java index c4c9208d9..969737f68 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java @@ -35,7 +35,7 @@ public static enum Justification { } public static enum Orientation { - HORIZONTAL, VERTICAL; + HORIZONTAL, HORIZONTAL_REVERSE, VERTICAL, VERTICAL_REVERSE; } public static void setElementAsFlexContainer(Element el) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java index 5a047207e..6563a21dd 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java @@ -52,6 +52,14 @@ public void _setOrientationProperty(Element el, Orientation orientation) { value = "column"; break; } + case HORIZONTAL_REVERSE: { + value = "row-reverse"; + break; + } + case VERTICAL_REVERSE: { + value = "column-reverse"; + break; + } default: { value = ""; break; @@ -123,9 +131,12 @@ protected void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf setStyleProperty(el, "msFlexItemAlign", value); } + /** + * IE10/11 sets flex-shrink to 0 if omitted whereas webkit sets to 1, so lets copy webkit + */ @Override protected void _setFlex(Element el, double grow, String basis) { - setStyleProperty(el,"msFlex", Double.toString(grow)+" "+(basis == null ? "0%" : basis)); + _setFlex(el,grow,1,basis); } @Override diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java index d8aac7664..1fe2a6938 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java @@ -47,6 +47,14 @@ public void _setOrientationProperty(Element el, Orientation orientation) { value = "column"; break; } + case HORIZONTAL_REVERSE: { + value = "row-reverse"; + break; + } + case VERTICAL_REVERSE: { + value = "column-reverse"; + break; + } default: { value = ""; break; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java index 343694cf4..1ac0f3b47 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java @@ -47,6 +47,14 @@ public void _setOrientationProperty(Element el, Orientation orientation) { value = "column"; break; } + case HORIZONTAL_REVERSE: { + value = "row-reverse"; + break; + } + case VERTICAL_REVERSE: { + value = "column-reverse"; + break; + } default: { value = ""; break; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java index 73341f66c..4c5178eb9 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java @@ -45,6 +45,7 @@ public void _setAlignmentProperty(Element el, Alignment alignment) { @Override public void _setOrientationProperty(Element el, Orientation orientation) { String orientationOldSyntax, orientationNewSyntax; + boolean reverse = false; switch (orientation) { case HORIZONTAL: { orientationOldSyntax = "horizontal"; @@ -56,6 +57,16 @@ public void _setOrientationProperty(Element el, Orientation orientation) { orientationNewSyntax = "column"; break; } + case HORIZONTAL_REVERSE: { + orientationOldSyntax = "horizontal"; reverse = true; + orientationNewSyntax = "row-reverse"; + break; + } + case VERTICAL_REVERSE: { + orientationOldSyntax = "vertical"; reverse = true; + orientationNewSyntax = "column-reverse"; + break; + } default: { orientationOldSyntax = ""; orientationNewSyntax = ""; @@ -63,6 +74,7 @@ public void _setOrientationProperty(Element el, Orientation orientation) { } } setStyleProperty(el, "WebkitBoxOrient", orientationOldSyntax); + setStyleProperty(el, "WebkitBoxDirection", reverse ? "reverse" : "normal"); setStyleProperty(el, "WebkitFlexDirection", orientationNewSyntax); } From 0a6c6f3410913e9a97cc3cee5747c88e848bca8b Mon Sep 17 00:00:00 2001 From: Paul French Date: Thu, 4 Dec 2014 09:38:11 +0000 Subject: [PATCH 18/40] do not blurBeforeAnimation if the node is the body element since this causes the IE10 browser to disappear behind other windows --- .../widget/animation/impl/AnimationWidgetKeyFrameImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/AnimationWidgetKeyFrameImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/AnimationWidgetKeyFrameImpl.java index b0ff2375e..a5d79a18b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/AnimationWidgetKeyFrameImpl.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/AnimationWidgetKeyFrameImpl.java @@ -186,7 +186,7 @@ public void setSecondWidget(IsWidget w) { private native void blurBeforeAnimation() /*-{ var node = $doc.querySelector(":focus"); - if (node != null) { + if ((node != null) && !((node.nodeType === 1) && (node.nodeName === "BODY"))) { if (typeof (node.blur) == "function") { node.blur(); } From c14b79fd707a51515aea3da4ef2408d987914406 Mon Sep 17 00:00:00 2001 From: Paul French Date: Fri, 5 Dec 2014 10:25:51 +0000 Subject: [PATCH 19/40] on going fixes. For ie10 use -ms-flex: 1 1 instead of -ms-flex: 1 since ie10 sets shrink to 0 by default if not specified whereas webkit sets it to 1. Do not do event.preventDefault in the CellList if we are running on windows phone, prevents the scroll panel the CellList is in scrolling properly. --- .../event/pointer/SimulatedTouchEndEvent.java | 18 ++++++------ .../pointer/SimulatedTouchMoveEvent.java | 4 +-- .../pointer/SimulatedTouchStartEvent.java | 4 +-- .../pointer/TouchEndToMsPointerUpHandler.java | 2 +- .../TouchMoveToMsPointerMoveHandler.java | 2 +- .../TouchStartToMsPointerDownHandler.java | 5 +--- .../widget/animation/bundle/dissolve.css | 2 ++ .../client/widget/animation/bundle/fade.css | 2 ++ .../client/widget/animation/bundle/flip.css | 2 ++ .../ui/client/widget/animation/bundle/pop.css | 2 ++ .../widget/animation/bundle/slide-up.css | 2 ++ .../client/widget/animation/bundle/slide.css | 2 ++ .../client/widget/animation/bundle/swap.css | 2 ++ .../animation/impl/animation-display.css | 28 +++++++++---------- .../ui/client/widget/carousel/carousel.css | 4 +-- .../widget/dialog/panel/dialog-button.css | 2 +- .../mgwt/ui/client/widget/form/form.css | 4 +-- .../mgwt/ui/client/widget/input/input.css | 2 +- .../widget/input/radio/mradiobutton.css | 4 +-- .../client/widget/list/celllist/CellList.java | 13 ++++++--- .../list/celllist/grouping-celllist.css | 2 +- .../widget/list/widgetlist/widgetlist.css | 2 +- .../mgwt/ui/client/widget/panel/flex/flex.css | 2 +- .../ui/client/widget/panel/pull/pullpanel.css | 2 +- .../scroll/impl/ScrollPanelTouchImpl.java | 10 +++---- .../ui/client/widget/tabbar/tabbar-button.css | 2 +- .../mgwt/ui/client/widget/tabbar/tabbar.css | 4 +-- .../ui/client/widget/touch/TouchPanel.java | 10 +------ .../ui/client/widget/touch/TouchWidget.java | 2 -- 29 files changed, 73 insertions(+), 69 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchEndEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchEndEvent.java index 7f0245862..c0d2bae55 100644 --- a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchEndEvent.java +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchEndEvent.java @@ -31,17 +31,17 @@ public class SimulatedTouchEndEvent extends TouchEndEvent { /** * Construct a simulated TouchEndEvent from a {@link MsPointerUpEvent} * - * @param pointerUpEvent the data for the simulated event; + * @param event the data for the simulated event; * @param multiTouch */ - public SimulatedTouchEndEvent(MsPointerUpEvent pointerUpEvent, int touchId) { - clientX = pointerUpEvent.getClientX(); - clientY = pointerUpEvent.getClientY(); - this.touchId = touchId; - pageX = pointerUpEvent.getScreenX(); - pageY = pointerUpEvent.getScreenY(); - setNativeEvent(pointerUpEvent.getNativeEvent()); - setSource(pointerUpEvent.getSource()); + public SimulatedTouchEndEvent(MsPointerUpEvent event) { + this.touchId = event.getPointerId(); + clientX = event.getClientX(); + clientY = event.getClientY(); + pageX = event.getScreenX(); + pageY = event.getScreenY(); + setNativeEvent(event.getNativeEvent()); + setSource(event.getSource()); } @Override diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchMoveEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchMoveEvent.java index 054f159c1..715ddbc0a 100644 --- a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchMoveEvent.java +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchMoveEvent.java @@ -28,8 +28,8 @@ public class SimulatedTouchMoveEvent extends TouchMoveEvent { private final int pageY; private int touchId; - public SimulatedTouchMoveEvent(MsPointerMoveEvent event, int touchId) { - this.touchId = touchId; + public SimulatedTouchMoveEvent(MsPointerMoveEvent event) { + this.touchId = event.getPointerId(); clientX = event.getClientX(); clientY = event.getClientY(); pageX = event.getScreenX(); diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchStartEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchStartEvent.java index bef61f00f..0e1a852b5 100644 --- a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchStartEvent.java +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/SimulatedTouchStartEvent.java @@ -28,8 +28,8 @@ public class SimulatedTouchStartEvent extends TouchStartEvent { private final int pageY; private int touchId; - public SimulatedTouchStartEvent(MsPointerDownEvent event, int touchId) { - this.touchId = touchId; + public SimulatedTouchStartEvent(MsPointerDownEvent event) { + this.touchId = event.getPointerId(); clientX = event.getClientX(); clientY = event.getClientY(); pageX = event.getScreenX(); diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchEndToMsPointerUpHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchEndToMsPointerUpHandler.java index 9a9db8bf4..ea02e8af9 100644 --- a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchEndToMsPointerUpHandler.java +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchEndToMsPointerUpHandler.java @@ -28,7 +28,7 @@ public TouchEndToMsPointerUpHandler(TouchEndHandler handler) { /** {@inheritDoc} */ @Override public void onPointerUp(MsPointerUpEvent event) { - SimulatedTouchEndEvent simulatedTouchEndEvent = new SimulatedTouchEndEvent(event, TouchStartToMsPointerDownHandler.lastTouchId); + SimulatedTouchEndEvent simulatedTouchEndEvent = new SimulatedTouchEndEvent(event); handler.onTouchEnd(simulatedTouchEndEvent); } diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchMoveToMsPointerMoveHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchMoveToMsPointerMoveHandler.java index 6ef42930d..c3670fffe 100644 --- a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchMoveToMsPointerMoveHandler.java +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchMoveToMsPointerMoveHandler.java @@ -35,7 +35,7 @@ public TouchMoveToMsPointerMoveHandler(TouchMoveHandler touchMoveHandler) { public void onPointerMove(MsPointerMoveEvent event) { if (ignoreEvent) return; - touchMoveHandler.onTouchMove(new SimulatedTouchMoveEvent(event, TouchStartToMsPointerDownHandler.lastTouchId)); + touchMoveHandler.onTouchMove(new SimulatedTouchMoveEvent(event)); } @Override diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchStartToMsPointerDownHandler.java b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchStartToMsPointerDownHandler.java index 3389df24f..14ebe9d58 100644 --- a/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchStartToMsPointerDownHandler.java +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/pointer/TouchStartToMsPointerDownHandler.java @@ -22,16 +22,13 @@ public class TouchStartToMsPointerDownHandler implements MsPointerDownHandler { private final TouchStartHandler handler; - public static int lastTouchId = 0; - public TouchStartToMsPointerDownHandler(TouchStartHandler handler) { this.handler = handler; } @Override public void onPointerDown(MsPointerDownEvent event) { - lastTouchId++; - SimulatedTouchStartEvent simulatedTouchStartEvent = new SimulatedTouchStartEvent(event, lastTouchId); + SimulatedTouchStartEvent simulatedTouchStartEvent = new SimulatedTouchStartEvent(event); handler.onTouchStart(simulatedTouchStartEvent); } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css index 3d98ad071..de55a77c2 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css @@ -1,3 +1,4 @@ +@if user.agent safari { .in, .out { -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; @@ -29,6 +30,7 @@ from { opacity: 0; } to { opacity: 1; } } +} @if user.agent ie10 { .in, .out { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css index 9195e2902..998e59438 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css @@ -1,3 +1,4 @@ +@if user.agent safari { .in, .out { -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; @@ -28,6 +29,7 @@ from { opacity: 1; } to { opacity: 0; } } +} @if user.agent ie10 { .in, .out { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css index 03a89e4bc..dcda09138 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css @@ -1,3 +1,4 @@ +@if user.agent safari { .in, .out { -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; @@ -41,6 +42,7 @@ from { -webkit-transform: rotateY(0) scale(1); } to { -webkit-transform: rotateY(180deg) scale(.8); } } +} @if user.agent ie10 { .in, .out { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css index 3940d9233..37bad2cf8 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css @@ -1,3 +1,4 @@ +@if user.agent safari { .in, .out { -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; @@ -41,6 +42,7 @@ opacity: 0; } } +} @if user.agent ie10 { .in, .out { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css index 5be436cfd..34870a237 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css @@ -1,3 +1,4 @@ +@if user.agent safari { .in, .out { -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; @@ -43,6 +44,7 @@ from { -webkit-transform: translateY(-100%); } to { -webkit-transform: translateY(0%); } } +} @if user.agent ie10 { .in, .out { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css index 0acb66232..ef0b389a9 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css @@ -1,3 +1,4 @@ +@if user.agent safari { .in, .out { -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; @@ -47,6 +48,7 @@ from { -webkit-transform: translateX(0); } to { -webkit-transform: translateX(100%); } } +} @if user.agent ie10 { .in, .out { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css index 8f4f7e0ba..b06722ddd 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css @@ -1,3 +1,4 @@ +@if user.agent safari { .in, .out { -webkit-animation-timing-function: ease-in-out; -webkit-animation-fill-mode: both; @@ -79,6 +80,7 @@ -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg); } } +} @if user.agent ie10 { .in, .out { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css index 41b2bf904..1ddb0ea40 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css @@ -3,7 +3,6 @@ width: 100%; height: 100%; overflow:hidden; - -webkit-backface-visibility: hidden; } .display { @@ -13,28 +12,27 @@ right: 0px; bottom: 0px; overflow:hidden; - -webkit-transform-style: preserve-3d; - -webkit-backface-visibility: hidden; - -webkit-transform: translate3d(0,0,0) rotate(0) scale(1); - -webkit-perspective: 800; } + +@if user.agent safari { + .displayContainer { + -webkit-backface-visibility: hidden; + } + + .display { + -webkit-transform-style: preserve-3d; + -webkit-backface-visibility: hidden; + -webkit-transform: translate3d(0,0,0) rotate(0) scale(1); + -webkit-perspective: 800; + } +} @if user.agent ie10 { .displayContainer { - position: absolute; - width: 100%; - height: 100%; - overflow:hidden; backface-visibility: hidden; } .display { - position: absolute; - top: 0px; - left: 0px; - right: 0px; - bottom: 0px; - overflow:hidden; backface-visibility: hidden; transform: translate3d(0,0,0) rotate(0) scale(1); perspective: 800; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css index 04a3495a8..1d090f735 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css @@ -18,7 +18,7 @@ @if user.agent ie10 { .mgwt-Carousel { display: -ms-flexbox; - -ms-flex: 1; + -ms-flex: 1 1; } } @@ -38,7 +38,7 @@ @if user.agent ie10 { .mgwt-Carousel-Scroller, .mgwt-Carousel-Container { - -ms-flex: 1; + -ms-flex: 1 1; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css index 1010b6c95..5685a856a 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css @@ -26,7 +26,7 @@ @if user.agent ie10 { .mgwt-DialogButton { - -ms-flex: 1; + -ms-flex: 1 1; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css index 3d7f3d75f..89a59f55c 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css @@ -30,7 +30,7 @@ @if user.agent ie10 { .mgwt-Form-Entry { display: -ms-flexbox; - -ms-box-pack: center; + -ms-flex-pack: center; } } @@ -96,7 +96,7 @@ @if user.agent ie10 { .mgwt-Form-Entry-container { - -ms-flex: 1; + -ms-flex: 1 1; -ms-flex-pack: end; display: -ms-flexbox; } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css index 3e1efa339..bd2bb4e93 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css @@ -21,7 +21,7 @@ .mgwt-TextBox, .mgwt-InputBox-box, .mgwt-PasswordTextBox, .mgwt-InputBox-box, .mgwt-TextArea, .mgwt-InputBox-box { display: -ms-flexbox; - -ms-flex: 1; + -ms-flex: 1 1; -ms-user-select: text; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css index cc0933056..0023f4f8b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css @@ -33,11 +33,11 @@ .mgwt-RadioButton { display: -ms-flexbox; -ms-flex-direction: row; - -ms-flex: 1; + -ms-flex: 1 1; } .mgwt-RadioButton-label { display: -ms-flexbox; - -ms-flex: 1; + -ms-flex: 1 1; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/CellList.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/CellList.java index 111e581ae..061541520 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/CellList.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/CellList.java @@ -13,6 +13,8 @@ */ package com.googlecode.mgwt.ui.client.widget.list.celllist; +import java.util.List; + import com.google.gwt.core.client.GWT; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.EventTarget; @@ -29,14 +31,12 @@ import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.ui.Widget; - import com.googlecode.mgwt.dom.client.event.tap.Tap; import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; import com.googlecode.mgwt.dom.client.recognizer.EventPropagator; +import com.googlecode.mgwt.ui.client.MGWT; import com.googlecode.mgwt.ui.client.widget.touch.TouchWidgetImpl; -import java.util.List; - /** * * A widget that renders its children as a list @@ -123,7 +123,12 @@ public void onTouchStart(TouchStartEvent event) { return; } - event.preventDefault(); + // if windows phone then do not prevent default, causes scrolling issues when + // in scroll panel (not sure why), ie10 desktop is fine + if (!MGWT.getOsDetection().isWindowsPhone()) + { + event.preventDefault(); + } // text node use the parent.. if (Node.is(eventTarget) && !Element.is(eventTarget)) { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css index 1ecf37ef8..f4ed2ed0b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css @@ -84,7 +84,7 @@ @if user.agent ie10 { .mgwt-GroupingList-Selection-Bar > li{ - -ms-flex: 1; + -ms-flex: 1 1; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/widgetlist/widgetlist.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/widgetlist/widgetlist.css index 59f3e036d..1cfbd8a52 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/widgetlist/widgetlist.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/widgetlist/widgetlist.css @@ -43,7 +43,7 @@ } } -@if user.agent safari { +@if user.agent ie10 { .mgwt-WidgetList-Entry { display: -ms-flexbox; } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css index 86e53675a..7a2a6e502 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css @@ -46,7 +46,7 @@ @if user.agent ie10 { .mgwt-FlexPanel-flex { - -ms-flex: 1; + -ms-flex: 1 1; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css index 20b699012..c16730f1a 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css @@ -14,7 +14,7 @@ @if user.agent ie10 { .mgwt-PullPanel { - -ms-flex: 1; + -ms-flex: 1 1; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java index 3e2fde207..82b8bdcfa 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java @@ -32,7 +32,6 @@ import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; - import com.googlecode.mgwt.collection.shared.CollectionFactory; import com.googlecode.mgwt.collection.shared.LightArray; import com.googlecode.mgwt.collection.shared.LightArrayInt; @@ -42,6 +41,7 @@ import com.googlecode.mgwt.dom.client.event.orientation.OrientationChangeHandler; import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; import com.googlecode.mgwt.ui.client.MGWT; +import com.googlecode.mgwt.ui.client.TouchSupport; import com.googlecode.mgwt.ui.client.util.CssUtil; import com.googlecode.mgwt.ui.client.widget.panel.scroll.BeforeScrollEndEvent; import com.googlecode.mgwt.ui.client.widget.panel.scroll.BeforeScrollMoveEvent; @@ -334,7 +334,7 @@ public ScrollPanelTouchImpl() { this.fixedScrollbar = MGWT.getOsDetection().isAndroid() && !MGWT.getOsDetection().isAndroid4_4_OrHigher(); this.hideScrollBar = true; - this.fadeScrollBar = MGWT.getOsDetection().isIOs() && CssUtil.has3d(); + this.fadeScrollBar = (MGWT.getOsDetection().isIOs() || MGWT.getOsDetection().isWindowsPhone()) && CssUtil.has3d(); // array for scrollbars this.scrollBar = new boolean[2]; @@ -1596,7 +1596,7 @@ public void setWidget(Widget w) { // clear old event handlers unbindStartEvent(); unbindResizeEvent(); - if (MGWT.getOsDetection().isDesktop()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { unbindMouseoutEvent(); unbindMouseWheelEvent(); } @@ -1616,7 +1616,7 @@ public void setWidget(Widget w) { if (isAttached()) { bindResizeEvent(); bindStartEvent(); - if (MGWT.getOsDetection().isDesktop()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { bindMouseoutEvent(); bindMouseWheelEvent(); } @@ -1650,7 +1650,7 @@ protected void onAttach() { // bind events bindResizeEvent(); bindStartEvent(); - if (MGWT.getOsDetection().isDesktop()) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { bindMouseoutEvent(); bindMouseWheelEvent(); } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar-button.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar-button.css index 6e0342902..29ae02215 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar-button.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar-button.css @@ -26,7 +26,7 @@ .mgwt-TabBar-Button { display: -ms-flexbox; -ms-flex-direction: column; - -ms-flex: 1; + -ms-flex: 1 1; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css index 37c264746..6688cb18f 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css @@ -16,7 +16,7 @@ @if user.agent ie10 { .mgwt-TabPanel { display: -ms-flexbox; - -ms-flex: 1; + -ms-flex: 1 1; -ms-flex-direction: column; } } @@ -49,7 +49,7 @@ @if user.agent ie10 { .mgwt-TabPanel-container { display: -ms-flexbox; - -ms-flex: 1; + -ms-flex: 1 1; -ms-flex-direction: column; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchPanel.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchPanel.java index dcf1b9236..8d9523f61 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchPanel.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchPanel.java @@ -23,8 +23,6 @@ import com.google.gwt.event.dom.client.TouchStartHandler; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.ui.FlowPanel; - -import com.googlecode.mgwt.dom.client.event.mouse.HandlerRegistrationCollection; import com.googlecode.mgwt.dom.client.event.tap.HasTapHandlers; import com.googlecode.mgwt.dom.client.event.tap.TapEvent; import com.googlecode.mgwt.dom.client.event.tap.TapHandler; @@ -83,13 +81,7 @@ public HandlerRegistration addTouchEndHandler(TouchEndHandler handler) { @Override public HandlerRegistration addTouchHandler(TouchHandler handler) { - HandlerRegistrationCollection handlerRegistrationCollection = new HandlerRegistrationCollection(); - - handlerRegistrationCollection.addHandlerRegistration(addTouchCancelHandler(handler)); - handlerRegistrationCollection.addHandlerRegistration(addTouchStartHandler(handler)); - handlerRegistrationCollection.addHandlerRegistration(addTouchEndHandler(handler)); - handlerRegistrationCollection.addHandlerRegistration(addTouchMoveHandler(handler)); - return handlerRegistrationCollection; + return impl.addTouchHandler(this, handler); } @Override diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidget.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidget.java index 524c6cd53..5f3cf4a02 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidget.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/touch/TouchWidget.java @@ -22,8 +22,6 @@ import com.google.gwt.event.dom.client.TouchStartHandler; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.ui.Widget; - -import com.googlecode.mgwt.dom.client.event.mouse.HandlerRegistrationCollection; import com.googlecode.mgwt.dom.client.event.tap.HasTapHandlers; import com.googlecode.mgwt.dom.client.event.tap.TapEvent; import com.googlecode.mgwt.dom.client.event.tap.TapHandler; From ada6a14cb7f1f09de7ccba04ce10f16ad5a89e6f Mon Sep 17 00:00:00 2001 From: Paul French Date: Mon, 8 Dec 2014 11:11:19 +0000 Subject: [PATCH 20/40] for ie10/ie11 desktop needed to add a focus fix where when using pointer capture, input elements failed to get the focus properly. See https://stackoverflow.com/questions/27355271/desktop-ie10-ie11-on-windows-input-elements-fail-to-get-focus-when-pointer-cap --- .../gwt/user/client/impl/DOMImplIE10.java | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java b/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java index e7a80d115..782408f09 100644 --- a/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java +++ b/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java @@ -16,6 +16,7 @@ package com.google.gwt.user.client.impl; import com.google.gwt.core.client.JavaScriptObject; +import com.googlecode.mgwt.ui.client.MGWT; /** @@ -25,19 +26,44 @@ public class DOMImplIE10 extends DOMImplIE9 { static { - //DOMImplStandard.addCaptureEventDispatchers(getCaptureEventDispa + DOMImplStandard.addCaptureEventDispatchers(getCaptureEventDispatchers()); DOMImplStandard.addBitlessEventDispatchers(getBitlessEventDispatchers()); - capturePointerEvents(); + if (MGWT.getOsDetection().isWindowsPhone()) { + capturePointerEvents(); + } + else { + // for desktop we need a focus fix + capturePointerEventsWithFocusFix(); + } } /** - * Lets have the same behaviour as IOS where the target element continues to receive pointer events - * even when the pointer has moved off the element up until pointer up has occured + * Lets have the same behaviour as IOS where the target element continues to receive Pointer events + * even when the pointer has moved off the element up until MSPointerUp has occurred. */ private native static void capturePointerEvents() /*-{ - $wnd.addEventListener('MSPointerDown',function(evt){evt.target.msSetPointerCapture(evt.pointerId);}, true); + $wnd.addEventListener('MSPointerDown', + function(evt) { + evt.target.msSetPointerCapture(evt.pointerId); + }, true); }-*/; + /** + * On desktop, for some reason when you do pointer capture input elements fail to get the focus + */ + private native static void capturePointerEventsWithFocusFix() /*-{ + var getFocus = function(evt) { + this.focus() + }; + $wnd.addEventListener('MSPointerDown', + function(evt) { + evt.target.msSetPointerCapture(evt.pointerId); + if (evt.target.focus) { + evt.target.addEventListener('MSPointerUp',getFocus); + } + }, true); + }-*/; + public static native JavaScriptObject getCaptureEventDispatchers() /*-{ return { MSPointerDown: @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent(*), From 7851c24fec1f59f4048c092692392b69c088acb2 Mon Sep 17 00:00:00 2001 From: Paul French Date: Tue, 9 Dec 2014 15:09:52 +0000 Subject: [PATCH 21/40] capturing pointer events on input or textarea elements causes many issues, so we no longer capture pointer events if the target element is an input or textarea. Turned on default behaviour for textarea so we can scroll textarea. However this can cause a bounce when scrolling a text area to the start or end. However this is better then not being able to scroll at all like currently in IOS --- .../gwt/user/client/impl/DOMImplIE10.java | 38 +++++-------------- .../mgwt/ui/client/widget/input/input.css | 4 ++ 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java b/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java index 782408f09..b8b4c0035 100644 --- a/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java +++ b/src/main/java/com/google/gwt/user/client/impl/DOMImplIE10.java @@ -16,7 +16,6 @@ package com.google.gwt.user.client.impl; import com.google.gwt.core.client.JavaScriptObject; -import com.googlecode.mgwt.ui.client.MGWT; /** @@ -28,41 +27,24 @@ public class DOMImplIE10 extends DOMImplIE9 { { DOMImplStandard.addCaptureEventDispatchers(getCaptureEventDispatchers()); DOMImplStandard.addBitlessEventDispatchers(getBitlessEventDispatchers()); - if (MGWT.getOsDetection().isWindowsPhone()) { - capturePointerEvents(); - } - else { - // for desktop we need a focus fix - capturePointerEventsWithFocusFix(); - } + capturePointerEvents(); } /** * Lets have the same behaviour as IOS where the target element continues to receive Pointer events - * even when the pointer has moved off the element up until MSPointerUp has occurred. + * even when the pointer has moved off the element up until MSPointerUp has occurred. + * + * Do not do pointer capture on input or textarea elements, all sorts of problems arise if you do! */ private native static void capturePointerEvents() /*-{ - $wnd.addEventListener('MSPointerDown', - function(evt) { - evt.target.msSetPointerCapture(evt.pointerId); - }, true); + $wnd.addEventListener('MSPointerDown', + $entry(function(evt) { + if ((evt.target.tagName !== 'INPUT') && (evt.target.tagName !== 'TEXTAREA')) { + evt.target.msSetPointerCapture(evt.pointerId); + } + }), true); }-*/; - /** - * On desktop, for some reason when you do pointer capture input elements fail to get the focus - */ - private native static void capturePointerEventsWithFocusFix() /*-{ - var getFocus = function(evt) { - this.focus() - }; - $wnd.addEventListener('MSPointerDown', - function(evt) { - evt.target.msSetPointerCapture(evt.pointerId); - if (evt.target.focus) { - evt.target.addEventListener('MSPointerUp',getFocus); - } - }, true); - }-*/; public static native JavaScriptObject getCaptureEventDispatchers() /*-{ return { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css index bd2bb4e93..974521e55 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css @@ -24,6 +24,10 @@ -ms-flex: 1 1; -ms-user-select: text; } + + textarea.mgwt-InputBox-box { + -ms-touch-action: pan-y; + } } @if user.agent gecko1_8 { From 3cbd91a5b3e48b69a7a5c1783753b9fac3ae689e Mon Sep 17 00:00:00 2001 From: Paul French Date: Tue, 9 Dec 2014 15:20:31 +0000 Subject: [PATCH 22/40] remove drop down arrow on select --- .../mgwt/ui/client/widget/input/listbox/mlistbox.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css index 57a3d1c29..b6e5e1176 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css @@ -21,6 +21,10 @@ display: -ms-flexbox; -ms-user-select: text; } + + select::-ms-expand { + display: none; + } } @if user.agent gecko1_8 { From 64d970ff8cf4fffb9f90a86939d9625417ed3c60 Mon Sep 17 00:00:00 2001 From: Paul French Date: Thu, 11 Dec 2014 17:59:25 +0000 Subject: [PATCH 23/40] fixed issue where scroll panel did not work on windows phone 8.1 update but worked fine on windows phone 8. Had to force getComputedStyle to return a 3D matrix for the transform property by specifying a non-zero z value (-1px). We now detect the device density correctly for ie10/11 (we use the screen object). We do not try and detect ie11 user agent, we assume if using ie11 that the meta tag ie10 compatibilty is set. User agent strings for ie11 are now even more complex. They specify webkit, iphone, gecko etc etc as part of the string. This makes OS detection more difficult using the user agent string. --- .../rebind/UserAgentPropertyGenerator.java | 6 ++---- src/main/java/com/googlecode/mgwt/dom/DOM.gwt.xml | 15 ++++++++++++--- .../mgwt/ui/client/OsDetectionRuntimeImpl.java | 10 +++++++++- .../mgwt/ui/client/util/impl/CssUtilIE10Impl.java | 13 ++++++++++--- 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java b/src/main/java/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java index 64f4b6d5b..9f7483ed0 100644 --- a/src/main/java/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java +++ b/src/main/java/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java @@ -26,11 +26,9 @@ public class UserAgentPropertyGenerator implements PropertyProviderGenerator { * ensures we never choose them for IE11 (we know that they will not work for IE11). */ private enum UserAgent { - safari("return (ua.indexOf('webkit') != -1);"), + safari("return ((ua.indexOf('webkit') != -1) && !(ua.indexOf('trident') != -1));"), ie10("return (ua.indexOf('msie') != -1 && (docMode >= 10 && docMode < 11)) || " - + "(ua.indexOf('iemobile') != -1 && (docMode >= 10 && docMode < 11)) || " - + "(ua.indexOf('msie') != -1 && (docMode >= 11 && docMode < 12)) || " - + "(ua.indexOf('iemobile') != -1 && (docMode >= 11 && docMode < 12));"), + + "(ua.indexOf('iemobile') != -1 && (docMode >= 10 && docMode < 11))"), ie9("return (ua.indexOf('msie') != -1 && (docMode >= 9 && docMode < 11));"), ie8("return (ua.indexOf('msie') != -1 && (docMode >= 8 && docMode < 11));"), gecko1_8("return (ua.indexOf('gecko') != -1 || docMode >= 11);"); diff --git a/src/main/java/com/googlecode/mgwt/dom/DOM.gwt.xml b/src/main/java/com/googlecode/mgwt/dom/DOM.gwt.xml index abba2a2c9..07446025e 100644 --- a/src/main/java/com/googlecode/mgwt/dom/DOM.gwt.xml +++ b/src/main/java/com/googlecode/mgwt/dom/DOM.gwt.xml @@ -38,7 +38,10 @@ // Detect form factor from user agent. var ua = navigator.userAgent.toLowerCase(); - if (ua.indexOf("iphone") != -1 || ua.indexOf("ipod") != -1) { + if (ua.indexOf("windows phone 8") != -1) { + // windows phone 8/8.1 + return "phone"; + } else if (ua.indexOf("iphone") != -1 || ua.indexOf("ipod") != -1) { // iphone and ipod. return "phone"; } else if (ua.indexOf("ipad") != -1) { @@ -50,8 +53,6 @@ }else{ return "tablet"; } - } else if (ua.indexOf("windows phone 8") != -1) { - return "phone"; } // Everything else is a desktop. @@ -59,6 +60,14 @@ ]]> Date: Fri, 19 Dec 2014 10:56:09 +0000 Subject: [PATCH 24/40] added flexwrap to FlexInputHelper, corrected name of MozAlignSelf in Mozilla implementation of FlexInputHelper --- .../widget/panel/flex/FlexPropertyHelper.java | 9 ++++++ .../panel/flex/FlexPropertyHelperIE10.java | 26 ++++++++++++++++ .../panel/flex/FlexPropertyHelperMoz.java | 27 ++++++++++++++++- .../flex/FlexPropertyHelperStandard.java | 25 ++++++++++++++++ .../panel/flex/FlexPropertyHelperWebkit.java | 30 +++++++++++++++++++ 5 files changed, 116 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java index 969737f68..255695009 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelper.java @@ -38,6 +38,10 @@ public static enum Orientation { HORIZONTAL, HORIZONTAL_REVERSE, VERTICAL, VERTICAL_REVERSE; } + public static enum FlexWrap { + NOWRAP, WRAP, WRAP_REVERSE; + } + public static void setElementAsFlexContainer(Element el) { setElementAsFlexContainer(el, null); @@ -88,6 +92,10 @@ public static void setJustification(Element el, Justification justification) { impl._setJustificationProperty(el, justification); } + public static void setFlexWrap(Element el, FlexWrap flexWrap) { + impl._setFlexWrapProperty(el, flexWrap); + } + public static void clearAlignment(Element el) { impl._setAlignmentProperty(el,Alignment.NONE); } @@ -108,4 +116,5 @@ protected void setStyleProperty(Element el, String property, String value) { protected abstract void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf); protected abstract void _setOrientationProperty(Element el, Orientation orientation); protected abstract void _setJustificationProperty(Element el, Justification justification); + protected abstract void _setFlexWrapProperty(Element el, FlexWrap flexWrap); } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java index 6563a21dd..0a27520fe 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperIE10.java @@ -131,6 +131,32 @@ protected void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf setStyleProperty(el, "msFlexItemAlign", value); } + @Override + protected void _setFlexWrapProperty(Element el, FlexWrap flexWrap) + { + String value; + switch (flexWrap) { + case NOWRAP: { + value = "nowrap"; + break; + } + case WRAP: { + value = "wrap"; + break; + } + case WRAP_REVERSE: { + value = "wrap-reverse"; + break; + } + default: { + value = "nowrap"; + break; + } + } + setStyleProperty(el, "msFlexWrap", value); + } + + /** * IE10/11 sets flex-shrink to 0 if omitted whereas webkit sets to 1, so lets copy webkit */ diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java index 1fe2a6938..b55116f17 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperMoz.java @@ -123,7 +123,32 @@ protected void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf value = "auto"; } } - setStyleProperty(el, "alignSelf", value); + setStyleProperty(el, "MozAlignSelf", value); + } + + @Override + protected void _setFlexWrapProperty(Element el, FlexWrap flexWrap) + { + String value; + switch (flexWrap) { + case NOWRAP: { + value = "nowrap"; + break; + } + case WRAP: { + value = "wrap"; + break; + } + case WRAP_REVERSE: { + value = "wrap-reverse"; + break; + } + default: { + value = "nowrap"; + break; + } + } + setStyleProperty(el, "MozFlexWrap", value); } @Override diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java index 1ac0f3b47..02c502e32 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperStandard.java @@ -126,6 +126,31 @@ protected void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf setStyleProperty(el, "alignSelf", value); } + @Override + protected void _setFlexWrapProperty(Element el, FlexWrap flexWrap) + { + String value; + switch (flexWrap) { + case NOWRAP: { + value = "nowrap"; + break; + } + case WRAP: { + value = "wrap"; + break; + } + case WRAP_REVERSE: { + value = "wrap-reverse"; + break; + } + default: { + value = "nowrap"; + break; + } + } + setStyleProperty(el, "flexWrap", value); + } + @Override protected void _setFlex(Element el, double grow, String basis) { setStyleProperty(el,"flex", Double.toString(grow)+" "+(basis == null ? "0%" : basis)); diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java index 4c5178eb9..39cd292d4 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPropertyHelperWebkit.java @@ -148,6 +148,36 @@ protected void _setAlignmentSelfProperty(Element el, AlignmentSelf alignmentSelf setStyleProperty(el, "WebkitAlignSelf", value); } + @Override + protected void _setFlexWrapProperty(Element el, FlexWrap flexWrap) + { + String flexWrapOldSyntax, flexWrapNewSyntax; + switch (flexWrap) { + case NOWRAP: { + flexWrapOldSyntax = "single"; + flexWrapNewSyntax = "nowrap"; + break; + } + case WRAP: { + flexWrapOldSyntax = "multiple"; + flexWrapNewSyntax = "wrap"; + break; + } + case WRAP_REVERSE: { + flexWrapOldSyntax = "multiple"; + flexWrapNewSyntax = "wrap"; + break; + } + default: { + flexWrapOldSyntax = "single"; + flexWrapNewSyntax = "nowrap"; + break; + } + } + setStyleProperty(el, "WebkitBoxLines", flexWrapOldSyntax); + setStyleProperty(el, "WebkitFlexWrap", flexWrapNewSyntax); + } + @Override public void _setFlex(Element el, double grow, String basis) { setStyleProperty(el,"WebkitBoxFlex", Double.toString(grow)); From b449d580bc8fbc8eeaeae54c9afbaead8bd5e8d1 Mon Sep 17 00:00:00 2001 From: Paul French Date: Tue, 6 Jan 2015 13:54:36 +0000 Subject: [PATCH 25/40] Need access to ButtonBaseAppearance so subclass can override the default touch handlers added that do not always give you the required behaviour --- .../googlecode/mgwt/ui/client/widget/button/ButtonBase.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java index 146230f9a..9905dad22 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ButtonBase.java @@ -123,5 +123,8 @@ public void onTap(TapEvent event) { } } + public ButtonBaseAppearance getAppearance() { + return baseAppearance; + } } From b7066e4966e7259f3bf251df046b905656a1a199 Mon Sep 17 00:00:00 2001 From: Paul French Date: Thu, 15 Jan 2015 18:04:27 +0000 Subject: [PATCH 26/40] Added correct orientation support for windows phone 8.1 --- .../java/com/googlecode/mgwt/ui/UI.gwt.xml | 12 ++ .../util/impl/IEOrientationHandler.java | 170 ++++++++++++++++++ .../scroll/impl/ScrollPanelTouchImpl.java | 30 +--- 3 files changed, 190 insertions(+), 22 deletions(-) create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/util/impl/IEOrientationHandler.java diff --git a/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml b/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml index b40a8e7e8..b168089c0 100644 --- a/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml +++ b/src/main/java/com/googlecode/mgwt/ui/UI.gwt.xml @@ -187,8 +187,20 @@ under * the License. + + + + + + + + + + + + diff --git a/src/main/java/com/googlecode/mgwt/ui/client/util/impl/IEOrientationHandler.java b/src/main/java/com/googlecode/mgwt/ui/client/util/impl/IEOrientationHandler.java new file mode 100644 index 000000000..6b56f4aa6 --- /dev/null +++ b/src/main/java/com/googlecode/mgwt/ui/client/util/impl/IEOrientationHandler.java @@ -0,0 +1,170 @@ +package com.googlecode.mgwt.ui.client.util.impl; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.core.client.JavaScriptObject; +import com.google.gwt.dom.client.Document; +import com.google.gwt.event.logical.shared.CloseEvent; +import com.google.gwt.event.logical.shared.CloseHandler; +import com.google.gwt.event.logical.shared.ResizeEvent; +import com.google.gwt.event.logical.shared.ResizeHandler; +import com.google.gwt.user.client.Window; +import com.google.web.bindery.event.shared.EventBus; +import com.googlecode.mgwt.dom.client.event.orientation.OrientationChangeEvent; +import com.googlecode.mgwt.dom.client.event.orientation.OrientationChangeEvent.ORIENTATION; +import com.googlecode.mgwt.ui.client.util.OrientationHandler; +import com.googlecode.mgwt.ui.client.widget.main.MainResourceAppearance.UtilCss; +import com.googlecode.mgwt.ui.client.widget.main.MainResourceHolder; + +/** + * IE11 on windows 8 or windows phone 8.1 supports orientation events but via + * the Screen object, IE10 on windows phone 8 does not support orientation events. + * IE10 on windows phone/desktop does support resize events but they do not appear to + * fire on wp8 when the viewport is set to device-width. We fallback to resize events anyhow. + */ +public class IEOrientationHandler implements OrientationHandler { + private static native JavaScriptObject setupOrientation0( + IEOrientationHandler handler)/*-{ + var func = $entry(function(evt) { + handler.@com.googlecode.mgwt.ui.client.util.impl.IEOrientationHandler::onorientationChange(Ljava/lang/String;)(evt.target.msOrientation); + }); + $wnd.screen.onmsorientationchange = func; + return func; + }-*/; + + private static native void destroyOrientation(JavaScriptObject o)/*-{ + $wnd.screen.onmsorientationchange = null; + }-*/; + + // update styles on body + private static void setClasses(ORIENTATION o) { + + UtilCss utilCss = MainResourceHolder.getUtilCss(); + switch (o) { + + case PORTRAIT: + Document.get().getBody().addClassName(utilCss.portrait()); + Document.get().getBody().removeClassName(utilCss.landscape()); + break; + case LANDSCAPE: + Document.get().getBody().addClassName(utilCss.landscape()); + Document.get().getBody().removeClassName(utilCss.portrait()); + break; + + default: + break; + } + } + + protected static ORIENTATION currentOrientation; + protected static boolean orientationInitialized; + protected JavaScriptObject nativeJsFunction; + + private EventBus manager; + + @Override + public final void maybeSetupOrientation(EventBus manager) { + this.manager = manager; + if (orientationInitialized) + return; + if (!GWT.isClient()) { + return; + } + doSetupOrientation(); + orientationInitialized = true; + setClasses(getOrientation()); + } + + protected void setupNativeBrowerOrientationHandler() { + Window.alert("Settting up native browser orientation handler"); + nativeJsFunction = setupOrientation0(this); + Window.addCloseHandler(new CloseHandler() { + + @Override + public void onClose(CloseEvent event) { + destroyOrientation(nativeJsFunction); + } + }); + } + + protected static native String getOrientation0()/*-{ + if (typeof ($wnd.screen.msOrientation) == 'undefined') { + return "portrait-primary"; + } + return $wnd.screen.msOrientation; + }-*/; + + protected static ORIENTATION getBrowserOrientation() { + String orientation = getOrientation0(); + + ORIENTATION o; + if ("landscape-primary".equals(orientation) || "landscape-secondary".equals(orientation)) { + o = ORIENTATION.LANDSCAPE; + } + else { + o = ORIENTATION.PORTRAIT; + } + return o; + } + + void fireOrientationChangedEvent(ORIENTATION orientation) { + setClasses(orientation); + manager.fireEvent(new OrientationChangeEvent(orientation)); + } + + private void onorientationChange(String orientation) { + ORIENTATION o; + if ("landscape-primary".equals(orientation) || "landscape-secondary".equals(orientation)) { + o = ORIENTATION.LANDSCAPE; + } + else { + o = ORIENTATION.PORTRAIT; + } + currentOrientation = o; + fireOrientationChangedEvent(o); + } + + public void doSetupOrientation() { + + if (!orientationSupported()) { + Window.addResizeHandler(new ResizeHandler() { + + @Override + public void onResize(ResizeEvent event) { + ORIENTATION orientation = getOrientation(); + if (orientation != currentOrientation) { + currentOrientation = orientation; + fireOrientationChangedEvent(orientation); + } + } + }); + } else { + setupNativeBrowerOrientationHandler(); + } + + } + + /** + * Get the current orientation of the device + * + * @return the current orientation of the device + */ + public ORIENTATION getOrientation() { + if (!orientationSupported()) { + int height = Window.getClientHeight(); + int width = Window.getClientWidth(); + + if (width > height) { + return ORIENTATION.LANDSCAPE; + } else { + return ORIENTATION.PORTRAIT; + } + } else { + return getBrowserOrientation(); + } + } + + private static native boolean orientationSupported() /*-{ + return "msOrientation" in $wnd.screen; + }-*/; + +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java index 82b8bdcfa..cf3279188 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java @@ -1775,30 +1775,16 @@ private void unbindMoveEvent() { * */ private void bindResizeEvent() { - if (!MGWT.getFormFactor().isDesktop()) { - orientationChangeRegistration = MGWT.addOrientationChangeHandler(new OrientationChangeHandler() { - - @Override - public void onOrientationChanged(OrientationChangeEvent event) { - if (shouldHandleResize) { - resize(); - } - - } - }); - } else { - orientationChangeRegistration = Window.addResizeHandler(new ResizeHandler() { - - @Override - public void onResize(ResizeEvent event) { - if (shouldHandleResize) { - resize(); - } + orientationChangeRegistration = MGWT.addOrientationChangeHandler(new OrientationChangeHandler() { + @Override + public void onOrientationChanged(OrientationChangeEvent event) { + if (shouldHandleResize) { + resize(); } - }); - } - + } + + }); } private void unbindResizeEvent() { From 88544167ef882a0319bae84a1d17a8f522c02481 Mon Sep 17 00:00:00 2001 From: Paul French Date: Fri, 16 Jan 2015 17:45:37 +0000 Subject: [PATCH 27/40] In IEOrientationHandler removed window.alert left in by mistake. Added !important to portraitonly and landscapeonly css since not always easy to ensure this css gets priority over other css --- .../ui/client/util/impl/IEOrientationHandler.java | 13 +++++++------ .../googlecode/mgwt/ui/client/widget/main/util.css | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/util/impl/IEOrientationHandler.java b/src/main/java/com/googlecode/mgwt/ui/client/util/impl/IEOrientationHandler.java index 6b56f4aa6..271f16790 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/util/impl/IEOrientationHandler.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/util/impl/IEOrientationHandler.java @@ -22,8 +22,8 @@ * fire on wp8 when the viewport is set to device-width. We fallback to resize events anyhow. */ public class IEOrientationHandler implements OrientationHandler { - private static native JavaScriptObject setupOrientation0( - IEOrientationHandler handler)/*-{ + + private static native JavaScriptObject setupOrientation0(IEOrientationHandler handler)/*-{ var func = $entry(function(evt) { handler.@com.googlecode.mgwt.ui.client.util.impl.IEOrientationHandler::onorientationChange(Ljava/lang/String;)(evt.target.msOrientation); }); @@ -35,6 +35,8 @@ private static native void destroyOrientation(JavaScriptObject o)/*-{ $wnd.screen.onmsorientationchange = null; }-*/; + private boolean orientationSupported = isOrientationSupported(); + // update styles on body private static void setClasses(ORIENTATION o) { @@ -75,7 +77,6 @@ public final void maybeSetupOrientation(EventBus manager) { } protected void setupNativeBrowerOrientationHandler() { - Window.alert("Settting up native browser orientation handler"); nativeJsFunction = setupOrientation0(this); Window.addCloseHandler(new CloseHandler() { @@ -125,7 +126,7 @@ private void onorientationChange(String orientation) { public void doSetupOrientation() { - if (!orientationSupported()) { + if (!orientationSupported) { Window.addResizeHandler(new ResizeHandler() { @Override @@ -149,7 +150,7 @@ public void onResize(ResizeEvent event) { * @return the current orientation of the device */ public ORIENTATION getOrientation() { - if (!orientationSupported()) { + if (!orientationSupported) { int height = Window.getClientHeight(); int width = Window.getClientWidth(); @@ -163,7 +164,7 @@ public ORIENTATION getOrientation() { } } - private static native boolean orientationSupported() /*-{ + private static native boolean isOrientationSupported() /*-{ return "msOrientation" in $wnd.screen; }-*/; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/util.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/util.css index 81a67de77..a4ed37733 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/util.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/util.css @@ -1,11 +1,11 @@ @media (orientation:portrait) { .landscapeonly { - display: none; + display: none !important; } } @media (orientation:landscape) { .portraitonly { - display: none; + display: none !important; } } \ No newline at end of file From 468769be03a93ac8901b8bcb88f257ff2282834d Mon Sep 17 00:00:00 2001 From: Paul French Date: Thu, 22 Jan 2015 10:06:21 +0000 Subject: [PATCH 28/40] Avoid long emulation in ScrollPanel --- .../panel/scroll/impl/ScrollPanelTouchImpl.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java index cf3279188..b9fae5837 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/impl/ScrollPanelTouchImpl.java @@ -3,6 +3,7 @@ import com.google.gwt.animation.client.AnimationScheduler; import com.google.gwt.animation.client.AnimationScheduler.AnimationCallback; import com.google.gwt.animation.client.AnimationScheduler.AnimationHandle; +import com.google.gwt.core.client.Duration; import com.google.gwt.core.client.JsArray; import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; @@ -23,12 +24,9 @@ import com.google.gwt.event.dom.client.TouchEvent; import com.google.gwt.event.dom.client.TouchMoveEvent; import com.google.gwt.event.dom.client.TouchStartEvent; -import com.google.gwt.event.logical.shared.ResizeEvent; -import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Timer; -import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.SimplePanel; import com.google.gwt.user.client.ui.Widget; @@ -250,7 +248,7 @@ public int getTime() { private int startY; private int pointX; private int pointY; - private long startTime; + private double startTime; private double touchesDist; private double lastScale; private boolean bounce; @@ -673,7 +671,7 @@ private void move(TouchMoveEvent event) { int deltaY = touches.get(0).getPageY() - this.pointY; int newX = this.x + deltaX; int newY = this.y + deltaY; - long timeStamp = System.currentTimeMillis(); + double timeStamp = Duration.currentTimeMillis(); // fire onbeforescroll event fireEvent(new BeforeScrollMoveEvent(event)); @@ -774,7 +772,7 @@ private void end(final TouchEvent event) { return; } - long duration = System.currentTimeMillis() - this.startTime; + double duration = Duration.currentTimeMillis() - this.startTime; int newPosX = this.x; int newPosY = this.y; Momentum momentumX = Momentum.ZERO_MOMENTUM; @@ -1081,7 +1079,7 @@ private void startAnimation(final boolean issueEvent) { return; } - final long startTime = System.currentTimeMillis(); + final double startTime = Duration.currentTimeMillis(); final AnimationCallback animationCallback = new AnimationCallback() { @@ -1128,7 +1126,7 @@ private void setTransistionTime(int time) { } - private Momentum momentum(int dist, long time, int maxDistUpper, int maxDistLower, int size) { + private Momentum momentum(int dist, double time, int maxDistUpper, int maxDistLower, int size) { double deceleration = 0.0006; double speed = ((double) (Math.abs(dist))) / time; double newDist = (speed * speed) / (2 * deceleration); From 8455a9f4ee1d5810ca30216d0b226e7ef6cdafd2 Mon Sep 17 00:00:00 2001 From: Paul French Date: Thu, 22 Jan 2015 10:08:56 +0000 Subject: [PATCH 29/40] fix minor bug when specifying ie10 compatibility. Does not seem to make any diferrence. Looks like you have to specify in the html file as a meta tag and not rely on it being dynamically added and picked up by ie10/11 --- src/main/java/com/googlecode/mgwt/ui/client/MGWT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java b/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java index 1bbf753f2..ecfb1d7c7 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java @@ -155,7 +155,8 @@ public static void applySettings(MGWTSettings settings) { if (TouchSupport.isTouchEventsEmulatedUsingPointerEvents()) { MetaElement ieCompatible = Document.get().createMetaElement(); - ieCompatible.setHttpEquiv("IE=10"); + ieCompatible.setHttpEquiv("x-ua-compatible"); + ieCompatible.setContent("IE=10"); head.appendChild(ieCompatible); MetaElement tapHighlight = Document.get().createMetaElement(); From a0ef7698a900522257245c62ad963fefa5980ad0 Mon Sep 17 00:00:00 2001 From: Paul French Date: Thu, 22 Jan 2015 10:11:50 +0000 Subject: [PATCH 30/40] due to poor performance of ScrollPanel in IE10/11 when a reasonable amount of DOM added, attempting to eliminate any translate3d type issues. Use 0px instead of -1px for the z co-ordinate and check what transform matrix returned, either 2d or 3D and extract the relevant co-ordinates --- .../ui/client/util/impl/CssUtilIE10Impl.java | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/util/impl/CssUtilIE10Impl.java b/src/main/java/com/googlecode/mgwt/ui/client/util/impl/CssUtilIE10Impl.java index 364348b41..2ea02f48e 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/util/impl/CssUtilIE10Impl.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/util/impl/CssUtilIE10Impl.java @@ -5,10 +5,9 @@ /** * No idea why but there is a slight difference between Windows Phone 8.1 and - * Windows Phone 8.1 Update. To force getComputedStyle to return a 3D matrix for - * the transform property the translate3d function needs a non-zero z value. - * Windows Phone 8.1 works if you specify 0 but Windows Phone 8.1 Update does not, it returns - * a 2D matrix. So we force a 3D matrix to be returned by specifying a z value of -1px + * Windows Phone 8.1 Update. When using translate3d with z=0 getComputedStyle returns + * a 3D matrix on Windows Phone 8.1 but for Windows Phone 8.1 Update it returns + * a 2D matrix. So we check which matrix is returned before using the relevant elements */ public class CssUtilIE10Impl implements CssUtilImpl { @@ -17,7 +16,7 @@ public CssUtilIE10Impl() { @Override public void translate(Element el, int x, int y) { - String cssText = "translate3d(" + x + "px, " + y + "px, -1px)"; + String cssText = "translate3d(" + x + "px," + y + "px,0px)"; _translate(el, cssText); } @@ -74,9 +73,16 @@ public int[] getPositionFromTransForm(Element element) { private native JsArrayInteger getPositionFromTransform(Element el)/*-{ var matrix = getComputedStyle(el, null)['transform'].replace( /[^0-9-.,]/g, '').split(','); - var x = matrix[12] * 1; - var y = matrix[13] * 1; - return [ x, y ]; + if (matrix.length === 6) { + var x = matrix[4] * 1; + var y = matrix[5] * 1; + return [ x, y ]; + } + else { + var x = matrix[12] * 1; + var y = matrix[13] * 1; + return [ x, y ]; + } }-*/; @Override @@ -111,13 +117,13 @@ public native void setTransistionTimingFunction(Element element, String string) @Override public void setTranslateAndZoom(Element el, int x, int y, double scale) { - String cssText = "translate3d(" + x + "px, " + y + "px, -1px) scale(" + scale + ")"; + String cssText = "translate3d(" + x + "px, " + y + "px,0px) scale(" + scale + ")"; el.getStyle().setProperty("transform", cssText); } @Override public void translatePercent(Element el, double x, double y) { - String cssText = "translate3d(" + x + "%, " + y + "%, -1px)"; + String cssText = "translate3d(" + x + "%, " + y + "%,0%)"; _translate(el, cssText); } From 3ed8944e066969eef8a63dd6492bb873c67bee7e Mon Sep 17 00:00:00 2001 From: Paul French Date: Thu, 22 Jan 2015 10:14:31 +0000 Subject: [PATCH 31/40] removed -ms-touch-action: none, which is applied to elements since need to use native scrollable divs to get better performance then using the MGWT ScrollPanel. Unfortunately one side effect of this is we start to get application bounce when scrolling limits are reached of a scrollbale div. --- src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css index 4c69ed857..ff97e38a9 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css @@ -24,7 +24,6 @@ -ms-user-select: none; -ms-text-size-adjust: none; -ms-touch-select: none; - -ms-touch-action: none; -ms-flex: 0 1 auto; } From b741698e53725c306f0dfcdd1777320437555471 Mon Sep 17 00:00:00 2001 From: Paul French Date: Fri, 23 Jan 2015 15:40:41 +0000 Subject: [PATCH 32/40] Only apply ios71 body bug fix when ios71. Also stop possible re-creation of orientation handler if current orientation handler not removed correctly. Remove the orientation handler correctly when orientation event fired. --- .../ui/client/widget/main/IOS71BodyBug.java | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/IOS71BodyBug.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/IOS71BodyBug.java index 37227190b..1dde0bb9a 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/IOS71BodyBug.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/IOS71BodyBug.java @@ -45,30 +45,36 @@ interface Resources extends ClientBundle { TextResource css(); } + /** + * Only apply fix if ios71 + */ public static void applyWorkaround() { - // iOS bug fix needs only be applied in portrait orientation. - // Fix is deferred until the orientation change event is fired. - if (MGWT.getOrientation() == ORIENTATION.PORTRAIT) { - registerOrientationChangeEvent(); - return; + if (isIOS71() && (MGWT.getOsDetection().isIPad() || MGWT.getOsDetection().isIPadRetina())) { + // iOS bug fix needs only be applied in portrait orientation. + // Fix is deferred until the orientation change event is fired. + if (MGWT.getOrientation() == ORIENTATION.PORTRAIT) { + registerOrientationChangeEvent(); + return; + } + applyFix(); } + } - if (MGWT.getOsDetection().isIPad() || MGWT.getOsDetection().isIPadRetina()) { - if (isIOS71() && windowInnerHeight() == 672) { + private static void applyFix() { + if (windowInnerHeight() == 672) { String text = Resources.INSTANCE.css().getText(); StyleInjector.inject(text); Document.get().getBody().addClassName("__fixIOS7BodyBug"); } - } } - private static void registerOrientationChangeEvent() { orientationChangeHandler = MGWT.addOrientationChangeHandler(new OrientationChangeHandler() { @Override public void onOrientationChanged(OrientationChangeEvent event) { + orientationChangeHandler.removeHandler(); orientationChangeHandler = null; - applyWorkaround(); + applyFix(); } }); } From e7a3bee6eeb90dfca2dc9cf05d273fc429085869 Mon Sep 17 00:00:00 2001 From: Paul French Date: Tue, 10 Mar 2015 11:15:47 +0000 Subject: [PATCH 33/40] Added more position information to the TapEvent via the Touch object. When preventing scrolling for IOS we no longer preventDefault the TouchMove event if it originates from an INPUT, TEXTAREA or SELECT element. This solves a multitude of issues with these input types where default behaviour of the browser is required so that they function as expected. Also on more sensitive touch devices like the ipad air 2 the input type elements were very hard to tap and navigate between if a TouchMove event was generated as part of the touch and the TouchMove vent is prevent defaulted. --- .../mgwt/dom/client/event/tap/TapEvent.java | 35 +++++++++++-------- .../dom/client/recognizer/TapRecognizer.java | 10 +++--- .../com/googlecode/mgwt/ui/client/MGWT.java | 17 ++++----- .../input/search/MSearchBoxGwtTest.java | 2 +- 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/dom/client/event/tap/TapEvent.java b/src/main/java/com/googlecode/mgwt/dom/client/event/tap/TapEvent.java index 8981c8fa5..1cc8885f4 100644 --- a/src/main/java/com/googlecode/mgwt/dom/client/event/tap/TapEvent.java +++ b/src/main/java/com/googlecode/mgwt/dom/client/event/tap/TapEvent.java @@ -16,6 +16,7 @@ package com.googlecode.mgwt.dom.client.event.tap; import com.google.gwt.dom.client.Element; +import com.google.gwt.dom.client.Touch; import com.google.gwt.event.shared.GwtEvent; /** @@ -28,16 +29,14 @@ public class TapEvent extends GwtEvent { private static final Type TYPE = new Type(); - private final int startX; - private final int startY; + private final Touch touch; private final Element targetElement; - public TapEvent(Object source, Element targetElement, int startX, int startY) { - this.targetElement = targetElement; - this.startX = startX; - this.startY = startY; - setSource(source); - } + public TapEvent(Object source, Element targetElement, Touch touch) { + this.targetElement = targetElement; + this.touch = touch; + setSource(source); + } @Override public com.google.gwt.event.shared.GwtEvent.Type getAssociatedType() { @@ -54,15 +53,23 @@ public static Type getType() { return TYPE; } - public int getStartX() { - return startX; + /** + * Get access to other useful position information related to the tap event + * @return + */ + public Touch getTouch() { + return touch; } - public int getStartY() { - return startY; - } + public int getStartX() { + return touch.getPageX(); + } - /** + public int getStartY() { + return touch.getPageY(); + } + + /** * Returns the element that was the actual target of the Tap event. */ public Element getTargetElement() { diff --git a/src/main/java/com/googlecode/mgwt/dom/client/recognizer/TapRecognizer.java b/src/main/java/com/googlecode/mgwt/dom/client/recognizer/TapRecognizer.java index 47f40de34..5d4a10710 100644 --- a/src/main/java/com/googlecode/mgwt/dom/client/recognizer/TapRecognizer.java +++ b/src/main/java/com/googlecode/mgwt/dom/client/recognizer/TapRecognizer.java @@ -44,6 +44,8 @@ public class TapRecognizer implements TouchHandler { private boolean hasMoved; + private Touch touch; + private int start_x; private int start_y; @@ -78,9 +80,9 @@ public void onTouchStart(TouchStartEvent event) { }else { targetElement = null; } - - start_x = event.getTouches().get(0).getPageX(); - start_y = event.getTouches().get(0).getPageY(); + touch = event.getTouches().get(0); + start_x = touch.getPageX(); + start_y = touch.getPageY(); } @Override @@ -94,7 +96,7 @@ public void onTouchMove(TouchMoveEvent event) { @Override public void onTouchEnd(TouchEndEvent event) { if (!hasMoved && !touchCanceled) { - TapEvent tapEvent = new TapEvent(source, targetElement, start_x, start_y); + TapEvent tapEvent = new TapEvent(source, targetElement, touch); getEventPropagator().fireEvent(source, tapEvent); } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java b/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java index ecfb1d7c7..52880b8c8 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/MGWT.java @@ -33,7 +33,6 @@ 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; @@ -315,13 +314,15 @@ private static Element getHead() { } private static native void setupPreventScrolling(Element el)/*-{ - var func = function(event) { - event.preventDefault(); - return false; - }; - - el.ontouchmove = func; - + var func = function(event) { + var tagName = event.target.tagName; + if ((tagName == 'INPUT') || (tagName == 'SELECT') || (tagName == 'TEXTAREA')) { + return true; + } + event.preventDefault(); + return false; + }; + el.ontouchmove = func; }-*/; private static void setupPreventScrollingIE10(Element el) { diff --git a/src/test/java/com/googlecode/mgwt/ui/client/widget/input/search/MSearchBoxGwtTest.java b/src/test/java/com/googlecode/mgwt/ui/client/widget/input/search/MSearchBoxGwtTest.java index 68f8cd1a6..8fd0e3fe7 100644 --- a/src/test/java/com/googlecode/mgwt/ui/client/widget/input/search/MSearchBoxGwtTest.java +++ b/src/test/java/com/googlecode/mgwt/ui/client/widget/input/search/MSearchBoxGwtTest.java @@ -93,7 +93,7 @@ public void execute() { assertEquals(4, valueChangeEventCount); assertEquals(0, clearCount); - mSearchBox.clearButton.fireEvent(new TapEvent(this, null, 0, 0)); + mSearchBox.clearButton.fireEvent(new TapEvent(this, null, null)); assertEquals("", mSearchBox.getValue()); assertEquals(2, submitCount); From d2c974cb46741aeff35b8082a1ca1fbf049920b7 Mon Sep 17 00:00:00 2001 From: Paul French Date: Fri, 5 Jun 2015 10:01:13 +0100 Subject: [PATCH 34/40] Updated to use GWT 2.7 --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 0e62cbf2c..9f71ff96b 100644 --- a/pom.xml +++ b/pom.xml @@ -10,13 +10,13 @@ 4.0.0 com.googlecode.mgwt - mgwt - 2.0.1-SNAPSHOT + kirona-mgwt + 2.0.2 jar mgwt - 2.6.1 + 2.7.0 UTF-8 @@ -127,7 +127,7 @@ org.codehaus.mojo gwt-maven-plugin - 2.6.1 + 2.7.0 From f54716674fc72bd7b08562fb5f775c90c859f4c2 Mon Sep 17 00:00:00 2001 From: Maurycy-Sokolowski Date: Sat, 12 Sep 2015 11:38:10 -0700 Subject: [PATCH 35/40] Support for IE and Firefox --- pom.xml | 6 +- .../theme/platform/button/button-android.css | 7 +- .../widget/animation/bundle/dissolve.css | 34 +++ .../client/widget/animation/bundle/fade.css | 34 +++ .../client/widget/animation/bundle/flip.css | 58 ++++ .../ui/client/widget/animation/bundle/pop.css | 58 ++++ .../widget/animation/bundle/slide-up.css | 54 ++++ .../client/widget/animation/bundle/slide.css | 54 ++++ .../client/widget/animation/bundle/swap.css | 140 +++++++++- .../animation/impl/animation-display.css | 13 + .../ui/client/widget/button/ImageButton.java | 227 ++++++++------- .../mgwt/ui/client/widget/button/button.css | 4 +- .../ui/client/widget/button/imagebutton.css | 23 +- .../ui/client/widget/buttonbar/buttonbar.css | 2 + .../ui/client/widget/carousel/carousel.css | 10 +- .../widget/dialog/options/options-dialog.css | 2 + .../widget/dialog/panel/dialog-button.css | 2 +- .../ui/client/widget/dialog/panel/dialog.css | 3 + .../mgwt/ui/client/widget/form/form.css | 3 + .../client/widget/input/checkbox/checkbox.css | 24 +- .../mgwt/ui/client/widget/input/input.css | 3 + .../client/widget/input/listbox/mlistbox.css | 3 + .../widget/input/radio/mradiobutton.css | 4 + .../client/widget/input/search/searchbox.css | 35 ++- .../list/celllist/grouping-celllist.css | 2 + .../mgwt/ui/client/widget/main/main.css | 16 ++ .../mgwt/ui/client/widget/main/selection.css | 4 + .../client/widget/menu/swipe/swipe-menu.css | 2 + .../client/widget/panel/flex/FlexPanel.java | 258 +++++++++--------- .../mgwt/ui/client/widget/panel/flex/flex.css | 2 + .../ui/client/widget/panel/pull/pullpanel.css | 1 + .../widget/panel/scroll/scrollpanel.css | 11 + .../ui/client/widget/progress/progressbar.css | 5 + .../widget/progress/progressindicator.css | 24 ++ .../widget/progress/progressspinner.css | 34 +++ .../mgwt/ui/client/widget/tabbar/tabbar.css | 1 + 36 files changed, 893 insertions(+), 270 deletions(-) diff --git a/pom.xml b/pom.xml index 66aef213a..dfa0a31f6 100644 --- a/pom.xml +++ b/pom.xml @@ -11,12 +11,12 @@ com.googlecode.mgwt mgwt - 2.0.0-SNAPSHOT + 2.0.0-MJS-SNAPSHOT jar mgwt - 2.6.1 + 2.7.0 UTF-8 @@ -127,7 +127,7 @@ org.codehaus.mojo gwt-maven-plugin - 2.6.1 + 2.7.0 diff --git a/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/button/button-android.css b/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/button/button-android.css index e38fa487e..4e6ba8d72 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/button/button-android.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/theme/platform/button/button-android.css @@ -18,12 +18,13 @@ @if user.agent gecko1_8 { .mgwt-Button { - \-moz-border-radius: 4px; border-radius: 4px; background-image: literal('-moz-linear-gradient(top, rgb(180, 180, 180), rgb(160, 160, 160))'); + background-image: literal('-ms-linear-gradient(top, rgb(180, 180, 180), rgb(160, 160, 160))'); } .mgwt-Button-active { background-image: literal('-moz-linear-gradient(top, rgb(82, 163, 196), rgb(62, 143, 176))'); + background-image: literal('-ms-linear-gradient(top, rgb(82, 163, 196), rgb(62, 143, 176))'); } } @@ -44,9 +45,11 @@ @if user.agent gecko1_8 { .mgwt-Button-important { background-image: literal('-moz-linear-gradient(top, rgba(255,59,59,0.70), rgba(255,0,0,0.80))'); + background-image: literal('-ms-linear-gradient(top, rgba(255,59,59,0.70), rgba(255,0,0,0.80))'); } .mgwt-Button-important.mgwt-Button-active { background-image: literal('-moz-linear-gradient(top, rgba(255,30,30,0.80), rgba(255,0,0,0.90))'); + background-image: literal('-ms-linear-gradient(top, rgba(255,30,30,0.80), rgba(255,0,0,0.90))'); color: #fff; } } @@ -68,9 +71,11 @@ @if user.agent gecko1_8 { .mgwt-Button-confirm { background-image: literal('-moz-linear-gradient(top, rgba(115,239,115,0.70), rgba(0,150,0,0.80))'); + background-image: literal('-ms-linear-gradient(top, rgba(115,239,115,0.70), rgba(0,150,0,0.80))'); } .mgwt-Button-confirm.mgwt-Button-active { background-image: literal('-moz-linear-gradient(top, rgba(100,220,100,0.70), rgba(0,100,0,0.80))'); + background-image: literal('-ms-linear-gradient(top, rgba(100,220,100,0.70), rgba(0,100,0,0.80))'); color: #fff; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css index ee13eed55..167cff41b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/dissolve.css @@ -2,22 +2,36 @@ -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; -webkit-animation-fill-mode: both; + -moz-animation-timing-function: ease-in-out; + -moz-animation-duration: 300ms; + -moz-animation-fill-mode: both; + -ms-animation-timing-function: ease-in-out; + -ms-animation-duration: 300ms; + -ms-animation-fill-mode: both; } .in { -webkit-animation-name: appear; + -moz-animation-name: appear; + -ms-animation-name: appear; } .out { -webkit-animation-name: dissolve; + -moz-animation-name: dissolve; + -ms-animation-name: dissolve; } .in.reverse { -webkit-animation-name: appear; + -moz-animation-name: appear; + -ms-animation-name: appear; } .out.reverse { -webkit-animation-name: dissolve; + -moz-animation-name: dissolve; + -ms-animation-name: dissolve; } @-webkit-keyframes dissolve { @@ -29,3 +43,23 @@ from { opacity: 0; } to { opacity: 1; } } + +@-moz-keyframes dissolve { + from { opacity: 1; } + to { opacity: 0; } +} + +@-moz-keyframes appear { + from { opacity: 0; } + to { opacity: 1; } +} + +@-ms-keyframes dissolve { + from { opacity: 1; } + to { opacity: 0; } +} + +@-ms-keyframes appear { + from { opacity: 0; } + to { opacity: 1; } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css index 602c79db9..31c6a2e50 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/fade.css @@ -2,21 +2,35 @@ -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; -webkit-animation-fill-mode: both; + -moz-animation-timing-function: ease-in-out; + -moz-animation-duration: 300ms; + -moz-animation-fill-mode: both; + -ms-animation-timing-function: ease-in-out; + -ms-animation-duration: 300ms; + -ms-animation-fill-mode: both; } .in { -webkit-animation-name: fadein; + -moz-animation-name: fadein; + -ms-animation-name: fadein; } .out { -webkit-animation-name: fadeout; + -moz-animation-name: fadeout; + -ms-animation-name: fadeout; } .in.reverse { -webkit-animation-name: fadein; + -moz-animation-name: fadein; + -ms-animation-name: fadein; } .out.reverse { -webkit-animation-name: fadeout; + -moz-animation-name: fadeout; + -ms-animation-name: fadeout; } @-webkit-keyframes fadein { @@ -28,3 +42,23 @@ from { opacity: 1; } to { opacity: 0; } } + +@-moz-keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } +} + +@-moz-keyframes fadeout { + from { opacity: 1; } + to { opacity: 0; } +} + +@-ms-keyframes fadein { + from { opacity: 0; } + to { opacity: 1; } +} + +@-ms-keyframes fadeout { + from { opacity: 1; } + to { opacity: 0; } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css index cb9df89f4..7c0d90f39 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/flip.css @@ -4,22 +4,40 @@ -webkit-animation-fill-mode: both; -webkit-animation-duration: .65s; -webkit-backface-visibility: hidden; + -moz-animation-timing-function: ease-in-out; + -moz-animation-duration: 300ms; + -moz-animation-fill-mode: both; + -moz-animation-duration: .65s; + -moz-backface-visibility: hidden; + -ms-animation-timing-function: ease-in-out; + -ms-animation-duration: 300ms; + -ms-animation-fill-mode: both; + -ms-animation-duration: .65s; + -ms-backface-visibility: hidden; } .in { -webkit-animation-name: flipinfromleft; + -moz-animation-name: flipinfromleft; + -ms-animation-name: flipinfromleft; } .out { -webkit-animation-name: flipouttoleft; + -moz-animation-name: flipouttoleft; + -ms-animation-name: flipouttoleft; } .in.reverse { -webkit-animation-name: flipinfromright; + -moz-animation-name: flipinfromright; + -ms-animation-name: flipinfromright; } .out.reverse { -webkit-animation-name: flipouttoright; + -moz-animation-name: flipouttoright; + -ms-animation-name: flipouttoright; } @-webkit-keyframes flipinfromright { @@ -41,3 +59,43 @@ from { -webkit-transform: rotateY(0) scale(1); } to { -webkit-transform: rotateY(180deg) scale(.8); } } + +@-moz-keyframes flipinfromright { + from { -moz-transform: rotateY(-180deg) scale(.8); } + to { -moz-transform: rotateY(0) scale(1); } +} + +@-moz-keyframes flipinfromleft { + from { -moz-transform: rotateY(180deg) scale(.8); } + to { -moz-transform: rotateY(0) scale(1); } +} + +@-moz-keyframes flipouttoleft { + from { -moz-transform: rotateY(0) scale(1); } + to { -moz-transform: rotateY(-180deg) scale(.8); } +} + +@-moz-keyframes flipouttoright { + from { -moz-transform: rotateY(0) scale(1); } + to { -moz-transform: rotateY(180deg) scale(.8); } +} + +@-ms-keyframes flipinfromright { + from { -ms-transform: rotateY(-180deg) scale(.8); } + to { -ms-transform: rotateY(0) scale(1); } +} + +@-ms-keyframes flipinfromleft { + from { -ms-transform: rotateY(180deg) scale(.8); } + to { -ms-transform: rotateY(0) scale(1); } +} + +@-ms-keyframes flipouttoleft { + from { -ms-transform: rotateY(0) scale(1); } + to { -ms-transform: rotateY(-180deg) scale(.8); } +} + +@-ms-keyframes flipouttoright { + from { -ms-transform: rotateY(0) scale(1); } + to { -ms-transform: rotateY(180deg) scale(.8); } +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css index 58689fa58..48084735d 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/pop.css @@ -2,22 +2,36 @@ -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; -webkit-animation-fill-mode: both; + -moz-animation-timing-function: ease-in-out; + -moz-animation-duration: 300ms; + -moz-animation-fill-mode: both; + -ms-animation-timing-function: ease-in-out; + -ms-animation-duration: 300ms; + -ms-animation-fill-mode: both; } .in { -webkit-animation-name: popin; + -moz-animation-name: popin; + -ms-animation-name: popin; } .out { -webkit-animation-name: popout; + -moz-animation-name: popout; + -ms-animation-name: popout; } .in.reverse { -webkit-animation-name: popin; + -moz-animation-name: popin; + -ms-animation-name: popin; } .out.reverse { -webkit-animation-name: popout; + -moz-animation-name: popout; + -ms-animation-name: popout; } @-webkit-keyframes popin { @@ -41,3 +55,47 @@ opacity: 0; } } + +@-moz-keyframes popin { + from { + -moz-transform: scale(.3); + opacity: 0; + } + to { + -moz-transform: scale(1); + opacity: 1; + } +} + +@-moz-keyframes popout { + from { + -moz-transform: scale(1); + opacity: 1; + } + to { + -moz-transform: scale(.3); + opacity: 0; + } +} + +@-ms-keyframes popin { + from { + -ms-transform: scale(.3); + opacity: 0; + } + to { + -ms-transform: scale(1); + opacity: 1; + } +} + +@-ms-keyframes popout { + from { + -ms-transform: scale(1); + opacity: 1; + } + to { + -ms-transform: scale(.3); + opacity: 0; + } +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css index 9fc0ea77e..4b7545754 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide-up.css @@ -2,26 +2,40 @@ -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; -webkit-animation-fill-mode: both; + -moz-animation-timing-function: ease-in-out; + -moz-animation-duration: 300ms; + -moz-animation-fill-mode: both; + -ms-animation-timing-function: ease-in-out; + -ms-animation-duration: 300ms; + -ms-animation-fill-mode: both; } .in { -webkit-animation-name: slideupfrombottom; + -moz-animation-name: slideupfrombottom; + -ms-animation-name: slideupfrombottom; z-index: 10; } .out { -webkit-animation-name: slideupfrommiddle; + -moz-animation-name: slideupfrommiddle; + -ms-animation-name: slideupfrommiddle; z-index: 0; } .out.reverse { z-index: 10; -webkit-animation-name: slidedownfrommiddle; + -moz-animation-name: slidedownfrommiddle; + -ms-animation-name: slidedownfrommiddle; } .in.reverse { z-index: 0; -webkit-animation-name: slidedownfromtop; + -moz-animation-name: slidedownfromtop; + -ms-animation-name: slidedownfromtop; } @-webkit-keyframes slideupfrombottom { @@ -43,3 +57,43 @@ from { -webkit-transform: translateY(-100%); } to { -webkit-transform: translateY(0%); } } + +@-moz-keyframes slideupfrombottom { + from { -moz-transform: translateY(100%); } + to { -moz-transform: translateY(0); } +} + +@-moz-keyframes slidedownfrommiddle { + from { -moz-transform: translateY(0); } + to { -moz-transform: translateY(100%); } +} + +@-moz-keyframes slideupfrommiddle { + from { -moz-transform: translateY(0); } + to { -moz-transform: translateY(-100%); } +} + +@-moz-keyframes slidedownfromtop { + from { -moz-transform: translateY(-100%); } + to { -moz-transform: translateY(0%); } +} + +@-ms-keyframes slideupfrombottom { + from { -ms-transform: translateY(100%); } + to { -ms-transform: translateY(0); } +} + +@-ms-keyframes slidedownfrommiddle { + from { -ms-transform: translateY(0); } + to { -ms-transform: translateY(100%); } +} + +@-ms-keyframes slideupfrommiddle { + from { -ms-transform: translateY(0); } + to { -ms-transform: translateY(-100%); } +} + +@-ms-keyframes slidedownfromtop { + from { -ms-transform: translateY(-100%); } + to { -ms-transform: translateY(0%); } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css index 407ff7c55..c655638fb 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/slide.css @@ -2,6 +2,12 @@ -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 300ms; -webkit-animation-fill-mode: both; + -moz-animation-timing-function: ease-in-out; + -moz-animation-duration: 300ms; + -moz-animation-fill-mode: both; + -ms-animation-timing-function: ease-in-out; + -ms-animation-duration: 300ms; + -ms-animation-fill-mode: both; } .in { @@ -14,18 +20,26 @@ .in { -webkit-animation-name: slideinfromright; + -moz-animation-name: slideinfromright; + -ms-animation-name: slideinfromright; } .out { -webkit-animation-name: slideouttoleft; + -moz-animation-name: slideouttoleft; + -ms-animation-name: slideouttoleft; } .in.reverse { -webkit-animation-name: slideinfromleft; + -moz-animation-name: slideinfromleft; + -ms-animation-name: slideinfromleft; } .out.reverse { -webkit-animation-name: slideouttoright; + -moz-animation-name: slideouttoright; + -ms-animation-name: slideouttoright; } @-webkit-keyframes slideinfromright { @@ -47,3 +61,43 @@ from { -webkit-transform: translateX(0); } to { -webkit-transform: translateX(100%); } } + +@-moz-keyframes slideinfromright { + from { -moz-transform: translateX(100%); } + to { -moz-transform: translateX(0); } +} + +@-moz-keyframes slideinfromleft { + from { -moz-transform: translateX(-100%); } + to { -moz-transform: translateX(0); } +} + +@-moz-keyframes slideouttoleft { + from { -moz-transform: translateX(0); } + to { -moz-transform: translateX(-100%); } +} + +@-moz-keyframes slideouttoright { + from { -moz-transform: translateX(0); } + to { -moz-transform: translateX(100%); } +} + +@-ms-keyframes slideinfromright { + from { -ms-transform: translateX(100%); } + to { -ms-transform: translateX(0); } +} + +@-ms-keyframes slideinfromleft { + from { -ms-transform: translateX(-100%); } + to { -ms-transform: translateX(0); } +} + +@-ms-keyframes slideouttoleft { + from { -ms-transform: translateX(0); } + to { -ms-transform: translateX(-100%); } +} + +@-ms-keyframes slideouttoright { + from { -ms-transform: translateX(0); } + to { -ms-transform: translateX(100%); } +} diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css index 18d2e6db5..14fbdb7d7 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/bundle/swap.css @@ -4,19 +4,37 @@ -webkit-transform: perspective(800); -webkit-animation-duration: .7s; -webkit-transform-style: preserve-3d; + -moz-animation-timing-function: ease-in-out; + -moz-animation-fill-mode: both; + -moz-transform: perspective(800); + -moz-animation-duration: .7s; + -moz-transform-style: preserve-3d; + -ms-animation-timing-function: ease-in-out; + -ms-animation-fill-mode: both; + -ms-transform: perspective(800); + -ms-animation-duration: .7s; + -ms-transform-style: preserve-3d; } .out { - -webkit-animation-name: swapouttoleft; + -webkit-animation-name: swapouttoleft; + -moz-animation-name: swapouttoleft; + -ms-animation-name: swapouttoleft; } .in { -webkit-animation-name: swapinfromright; + -moz-animation-name: swapinfromright; + -ms-animation-name: swapinfromright; } .out.reverse { -webkit-animation-name: swapouttoright; + -moz-animation-name: swapouttoright; + -ms-animation-name: swapouttoright; } .in.reverse { -webkit-animation-name: swapinfromleft; + -moz-animation-name: swapinfromleft; + -ms-animation-name: swapinfromleft; } @@ -79,3 +97,123 @@ -webkit-transform: translate3d(0px, 0px, 0px) rotateY(0deg); } } + +@-moz-keyframes swapouttoright { + 0% { + -moz-transform: translate3d(0px, 0px, 0px) rotateY(0deg); + -moz-animation-timing-function: ease-in-out; + } + 50% { + -moz-transform: translate3d(-180px, 0px, -400px) rotateY(20deg); + -moz-animation-timing-function: ease-in; + opacity: 0.8; + } + 100% { + -moz-transform: translate3d(0px, 0px, -800px) rotateY(70deg); + opacity: 0; + } +} + +@-moz-keyframes swapouttoleft { + 0% { + -moz-transform: translate3d(0px, 0px, 0px) rotateY(0deg); + -moz-animation-timing-function: ease-in-out; + } + 50% { + -moz-transform: translate3d(180px, 0px, -400px) rotateY(-20deg); + -moz-animation-timing-function: ease-in; + opacity: 0.8; + } + 100% { + -moz-transform: translate3d(0px, 0px, -800px) rotateY(-70deg); + opacity: 0; + } +} + +@-moz-keyframes swapinfromright { + 0% { + -moz-transform: translate3d(0px, 0px, -800px) rotateY(70deg); + -moz-animation-timing-function: ease-out; + } + 50% { + -moz-transform: translate3d(-180px, 0px, -400px) rotateY(20deg); + -moz-animation-timing-function: ease-in-out; + } + 100% { + -moz-transform: translate3d(0px, 0px, 0px) rotateY(0deg); + } +} + +@-moz-keyframes swapinfromleft { + 0% { + -moz-transform: translate3d(0px, 0px, -800px) rotateY(-70deg); + -moz-animation-timing-function: ease-out; + } + 50% { + -moz-transform: translate3d(180px, 0px, -400px) rotateY(-20deg); + -moz-animation-timing-function: ease-in-out; + } + 100% { + -moz-transform: translate3d(0px, 0px, 0px) rotateY(0deg); + } +} + +@-ms-keyframes swapouttoright { + 0% { + -ms-transform: translate3d(0px, 0px, 0px) rotateY(0deg); + -ms-animation-timing-function: ease-in-out; + } + 50% { + -ms-transform: translate3d(-180px, 0px, -400px) rotateY(20deg); + -ms-animation-timing-function: ease-in; + opacity: 0.8; + } + 100% { + -ms-transform: translate3d(0px, 0px, -800px) rotateY(70deg); + opacity: 0; + } +} + +@-ms-keyframes swapouttoleft { + 0% { + -ms-transform: translate3d(0px, 0px, 0px) rotateY(0deg); + -ms-animation-timing-function: ease-in-out; + } + 50% { + -ms-transform: translate3d(180px, 0px, -400px) rotateY(-20deg); + -ms-animation-timing-function: ease-in; + opacity: 0.8; + } + 100% { + -ms-transform: translate3d(0px, 0px, -800px) rotateY(-70deg); + opacity: 0; + } +} + +@-ms-keyframes swapinfromright { + 0% { + -ms-transform: translate3d(0px, 0px, -800px) rotateY(70deg); + -ms-animation-timing-function: ease-out; + } + 50% { + -ms-transform: translate3d(-180px, 0px, -400px) rotateY(20deg); + -ms-animation-timing-function: ease-in-out; + } + 100% { + -ms-transform: translate3d(0px, 0px, 0px) rotateY(0deg); + } +} + +@-ms-keyframes swapinfromleft { + 0% { + -ms-transform: translate3d(0px, 0px, -800px) rotateY(-70deg); + -ms-animation-timing-function: ease-out; + } + 50% { + -ms-transform: translate3d(180px, 0px, -400px) rotateY(-20deg); + -ms-animation-timing-function: ease-in-out; + } + 100% { + -ms-transform: translate3d(0px, 0px, 0px) rotateY(0deg); + } +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css index 7ad9c9954..12ab83317 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/animation/impl/animation-display.css @@ -4,6 +4,8 @@ height: 100%; overflow:hidden; -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; } .display { @@ -14,7 +16,18 @@ bottom: 0px; overflow:hidden; -webkit-transform-style: preserve-3d; + -moz-transform-style: preserve-3d; + -ms-transform-style: preserve-3d; + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + -ms-backface-visibility: hidden; + -webkit-transform: translate3d(0,0,0) rotate(0) scale(1); + -moz-transform: translate3d(0,0,0) rotate(0) scale(1); + -ms-transform: translate3d(0,0,0) rotate(0) scale(1); + -webkit-perspective: 800; + -moz-perspective: 800; + -ms-perspective: 800; } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ImageButton.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ImageButton.java index 968de7e4d..4ae230409 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ImageButton.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/ImageButton.java @@ -25,7 +25,6 @@ import com.google.gwt.resources.client.ImageResource; import com.google.gwt.uibinder.client.UiFactory; import com.google.gwt.uibinder.client.UiField; - import com.googlecode.mgwt.dom.client.event.touch.TouchHandler; import com.googlecode.mgwt.ui.client.MGWT; import com.googlecode.mgwt.ui.client.util.IconHandler; @@ -36,122 +35,122 @@ */ public class ImageButton extends ButtonBase implements IsSizeable { - private static final ImageButtonAppearance DEFAULT_BUTTON_APPEARANCE = GWT - .create(ImageButtonAppearance.class); + private static final ImageButtonAppearance DEFAULT_BUTTON_APPEARANCE = GWT.create(ImageButtonAppearance.class); + + private final ImageButtonAppearance appearance; - private final ImageButtonAppearance appearance; + @UiField + public Element text; - @UiField - public Element text; + @UiField + public Element image; - @UiField - public Element image; + private ImageResource icon; - private ImageResource icon; + private String iconColor; - private String iconColor; - - private String iconActiveColor; - - public ImageButton() { - this(DEFAULT_BUTTON_APPEARANCE, ""); - } - - public ImageButton(String text) { - this(DEFAULT_BUTTON_APPEARANCE, text); - } - - public ImageButton(ImageResource icon) { - this(DEFAULT_BUTTON_APPEARANCE, icon, ""); - } - - public ImageButton(ImageButtonAppearance appearance, String text) { - this(appearance, null, text); - } - - public ImageButton(ImageButtonAppearance appearance, ImageResource iconImage, String text) { - super(appearance); - this.appearance = appearance; - setElement(appearance.uiBinder().createAndBindUi(this)); - this.iconColor = appearance.css().ICON_BACKGROUND_COLOR(); - this.iconActiveColor = appearance.css().ICON_BACKGROUND_COLOR_ACTIVE(); - setIcon(iconImage); - - // iOS6 and old android have problems with the aligning in flexible box model with inline-block - // elements - if (MGWT.getOsDetection().isAndroid4_3_orLower() || MGWT.getOsDetection().isIOS6()) { - this.text.getStyle().setDisplay(Display.BLOCK); - } - - addTouchHandler(new TouchHandler() { - - @Override - public void onTouchCancel(TouchCancelEvent event) { - - IconHandler.setIcons(image, icon, iconColor); - } - - @Override - public void onTouchEnd(TouchEndEvent event) { - - IconHandler.setIcons(image, icon, iconColor); - } - - @Override - public void onTouchMove(TouchMoveEvent event) { - } - - @Override - public void onTouchStart(TouchStartEvent event) { - IconHandler.setIcons(image, icon, iconActiveColor); - } - }); - } - - @UiFactory - public ImageButtonAppearance getAppearance() { - return appearance; - } - - @Override - public String getText() { - return text.getInnerText(); - } - - @Override - public void setText(String text) { - this.text.setInnerText(text); - } - - public void setIcon(ImageResource icon) { - this.icon = icon; - updateIcon(); - } - - @Override - public void setSmall(boolean small) { - if (small) { - addStyleName(appearance.css().small()); - } else { - removeStyleName(appearance.css().small()); - } - } - - public void setIconColor(String iconColor) { - this.iconColor = iconColor; - updateIcon(); - } - - public void setIconActiveColor(String iconActiveColor) { - this.iconActiveColor = iconActiveColor; - updateIcon(); - } - - protected void updateIcon() { - if (isActive()) { - IconHandler.setIcons(image, icon, iconActiveColor); - } else { - IconHandler.setIcons(image, icon, iconColor); - } - } + private String iconActiveColor; + + public ImageButton() { + this(DEFAULT_BUTTON_APPEARANCE, ""); + } + + public ImageButton(String text) { + this(DEFAULT_BUTTON_APPEARANCE, text); + } + + public ImageButton(ImageResource icon) { + this(DEFAULT_BUTTON_APPEARANCE, icon, ""); + } + + public ImageButton(ImageButtonAppearance appearance, String text) { + this(appearance, null, text); + } + + public ImageButton(ImageButtonAppearance appearance, ImageResource iconImage, String text) { + super(appearance); + this.appearance = appearance; + setElement(appearance.uiBinder().createAndBindUi(this)); + this.iconColor = appearance.css().ICON_BACKGROUND_COLOR(); + this.iconActiveColor = appearance.css().ICON_BACKGROUND_COLOR_ACTIVE(); + setIcon(iconImage); + + // iOS6 and old android have problems with the aligning in flexible box + // model with inline-block + // elements + if (MGWT.getOsDetection().isAndroid4_3_orLower() || MGWT.getOsDetection().isIOS6()) { + this.text.getStyle().setDisplay(Display.BLOCK); + } + + addTouchHandler(new TouchHandler() { + + @Override + public void onTouchCancel(TouchCancelEvent event) { + + IconHandler.setIcons(image, icon, iconColor); + } + + @Override + public void onTouchEnd(TouchEndEvent event) { + + IconHandler.setIcons(image, icon, iconColor); + } + + @Override + public void onTouchMove(TouchMoveEvent event) { + } + + @Override + public void onTouchStart(TouchStartEvent event) { + IconHandler.setIcons(image, icon, iconActiveColor); + } + }); + } + + @UiFactory + public ImageButtonAppearance getAppearance() { + return appearance; + } + + @Override + public String getText() { + return text.getInnerText(); + } + + @Override + public void setText(String text) { + this.text.setInnerText(text); + } + + public void setIcon(ImageResource icon) { + this.icon = icon; + updateIcon(); + } + + @Override + public void setSmall(boolean small) { + if (small) { + addStyleName(appearance.css().small()); + } else { + removeStyleName(appearance.css().small()); + } + } + + public void setIconColor(String iconColor) { + this.iconColor = iconColor; + updateIcon(); + } + + public void setIconActiveColor(String iconActiveColor) { + this.iconActiveColor = iconActiveColor; + updateIcon(); + } + + protected void updateIcon() { + if (isActive()) { + IconHandler.setIcons(image, icon, iconActiveColor); + } else { + IconHandler.setIcons(image, icon, iconColor); + } + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/button.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/button.css index c288ceda5..9ff119b5e 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/button.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/button.css @@ -8,12 +8,12 @@ color: #454545; display: inline-block; position: relative; - padding: 10px; + padding: 0.2em; margin: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - font-size: 16px; + font-size: 1em; background-color: #e5e9e8; border: 1px solid #9daca9; border-radius: 6px; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/imagebutton.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/imagebutton.css index a8ada1935..98e264c22 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/button/imagebutton.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/button/imagebutton.css @@ -17,6 +17,7 @@ @if user.agent gecko1_8 { .mgwt-ImageButton { display: -moz-box; + display: -ms-flexbox; } } @@ -32,13 +33,21 @@ max-width: 130px; overflow: hidden; background-color: #e5e9e8; - box-shadow: inset 0 1px #fff; border: 1px solid #9daca9; border-radius: 6px; + box-shadow: inset 0 1px #fff; + -moz-box-shadow: inset 0 1px #fff; + -ms-box-shadow: inset 0 1px #fff; + -o-box-shadow: inset 0 1px #fff; + -webkit-box-shadow: inset 0 1px #fff; } .mgwt-ImageButton-active { box-shadow: inset 0 1px rgba(255, 255, 255, 0.36); + -moz-box-shadow: inset 0 1px rgba(255, 255, 255, 0.36); + -ms-box-shadow: inset 0 1px rgba(255, 255, 255, 0.36); + -o-box-shadow: inset 0 1px rgba(255, 255, 255, 0.36); + -webkit-box-shadow: inset 0 1px rgba(255, 255, 255, 0.36); } .mgwt-ImageButton-disabled { @@ -46,7 +55,7 @@ } .mgwt-ImageButton-image { - z-index: 1; + /*z-index: 1;*/ display: inline-block; background-repeat: no-repeat; height: 32px; @@ -72,6 +81,10 @@ } .mgwt-ImageButton.mgwt-ImageButton-small { + -moz-box-shadow: none; + -ms-box-shadow: none; + -o-box-shadow: none; + -webkit-box-shadow: none; box-shadow: none; border: none; border-radius: 0px; @@ -80,8 +93,12 @@ } .mgwt-ImageButton.mgwt-ImageButton-small.mgwt-ImageButton-active { + -moz-box-shadow: none; + -ms-box-shadow: none; + -o-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; color: #eff1f1; border: none; - box-shadow: none; outline: 0; } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/buttonbar/buttonbar.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/buttonbar/buttonbar.css index 936a6c2a9..6ab597e3b 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/buttonbar/buttonbar.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/buttonbar/buttonbar.css @@ -23,6 +23,8 @@ .mgwt-ButtonBar { display: -moz-box; -moz-box-orient: horizontal; + display: -ms-flexbox; + -ms-box-orient: horizontal; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css index b912d0e36..ed550b5b1 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/carousel/carousel.css @@ -20,6 +20,10 @@ flex:1; flex-flow: column; overflow: visible; + display: -moz-flexbox; + display: -ms-flexbox; + -moz-flex: 1; + -ms-flex: 1 1; } @if user.agent safari { @@ -31,10 +35,14 @@ .mgwt-Carousel-Scroller { flex: 1 + -moz-flex: 1; + -ms-flex: 1 1; } .mgwt-Carousel-Container { flex: 1; + -moz-flex: 1; + -ms-flex: 1 1; } .mgwt-Carousel-Holder { @@ -64,4 +72,4 @@ .mgwt-Carousel-Indicator-active { background-color: #757575; -} +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/options/options-dialog.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/options/options-dialog.css index 25e727cc2..b39b4c3ce 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/options/options-dialog.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/options/options-dialog.css @@ -9,6 +9,8 @@ right: 0px; background-color: rgba(0, 0, 0, 0.9); background-image: literal('-webkit-gradient(linear, 0% 0, 0% 100%, from(rgba(50, 74, 103, 0.9)), color-stop(0.02, rgba(20, 25, 35, 0.9) ), to(rgba(0, 0, 0, 0.0) ) )'); + background-image: literal('-moz-gradient(linear, 0% 0, 0% 100%, from(rgba(50, 74, 103, 0.9)), color-stop(0.02, rgba(20, 25, 35, 0.9) ), to(rgba(0, 0, 0, 0.0) ) )'); + background-image: literal('-ms-gradient(linear, 0% 0, 0% 100%, from(rgba(50, 74, 103, 0.9)), color-stop(0.02, rgba(20, 25, 35, 0.9) ), to(rgba(0, 0, 0, 0.0) ) )'); border-top: 1px solid #030506; padding: 10px; } \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css index dfb2020ae..e0ad95601 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog-button.css @@ -29,7 +29,7 @@ padding-right: 5px; padding-left: 5px; min-width: 55px; - height: 24px; + height: 100%; line-height: 24px; text-shadow: none; background-color: #288edf; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog.css index 8b45fc404..9fa3f906e 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/dialog/panel/dialog.css @@ -42,6 +42,9 @@ display: flex; -webkit-box-pack: center; /* iOS < 7 && Android < 4.4*/ -webkit-justify-content: center; + -moz-box-pack: center; /* iOS < 7 && Android < 4.4*/ -moz-justify-content: center; + -ms-box-pack: center; /* iOS < 7 && Android < 4.4*/ + -ms-justify-content: center; justify-content: center; } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css index cfe769c52..5803a55be 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/form/form.css @@ -31,6 +31,7 @@ .mgwt-Form-Entry { width: 100%; -moz-justify-content: center; + -ms-justify-content: center; display: -moz-box; display: -ms-flexbox; /* IE is in FF permutation */ } @@ -61,6 +62,7 @@ .mgwt-Form-Entry-label { width: 30%; display: -moz-box; + display: -ms-flexbox; } } @@ -86,6 +88,7 @@ -moz-box-flex: 1; -moz-box-pack: end; display: -moz-box; + display: -ms-flexbox; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/checkbox.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/checkbox.css index 648fe6eba..5c3d3f0eb 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/checkbox.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/checkbox/checkbox.css @@ -45,6 +45,8 @@ .mgwt-CheckBox-middle { -moz-transition: all 0.1s ease-in-out; -moz-border-radius: 6px; + -ms-transition: all 0.1s ease-in-out; + -ms-border-radius: 6px; } } @@ -66,6 +68,7 @@ @if user.agent gecko1_8 { .mgwt-CheckBox-middle-content { -moz-box-sizing: border-box; + -ms-box-sizing: border-box; } } @@ -88,6 +91,7 @@ @if user.agent gecko1_8 { .mgwt-CheckBox-on { -moz-transition: all 0.1s ease-in-out; + -ms-transition: all 0.1s ease-in-out; } } @@ -111,6 +115,7 @@ @if user.agent gecko1_8 { .mgwt-CheckBox-off { -moz-transition: all 0.1s ease-in-out; + -ms-transition: all 0.1s ease-in-out; } } @@ -145,31 +150,26 @@ } .mgwt-CheckBox-notchecked .mgwt-CheckBox-middle { -moz-transform: translate(-54px,0); + -ms-transform: translate(-54px,0); } .mgwt-CheckBox-checked .mgwt-CheckBox-middle { -moz-transform: translate(0px,0); + -ms-transform: translate(0px,0); } .mgwt-CheckBox-notchecked .mgwt-CheckBox-off { -moz-transform: translate(-54px,0); + -ms-transform: translate(-54px,0); } .mgwt-CheckBox-checked .mgwt-CheckBox-off { -moz-transform: translate(0px,0); + -ms-transform: translate(0px,0); } .mgwt-CheckBox-notchecked .mgwt-CheckBox-on { -moz-transform: translate(-62px,0); + -ms-transform: translate(-62px,0); } .mgwt-CheckBox-checked .mgwt-CheckBox-on { -moz-transform: translate(0px,0); + -ms-transform: translate(0px,0); } -} - -/*TODO add browser....*/ -@if user.agent ie8 ie9 ie10 { - .mgwt-CheckBox-important .mgwt-CheckBox-on {} - .mgwt-CheckBox-notchecked .mgwt-CheckBox-middle {} - .mgwt-CheckBox-checked .mgwt-CheckBox-middle {} - .mgwt-CheckBox-notchecked .mgwt-CheckBox-off {} - .mgwt-CheckBox-checked .mgwt-CheckBox-off {} - .mgwt-CheckBox-notchecked .mgwt-CheckBox-on {} - .mgwt-CheckBox-checked .mgwt-CheckBox-on {} -} +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css index 56a30e7e6..2bcee4d4c 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/input.css @@ -24,6 +24,9 @@ -moz-box-flex: 1; -moz-appearance: none; -moz-user-select: text; + + display: -ms-flexbox; + -ms-user-select: text; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css index 600144b7a..6ae8950d2 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/listbox/mlistbox.css @@ -21,6 +21,9 @@ display: -moz-box; -moz-appearance: none; -moz-user-select: text; + display: -ms-flexbox; + -ms-appearance: none; + -ms-user-select: text; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css index c2eff4c5a..92c78c44f 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/radio/mradiobutton.css @@ -34,9 +34,11 @@ display: -moz-box; -moz-box-orient: horizontal; -moz-box-flex: 1; + -ms-box-orient: horizontal; } .mgwt-RadioButton-label { display: -moz-box; + display: -ms-flexbox; -moz-box-flex: 1; } } @@ -86,8 +88,10 @@ @if user.agent gecko1_8 { .mgwt-RadioButton-input { -moz-appearance: none !important; + -ms-appearance: none !important; } .mgwt-RadioButton-input:CHECKED { -moz-appearance: none !important; + -ms-appearance: none !important; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css index 4947d2f9a..cdc9279df 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css @@ -7,7 +7,11 @@ @external mgwt-SearchBox-icon; } -::-webkit-search-cancel-button { -webkit-appearance: none; } +::-webkit-search-cancel-button { + -webkit-appearance: none; + -moz-appearance: none; + -ms-appearance: none; +} .mgwt-SearchBox { height: 44px; @@ -41,6 +45,7 @@ @if user.agent gecko1_8 { .mgwt-SearchBox-input { width: literal("-moz-calc(100% - 47px);"); + width: literal("-ms-calc(100% - 47px);"); } } @@ -58,6 +63,9 @@ -moz-appearance: none; -moz-user-select: text; -moz-tap-highlight-color: rgba(0, 0, 0, 0); + -ms-appearance: none; + -ms-user-select: text; + -ms-tap-highlight-color: rgba(0, 0, 0, 0); } } @@ -90,6 +98,14 @@ .mgwt-SearchBox-icon { -webkit-mask-image: searchImage; -webkit-mask-repeat: no-repeat; + background-color: #78787E; + } +} + +@if user.agent gecko1_8 { + .mgwt-SearchBox-icon { + background-image: searchImage; + background-repeat: no-repeat; } } @@ -99,18 +115,21 @@ left: 8px; height: 16px; width: 16px; - background-color: #78787E; } @if mgwt.density high { .mgwt-SearchBox-icon { -webkit-mask-size: 17px 17px; + -moz-mask-size: 17px 17px; + -ms-mask-size: 17px 17px; } } @if mgwt.density xhigh { .mgwt-SearchBox-icon { -webkit-mask-size: 12px 12px; + -moz-mask-size: 12px 12px; + -ms-mask-size: 12px 12px; } } @@ -122,6 +141,14 @@ } } +@if user.agent gecko1_8 { + .mgwt-SearchBox-clear { + background-image: clearImage; + background-repeat: no-repeat; + background-position: center center; + } +} + .mgwt-SearchBox-clear { position: absolute; top: -2px; @@ -134,11 +161,15 @@ @if mgwt.density high { .mgwt-SearchBox-clear { -webkit-mask-size: 19px 19px; + -moz-mask-size: 19px 19px; + -ms-mask-size: 19px 19px; } } @if mgwt.density xhigh { .mgwt-SearchBox-clear { -webkit-mask-size: 14px 14px; + -moz-mask-size: 14px 14px; + -ms-mask-size: 14px 14px; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css index e43c31bd5..e525d4ade 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/list/celllist/grouping-celllist.css @@ -12,6 +12,7 @@ @if user.agent gecko1_8 { .mgwt-GroupingList { display: -moz-box; + display: -ms-flexbox; } } @@ -48,6 +49,7 @@ @if user.agent gecko1_8 { .mgwt-GroupingList-Selection-Bar { display: -moz-box; + display: -ms-flexbox; -moz-box-orient: vertical; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css index a13553213..ccf3ef8d7 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/main.css @@ -3,6 +3,12 @@ -webkit-text-size-adjust: none; -webkit-touch-callout: none; -webkit-text-size-adjust: none; + -moz-text-size-adjust: none; + -moz-touch-callout: none; + -moz-text-size-adjust: none; + -ms-text-size-adjust: none; + -ms-touch-callout: none; + -ms-text-size-adjust: none; margin: 0px; padding: 0px; font-family: Helvetica, sans-serif; @@ -17,6 +23,10 @@ body { font-weight: 400; -webkit-perspective: 800; -webkit-transform-style: preserve-3d; + -moz-perspective: 800; + -moz-transform-style: preserve-3d; + -ms-perspective: 800; + -ms-transform-style: preserve-3d; position: absolute; width: 100%; height: 100%; @@ -30,20 +40,26 @@ body { @if user.agent gecko1_8 { * { -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; } input, textarea { -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; } } @if user.agent gecko1_8 { * { -moz-user-select: none; + -ms-user-select: none; } input, textarea { -moz-user-select: text; + -ms-user-select: text; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/selection.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/selection.css index 7d6f24c66..e55dfccd6 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/main/selection.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/main/selection.css @@ -11,6 +11,7 @@ @if user.agent gecko1_8 { .userSelectNone { -moz-user-select: none; + -ms-user-select: none; } } @@ -29,6 +30,7 @@ @if user.agent gecko1_8 { .userSelectText { -moz-user-select: text; + -ms-user-select: text; } } @@ -47,6 +49,7 @@ @if user.agent gecko1_8 { .userSelectAll { -moz-user-select: all; + -ms-user-select: all; } } @@ -65,6 +68,7 @@ @if user.agent gecko1_8 { .userSelectElement { -moz-user-select: element; + -ms-user-select: element; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/swipe/swipe-menu.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/swipe/swipe-menu.css index 0733b6fa3..5828cbd39 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/swipe/swipe-menu.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/menu/swipe/swipe-menu.css @@ -43,9 +43,11 @@ @if user.agent gecko1_8 { .opened { -moz-transform: translate3d(0, 0, 0); + -ms-transform: translate3d(0, 0, 0); } .closed { -moz-transform: translate3d(-40%, 0, 0); + -ms-transform: translate3d(-40%, 0, 0); } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanel.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanel.java index 8d90ae98a..c47cf53c5 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanel.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanel.java @@ -13,6 +13,8 @@ */ package com.googlecode.mgwt.ui.client.widget.panel.flex; +import java.util.Iterator; + import com.google.gwt.core.shared.GWT; import com.google.gwt.uibinder.client.UiFactory; import com.google.gwt.uibinder.client.UiField; @@ -22,146 +24,142 @@ import com.google.gwt.user.client.ui.IndexedPanel; import com.google.gwt.user.client.ui.IsWidget; import com.google.gwt.user.client.ui.Widget; - import com.googlecode.mgwt.ui.client.widget.panel.flex.FlexPropertyHelper.Alignment; import com.googlecode.mgwt.ui.client.widget.panel.flex.FlexPropertyHelper.Justification; import com.googlecode.mgwt.ui.client.widget.panel.flex.FlexPropertyHelper.Orientation; -import java.util.Iterator; - /** * A FlexPanel uses the flexible box model to layout its children. *

- * Note: For children implementing {@link IsFlexible} flex:1 is applied automatically when added - * to this panel. + * Note: For children implementing {@link IsFlexible} flex:1 is applied + * automatically when added to this panel. * * @author Daniel Kurka */ public class FlexPanel extends Composite implements HasWidgets.ForIsWidget, IndexedPanel.ForIsWidget { - public static final FlexPanelAppearance DEFAULT_APPERANCE = GWT.create(FlexPanelAppearance.class); - - @UiField - protected FlowPanel container; - - private FlexPanelAppearance appearance; - - public FlexPanel() { - this(DEFAULT_APPERANCE); - } - - public FlexPanel(FlexPanelAppearance appearance) { - this.appearance = appearance; - initWidget(this.appearance.uiBinder().createAndBindUi(this)); - } - - @Override - public void add(Widget w) { - if (w instanceof IsFlexible) { - w.addStyleName(appearance.css().flexible()); - } - container.add(w); - } - - @Override - public void clear() { - Iterator iterator = container.iterator(); - while (iterator.hasNext()) { - Widget w = iterator.next(); - if (w instanceof IsFlexible) { - w.removeStyleName(appearance.css().flexible()); - } - } - container.clear(); - } - - @Override - public Iterator iterator() { - return container.iterator(); - } - - @Override - public boolean remove(Widget w) { - if (w instanceof IsFlexible) { - w.removeStyleName(appearance.css().flexible()); - } - return container.remove(w); - } - - @Override - public void add(IsWidget w) { - if (w.asWidget() instanceof IsFlexible) { - w.asWidget().addStyleName(appearance.css().flexible()); - } - container.add(w); - } - - public void add(Widget widget, double flex) { - container.add(widget); - - FlexPropertyHelper.setFlex(widget.getElement(), flex); - } - - @Override - public boolean remove(IsWidget w) { - if (w.asWidget() instanceof IsFlexible) { - w.asWidget().removeStyleName(appearance.css().flexible()); - } - return container.remove(w); - } - - public void setOrientation(Orientation value) { - FlexPropertyHelper.setOrientation(getElement(), value); - } - - public void setAlignment(Alignment value) { - FlexPropertyHelper.setAlignment(getElement(), value); - } - - public void setJustification(Justification value) { - FlexPropertyHelper.setJustification(getElement(), value); - } - - - public void clearAlignment() { - FlexPropertyHelper.clearAlignment(getElement()); - } - - public void clearJustification() { - FlexPropertyHelper.clearJustification(getElement()); - } - - @UiFactory - protected FlexPanelAppearance getAppearance() { - return appearance; - } - - @Override - public Widget getWidget(int index) { - return container.getWidget(index); - } - - @Override - public int getWidgetCount() { - return container.getWidgetCount(); - } - - @Override - public int getWidgetIndex(Widget child) { - return container.getWidgetIndex(child); - } - - @Override - public boolean remove(int index) { - Widget w = getWidget(index); - if (w instanceof IsFlexible) { - w.removeStyleName(appearance.css().flexible()); - } - return container.remove(index); - } - - @Override - public int getWidgetIndex(IsWidget child) { - return container.getWidgetIndex(child); - } + public static final FlexPanelAppearance DEFAULT_APPERANCE = GWT.create(FlexPanelAppearance.class); + + @UiField + protected FlowPanel container; + + private FlexPanelAppearance appearance; + + public FlexPanel() { + this(DEFAULT_APPERANCE); + } + + public FlexPanel(FlexPanelAppearance appearance) { + this.appearance = appearance; + initWidget(this.appearance.uiBinder().createAndBindUi(this)); + } + + @Override + public void add(Widget w) { + if (w instanceof IsFlexible) { + w.addStyleName(appearance.css().flexible()); + } + container.add(w); + } + + @Override + public void clear() { + Iterator iterator = container.iterator(); + while (iterator.hasNext()) { + Widget w = iterator.next(); + if (w instanceof IsFlexible) { + w.removeStyleName(appearance.css().flexible()); + } + } + container.clear(); + } + + @Override + public Iterator iterator() { + return container.iterator(); + } + + @Override + public boolean remove(Widget w) { + if (w instanceof IsFlexible) { + w.removeStyleName(appearance.css().flexible()); + } + return container.remove(w); + } + + @Override + public void add(IsWidget w) { + if (w.asWidget() instanceof IsFlexible) { + w.asWidget().addStyleName(appearance.css().flexible()); + } + container.add(w); + } + + public void add(Widget widget, double flex) { + container.add(widget); + + FlexPropertyHelper.setFlex(widget.getElement(), flex); + } + + @Override + public boolean remove(IsWidget w) { + if (w.asWidget() instanceof IsFlexible) { + w.asWidget().removeStyleName(appearance.css().flexible()); + } + return container.remove(w); + } + + public void setOrientation(Orientation value) { + FlexPropertyHelper.setOrientation(getElement(), value); + } + + public void setAlignment(Alignment value) { + FlexPropertyHelper.setAlignment(getElement(), value); + } + + public void setJustification(Justification value) { + FlexPropertyHelper.setJustification(getElement(), value); + } + + public void clearAlignment() { + FlexPropertyHelper.clearAlignment(getElement()); + } + + public void clearJustification() { + FlexPropertyHelper.clearJustification(getElement()); + } + + @UiFactory + protected FlexPanelAppearance getAppearance() { + return appearance; + } + + @Override + public Widget getWidget(int index) { + return container.getWidget(index); + } + + @Override + public int getWidgetCount() { + return container.getWidgetCount(); + } + + @Override + public int getWidgetIndex(Widget child) { + return container.getWidgetIndex(child); + } + + @Override + public boolean remove(int index) { + Widget w = getWidget(index); + if (w instanceof IsFlexible) { + w.removeStyleName(appearance.css().flexible()); + } + return container.remove(index); + } + + @Override + public int getWidgetIndex(IsWidget child) { + return container.getWidgetIndex(child); + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css index c481f710c..a898774e0 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/flex.css @@ -14,6 +14,7 @@ @if user.agent gecko1_8 { .mgwt-FlexPanel { display: -moz-box; + display: -ms-flexbox; } } @@ -40,6 +41,7 @@ @if user.agent gecko1_8 { .mgwt-FlexPanel-flex { -moz-flex: 1; + -ms-flex: 1 1; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css index 58ccf23bb..a5814e0f1 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/pull/pullpanel.css @@ -44,6 +44,7 @@ @if user.agent gecko1_8 { .mgwt-PullToRefresh-arrow { -moz-transform-origin: 12px 9px; + -ms-transform-origin: 12px 9px; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/scrollpanel.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/scrollpanel.css index 21e49a97f..93cdf9297 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/scrollpanel.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/scroll/scrollpanel.css @@ -25,6 +25,8 @@ .mgwt-ScrollPanel-container { -moz-transition-property: literal('-moz-transform'); -moz-transition-timing-function: literal('cubic-bezier(0, 0, 0.25, 1)'); + -ms-transition-property: literal('-ms-transform'); + -ms-transition-timing-function: literal('cubic-bezier(0, 0, 0.25, 1)'); vertical-align: top; } } @@ -49,6 +51,9 @@ -moz-transition-duration: 300ms; -moz-transition-delay: 0ms; -moz-transition-property: opacity; + -ms-transition-duration: 300ms; + -ms-transition-delay: 0ms; + -ms-transition-property: opacity; } } @@ -94,5 +99,11 @@ -moz-transition-timing-function:cubic-bezier(0.33,0.66,0.66,1); -moz-transform: translate('0,0'); -moz-transition-duration:0; + -ms-background-clip:padding-box; + -ms-box-sizing:border-box; + -ms-transition-property:literal('-webkit-transform'); + -ms-transition-timing-function:cubic-bezier(0.33,0.66,0.66,1); + -ms-transform: translate('0,0'); + -ms-transition-duration:0; } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressbar.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressbar.css index 8eab117bd..9663ddb2e 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressbar.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressbar.css @@ -34,6 +34,11 @@ -moz-animation-name: anmiateProgressBar; -moz-animation-iteration-count: infinite; -moz-animation-timing-function: linear; + + animation-duration: 9s; + animation-name: anmiateProgressBar; + animation-iteration-count: infinite; + animation-timing-function: linear; } @-moz-keyframes anmiateProgressBar { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressindicator.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressindicator.css index 4848ee5f5..5285082ce 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressindicator.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressindicator.css @@ -54,13 +54,20 @@ -moz-animation-iteration-count: infinite; -moz-animation-timing-function: linear; -moz-animation-name: progressIndicatorAnimation; + + -ms-animation-duration: 1s; + -ms-animation-iteration-count: infinite; + -ms-animation-timing-function: linear; + -ms-animation-name: progressIndicatorAnimation; } .mgwt-ProgressIndicator > span:nth-child\(2\) { -moz-animation-delay: 0.33s; + -ms-animation-delay: 0.33s; } .mgwt-ProgressIndicator > span:nth-child\(3\) { -moz-animation-delay: 0.66s; + -ms-animation-delay: 0.66s; } @-moz-keyframes progressIndicatorAnimation { @@ -79,4 +86,21 @@ -moz-transform: scale(0.25); } } + + @-ms-keyframes progressIndicatorAnimation { + 0% { + -ms-transform: scale(0.25); + background-color: #1e7dc8; + } + 16% { + -ms-transform: scale(1.0); + background-color: #1e7dc8; + } + 33% { + -ms-transform: scale(0.25); + } + 100% { + -ms-transform: scale(0.25); + } + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressspinner.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressspinner.css index 7e3865f52..e632cddff 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressspinner.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/progress/progressspinner.css @@ -22,50 +22,74 @@ .mgwt-ProgressSpinner > span:nth-child\(1\) { -webkit-transform: translate3d(0, -10px, 0); + -moz-transform: translate3d(0, -10px, 0); + -ms-transform: translate3d(0, -10px, 0); } .mgwt-ProgressSpinner > span:nth-child\(2\) { -webkit-transform: translate3d(5px, -8.66px, 0) rotate(30deg); + -moz-transform: translate3d(5px, -8.66px, 0) rotate(30deg); + -ms-transform: translate3d(5px, -8.66px, 0) rotate(30deg); } .mgwt-ProgressSpinner > span:nth-child\(3\) { -webkit-transform: translate3d(8.66px, -5px, 0) rotate(60deg); + -moz-transform: translate3d(8.66px, -5px, 0) rotate(60deg); + -ms-transform: translate3d(8.66px, -5px, 0) rotate(60deg); } .mgwt-ProgressSpinner > span:nth-child\(4\) { -webkit-transform: translate3d(10px, 0, 0) rotate(90deg); + -moz-transform: translate3d(10px, 0, 0) rotate(90deg); + -ms-transform: translate3d(10px, 0, 0) rotate(90deg); } .mgwt-ProgressSpinner > span:nth-child\(5\) { -webkit-transform: translate3d(8.66px, 5px, 0) rotate(120deg); + -moz-transform: translate3d(8.66px, 5px, 0) rotate(120deg); + -ms-transform: translate3d(8.66px, 5px, 0) rotate(120deg); } .mgwt-ProgressSpinner > span:nth-child\(6\) { -webkit-transform: translate3d(5px, 8.66px, 0) rotate(150deg); + -moz-transform: translate3d(5px, 8.66px, 0) rotate(150deg); + -ms-transform: translate3d(5px, 8.66px, 0) rotate(150deg); } .mgwt-ProgressSpinner > span:nth-child\(7\) { -webkit-transform: translate3d(0px, 10px, 0); + -moz-transform: translate3d(0px, 10px, 0); + -ms-transform: translate3d(0px, 10px, 0); } .mgwt-ProgressSpinner > span:nth-child\(8\) { -webkit-transform: translate3d(-5px, 8.66px, 0) rotate(210deg); + -moz-transform: translate3d(-5px, 8.66px, 0) rotate(210deg); + -ms-transform: translate3d(-5px, 8.66px, 0) rotate(210deg); } .mgwt-ProgressSpinner > span:nth-child\(9\) { -webkit-transform: translate3d(-8.66px, 5px, 0) rotate(240deg); + -moz-transform: translate3d(-8.66px, 5px, 0) rotate(240deg); + -ms-transform: translate3d(-8.66px, 5px, 0) rotate(240deg); } .mgwt-ProgressSpinner > span:nth-child\(10\) { -webkit-transform: translate3d(-10px, 0, 0) rotate(90deg);; + -moz-transform: translate3d(-10px, 0, 0) rotate(90deg);; + -ms-transform: translate3d(-10px, 0, 0) rotate(90deg);; } .mgwt-ProgressSpinner > span:nth-child\(11\) { -webkit-transform: translate3d(-8.66px, -5px, 0) rotate(300deg); + -moz-transform: translate3d(-8.66px, -5px, 0) rotate(300deg); + -ms-transform: translate3d(-8.66px, -5px, 0) rotate(300deg); } .mgwt-ProgressSpinner > span:nth-child\(12\) { -webkit-transform: translate3d(-5px, -8.66px, 0) rotate(330deg); + -moz-transform: translate3d(-5px, -8.66px, 0) rotate(330deg); + -ms-transform: translate3d(-5px, -8.66px, 0) rotate(330deg); } @@ -74,6 +98,16 @@ -webkit-animation-timing-function: linear; -webkit-animation-duration: ANIMATION_DURATION; -webkit-animation-name: animationProgressSpinner; + + -moz-animation-iteration-count: infinite; + -moz-animation-timing-function: linear; + -moz-animation-duration: ANIMATION_DURATION; + -moz-animation-name: animationProgressSpinner; + + -ms-animation-iteration-count: infinite; + -ms-animation-timing-function: linear; + -ms-animation-duration: ANIMATION_DURATION; + -ms-animation-name: animationProgressSpinner; } @if user.agent safari { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css index ad760ced3..0285b7467 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/tabbar/tabbar.css @@ -55,6 +55,7 @@ @if user.agent gecko1_8 { .mgwt-TabBar { display: -moz-box; + display: -ms-flexbox; -moz-box-orient: horizontal; } } From 96037ded07feb187ba3b7e9f3c58927f69589c3e Mon Sep 17 00:00:00 2001 From: Maurycy-Sokolowski Date: Sat, 12 Sep 2015 11:44:15 -0700 Subject: [PATCH 36/40] Modified snapshot name --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dfa0a31f6..099ba27ab 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ com.googlecode.mgwt mgwt - 2.0.0-MJS-SNAPSHOT + 2.0.1-SNAPSHOT jar mgwt From 8aa21fdefeeed6c9673dbd4788ec096589cb0b2f Mon Sep 17 00:00:00 2001 From: Maurycy-Sokolowski Date: Mon, 7 Dec 2015 13:29:57 -0800 Subject: [PATCH 37/40] Fixes for IEEdge --- .../mgwt/ui/client/OsDetection.java | 13 +- .../ui/client/OsDetectionRuntimeImpl.java | 324 ++++++++-------- .../mgwt/ui/client/util/IconHandler.java | 181 +++++---- .../client/widget/input/search/searchbox.css | 8 +- .../ui/client/widget/input/slider/Slider.java | 358 +++++++++--------- .../flex/FlexPanelDefaultAppearance.java | 40 +- 6 files changed, 467 insertions(+), 457 deletions(-) diff --git a/src/main/java/com/googlecode/mgwt/ui/client/OsDetection.java b/src/main/java/com/googlecode/mgwt/ui/client/OsDetection.java index 47655359a..a32b45f94 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/OsDetection.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/OsDetection.java @@ -125,11 +125,12 @@ public interface OsDetection { public boolean isPhone(); /** - * Are we running on Windows Phone 8/8.1 + * Are we running on Windows Phone 8/8.1/10 + * * @return */ public boolean isWindowsPhone(); - + /** * Are we running on a blackberry device * @@ -142,7 +143,9 @@ public interface OsDetection { boolean isAndroid2x(); - boolean isIOS6(); + boolean isIOS6(); + + boolean isAndroid4_3_orLower(); - boolean isAndroid4_3_orLower(); -} + boolean isIEEdge(); +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java index 01b9c8dc7..a78d4db57 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java @@ -2,161 +2,169 @@ public class OsDetectionRuntimeImpl implements OsDetection { - @Override - public boolean isAndroid() { - return isAndroidPhone() || isAndroidTablet(); - } - - @Override - public boolean isIPhone() { - String userAgent = getUserAgent(); - if (userAgent.contains("iphone") && getDevicePixelRatio() < 2) { - return true; - } - return false; - } - - @Override - public boolean isIPad() { - String userAgent = getUserAgent(); - if (userAgent.contains("ipad") && getDevicePixelRatio() < 2) { - return true; - } - return false; - } - - @Override - public boolean isIOs() { - return isIPad() || isIPadRetina() || isIPhone() || isRetina(); - } - - @Override - public boolean isRetina() { - String userAgent = getUserAgent(); - if (userAgent.contains("iphone") && getDevicePixelRatio() >= 2) { - return true; - } - return false; - } - - @Override - public boolean isIPadRetina() { - String userAgent = getUserAgent(); - if (userAgent.contains("ipad") && getDevicePixelRatio() >= 2) { - return true; - } - return false; - } - - @Override - public boolean isDesktop() { - return !isIOs() && !isAndroid(); - } - - @Override - public boolean isTablet() { - return isIPad() || isIPadRetina() || isAndroidTablet(); - } - - @Override - public boolean isAndroidTablet() { - String userAgent = getUserAgent(); - if (userAgent.contains("android") && !userAgent.contains("mobile")) { - return true; - } - return false; - } - - @Override - public boolean isAndroidPhone() { - String userAgent = getUserAgent(); - if (userAgent.contains("android") && userAgent.contains("mobile")) { - return true; - } - return false; - } - - @Override - public boolean isPhone() { - return isIPhone() || isRetina() || isAndroidPhone() || isWindowsPhone(); - } - - @Override - public boolean isWindowsPhone() - { - String userAgent = getUserAgent(); - if (userAgent.contains("windows phone 8")) { - return true; - } - return false; - } - - @Override - public boolean isBlackBerry() { - return false; - } - - @Override - public boolean isAndroid4_4_OrHigher() { - String userAgent = getUserAgent(); - if (userAgent.contains("android") && userAgent.contains("chrome")) { - return true; - } - return false; - } - - @Override - public boolean isAndroid2x() { - String userAgent = getUserAgent(); - if (userAgent.contains("android 2.")) { - return true; - } - return false; - } - - native String getUserAgent() /*-{ - return $wnd.navigator.userAgent.toLowerCase(); - }-*/; - - native double getDevicePixelRatio() /*-{ - if (!$wnd.devicePixelRatio) { - try { - if ('deviceXDPI' in $wnd.screen) { - $wnd.devicePixelRatio = $wnd.screen.deviceXDPI / $wnd.screen.logicalXDPI; - } - } - catch(e) {} - } - return $wnd.devicePixelRatio || 1; - }-*/; - - @Override - public boolean isIOS6() { - if(!isIOs()){ - return false; - } - - String userAgent = getUserAgent(); - if (userAgent.contains("os 6_")) { - return true; - } - - return false; - } - - @Override - public boolean isAndroid4_3_orLower() { - if(isAndroid4_4_OrHigher()) - { - return false; - } - - String userAgent = getUserAgent(); - if (userAgent.contains("android")) { - return true; - } - - return false; - } - -} + @Override + public boolean isAndroid() { + return isAndroidPhone() || isAndroidTablet(); + } + + @Override + public boolean isIPhone() { + String userAgent = getUserAgent(); + if (!isIEEdge(userAgent) && !isWindowsPhone() && userAgent.contains("iphone") && getDevicePixelRatio() < 2) { + return true; + } + return false; + } + + @Override + public boolean isIPad() { + String userAgent = getUserAgent(); + if (!isIEEdge(userAgent) && userAgent.contains("ipad") && getDevicePixelRatio() < 2) { + return true; + } + return false; + } + + @Override + public boolean isIOs() { + return isIPad() || isIPadRetina() || isIPhone() || isRetina(); + } + + @Override + public boolean isRetina() { + String userAgent = getUserAgent(); + if (!isIEEdge(userAgent) && !isWindowsPhone() && userAgent.contains("iphone") && getDevicePixelRatio() >= 2) { + return true; + } + return false; + } + + @Override + public boolean isIPadRetina() { + String userAgent = getUserAgent(); + if (!isIEEdge(userAgent) && userAgent.contains("ipad") && getDevicePixelRatio() >= 2) { + return true; + } + return false; + } + + @Override + public boolean isDesktop() { + return !isIOs() && !isAndroid() && !isWindowsPhone(); + } + + @Override + public boolean isTablet() { + return isIPad() || isIPadRetina() || isAndroidTablet(); + } + + @Override + public boolean isAndroidTablet() { + String userAgent = getUserAgent(); + if (!isIEEdge(userAgent) && !isWindowsPhone() && userAgent.contains("android") && !userAgent.contains("mobile")) { + return true; + } + return false; + } + + @Override + public boolean isAndroidPhone() { + String userAgent = getUserAgent(); + if (!isIEEdge(userAgent) && !isWindowsPhone() && userAgent.contains("android") && userAgent.contains("mobile")) { + return true; + } + return false; + } + + @Override + public boolean isPhone() { + return isIPhone() || isRetina() || isAndroidPhone() || isWindowsPhone(); + } + + @Override + public boolean isWindowsPhone() { + String userAgent = getUserAgent(); + if (userAgent.contains("windows phone 8") || userAgent.contains("windows phone 10")) { + return true; + } + return false; + } + + @Override + public boolean isBlackBerry() { + return false; + } + + @Override + public boolean isAndroid4_4_OrHigher() { + String userAgent = getUserAgent(); + if (!isIEEdge(userAgent) && userAgent.contains("android") && userAgent.contains("chrome")) { + return true; + } + return false; + } + + @Override + public boolean isAndroid2x() { + String userAgent = getUserAgent(); + if (!isIEEdge(userAgent) && userAgent.contains("android 2.")) { + return true; + } + return false; + } + + native String getUserAgent() /*-{ + return $wnd.navigator.userAgent.toLowerCase(); + }-*/; + + native double getDevicePixelRatio() /*-{ + if (!$wnd.devicePixelRatio) { + if ('deviceXDPI' in $wnd.screen) { + $wnd.devicePixelRatio = $wnd.screen.deviceXDPI + / $wnd.screen.logicalXDPI; + } + } + return $wnd.devicePixelRatio || 1; + }-*/; + + @Override + public boolean isIOS6() { + if (!isIOs()) { + return false; + } + + String userAgent = getUserAgent(); + if (userAgent.contains("os 6_")) { + return true; + } + + return false; + } + + @Override + public boolean isAndroid4_3_orLower() { + if (isAndroid4_4_OrHigher()) { + return false; + } + + String userAgent = getUserAgent(); + if (!isIEEdge(userAgent) && userAgent.contains("android")) { + return true; + } + + return false; + } + + private boolean isIEEdge(String userAgent) { + if (userAgent.contains("edge/12")) { + return true; + } + return false; + } + + @Override + public boolean isIEEdge() { + return isIEEdge(getUserAgent()); + } + +} \ No newline at end of file diff --git a/src/main/java/com/googlecode/mgwt/ui/client/util/IconHandler.java b/src/main/java/com/googlecode/mgwt/ui/client/util/IconHandler.java index edbd0329d..0941d612d 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/util/IconHandler.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/util/IconHandler.java @@ -25,97 +25,92 @@ public class IconHandler { - static { - if (MGWT.getOsDetection().isAndroid4_3_orLower()) { - ICON_HANDLER = new IconHandlerEmulatedImpl(); - } else { - ICON_HANDLER = GWT.create(IconHandlerImpl.class); - } - } - - - private interface IconHandlerImpl { - public void setIcons(Element element, ImageResource icon, String color); - } - - private static class IconHandlerNativeImpl implements IconHandlerImpl { - - protected static class Dimension { - private int width; - private int height; - - public Dimension(int width, int height) { - this.width = width; - this.height = height; - } - } - - @Override - public void setIcons(Element element, ImageResource icon, String color) { - if (icon == null) { - return; - } - - Dimension dimensions = calculateDimensions(icon); - element.getStyle().setProperty("WebkitMaskBoxImage", - "url(" + icon.getSafeUri().asString() + ")"); - element.getStyle().setWidth(dimensions.width, Unit.PX); - element.getStyle().setHeight(dimensions.height, Unit.PX); - element.getStyle().setProperty("WebkitMaskSize", - dimensions.width + "px, " + dimensions.height + "px"); - element.getStyle().setBackgroundColor(color); - } - - protected Dimension calculateDimensions(ImageResource icon) { - int iconWidth = icon.getWidth(); - int iconHeight = icon.getHeight(); - - if (MGWT.getDeviceDensity().isHighDPI()) { - iconWidth /= 1.5; - iconHeight /= 1.5; - } else if (MGWT.getDeviceDensity().isXHighDPI()) { - iconWidth /= 2; - iconHeight /= 2; - } - return new Dimension(iconWidth, iconHeight); - } - } - - private static class IconHandlerEmulatedImpl extends IconHandlerNativeImpl { - - private static final ImageConverter converter = new ImageConverter(); - - @Override - public void setIcons(final Element element, ImageResource icon, String color) { - if (icon == null) { - return; - } - - converter.convert(icon, color, new ImageConverterCallback() { - - @Override - public void onFailure(Throwable caught) { - } - - @Override - public void onSuccess(ImageResource convertImageResource) { - element.getStyle().setBackgroundColor("transparent"); - Dimension dimensions = calculateDimensions(convertImageResource); - element.getStyle().setWidth(dimensions.width, Unit.PX); - element.getStyle().setHeight(dimensions.height, Unit.PX); - element.getStyle().setBackgroundImage( - "url(" + convertImageResource.getSafeUri().asString() + ")"); - element.getStyle().setProperty("backgroundSize", - dimensions.width + "px " + dimensions.height + "px"); - } - - }); - } - } - - private static final IconHandlerImpl ICON_HANDLER; - - public static void setIcons(Element element, ImageResource icon, String color) { - ICON_HANDLER.setIcons(element, icon, color); - } + static { + if (MGWT.getOsDetection().isIEEdge() || MGWT.getOsDetection().isAndroid4_3_orLower()) { + ICON_HANDLER = new IconHandlerEmulatedImpl(); + } else { + ICON_HANDLER = GWT.create(IconHandlerImpl.class); + } + } + + private interface IconHandlerImpl { + public void setIcons(Element element, ImageResource icon, String color); + } + + private static class IconHandlerNativeImpl implements IconHandlerImpl { + + protected static class Dimension { + private int width; + private int height; + + public Dimension(int width, int height) { + this.width = width; + this.height = height; + } + } + + @Override + public void setIcons(Element element, ImageResource icon, String color) { + if (icon == null) { + return; + } + + Dimension dimensions = calculateDimensions(icon); + element.getStyle().setProperty("WebkitMaskBoxImage", "url(" + icon.getSafeUri().asString() + ")"); + element.getStyle().setWidth(dimensions.width, Unit.PX); + element.getStyle().setHeight(dimensions.height, Unit.PX); + element.getStyle().setProperty("WebkitMaskSize", dimensions.width + "px, " + dimensions.height + "px"); + element.getStyle().setBackgroundColor(color); + } + + protected Dimension calculateDimensions(ImageResource icon) { + int iconWidth = icon.getWidth(); + int iconHeight = icon.getHeight(); + + if (MGWT.getDeviceDensity().isHighDPI()) { + iconWidth /= 1.5; + iconHeight /= 1.5; + } else if (MGWT.getDeviceDensity().isXHighDPI()) { + iconWidth /= 2; + iconHeight /= 2; + } + return new Dimension(iconWidth, iconHeight); + } + } + + private static class IconHandlerEmulatedImpl extends IconHandlerNativeImpl { + + private static final ImageConverter converter = new ImageConverter(); + + @Override + public void setIcons(final Element element, ImageResource icon, String color) { + if (icon == null) { + return; + } + + converter.convert(icon, color, new ImageConverterCallback() { + + @Override + public void onFailure(Throwable caught) { + } + + @Override + public void onSuccess(ImageResource convertImageResource) { + element.getStyle().setBackgroundColor("transparent"); + Dimension dimensions = calculateDimensions(convertImageResource); + element.getStyle().setWidth(dimensions.width, Unit.PX); + element.getStyle().setHeight(dimensions.height, Unit.PX); + element.getStyle().setBackgroundImage("url(" + convertImageResource.getSafeUri().asString() + ")"); + element.getStyle().setProperty("backgroundSize", dimensions.width + "px " + dimensions.height + "px"); + } + + }); + } + } + + private static final IconHandlerImpl ICON_HANDLER; + + public static void setIcons(Element element, ImageResource icon, String color) { + ICON_HANDLER.setIcons(element, icon, color); + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css index 09013fcde..3b6bf7119 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/search/searchbox.css @@ -114,8 +114,10 @@ .mgwt-SearchBox-icon { -webkit-mask-image: searchImage; -webkit-mask-repeat: no-repeat; - background-color: #78787E; - } + + background-image: searchImage; + background-repeat: no-repeat; + background-color: inherit; } } @if user.agent gecko1_8 { @@ -212,7 +214,7 @@ right: 0px; height: 30px; width: 30px; - background-color: #78787E; + background-color: inherit; } @if mgwt.density high { diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java index ccb6ccebc..9b35c4a3a 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/input/slider/Slider.java @@ -38,185 +38,187 @@ /** * The mgwt pointer widget. * - * The pointer element is moved along the bar element to represent the value of the Slider + * The pointer element is moved along the bar element to represent the value of + * the Slider */ public class Slider extends Widget implements HasValue, LeafValueEditor { - private class SliderTouchHandler implements TouchHandler { - - @Override - public void onTouchStart(TouchStartEvent event) { - setValueContrained(event.getTouches().get(0).getClientX()); - if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { - DOM.setCapture(getElement()); - } - event.stopPropagation(); - event.preventDefault(); - } - - @Override - public void onTouchMove(TouchMoveEvent event) { - - setValueContrained(event.getTouches().get(0).getClientX()); - event.stopPropagation(); - event.preventDefault(); - } - - @Override - public void onTouchEnd(TouchEndEvent event) { - if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { - DOM.releaseCapture(getElement()); - } - event.stopPropagation(); - event.preventDefault(); - } - - @Override - public void onTouchCancel(TouchCancelEvent event) { - if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { - DOM.releaseCapture(getElement()); - } - } - } - - private static final SliderAppearance DEFAULT_APPEARANCE = GWT.create(SliderAppearance.class); - - private static final TouchWidgetImpl TOUCH_WIDGET_IMPL = GWT.create(TouchWidgetImpl.class); - - private int value; - private int max; - private final SliderAppearance apperance; - - @UiField - public Element pointer; - @UiField - public Element bar; - - public Slider() { - this(DEFAULT_APPEARANCE); - } - - public Slider(SliderAppearance apperance) { - this.apperance = apperance; - setElement(this.apperance.uiBinder().createAndBindUi(this)); - TOUCH_WIDGET_IMPL.addTouchHandler(this, new SliderTouchHandler()); - max = 100; - value = 0; - } - - @Override - public HandlerRegistration addValueChangeHandler(ValueChangeHandler handler) { - return addHandler(handler, ValueChangeEvent.getType()); - } - - /** - * Set the maximum of the pointer - * - * @param max the maximum to use - */ - public void setMax(int max) { - if (max <= 0) { - throw new IllegalArgumentException("max > 0"); - } - this.max = max; - } - - /** - * get the maximum of the pointer - * - * @return the maximum of the pointer - */ - public int getMax() { - return max; - } - - @Override - public Integer getValue() { - return value; - } - - @Override - public void setValue(Integer value) { - setValue(value, true); - } - - @Override - protected void onAttach() { - super.onAttach(); - Scheduler.get().scheduleDeferred(new ScheduledCommand() { - @Override - public void execute() { - setSliderPos(value); - } - }); - } - - @Override - public void setValue(Integer value, boolean fireEvents) { - setValue(value, fireEvents, true); - } - - @UiFactory - public SliderAppearance getApperance() { - return apperance; - } - - protected void setValue(Integer value, boolean fireEvents, boolean updateSlider) { - if (value == null) { - throw new IllegalArgumentException("value can not be null"); - } - - if (value < 0) { - throw new IllegalArgumentException("value >= 0"); - } - - if (value >= max) { - throw new IllegalArgumentException("value >= max"); - } - - int oldValue = this.value; - this.value = value; - if (updateSlider) { - setSliderPos(value); - } - - if (fireEvents) { - ValueChangeEvent.fireIfNotEqual(this, oldValue, value); - } - } - - private void setSliderPos(int value) { - - if (!isAttached()) { - return; - } - - int width = bar.getOffsetWidth(); - int sliderPos = value * width / max; - setPos(sliderPos); - - } - - private void setValueContrained(int x) { - x = x - Slider.this.getAbsoluteLeft(); - int width = bar.getOffsetWidth(); - - if (x < 0) { - x = 0; - } - - if (x > (width - 1)) { - x = width - 1; - } - - // scale it to max - int componentValue = x * max / width; - setValue(componentValue, true, false); - - setPos(x); - } - - private void setPos(int x) { - CssUtil.translate(pointer, x, 0); - } + private class SliderTouchHandler implements TouchHandler { + + @Override + public void onTouchStart(TouchStartEvent event) { + setValueContrained(event.getTouches().get(0).getClientX()); + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { + DOM.setCapture(getElement()); + } + event.stopPropagation(); + event.preventDefault(); + } + + @Override + public void onTouchMove(TouchMoveEvent event) { + + setValueContrained(event.getTouches().get(0).getClientX()); + event.stopPropagation(); + event.preventDefault(); + } + + @Override + public void onTouchEnd(TouchEndEvent event) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { + DOM.releaseCapture(getElement()); + } + event.stopPropagation(); + event.preventDefault(); + } + + @Override + public void onTouchCancel(TouchCancelEvent event) { + if (TouchSupport.isTouchEventsEmulatedUsingMouseEvents()) { + DOM.releaseCapture(getElement()); + } + } + } + + private static final SliderAppearance DEFAULT_APPEARANCE = GWT.create(SliderAppearance.class); + + private static final TouchWidgetImpl TOUCH_WIDGET_IMPL = GWT.create(TouchWidgetImpl.class); + + private int value; + private int max; + private final SliderAppearance apperance; + + @UiField + public Element pointer; + @UiField + public Element bar; + + public Slider() { + this(DEFAULT_APPEARANCE); + } + + public Slider(SliderAppearance apperance) { + this.apperance = apperance; + setElement(this.apperance.uiBinder().createAndBindUi(this)); + TOUCH_WIDGET_IMPL.addTouchHandler(this, new SliderTouchHandler()); + max = 100; + value = 0; + } + + @Override + public HandlerRegistration addValueChangeHandler(ValueChangeHandler handler) { + return addHandler(handler, ValueChangeEvent.getType()); + } + + /** + * Set the maximum of the pointer + * + * @param max + * the maximum to use + */ + public void setMax(int max) { + if (max <= 0) { + throw new IllegalArgumentException("max > 0"); + } + this.max = max; + } + + /** + * get the maximum of the pointer + * + * @return the maximum of the pointer + */ + public int getMax() { + return max; + } + + @Override + public Integer getValue() { + return value; + } + + @Override + public void setValue(Integer value) { + setValue(value, true); + } + + @Override + protected void onAttach() { + super.onAttach(); + Scheduler.get().scheduleDeferred(new ScheduledCommand() { + @Override + public void execute() { + setSliderPos(value); + } + }); + } + + @Override + public void setValue(Integer value, boolean fireEvents) { + setValue(value, fireEvents, true); + } + + @UiFactory + public SliderAppearance getApperance() { + return apperance; + } + + protected void setValue(Integer value, boolean fireEvents, boolean updateSlider) { + if (value == null) { + throw new IllegalArgumentException("value can not be null"); + } + + if (value < 0) { + throw new IllegalArgumentException("value >= 0"); + } + + if (value >= max) { + throw new IllegalArgumentException("value >= max"); + } + + int oldValue = this.value; + this.value = value; + if (updateSlider) { + setSliderPos(value); + } + + if (fireEvents) { + ValueChangeEvent.fireIfNotEqual(this, oldValue, value); + } + } + + private void setSliderPos(int value) { + + if (!isAttached()) { + return; + } + + int width = bar.getOffsetWidth(); + int sliderPos = value * width / max; + setPos(sliderPos); + + } + + private void setValueContrained(int x) { + x = x - Slider.this.getAbsoluteLeft(); + int width = bar.getOffsetWidth(); + + if (x < 0) { + x = 0; + } + + if (x > (width - 1)) { + x = width - 1; + } + + // scale it to max + int componentValue = x * max / width; + setValue(componentValue, true, false); + + setPos(x); + } + + private void setPos(int x) { + CssUtil.translate(pointer, x, 0); + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanelDefaultAppearance.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanelDefaultAppearance.java index cbc913028..4b1b4d7b2 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanelDefaultAppearance.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/panel/flex/FlexPanelDefaultAppearance.java @@ -20,31 +20,31 @@ import com.google.gwt.user.client.ui.Panel; public class FlexPanelDefaultAppearance implements FlexPanelAppearance { - static { - Resources.INSTANCE.css().ensureInjected(); - } + static { + Resources.INSTANCE.css().ensureInjected(); + } - interface Resources extends ClientBundle { + interface Resources extends ClientBundle { - Resources INSTANCE = GWT.create(Resources.class); + Resources INSTANCE = GWT.create(Resources.class); - @Source({"flex.css"}) - FlexPanelCss css(); - } + @Source({ "flex.css" }) + FlexPanelCss css(); + } - @UiTemplate("FlexPanelBaseAppearance.ui.xml") - interface Binder extends UiBinder { - } + @UiTemplate("FlexPanelBaseAppearance.ui.xml") + interface Binder extends UiBinder { + } - private static final Binder UI_BINDER = GWT.create(Binder.class); + private static final Binder UI_BINDER = GWT.create(Binder.class); - @Override - public UiBinder uiBinder() { - return UI_BINDER; - } + @Override + public UiBinder uiBinder() { + return UI_BINDER; + } - @Override - public FlexPanelCss css() { - return Resources.INSTANCE.css(); - } + @Override + public FlexPanelCss css() { + return Resources.INSTANCE.css(); + } } From b9f2aea7c252fa9a80f8a025469567d65b6470de Mon Sep 17 00:00:00 2001 From: Maurycy-Sokolowski Date: Thu, 28 Jan 2016 13:16:05 -0800 Subject: [PATCH 38/40] Added print button --- .../ui/client/widget/image/ImageHolder.java | 307 ++++----- .../image/ImageHolderDefaultAppearance.java | 589 +++++++++--------- .../ImageHolderDefaultHighAppearance.java | 589 +++++++++--------- .../ImageHolderDefaultXHighAppearance.java | 589 +++++++++--------- .../image/resources/ic_action_print_mdpi.png | Bin 0 -> 536 bytes .../image/resources/ic_action_print_xhdpi.png | Bin 0 -> 1017 bytes .../resources/ic_action_print_xxhdpi.png | Bin 0 -> 1258 bytes 7 files changed, 1039 insertions(+), 1035 deletions(-) create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/image/resources/ic_action_print_mdpi.png create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/image/resources/ic_action_print_xhdpi.png create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/image/resources/ic_action_print_xxhdpi.png diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolder.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolder.java index 760f02217..f1b229045 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolder.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolder.java @@ -15,305 +15,306 @@ import com.google.gwt.core.shared.GWT; import com.google.gwt.resources.client.ImageResource; - import com.googlecode.mgwt.ui.client.widget.image.ImageHolder.ImageHolderAppearance.Images; public class ImageHolder { - private static final ImageHolderAppearance APPEARANCE = GWT.create(ImageHolderAppearance.class); + private static final ImageHolderAppearance APPEARANCE = GWT.create(ImageHolderAppearance.class); + + public interface ImageHolderAppearance { + public interface Images { + ImageResource about(); - public interface ImageHolderAppearance { - public interface Images { - ImageResource about(); + ImageResource accept(); - ImageResource accept(); + ImageResource accounts(); - ImageResource accounts(); + ImageResource addAlarm(); - ImageResource addAlarm(); + ImageResource addGroup(); - ImageResource addGroup(); + ImageResource addPerson(); - ImageResource addPerson(); + ImageResource addToQueue(); - ImageResource addToQueue(); + ImageResource airplaneModeOff(); - ImageResource airplaneModeOff(); + ImageResource airplaneModeOn(); - ImageResource airplaneModeOn(); + ImageResource alarms(); - ImageResource alarms(); + ImageResource attachment(); - ImageResource attachment(); + ImageResource back(); - ImageResource back(); + ImageResource backspace(); - ImageResource backspace(); + ImageResource bad(); - ImageResource bad(); + ImageResource battery(); - ImageResource battery(); + ImageResource bightnessLow(); - ImageResource bightnessLow(); + ImageResource bluetoothConnected(); - ImageResource bluetoothConnected(); + ImageResource bluetooth(); - ImageResource bluetooth(); + ImageResource bluetoothSearching(); - ImageResource bluetoothSearching(); + ImageResource brightnessAuto(); - ImageResource brightnessAuto(); + ImageResource brightnessHigh(); - ImageResource brightnessHigh(); + ImageResource brightnessMedium(); - ImageResource brightnessMedium(); + ImageResource call(); - ImageResource call(); + ImageResource camera(); - ImageResource camera(); + ImageResource cancel(); - ImageResource cancel(); + ImageResource cast(); - ImageResource cast(); + ImageResource ccBcc(); - ImageResource ccBcc(); + ImageResource chat(); - ImageResource chat(); + ImageResource cloud(); - ImageResource cloud(); + ImageResource collapse(); - ImageResource collapse(); + ImageResource collection(); - ImageResource collection(); + ImageResource computer(); - ImageResource computer(); + ImageResource copy(); - ImageResource copy(); + ImageResource crop(); - ImageResource crop(); + ImageResource cut(); - ImageResource cut(); + ImageResource dataUsage(); - ImageResource dataUsage(); + ImageResource dialPad(); - ImageResource dialPad(); + ImageResource directions(); - ImageResource directions(); + ImageResource discard(); - ImageResource discard(); + ImageResource dock(); - ImageResource dock(); + ImageResource download(); - ImageResource download(); + ImageResource edit(); - ImageResource edit(); + ImageResource email(); - ImageResource email(); + ImageResource endCall(); - ImageResource endCall(); + ImageResource error(); - ImageResource error(); + ImageResource event(); - ImageResource event(); + ImageResource expand(); - ImageResource expand(); + ImageResource fastForward(); - ImageResource fastForward(); + ImageResource favorite(); - ImageResource favorite(); + ImageResource flashAutomatic(); - ImageResource flashAutomatic(); + ImageResource flashOff(); - ImageResource flashOff(); + ImageResource flashOn(); - ImageResource flashOn(); + ImageResource forward(); - ImageResource forward(); + ImageResource fullScreen(); - ImageResource fullScreen(); + ImageResource gamepad(); - ImageResource gamepad(); + ImageResource goToToday(); - ImageResource goToToday(); + ImageResource good(); - ImageResource good(); + ImageResource group(); - ImageResource group(); + ImageResource halfImportant(); - ImageResource halfImportant(); + ImageResource headphones(); - ImageResource headphones(); + ImageResource headset(); - ImageResource headset(); + ImageResource help(); - ImageResource help(); + ImageResource importExport(); - ImageResource importExport(); + ImageResource important(); - ImageResource important(); + ImageResource keyboard(); - ImageResource keyboard(); + ImageResource labels(); - ImageResource labels(); + ImageResource locationFound(); - ImageResource locationFound(); + ImageResource locationOff(); - ImageResource locationOff(); + ImageResource locationSearching(); - ImageResource locationSearching(); + ImageResource makeAvailableOffline(); - ImageResource makeAvailableOffline(); + ImageResource map(); - ImageResource map(); + ImageResource merge(); - ImageResource merge(); + ImageResource mic(); - ImageResource mic(); + ImageResource micMuted(); - ImageResource micMuted(); + ImageResource mouse(); - ImageResource mouse(); + ImageResource networkCell(); - ImageResource networkCell(); + ImageResource networkWifi(); - ImageResource networkWifi(); + ImageResource newAccount(); - ImageResource newAccount(); + ImageResource newAttachment(); - ImageResource newAttachment(); + ImageResource newEmail(); - ImageResource newEmail(); + ImageResource newEvent(); - ImageResource newEvent(); + ImageResource newItem(); - ImageResource newItem(); + ImageResource newLabel(); - ImageResource newLabel(); + ImageResource newPicture(); - ImageResource newPicture(); + ImageResource next(); - ImageResource next(); + ImageResource nextItem(); - ImageResource nextItem(); + ImageResource notImportant(); - ImageResource notImportant(); + ImageResource notSecure(); - ImageResource notSecure(); + ImageResource overflow(); - ImageResource overflow(); + ImageResource paste(); - ImageResource paste(); + ImageResource pause(); - ImageResource pause(); + ImageResource pauseOverVideo(); - ImageResource pauseOverVideo(); + ImageResource person(); - ImageResource person(); + ImageResource phone(); - ImageResource phone(); + ImageResource picture(); - ImageResource picture(); + ImageResource place(); - ImageResource place(); + ImageResource play(); - ImageResource play(); + ImageResource playOverVideo(); - ImageResource playOverVideo(); + ImageResource previous(); - ImageResource previous(); + ImageResource previousItem(); - ImageResource previousItem(); + ImageResource print(); - ImageResource read(); + ImageResource read(); - ImageResource refresh(); + ImageResource refresh(); - ImageResource remove(); + ImageResource remove(); - ImageResource repeat(); + ImageResource repeat(); - ImageResource replay(); + ImageResource replay(); - ImageResource replyAll(); + ImageResource replyAll(); - ImageResource reply(); + ImageResource reply(); - ImageResource returnFromFullScreen(); + ImageResource returnFromFullScreen(); - ImageResource rewind(); + ImageResource rewind(); - ImageResource ringVolume(); + ImageResource ringVolume(); - ImageResource rotateLeft(); + ImageResource rotateLeft(); - ImageResource rotateRight(); + ImageResource rotateRight(); - ImageResource save(); + ImageResource save(); - ImageResource screenLockedToLandscape(); + ImageResource screenLockedToLandscape(); - ImageResource screenLockedToPortrait(); + ImageResource screenLockedToPortrait(); - ImageResource screenRotation(); + ImageResource screenRotation(); - ImageResource sdStorage(); + ImageResource sdStorage(); - ImageResource search(); + ImageResource search(); - ImageResource secure(); + ImageResource secure(); - ImageResource selectAll(); + ImageResource selectAll(); - ImageResource sendNow(); + ImageResource sendNow(); - ImageResource settings(); + ImageResource settings(); - ImageResource share(); + ImageResource share(); - ImageResource shuffle(); + ImageResource shuffle(); - ImageResource slideshow(); + ImageResource slideshow(); - ImageResource sortBySize(); + ImageResource sortBySize(); - ImageResource split(); + ImageResource split(); - ImageResource stop(); + ImageResource stop(); - ImageResource storage(); + ImageResource storage(); - ImageResource switchCamera(); + ImageResource switchCamera(); - ImageResource switchVideo(); + ImageResource switchVideo(); - ImageResource time(); + ImageResource time(); - ImageResource undo(); + ImageResource undo(); - ImageResource unread(); + ImageResource unread(); - ImageResource upload(); + ImageResource upload(); - ImageResource usb(); + ImageResource usb(); - ImageResource video(); + ImageResource video(); - ImageResource viewAsGrid(); + ImageResource viewAsGrid(); - ImageResource viewAsList(); + ImageResource viewAsList(); - ImageResource volumeMuted(); + ImageResource volumeMuted(); - ImageResource volumeOn(); + ImageResource volumeOn(); - ImageResource warning(); + ImageResource warning(); - ImageResource webSite(); - } + ImageResource webSite(); + } - Images get(); - } + Images get(); + } - public static Images get() { - return APPEARANCE.get(); - } + public static Images get() { + return APPEARANCE.get(); + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultAppearance.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultAppearance.java index 6c65c9805..eb68905dc 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultAppearance.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultAppearance.java @@ -18,448 +18,449 @@ import com.google.gwt.core.shared.GWT; import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.ImageResource; - import com.googlecode.mgwt.ui.client.widget.image.ImageHolder.ImageHolderAppearance; public class ImageHolderDefaultAppearance implements ImageHolderAppearance { - interface Resources extends ClientBundle, Images { + interface Resources extends ClientBundle, Images { - Resources INSTANCE = GWT.create(Resources.class); + Resources INSTANCE = GWT.create(Resources.class); - @Source("resources/ic_action_about_mdpi.png") - ImageResource about(); + @Source("resources/ic_action_about_mdpi.png") + ImageResource about(); - @Source("resources/ic_action_accept_mdpi.png") - ImageResource accept(); + @Source("resources/ic_action_accept_mdpi.png") + ImageResource accept(); - @Source("resources/ic_action_accounts_mdpi.png") - ImageResource accounts(); + @Source("resources/ic_action_accounts_mdpi.png") + ImageResource accounts(); - @Source("resources/ic_action_add_alarm_mdpi.png") - ImageResource addAlarm(); + @Source("resources/ic_action_add_alarm_mdpi.png") + ImageResource addAlarm(); - @Source("resources/ic_action_add_group_mdpi.png") - ImageResource addGroup(); + @Source("resources/ic_action_add_group_mdpi.png") + ImageResource addGroup(); - @Source("resources/ic_action_add_person_mdpi.png") - ImageResource addPerson(); + @Source("resources/ic_action_add_person_mdpi.png") + ImageResource addPerson(); - @Source("resources/ic_action_add_to_queue_mdpi.png") - ImageResource addToQueue(); + @Source("resources/ic_action_add_to_queue_mdpi.png") + ImageResource addToQueue(); - @Source("resources/ic_action_airplane_mode_off_mdpi.png") - ImageResource airplaneModeOff(); + @Source("resources/ic_action_airplane_mode_off_mdpi.png") + ImageResource airplaneModeOff(); - @Source("resources/ic_action_airplane_mode_on_mdpi.png") - ImageResource airplaneModeOn(); + @Source("resources/ic_action_airplane_mode_on_mdpi.png") + ImageResource airplaneModeOn(); - @Source("resources/ic_action_alarms_mdpi.png") - ImageResource alarms(); + @Source("resources/ic_action_alarms_mdpi.png") + ImageResource alarms(); - @Source("resources/ic_action_attachment_mdpi.png") - ImageResource attachment(); + @Source("resources/ic_action_attachment_mdpi.png") + ImageResource attachment(); - @Source("resources/ic_action_back_mdpi.png") - ImageResource back(); + @Source("resources/ic_action_back_mdpi.png") + ImageResource back(); - @Source("resources/ic_action_backspace_mdpi.png") - ImageResource backspace(); + @Source("resources/ic_action_backspace_mdpi.png") + ImageResource backspace(); - @Source("resources/ic_action_bad_mdpi.png") - ImageResource bad(); + @Source("resources/ic_action_bad_mdpi.png") + ImageResource bad(); - @Source("resources/ic_action_battery_mdpi.png") - ImageResource battery(); + @Source("resources/ic_action_battery_mdpi.png") + ImageResource battery(); - @Source("resources/ic_action_bightness_low_mdpi.png") - ImageResource bightnessLow(); + @Source("resources/ic_action_bightness_low_mdpi.png") + ImageResource bightnessLow(); - @Source("resources/ic_action_bluetooth_connected_mdpi.png") - ImageResource bluetoothConnected(); + @Source("resources/ic_action_bluetooth_connected_mdpi.png") + ImageResource bluetoothConnected(); - @Source("resources/ic_action_bluetooth_mdpi.png") - ImageResource bluetooth(); + @Source("resources/ic_action_bluetooth_mdpi.png") + ImageResource bluetooth(); - @Source("resources/ic_action_bluetooth_searching_mdpi.png") - ImageResource bluetoothSearching(); + @Source("resources/ic_action_bluetooth_searching_mdpi.png") + ImageResource bluetoothSearching(); - @Source("resources/ic_action_brightness_auto_mdpi.png") - ImageResource brightnessAuto(); + @Source("resources/ic_action_brightness_auto_mdpi.png") + ImageResource brightnessAuto(); - @Source("resources/ic_action_brightness_high_mdpi.png") - ImageResource brightnessHigh(); + @Source("resources/ic_action_brightness_high_mdpi.png") + ImageResource brightnessHigh(); - @Source("resources/ic_action_brightness_medium_mdpi.png") - ImageResource brightnessMedium(); + @Source("resources/ic_action_brightness_medium_mdpi.png") + ImageResource brightnessMedium(); - @Source("resources/ic_action_call_mdpi.png") - ImageResource call(); + @Source("resources/ic_action_call_mdpi.png") + ImageResource call(); - @Source("resources/ic_action_camera_mdpi.png") - ImageResource camera(); + @Source("resources/ic_action_camera_mdpi.png") + ImageResource camera(); - @Source("resources/ic_action_cancel_mdpi.png") - ImageResource cancel(); + @Source("resources/ic_action_cancel_mdpi.png") + ImageResource cancel(); - @Source("resources/ic_action_cast_mdpi.png") - ImageResource cast(); + @Source("resources/ic_action_cast_mdpi.png") + ImageResource cast(); - @Source("resources/ic_action_cc_bcc_mdpi.png") - ImageResource ccBcc(); + @Source("resources/ic_action_cc_bcc_mdpi.png") + ImageResource ccBcc(); - @Source("resources/ic_action_chat_mdpi.png") - ImageResource chat(); + @Source("resources/ic_action_chat_mdpi.png") + ImageResource chat(); - @Source("resources/ic_action_cloud_mdpi.png") - ImageResource cloud(); + @Source("resources/ic_action_cloud_mdpi.png") + ImageResource cloud(); - @Source("resources/ic_action_collapse_mdpi.png") - ImageResource collapse(); + @Source("resources/ic_action_collapse_mdpi.png") + ImageResource collapse(); - @Source("resources/ic_action_collection_mdpi.png") - ImageResource collection(); + @Source("resources/ic_action_collection_mdpi.png") + ImageResource collection(); - @Source("resources/ic_action_computer_mdpi.png") - ImageResource computer(); + @Source("resources/ic_action_computer_mdpi.png") + ImageResource computer(); - @Source("resources/ic_action_copy_mdpi.png") - ImageResource copy(); + @Source("resources/ic_action_copy_mdpi.png") + ImageResource copy(); - @Source("resources/ic_action_crop_mdpi.png") - ImageResource crop(); + @Source("resources/ic_action_crop_mdpi.png") + ImageResource crop(); - @Source("resources/ic_action_cut_mdpi.png") - ImageResource cut(); + @Source("resources/ic_action_cut_mdpi.png") + ImageResource cut(); - @Source("resources/ic_action_data_usage_mdpi.png") - ImageResource dataUsage(); + @Source("resources/ic_action_data_usage_mdpi.png") + ImageResource dataUsage(); - @Source("resources/ic_action_dial_pad_mdpi.png") - ImageResource dialPad(); + @Source("resources/ic_action_dial_pad_mdpi.png") + ImageResource dialPad(); - @Source("resources/ic_action_directions_mdpi.png") - ImageResource directions(); + @Source("resources/ic_action_directions_mdpi.png") + ImageResource directions(); - @Source("resources/ic_action_discard_mdpi.png") - ImageResource discard(); + @Source("resources/ic_action_discard_mdpi.png") + ImageResource discard(); - @Source("resources/ic_action_dock_mdpi.png") - ImageResource dock(); + @Source("resources/ic_action_dock_mdpi.png") + ImageResource dock(); - @Source("resources/ic_action_download_mdpi.png") - ImageResource download(); + @Source("resources/ic_action_download_mdpi.png") + ImageResource download(); - @Source("resources/ic_action_edit_mdpi.png") - ImageResource edit(); + @Source("resources/ic_action_edit_mdpi.png") + ImageResource edit(); - @Source("resources/ic_action_email_mdpi.png") - ImageResource email(); + @Source("resources/ic_action_email_mdpi.png") + ImageResource email(); - @Source("resources/ic_action_end_call_mdpi.png") - ImageResource endCall(); + @Source("resources/ic_action_end_call_mdpi.png") + ImageResource endCall(); - @Source("resources/ic_action_error_mdpi.png") - ImageResource error(); + @Source("resources/ic_action_error_mdpi.png") + ImageResource error(); - @Source("resources/ic_action_event_mdpi.png") - ImageResource event(); + @Source("resources/ic_action_event_mdpi.png") + ImageResource event(); - @Source("resources/ic_action_expand_mdpi.png") - ImageResource expand(); + @Source("resources/ic_action_expand_mdpi.png") + ImageResource expand(); - @Source("resources/ic_action_fast_forward_mdpi.png") - ImageResource fastForward(); + @Source("resources/ic_action_fast_forward_mdpi.png") + ImageResource fastForward(); - @Source("resources/ic_action_favorite_mdpi.png") - ImageResource favorite(); + @Source("resources/ic_action_favorite_mdpi.png") + ImageResource favorite(); - @Source("resources/ic_action_flash_automatic_mdpi.png") - ImageResource flashAutomatic(); + @Source("resources/ic_action_flash_automatic_mdpi.png") + ImageResource flashAutomatic(); - @Source("resources/ic_action_flash_off_mdpi.png") - ImageResource flashOff(); + @Source("resources/ic_action_flash_off_mdpi.png") + ImageResource flashOff(); - @Source("resources/ic_action_flash_on_mdpi.png") - ImageResource flashOn(); + @Source("resources/ic_action_flash_on_mdpi.png") + ImageResource flashOn(); - @Source("resources/ic_action_forward_mdpi.png") - ImageResource forward(); + @Source("resources/ic_action_forward_mdpi.png") + ImageResource forward(); - @Source("resources/ic_action_full_screen_mdpi.png") - ImageResource fullScreen(); + @Source("resources/ic_action_full_screen_mdpi.png") + ImageResource fullScreen(); - @Source("resources/ic_action_gamepad_mdpi.png") - ImageResource gamepad(); + @Source("resources/ic_action_gamepad_mdpi.png") + ImageResource gamepad(); - @Source("resources/ic_action_go_to_today_mdpi.png") - ImageResource goToToday(); + @Source("resources/ic_action_go_to_today_mdpi.png") + ImageResource goToToday(); - @Source("resources/ic_action_good_mdpi.png") - ImageResource good(); + @Source("resources/ic_action_good_mdpi.png") + ImageResource good(); - @Source("resources/ic_action_group_mdpi.png") - ImageResource group(); + @Source("resources/ic_action_group_mdpi.png") + ImageResource group(); - @Source("resources/ic_action_half_important_mdpi.png") - ImageResource halfImportant(); + @Source("resources/ic_action_half_important_mdpi.png") + ImageResource halfImportant(); - @Source("resources/ic_action_headphones_mdpi.png") - ImageResource headphones(); + @Source("resources/ic_action_headphones_mdpi.png") + ImageResource headphones(); - @Source("resources/ic_action_headset_mdpi.png") - ImageResource headset(); + @Source("resources/ic_action_headset_mdpi.png") + ImageResource headset(); - @Source("resources/ic_action_help_mdpi.png") - ImageResource help(); + @Source("resources/ic_action_help_mdpi.png") + ImageResource help(); - @Source("resources/ic_action_import_export_mdpi.png") - ImageResource importExport(); + @Source("resources/ic_action_import_export_mdpi.png") + ImageResource importExport(); - @Source("resources/ic_action_important_mdpi.png") - ImageResource important(); + @Source("resources/ic_action_important_mdpi.png") + ImageResource important(); - @Source("resources/ic_action_keyboard_mdpi.png") - ImageResource keyboard(); + @Source("resources/ic_action_keyboard_mdpi.png") + ImageResource keyboard(); - @Source("resources/ic_action_labels_mdpi.png") - ImageResource labels(); + @Source("resources/ic_action_labels_mdpi.png") + ImageResource labels(); - @Source("resources/ic_action_location_found_mdpi.png") - ImageResource locationFound(); + @Source("resources/ic_action_location_found_mdpi.png") + ImageResource locationFound(); - @Source("resources/ic_action_location_off_mdpi.png") - ImageResource locationOff(); + @Source("resources/ic_action_location_off_mdpi.png") + ImageResource locationOff(); - @Source("resources/ic_action_location_searching_mdpi.png") - ImageResource locationSearching(); + @Source("resources/ic_action_location_searching_mdpi.png") + ImageResource locationSearching(); - @Source("resources/ic_action_make_available_offline_mdpi.png") - ImageResource makeAvailableOffline(); + @Source("resources/ic_action_make_available_offline_mdpi.png") + ImageResource makeAvailableOffline(); - @Source("resources/ic_action_map_mdpi.png") - ImageResource map(); + @Source("resources/ic_action_map_mdpi.png") + ImageResource map(); - @Source("resources/ic_action_merge_mdpi.png") - ImageResource merge(); + @Source("resources/ic_action_merge_mdpi.png") + ImageResource merge(); - @Source("resources/ic_action_mic_mdpi.png") - ImageResource mic(); + @Source("resources/ic_action_mic_mdpi.png") + ImageResource mic(); - @Source("resources/ic_action_mic_muted_mdpi.png") - ImageResource micMuted(); + @Source("resources/ic_action_mic_muted_mdpi.png") + ImageResource micMuted(); - @Source("resources/ic_action_mouse_mdpi.png") - ImageResource mouse(); + @Source("resources/ic_action_mouse_mdpi.png") + ImageResource mouse(); - @Source("resources/ic_action_network_cell_mdpi.png") - ImageResource networkCell(); + @Source("resources/ic_action_network_cell_mdpi.png") + ImageResource networkCell(); - @Source("resources/ic_action_network_wifi_mdpi.png") - ImageResource networkWifi(); + @Source("resources/ic_action_network_wifi_mdpi.png") + ImageResource networkWifi(); - @Source("resources/ic_action_new_account_mdpi.png") - ImageResource newAccount(); + @Source("resources/ic_action_new_account_mdpi.png") + ImageResource newAccount(); - @Source("resources/ic_action_new_attachment_mdpi.png") - ImageResource newAttachment(); + @Source("resources/ic_action_new_attachment_mdpi.png") + ImageResource newAttachment(); - @Source("resources/ic_action_new_email_mdpi.png") - ImageResource newEmail(); + @Source("resources/ic_action_new_email_mdpi.png") + ImageResource newEmail(); - @Source("resources/ic_action_new_event_mdpi.png") - ImageResource newEvent(); + @Source("resources/ic_action_new_event_mdpi.png") + ImageResource newEvent(); - @Source("resources/ic_action_new_label_mdpi.png") - ImageResource newLabel(); + @Source("resources/ic_action_new_label_mdpi.png") + ImageResource newLabel(); - @Source("resources/ic_action_new_mdpi.png") - ImageResource newItem(); + @Source("resources/ic_action_new_mdpi.png") + ImageResource newItem(); - @Source("resources/ic_action_new_picture_mdpi.png") - ImageResource newPicture(); + @Source("resources/ic_action_new_picture_mdpi.png") + ImageResource newPicture(); - @Source("resources/ic_action_next_item_mdpi.png") - ImageResource nextItem(); + @Source("resources/ic_action_next_item_mdpi.png") + ImageResource nextItem(); - @Source("resources/ic_action_next_mdpi.png") - ImageResource next(); + @Source("resources/ic_action_next_mdpi.png") + ImageResource next(); - @Source("resources/ic_action_not_important_mdpi.png") - ImageResource notImportant(); + @Source("resources/ic_action_not_important_mdpi.png") + ImageResource notImportant(); - @Source("resources/ic_action_not_secure_mdpi.png") - ImageResource notSecure(); + @Source("resources/ic_action_not_secure_mdpi.png") + ImageResource notSecure(); - @Source("resources/ic_action_overflow_mdpi.png") - ImageResource overflow(); + @Source("resources/ic_action_overflow_mdpi.png") + ImageResource overflow(); - @Source("resources/ic_action_paste_mdpi.png") - ImageResource paste(); + @Source("resources/ic_action_paste_mdpi.png") + ImageResource paste(); - @Source("resources/ic_action_pause_mdpi.png") - ImageResource pause(); + @Source("resources/ic_action_pause_mdpi.png") + ImageResource pause(); - @Source("resources/ic_action_pause_over_video_mdpi.png") - ImageResource pauseOverVideo(); + @Source("resources/ic_action_pause_over_video_mdpi.png") + ImageResource pauseOverVideo(); - @Source("resources/ic_action_person_mdpi.png") - ImageResource person(); + @Source("resources/ic_action_person_mdpi.png") + ImageResource person(); - @Source("resources/ic_action_phone_mdpi.png") - ImageResource phone(); + @Source("resources/ic_action_phone_mdpi.png") + ImageResource phone(); - @Source("resources/ic_action_picture_mdpi.png") - ImageResource picture(); + @Source("resources/ic_action_picture_mdpi.png") + ImageResource picture(); - @Source("resources/ic_action_place_mdpi.png") - ImageResource place(); + @Source("resources/ic_action_place_mdpi.png") + ImageResource place(); - @Source("resources/ic_action_play_mdpi.png") - ImageResource play(); + @Source("resources/ic_action_play_mdpi.png") + ImageResource play(); - @Source("resources/ic_action_play_over_video_mdpi.png") - ImageResource playOverVideo(); + @Source("resources/ic_action_play_over_video_mdpi.png") + ImageResource playOverVideo(); - @Source("resources/ic_action_previous_item_mdpi.png") - ImageResource previousItem(); + @Source("resources/ic_action_previous_item_mdpi.png") + ImageResource previousItem(); - @Source("resources/ic_action_previous_mdpi.png") - ImageResource previous(); + @Source("resources/ic_action_previous_mdpi.png") + ImageResource previous(); - @Source("resources/ic_action_read_mdpi.png") - ImageResource read(); + @Source("resources/ic_action_print_mdpi.png") + ImageResource print(); - @Source("resources/ic_action_refresh_mdpi.png") - ImageResource refresh(); + @Source("resources/ic_action_read_mdpi.png") + ImageResource read(); - @Source("resources/ic_action_remove_mdpi.png") - ImageResource remove(); + @Source("resources/ic_action_refresh_mdpi.png") + ImageResource refresh(); - @Source("resources/ic_action_repeat_mdpi.png") - ImageResource repeat(); + @Source("resources/ic_action_remove_mdpi.png") + ImageResource remove(); - @Source("resources/ic_action_replay_mdpi.png") - ImageResource replay(); + @Source("resources/ic_action_repeat_mdpi.png") + ImageResource repeat(); - @Source("resources/ic_action_reply_all_mdpi.png") - ImageResource replyAll(); + @Source("resources/ic_action_replay_mdpi.png") + ImageResource replay(); - @Source("resources/ic_action_reply_mdpi.png") - ImageResource reply(); + @Source("resources/ic_action_reply_all_mdpi.png") + ImageResource replyAll(); - @Source("resources/ic_action_return_from_full_screen_mdpi.png") - ImageResource returnFromFullScreen(); + @Source("resources/ic_action_reply_mdpi.png") + ImageResource reply(); - @Source("resources/ic_action_rewind_mdpi.png") - ImageResource rewind(); + @Source("resources/ic_action_return_from_full_screen_mdpi.png") + ImageResource returnFromFullScreen(); - @Source("resources/ic_action_ring_volume_mdpi.png") - ImageResource ringVolume(); + @Source("resources/ic_action_rewind_mdpi.png") + ImageResource rewind(); - @Source("resources/ic_action_rotate_left_mdpi.png") - ImageResource rotateLeft(); + @Source("resources/ic_action_ring_volume_mdpi.png") + ImageResource ringVolume(); - @Source("resources/ic_action_rotate_right_mdpi.png") - ImageResource rotateRight(); + @Source("resources/ic_action_rotate_left_mdpi.png") + ImageResource rotateLeft(); - @Source("resources/ic_action_save_mdpi.png") - ImageResource save(); + @Source("resources/ic_action_rotate_right_mdpi.png") + ImageResource rotateRight(); - @Source("resources/ic_action_screen_locked_to_landscape_mdpi.png") - ImageResource screenLockedToLandscape(); + @Source("resources/ic_action_save_mdpi.png") + ImageResource save(); - @Source("resources/ic_action_screen_locked_to_portrait_mdpi.png") - ImageResource screenLockedToPortrait(); + @Source("resources/ic_action_screen_locked_to_landscape_mdpi.png") + ImageResource screenLockedToLandscape(); - @Source("resources/ic_action_screen_rotation_mdpi.png") - ImageResource screenRotation(); + @Source("resources/ic_action_screen_locked_to_portrait_mdpi.png") + ImageResource screenLockedToPortrait(); - @Source("resources/ic_action_sd_storage_mdpi.png") - ImageResource sdStorage(); + @Source("resources/ic_action_screen_rotation_mdpi.png") + ImageResource screenRotation(); - @Source("resources/ic_action_search_mdpi.png") - ImageResource search(); + @Source("resources/ic_action_sd_storage_mdpi.png") + ImageResource sdStorage(); - @Source("resources/ic_action_secure_mdpi.png") - ImageResource secure(); + @Source("resources/ic_action_search_mdpi.png") + ImageResource search(); - @Source("resources/ic_action_select_all_mdpi.png") - ImageResource selectAll(); + @Source("resources/ic_action_secure_mdpi.png") + ImageResource secure(); - @Source("resources/ic_action_send_now_mdpi.png") - ImageResource sendNow(); + @Source("resources/ic_action_select_all_mdpi.png") + ImageResource selectAll(); - @Source("resources/ic_action_settings_mdpi.png") - ImageResource settings(); + @Source("resources/ic_action_send_now_mdpi.png") + ImageResource sendNow(); - @Source("resources/ic_action_share_mdpi.png") - ImageResource share(); + @Source("resources/ic_action_settings_mdpi.png") + ImageResource settings(); - @Source("resources/ic_action_shuffle_mdpi.png") - ImageResource shuffle(); + @Source("resources/ic_action_share_mdpi.png") + ImageResource share(); - @Source("resources/ic_action_slideshow_mdpi.png") - ImageResource slideshow(); + @Source("resources/ic_action_shuffle_mdpi.png") + ImageResource shuffle(); - @Source("resources/ic_action_sort_by_size_mdpi.png") - ImageResource sortBySize(); + @Source("resources/ic_action_slideshow_mdpi.png") + ImageResource slideshow(); - @Source("resources/ic_action_split_mdpi.png") - ImageResource split(); + @Source("resources/ic_action_sort_by_size_mdpi.png") + ImageResource sortBySize(); - @Source("resources/ic_action_stop_mdpi.png") - ImageResource stop(); + @Source("resources/ic_action_split_mdpi.png") + ImageResource split(); - @Source("resources/ic_action_storage_mdpi.png") - ImageResource storage(); + @Source("resources/ic_action_stop_mdpi.png") + ImageResource stop(); - @Source("resources/ic_action_switch_camera_mdpi.png") - ImageResource switchCamera(); + @Source("resources/ic_action_storage_mdpi.png") + ImageResource storage(); - @Source("resources/ic_action_switch_video_mdpi.png") - ImageResource switchVideo(); + @Source("resources/ic_action_switch_camera_mdpi.png") + ImageResource switchCamera(); - @Source("resources/ic_action_time_mdpi.png") - ImageResource time(); + @Source("resources/ic_action_switch_video_mdpi.png") + ImageResource switchVideo(); - @Source("resources/ic_action_undo_mdpi.png") - ImageResource undo(); + @Source("resources/ic_action_time_mdpi.png") + ImageResource time(); - @Source("resources/ic_action_unread_mdpi.png") - ImageResource unread(); + @Source("resources/ic_action_undo_mdpi.png") + ImageResource undo(); - @Source("resources/ic_action_upload_mdpi.png") - ImageResource upload(); + @Source("resources/ic_action_unread_mdpi.png") + ImageResource unread(); - @Source("resources/ic_action_usb_mdpi.png") - ImageResource usb(); + @Source("resources/ic_action_upload_mdpi.png") + ImageResource upload(); - @Source("resources/ic_action_video_mdpi.png") - ImageResource video(); + @Source("resources/ic_action_usb_mdpi.png") + ImageResource usb(); - @Source("resources/ic_action_view_as_grid_mdpi.png") - ImageResource viewAsGrid(); + @Source("resources/ic_action_video_mdpi.png") + ImageResource video(); - @Source("resources/ic_action_view_as_list_mdpi.png") - ImageResource viewAsList(); + @Source("resources/ic_action_view_as_grid_mdpi.png") + ImageResource viewAsGrid(); - @Source("resources/ic_action_volume_muted_mdpi.png") - ImageResource volumeMuted(); + @Source("resources/ic_action_view_as_list_mdpi.png") + ImageResource viewAsList(); - @Source("resources/ic_action_volume_on_mdpi.png") - ImageResource volumeOn(); + @Source("resources/ic_action_volume_muted_mdpi.png") + ImageResource volumeMuted(); - @Source("resources/ic_action_warning_mdpi.png") - ImageResource warning(); + @Source("resources/ic_action_volume_on_mdpi.png") + ImageResource volumeOn(); - @Source("resources/ic_action_web_site_mdpi.png") - ImageResource webSite(); + @Source("resources/ic_action_warning_mdpi.png") + ImageResource warning(); + @Source("resources/ic_action_web_site_mdpi.png") + ImageResource webSite(); - } + } - @Override - public Images get() { - return Resources.INSTANCE; - } + @Override + public Images get() { + return Resources.INSTANCE; + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultHighAppearance.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultHighAppearance.java index d1a5d5092..04bd72401 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultHighAppearance.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultHighAppearance.java @@ -18,448 +18,449 @@ import com.google.gwt.core.shared.GWT; import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.ImageResource; - import com.googlecode.mgwt.ui.client.widget.image.ImageHolder.ImageHolderAppearance; public class ImageHolderDefaultHighAppearance implements ImageHolderAppearance { - interface Resources extends ClientBundle, Images { + interface Resources extends ClientBundle, Images { - Resources INSTANCE = GWT.create(Resources.class); + Resources INSTANCE = GWT.create(Resources.class); - @Source("resources/ic_action_about_hdpi.png") - ImageResource about(); + @Source("resources/ic_action_about_hdpi.png") + ImageResource about(); - @Source("resources/ic_action_accept_hdpi.png") - ImageResource accept(); + @Source("resources/ic_action_accept_hdpi.png") + ImageResource accept(); - @Source("resources/ic_action_accounts_hdpi.png") - ImageResource accounts(); + @Source("resources/ic_action_accounts_hdpi.png") + ImageResource accounts(); - @Source("resources/ic_action_add_alarm_hdpi.png") - ImageResource addAlarm(); + @Source("resources/ic_action_add_alarm_hdpi.png") + ImageResource addAlarm(); - @Source("resources/ic_action_add_group_hdpi.png") - ImageResource addGroup(); + @Source("resources/ic_action_add_group_hdpi.png") + ImageResource addGroup(); - @Source("resources/ic_action_add_person_hdpi.png") - ImageResource addPerson(); + @Source("resources/ic_action_add_person_hdpi.png") + ImageResource addPerson(); - @Source("resources/ic_action_add_to_queue_hdpi.png") - ImageResource addToQueue(); + @Source("resources/ic_action_add_to_queue_hdpi.png") + ImageResource addToQueue(); - @Source("resources/ic_action_airplane_mode_off_hdpi.png") - ImageResource airplaneModeOff(); + @Source("resources/ic_action_airplane_mode_off_hdpi.png") + ImageResource airplaneModeOff(); - @Source("resources/ic_action_airplane_mode_on_hdpi.png") - ImageResource airplaneModeOn(); + @Source("resources/ic_action_airplane_mode_on_hdpi.png") + ImageResource airplaneModeOn(); - @Source("resources/ic_action_alarms_hdpi.png") - ImageResource alarms(); + @Source("resources/ic_action_alarms_hdpi.png") + ImageResource alarms(); - @Source("resources/ic_action_attachment_hdpi.png") - ImageResource attachment(); + @Source("resources/ic_action_attachment_hdpi.png") + ImageResource attachment(); - @Source("resources/ic_action_back_hdpi.png") - ImageResource back(); + @Source("resources/ic_action_back_hdpi.png") + ImageResource back(); - @Source("resources/ic_action_backspace_hdpi.png") - ImageResource backspace(); + @Source("resources/ic_action_backspace_hdpi.png") + ImageResource backspace(); - @Source("resources/ic_action_bad_hdpi.png") - ImageResource bad(); + @Source("resources/ic_action_bad_hdpi.png") + ImageResource bad(); - @Source("resources/ic_action_battery_hdpi.png") - ImageResource battery(); + @Source("resources/ic_action_battery_hdpi.png") + ImageResource battery(); - @Source("resources/ic_action_bightness_low_hdpi.png") - ImageResource bightnessLow(); + @Source("resources/ic_action_bightness_low_hdpi.png") + ImageResource bightnessLow(); - @Source("resources/ic_action_bluetooth_connected_hdpi.png") - ImageResource bluetoothConnected(); + @Source("resources/ic_action_bluetooth_connected_hdpi.png") + ImageResource bluetoothConnected(); - @Source("resources/ic_action_bluetooth_hdpi.png") - ImageResource bluetooth(); + @Source("resources/ic_action_bluetooth_hdpi.png") + ImageResource bluetooth(); - @Source("resources/ic_action_bluetooth_searching_hdpi.png") - ImageResource bluetoothSearching(); + @Source("resources/ic_action_bluetooth_searching_hdpi.png") + ImageResource bluetoothSearching(); - @Source("resources/ic_action_brightness_auto_hdpi.png") - ImageResource brightnessAuto(); + @Source("resources/ic_action_brightness_auto_hdpi.png") + ImageResource brightnessAuto(); - @Source("resources/ic_action_brightness_high_hdpi.png") - ImageResource brightnessHigh(); + @Source("resources/ic_action_brightness_high_hdpi.png") + ImageResource brightnessHigh(); - @Source("resources/ic_action_brightness_medium_hdpi.png") - ImageResource brightnessMedium(); + @Source("resources/ic_action_brightness_medium_hdpi.png") + ImageResource brightnessMedium(); - @Source("resources/ic_action_call_hdpi.png") - ImageResource call(); + @Source("resources/ic_action_call_hdpi.png") + ImageResource call(); - @Source("resources/ic_action_camera_hdpi.png") - ImageResource camera(); + @Source("resources/ic_action_camera_hdpi.png") + ImageResource camera(); - @Source("resources/ic_action_cancel_hdpi.png") - ImageResource cancel(); + @Source("resources/ic_action_cancel_hdpi.png") + ImageResource cancel(); - @Source("resources/ic_action_cast_hdpi.png") - ImageResource cast(); + @Source("resources/ic_action_cast_hdpi.png") + ImageResource cast(); - @Source("resources/ic_action_cc_bcc_hdpi.png") - ImageResource ccBcc(); + @Source("resources/ic_action_cc_bcc_hdpi.png") + ImageResource ccBcc(); - @Source("resources/ic_action_chat_hdpi.png") - ImageResource chat(); + @Source("resources/ic_action_chat_hdpi.png") + ImageResource chat(); - @Source("resources/ic_action_cloud_hdpi.png") - ImageResource cloud(); + @Source("resources/ic_action_cloud_hdpi.png") + ImageResource cloud(); - @Source("resources/ic_action_collapse_hdpi.png") - ImageResource collapse(); + @Source("resources/ic_action_collapse_hdpi.png") + ImageResource collapse(); - @Source("resources/ic_action_collection_hdpi.png") - ImageResource collection(); + @Source("resources/ic_action_collection_hdpi.png") + ImageResource collection(); - @Source("resources/ic_action_computer_hdpi.png") - ImageResource computer(); + @Source("resources/ic_action_computer_hdpi.png") + ImageResource computer(); - @Source("resources/ic_action_copy_hdpi.png") - ImageResource copy(); + @Source("resources/ic_action_copy_hdpi.png") + ImageResource copy(); - @Source("resources/ic_action_crop_hdpi.png") - ImageResource crop(); + @Source("resources/ic_action_crop_hdpi.png") + ImageResource crop(); - @Source("resources/ic_action_cut_hdpi.png") - ImageResource cut(); + @Source("resources/ic_action_cut_hdpi.png") + ImageResource cut(); - @Source("resources/ic_action_data_usage_hdpi.png") - ImageResource dataUsage(); + @Source("resources/ic_action_data_usage_hdpi.png") + ImageResource dataUsage(); - @Source("resources/ic_action_dial_pad_hdpi.png") - ImageResource dialPad(); + @Source("resources/ic_action_dial_pad_hdpi.png") + ImageResource dialPad(); - @Source("resources/ic_action_directions_hdpi.png") - ImageResource directions(); + @Source("resources/ic_action_directions_hdpi.png") + ImageResource directions(); - @Source("resources/ic_action_discard_hdpi.png") - ImageResource discard(); + @Source("resources/ic_action_discard_hdpi.png") + ImageResource discard(); - @Source("resources/ic_action_dock_hdpi.png") - ImageResource dock(); + @Source("resources/ic_action_dock_hdpi.png") + ImageResource dock(); - @Source("resources/ic_action_download_hdpi.png") - ImageResource download(); + @Source("resources/ic_action_download_hdpi.png") + ImageResource download(); - @Source("resources/ic_action_edit_hdpi.png") - ImageResource edit(); + @Source("resources/ic_action_edit_hdpi.png") + ImageResource edit(); - @Source("resources/ic_action_email_hdpi.png") - ImageResource email(); + @Source("resources/ic_action_email_hdpi.png") + ImageResource email(); - @Source("resources/ic_action_end_call_hdpi.png") - ImageResource endCall(); + @Source("resources/ic_action_end_call_hdpi.png") + ImageResource endCall(); - @Source("resources/ic_action_error_hdpi.png") - ImageResource error(); + @Source("resources/ic_action_error_hdpi.png") + ImageResource error(); - @Source("resources/ic_action_event_hdpi.png") - ImageResource event(); + @Source("resources/ic_action_event_hdpi.png") + ImageResource event(); - @Source("resources/ic_action_expand_hdpi.png") - ImageResource expand(); + @Source("resources/ic_action_expand_hdpi.png") + ImageResource expand(); - @Source("resources/ic_action_fast_forward_hdpi.png") - ImageResource fastForward(); + @Source("resources/ic_action_fast_forward_hdpi.png") + ImageResource fastForward(); - @Source("resources/ic_action_favorite_hdpi.png") - ImageResource favorite(); + @Source("resources/ic_action_favorite_hdpi.png") + ImageResource favorite(); - @Source("resources/ic_action_flash_automatic_hdpi.png") - ImageResource flashAutomatic(); + @Source("resources/ic_action_flash_automatic_hdpi.png") + ImageResource flashAutomatic(); - @Source("resources/ic_action_flash_off_hdpi.png") - ImageResource flashOff(); + @Source("resources/ic_action_flash_off_hdpi.png") + ImageResource flashOff(); - @Source("resources/ic_action_flash_on_hdpi.png") - ImageResource flashOn(); + @Source("resources/ic_action_flash_on_hdpi.png") + ImageResource flashOn(); - @Source("resources/ic_action_forward_hdpi.png") - ImageResource forward(); + @Source("resources/ic_action_forward_hdpi.png") + ImageResource forward(); - @Source("resources/ic_action_full_screen_hdpi.png") - ImageResource fullScreen(); + @Source("resources/ic_action_full_screen_hdpi.png") + ImageResource fullScreen(); - @Source("resources/ic_action_gamepad_hdpi.png") - ImageResource gamepad(); + @Source("resources/ic_action_gamepad_hdpi.png") + ImageResource gamepad(); - @Source("resources/ic_action_go_to_today_hdpi.png") - ImageResource goToToday(); + @Source("resources/ic_action_go_to_today_hdpi.png") + ImageResource goToToday(); - @Source("resources/ic_action_good_hdpi.png") - ImageResource good(); + @Source("resources/ic_action_good_hdpi.png") + ImageResource good(); - @Source("resources/ic_action_group_hdpi.png") - ImageResource group(); + @Source("resources/ic_action_group_hdpi.png") + ImageResource group(); - @Source("resources/ic_action_half_important_hdpi.png") - ImageResource halfImportant(); + @Source("resources/ic_action_half_important_hdpi.png") + ImageResource halfImportant(); - @Source("resources/ic_action_headphones_hdpi.png") - ImageResource headphones(); + @Source("resources/ic_action_headphones_hdpi.png") + ImageResource headphones(); - @Source("resources/ic_action_headset_hdpi.png") - ImageResource headset(); + @Source("resources/ic_action_headset_hdpi.png") + ImageResource headset(); - @Source("resources/ic_action_help_hdpi.png") - ImageResource help(); + @Source("resources/ic_action_help_hdpi.png") + ImageResource help(); - @Source("resources/ic_action_import_export_hdpi.png") - ImageResource importExport(); + @Source("resources/ic_action_import_export_hdpi.png") + ImageResource importExport(); - @Source("resources/ic_action_important_hdpi.png") - ImageResource important(); + @Source("resources/ic_action_important_hdpi.png") + ImageResource important(); - @Source("resources/ic_action_keyboard_hdpi.png") - ImageResource keyboard(); + @Source("resources/ic_action_keyboard_hdpi.png") + ImageResource keyboard(); - @Source("resources/ic_action_labels_hdpi.png") - ImageResource labels(); + @Source("resources/ic_action_labels_hdpi.png") + ImageResource labels(); - @Source("resources/ic_action_location_found_hdpi.png") - ImageResource locationFound(); + @Source("resources/ic_action_location_found_hdpi.png") + ImageResource locationFound(); - @Source("resources/ic_action_location_off_hdpi.png") - ImageResource locationOff(); + @Source("resources/ic_action_location_off_hdpi.png") + ImageResource locationOff(); - @Source("resources/ic_action_location_searching_hdpi.png") - ImageResource locationSearching(); + @Source("resources/ic_action_location_searching_hdpi.png") + ImageResource locationSearching(); - @Source("resources/ic_action_make_available_offline_hdpi.png") - ImageResource makeAvailableOffline(); + @Source("resources/ic_action_make_available_offline_hdpi.png") + ImageResource makeAvailableOffline(); - @Source("resources/ic_action_map_hdpi.png") - ImageResource map(); + @Source("resources/ic_action_map_hdpi.png") + ImageResource map(); - @Source("resources/ic_action_merge_hdpi.png") - ImageResource merge(); + @Source("resources/ic_action_merge_hdpi.png") + ImageResource merge(); - @Source("resources/ic_action_mic_hdpi.png") - ImageResource mic(); + @Source("resources/ic_action_mic_hdpi.png") + ImageResource mic(); - @Source("resources/ic_action_mic_muted_hdpi.png") - ImageResource micMuted(); + @Source("resources/ic_action_mic_muted_hdpi.png") + ImageResource micMuted(); - @Source("resources/ic_action_mouse_hdpi.png") - ImageResource mouse(); + @Source("resources/ic_action_mouse_hdpi.png") + ImageResource mouse(); - @Source("resources/ic_action_network_cell_hdpi.png") - ImageResource networkCell(); + @Source("resources/ic_action_network_cell_hdpi.png") + ImageResource networkCell(); - @Source("resources/ic_action_network_wifi_hdpi.png") - ImageResource networkWifi(); + @Source("resources/ic_action_network_wifi_hdpi.png") + ImageResource networkWifi(); - @Source("resources/ic_action_new_account_hdpi.png") - ImageResource newAccount(); + @Source("resources/ic_action_new_account_hdpi.png") + ImageResource newAccount(); - @Source("resources/ic_action_new_attachment_hdpi.png") - ImageResource newAttachment(); + @Source("resources/ic_action_new_attachment_hdpi.png") + ImageResource newAttachment(); - @Source("resources/ic_action_new_email_hdpi.png") - ImageResource newEmail(); + @Source("resources/ic_action_new_email_hdpi.png") + ImageResource newEmail(); - @Source("resources/ic_action_new_event_hdpi.png") - ImageResource newEvent(); + @Source("resources/ic_action_new_event_hdpi.png") + ImageResource newEvent(); - @Source("resources/ic_action_new_hdpi.png") - ImageResource newItem(); + @Source("resources/ic_action_new_hdpi.png") + ImageResource newItem(); - @Source("resources/ic_action_new_label_hdpi.png") - ImageResource newLabel(); + @Source("resources/ic_action_new_label_hdpi.png") + ImageResource newLabel(); - @Source("resources/ic_action_new_picture_hdpi.png") - ImageResource newPicture(); + @Source("resources/ic_action_new_picture_hdpi.png") + ImageResource newPicture(); - @Source("resources/ic_action_next_hdpi.png") - ImageResource next(); + @Source("resources/ic_action_next_hdpi.png") + ImageResource next(); - @Source("resources/ic_action_next_item_hdpi.png") - ImageResource nextItem(); + @Source("resources/ic_action_next_item_hdpi.png") + ImageResource nextItem(); - @Source("resources/ic_action_not_important_hdpi.png") - ImageResource notImportant(); + @Source("resources/ic_action_not_important_hdpi.png") + ImageResource notImportant(); - @Source("resources/ic_action_not_secure_hdpi.png") - ImageResource notSecure(); + @Source("resources/ic_action_not_secure_hdpi.png") + ImageResource notSecure(); - @Source("resources/ic_action_overflow_hdpi.png") - ImageResource overflow(); + @Source("resources/ic_action_overflow_hdpi.png") + ImageResource overflow(); - @Source("resources/ic_action_paste_hdpi.png") - ImageResource paste(); + @Source("resources/ic_action_paste_hdpi.png") + ImageResource paste(); - @Source("resources/ic_action_pause_hdpi.png") - ImageResource pause(); + @Source("resources/ic_action_pause_hdpi.png") + ImageResource pause(); - @Source("resources/ic_action_pause_over_video_hdpi.png") - ImageResource pauseOverVideo(); + @Source("resources/ic_action_pause_over_video_hdpi.png") + ImageResource pauseOverVideo(); - @Source("resources/ic_action_person_hdpi.png") - ImageResource person(); + @Source("resources/ic_action_person_hdpi.png") + ImageResource person(); - @Source("resources/ic_action_phone_hdpi.png") - ImageResource phone(); + @Source("resources/ic_action_phone_hdpi.png") + ImageResource phone(); - @Source("resources/ic_action_picture_hdpi.png") - ImageResource picture(); + @Source("resources/ic_action_picture_hdpi.png") + ImageResource picture(); - @Source("resources/ic_action_place_hdpi.png") - ImageResource place(); + @Source("resources/ic_action_place_hdpi.png") + ImageResource place(); - @Source("resources/ic_action_play_hdpi.png") - ImageResource play(); + @Source("resources/ic_action_play_hdpi.png") + ImageResource play(); - @Source("resources/ic_action_play_over_video_hdpi.png") - ImageResource playOverVideo(); + @Source("resources/ic_action_play_over_video_hdpi.png") + ImageResource playOverVideo(); - @Source("resources/ic_action_previous_hdpi.png") - ImageResource previous(); + @Source("resources/ic_action_previous_hdpi.png") + ImageResource previous(); - @Source("resources/ic_action_previous_item_hdpi.png") - ImageResource previousItem(); + @Source("resources/ic_action_previous_item_hdpi.png") + ImageResource previousItem(); - @Source("resources/ic_action_read_hdpi.png") - ImageResource read(); + @Source("resources/ic_action_print_hdpi.png") + ImageResource print(); - @Source("resources/ic_action_refresh_hdpi.png") - ImageResource refresh(); + @Source("resources/ic_action_read_hdpi.png") + ImageResource read(); - @Source("resources/ic_action_remove_hdpi.png") - ImageResource remove(); + @Source("resources/ic_action_refresh_hdpi.png") + ImageResource refresh(); - @Source("resources/ic_action_repeat_hdpi.png") - ImageResource repeat(); + @Source("resources/ic_action_remove_hdpi.png") + ImageResource remove(); - @Source("resources/ic_action_replay_hdpi.png") - ImageResource replay(); + @Source("resources/ic_action_repeat_hdpi.png") + ImageResource repeat(); - @Source("resources/ic_action_reply_all_hdpi.png") - ImageResource replyAll(); + @Source("resources/ic_action_replay_hdpi.png") + ImageResource replay(); - @Source("resources/ic_action_reply_hdpi.png") - ImageResource reply(); + @Source("resources/ic_action_reply_all_hdpi.png") + ImageResource replyAll(); - @Source("resources/ic_action_return_from_full_screen_hdpi.png") - ImageResource returnFromFullScreen(); + @Source("resources/ic_action_reply_hdpi.png") + ImageResource reply(); - @Source("resources/ic_action_rewind_hdpi.png") - ImageResource rewind(); + @Source("resources/ic_action_return_from_full_screen_hdpi.png") + ImageResource returnFromFullScreen(); - @Source("resources/ic_action_ring_volume_hdpi.png") - ImageResource ringVolume(); + @Source("resources/ic_action_rewind_hdpi.png") + ImageResource rewind(); - @Source("resources/ic_action_rotate_left_hdpi.png") - ImageResource rotateLeft(); + @Source("resources/ic_action_ring_volume_hdpi.png") + ImageResource ringVolume(); - @Source("resources/ic_action_rotate_right_hdpi.png") - ImageResource rotateRight(); + @Source("resources/ic_action_rotate_left_hdpi.png") + ImageResource rotateLeft(); - @Source("resources/ic_action_save_hdpi.png") - ImageResource save(); + @Source("resources/ic_action_rotate_right_hdpi.png") + ImageResource rotateRight(); - @Source("resources/ic_action_screen_locked_to_landscape_hdpi.png") - ImageResource screenLockedToLandscape(); + @Source("resources/ic_action_save_hdpi.png") + ImageResource save(); - @Source("resources/ic_action_screen_locked_to_portrait_hdpi.png") - ImageResource screenLockedToPortrait(); + @Source("resources/ic_action_screen_locked_to_landscape_hdpi.png") + ImageResource screenLockedToLandscape(); - @Source("resources/ic_action_screen_rotation_hdpi.png") - ImageResource screenRotation(); + @Source("resources/ic_action_screen_locked_to_portrait_hdpi.png") + ImageResource screenLockedToPortrait(); - @Source("resources/ic_action_sd_storage_hdpi.png") - ImageResource sdStorage(); + @Source("resources/ic_action_screen_rotation_hdpi.png") + ImageResource screenRotation(); - @Source("resources/ic_action_search_hdpi.png") - ImageResource search(); + @Source("resources/ic_action_sd_storage_hdpi.png") + ImageResource sdStorage(); - @Source("resources/ic_action_secure_hdpi.png") - ImageResource secure(); + @Source("resources/ic_action_search_hdpi.png") + ImageResource search(); - @Source("resources/ic_action_select_all_hdpi.png") - ImageResource selectAll(); + @Source("resources/ic_action_secure_hdpi.png") + ImageResource secure(); - @Source("resources/ic_action_send_now_hdpi.png") - ImageResource sendNow(); + @Source("resources/ic_action_select_all_hdpi.png") + ImageResource selectAll(); - @Source("resources/ic_action_settings_hdpi.png") - ImageResource settings(); + @Source("resources/ic_action_send_now_hdpi.png") + ImageResource sendNow(); - @Source("resources/ic_action_share_hdpi.png") - ImageResource share(); + @Source("resources/ic_action_settings_hdpi.png") + ImageResource settings(); - @Source("resources/ic_action_shuffle_hdpi.png") - ImageResource shuffle(); + @Source("resources/ic_action_share_hdpi.png") + ImageResource share(); - @Source("resources/ic_action_slideshow_hdpi.png") - ImageResource slideshow(); + @Source("resources/ic_action_shuffle_hdpi.png") + ImageResource shuffle(); - @Source("resources/ic_action_sort_by_size_hdpi.png") - ImageResource sortBySize(); + @Source("resources/ic_action_slideshow_hdpi.png") + ImageResource slideshow(); - @Source("resources/ic_action_split_hdpi.png") - ImageResource split(); + @Source("resources/ic_action_sort_by_size_hdpi.png") + ImageResource sortBySize(); - @Source("resources/ic_action_stop_hdpi.png") - ImageResource stop(); + @Source("resources/ic_action_split_hdpi.png") + ImageResource split(); - @Source("resources/ic_action_storage_hdpi.png") - ImageResource storage(); + @Source("resources/ic_action_stop_hdpi.png") + ImageResource stop(); - @Source("resources/ic_action_switch_camera_hdpi.png") - ImageResource switchCamera(); + @Source("resources/ic_action_storage_hdpi.png") + ImageResource storage(); - @Source("resources/ic_action_switch_video_hdpi.png") - ImageResource switchVideo(); + @Source("resources/ic_action_switch_camera_hdpi.png") + ImageResource switchCamera(); - @Source("resources/ic_action_time_hdpi.png") - ImageResource time(); + @Source("resources/ic_action_switch_video_hdpi.png") + ImageResource switchVideo(); - @Source("resources/ic_action_undo_hdpi.png") - ImageResource undo(); + @Source("resources/ic_action_time_hdpi.png") + ImageResource time(); - @Source("resources/ic_action_unread_hdpi.png") - ImageResource unread(); + @Source("resources/ic_action_undo_hdpi.png") + ImageResource undo(); - @Source("resources/ic_action_upload_hdpi.png") - ImageResource upload(); + @Source("resources/ic_action_unread_hdpi.png") + ImageResource unread(); - @Source("resources/ic_action_usb_hdpi.png") - ImageResource usb(); + @Source("resources/ic_action_upload_hdpi.png") + ImageResource upload(); - @Source("resources/ic_action_video_hdpi.png") - ImageResource video(); + @Source("resources/ic_action_usb_hdpi.png") + ImageResource usb(); - @Source("resources/ic_action_view_as_grid_hdpi.png") - ImageResource viewAsGrid(); + @Source("resources/ic_action_video_hdpi.png") + ImageResource video(); - @Source("resources/ic_action_view_as_list_hdpi.png") - ImageResource viewAsList(); + @Source("resources/ic_action_view_as_grid_hdpi.png") + ImageResource viewAsGrid(); - @Source("resources/ic_action_volume_muted_hdpi.png") - ImageResource volumeMuted(); + @Source("resources/ic_action_view_as_list_hdpi.png") + ImageResource viewAsList(); - @Source("resources/ic_action_volume_on_hdpi.png") - ImageResource volumeOn(); + @Source("resources/ic_action_volume_muted_hdpi.png") + ImageResource volumeMuted(); - @Source("resources/ic_action_warning_hdpi.png") - ImageResource warning(); + @Source("resources/ic_action_volume_on_hdpi.png") + ImageResource volumeOn(); - @Source("resources/ic_action_web_site_hdpi.png") - ImageResource webSite(); + @Source("resources/ic_action_warning_hdpi.png") + ImageResource warning(); + @Source("resources/ic_action_web_site_hdpi.png") + ImageResource webSite(); - } + } - @Override - public Images get() { - return Resources.INSTANCE; - } + @Override + public Images get() { + return Resources.INSTANCE; + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultXHighAppearance.java b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultXHighAppearance.java index 06632fc05..5d0a05694 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultXHighAppearance.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/ImageHolderDefaultXHighAppearance.java @@ -18,448 +18,449 @@ import com.google.gwt.core.shared.GWT; import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.ImageResource; - import com.googlecode.mgwt.ui.client.widget.image.ImageHolder.ImageHolderAppearance; public class ImageHolderDefaultXHighAppearance implements ImageHolderAppearance { - interface Resources extends ClientBundle, Images { + interface Resources extends ClientBundle, Images { - Resources INSTANCE = GWT.create(Resources.class); + Resources INSTANCE = GWT.create(Resources.class); - @Source("resources/ic_action_about_xhdpi.png") - ImageResource about(); + @Source("resources/ic_action_about_xhdpi.png") + ImageResource about(); - @Source("resources/ic_action_accept_xhdpi.png") - ImageResource accept(); + @Source("resources/ic_action_accept_xhdpi.png") + ImageResource accept(); - @Source("resources/ic_action_accounts_xhdpi.png") - ImageResource accounts(); + @Source("resources/ic_action_accounts_xhdpi.png") + ImageResource accounts(); - @Source("resources/ic_action_add_alarm_xhdpi.png") - ImageResource addAlarm(); + @Source("resources/ic_action_add_alarm_xhdpi.png") + ImageResource addAlarm(); - @Source("resources/ic_action_add_group_xhdpi.png") - ImageResource addGroup(); + @Source("resources/ic_action_add_group_xhdpi.png") + ImageResource addGroup(); - @Source("resources/ic_action_add_person_xhdpi.png") - ImageResource addPerson(); + @Source("resources/ic_action_add_person_xhdpi.png") + ImageResource addPerson(); - @Source("resources/ic_action_add_to_queue_xhdpi.png") - ImageResource addToQueue(); + @Source("resources/ic_action_add_to_queue_xhdpi.png") + ImageResource addToQueue(); - @Source("resources/ic_action_airplane_mode_off_xhdpi.png") - ImageResource airplaneModeOff(); + @Source("resources/ic_action_airplane_mode_off_xhdpi.png") + ImageResource airplaneModeOff(); - @Source("resources/ic_action_airplane_mode_on_xhdpi.png") - ImageResource airplaneModeOn(); + @Source("resources/ic_action_airplane_mode_on_xhdpi.png") + ImageResource airplaneModeOn(); - @Source("resources/ic_action_alarms_xhdpi.png") - ImageResource alarms(); + @Source("resources/ic_action_alarms_xhdpi.png") + ImageResource alarms(); - @Source("resources/ic_action_attachment_xhdpi.png") - ImageResource attachment(); + @Source("resources/ic_action_attachment_xhdpi.png") + ImageResource attachment(); - @Source("resources/ic_action_back_xhdpi.png") - ImageResource back(); + @Source("resources/ic_action_back_xhdpi.png") + ImageResource back(); - @Source("resources/ic_action_backspace_xhdpi.png") - ImageResource backspace(); + @Source("resources/ic_action_backspace_xhdpi.png") + ImageResource backspace(); - @Source("resources/ic_action_bad_xhdpi.png") - ImageResource bad(); + @Source("resources/ic_action_bad_xhdpi.png") + ImageResource bad(); - @Source("resources/ic_action_battery_xhdpi.png") - ImageResource battery(); + @Source("resources/ic_action_battery_xhdpi.png") + ImageResource battery(); - @Source("resources/ic_action_bightness_low_xhdpi.png") - ImageResource bightnessLow(); + @Source("resources/ic_action_bightness_low_xhdpi.png") + ImageResource bightnessLow(); - @Source("resources/ic_action_bluetooth_connected_xhdpi.png") - ImageResource bluetoothConnected(); + @Source("resources/ic_action_bluetooth_connected_xhdpi.png") + ImageResource bluetoothConnected(); - @Source("resources/ic_action_bluetooth_searching_xhdpi.png") - ImageResource bluetoothSearching(); + @Source("resources/ic_action_bluetooth_searching_xhdpi.png") + ImageResource bluetoothSearching(); - @Source("resources/ic_action_bluetooth_xhdpi.png") - ImageResource bluetooth(); + @Source("resources/ic_action_bluetooth_xhdpi.png") + ImageResource bluetooth(); - @Source("resources/ic_action_brightness_auto_xhdpi.png") - ImageResource brightnessAuto(); + @Source("resources/ic_action_brightness_auto_xhdpi.png") + ImageResource brightnessAuto(); - @Source("resources/ic_action_brightness_high_xhdpi.png") - ImageResource brightnessHigh(); + @Source("resources/ic_action_brightness_high_xhdpi.png") + ImageResource brightnessHigh(); - @Source("resources/ic_action_brightness_medium_xhdpi.png") - ImageResource brightnessMedium(); + @Source("resources/ic_action_brightness_medium_xhdpi.png") + ImageResource brightnessMedium(); - @Source("resources/ic_action_call_xhdpi.png") - ImageResource call(); + @Source("resources/ic_action_call_xhdpi.png") + ImageResource call(); - @Source("resources/ic_action_camera_xhdpi.png") - ImageResource camera(); + @Source("resources/ic_action_camera_xhdpi.png") + ImageResource camera(); - @Source("resources/ic_action_cancel_xhdpi.png") - ImageResource cancel(); + @Source("resources/ic_action_cancel_xhdpi.png") + ImageResource cancel(); - @Source("resources/ic_action_cast_xhdpi.png") - ImageResource cast(); + @Source("resources/ic_action_cast_xhdpi.png") + ImageResource cast(); - @Source("resources/ic_action_cc_bcc_xhdpi.png") - ImageResource ccBcc(); + @Source("resources/ic_action_cc_bcc_xhdpi.png") + ImageResource ccBcc(); - @Source("resources/ic_action_chat_xhdpi.png") - ImageResource chat(); + @Source("resources/ic_action_chat_xhdpi.png") + ImageResource chat(); - @Source("resources/ic_action_cloud_xhdpi.png") - ImageResource cloud(); + @Source("resources/ic_action_cloud_xhdpi.png") + ImageResource cloud(); - @Source("resources/ic_action_collapse_xhdpi.png") - ImageResource collapse(); + @Source("resources/ic_action_collapse_xhdpi.png") + ImageResource collapse(); - @Source("resources/ic_action_collection_xhdpi.png") - ImageResource collection(); + @Source("resources/ic_action_collection_xhdpi.png") + ImageResource collection(); - @Source("resources/ic_action_computer_xhdpi.png") - ImageResource computer(); + @Source("resources/ic_action_computer_xhdpi.png") + ImageResource computer(); - @Source("resources/ic_action_copy_xhdpi.png") - ImageResource copy(); + @Source("resources/ic_action_copy_xhdpi.png") + ImageResource copy(); - @Source("resources/ic_action_crop_xhdpi.png") - ImageResource crop(); + @Source("resources/ic_action_crop_xhdpi.png") + ImageResource crop(); - @Source("resources/ic_action_cut_xhdpi.png") - ImageResource cut(); + @Source("resources/ic_action_cut_xhdpi.png") + ImageResource cut(); - @Source("resources/ic_action_data_usage_xhdpi.png") - ImageResource dataUsage(); + @Source("resources/ic_action_data_usage_xhdpi.png") + ImageResource dataUsage(); - @Source("resources/ic_action_dial_pad_xhdpi.png") - ImageResource dialPad(); + @Source("resources/ic_action_dial_pad_xhdpi.png") + ImageResource dialPad(); - @Source("resources/ic_action_directions_xhdpi.png") - ImageResource directions(); + @Source("resources/ic_action_directions_xhdpi.png") + ImageResource directions(); - @Source("resources/ic_action_discard_xhdpi.png") - ImageResource discard(); + @Source("resources/ic_action_discard_xhdpi.png") + ImageResource discard(); - @Source("resources/ic_action_dock_xhdpi.png") - ImageResource dock(); + @Source("resources/ic_action_dock_xhdpi.png") + ImageResource dock(); - @Source("resources/ic_action_download_xhdpi.png") - ImageResource download(); + @Source("resources/ic_action_download_xhdpi.png") + ImageResource download(); - @Source("resources/ic_action_edit_xhdpi.png") - ImageResource edit(); + @Source("resources/ic_action_edit_xhdpi.png") + ImageResource edit(); - @Source("resources/ic_action_email_xhdpi.png") - ImageResource email(); + @Source("resources/ic_action_email_xhdpi.png") + ImageResource email(); - @Source("resources/ic_action_end_call_xhdpi.png") - ImageResource endCall(); + @Source("resources/ic_action_end_call_xhdpi.png") + ImageResource endCall(); - @Source("resources/ic_action_error_xhdpi.png") - ImageResource error(); + @Source("resources/ic_action_error_xhdpi.png") + ImageResource error(); - @Source("resources/ic_action_event_xhdpi.png") - ImageResource event(); + @Source("resources/ic_action_event_xhdpi.png") + ImageResource event(); - @Source("resources/ic_action_expand_xhdpi.png") - ImageResource expand(); + @Source("resources/ic_action_expand_xhdpi.png") + ImageResource expand(); - @Source("resources/ic_action_fast_forward_xhdpi.png") - ImageResource fastForward(); + @Source("resources/ic_action_fast_forward_xhdpi.png") + ImageResource fastForward(); - @Source("resources/ic_action_favorite_xhdpi.png") - ImageResource favorite(); + @Source("resources/ic_action_favorite_xhdpi.png") + ImageResource favorite(); - @Source("resources/ic_action_flash_automatic_xhdpi.png") - ImageResource flashAutomatic(); + @Source("resources/ic_action_flash_automatic_xhdpi.png") + ImageResource flashAutomatic(); - @Source("resources/ic_action_flash_off_xhdpi.png") - ImageResource flashOff(); + @Source("resources/ic_action_flash_off_xhdpi.png") + ImageResource flashOff(); - @Source("resources/ic_action_flash_on_xhdpi.png") - ImageResource flashOn(); + @Source("resources/ic_action_flash_on_xhdpi.png") + ImageResource flashOn(); - @Source("resources/ic_action_forward_xhdpi.png") - ImageResource forward(); + @Source("resources/ic_action_forward_xhdpi.png") + ImageResource forward(); - @Source("resources/ic_action_full_screen_xhdpi.png") - ImageResource fullScreen(); + @Source("resources/ic_action_full_screen_xhdpi.png") + ImageResource fullScreen(); - @Source("resources/ic_action_gamepad_xhdpi.png") - ImageResource gamepad(); + @Source("resources/ic_action_gamepad_xhdpi.png") + ImageResource gamepad(); - @Source("resources/ic_action_go_to_today_xhdpi.png") - ImageResource goToToday(); + @Source("resources/ic_action_go_to_today_xhdpi.png") + ImageResource goToToday(); - @Source("resources/ic_action_good_xhdpi.png") - ImageResource good(); + @Source("resources/ic_action_good_xhdpi.png") + ImageResource good(); - @Source("resources/ic_action_group_xhdpi.png") - ImageResource group(); + @Source("resources/ic_action_group_xhdpi.png") + ImageResource group(); - @Source("resources/ic_action_half_important_xhdpi.png") - ImageResource halfImportant(); + @Source("resources/ic_action_half_important_xhdpi.png") + ImageResource halfImportant(); - @Source("resources/ic_action_headphones_xhdpi.png") - ImageResource headphones(); + @Source("resources/ic_action_headphones_xhdpi.png") + ImageResource headphones(); - @Source("resources/ic_action_headset_xhdpi.png") - ImageResource headset(); + @Source("resources/ic_action_headset_xhdpi.png") + ImageResource headset(); - @Source("resources/ic_action_help_xhdpi.png") - ImageResource help(); + @Source("resources/ic_action_help_xhdpi.png") + ImageResource help(); - @Source("resources/ic_action_import_export_xhdpi.png") - ImageResource importExport(); + @Source("resources/ic_action_import_export_xhdpi.png") + ImageResource importExport(); - @Source("resources/ic_action_important_xhdpi.png") - ImageResource important(); + @Source("resources/ic_action_important_xhdpi.png") + ImageResource important(); - @Source("resources/ic_action_keyboard_xhdpi.png") - ImageResource keyboard(); + @Source("resources/ic_action_keyboard_xhdpi.png") + ImageResource keyboard(); - @Source("resources/ic_action_labels_xhdpi.png") - ImageResource labels(); + @Source("resources/ic_action_labels_xhdpi.png") + ImageResource labels(); - @Source("resources/ic_action_location_found_xhdpi.png") - ImageResource locationFound(); + @Source("resources/ic_action_location_found_xhdpi.png") + ImageResource locationFound(); - @Source("resources/ic_action_location_off_xhdpi.png") - ImageResource locationOff(); + @Source("resources/ic_action_location_off_xhdpi.png") + ImageResource locationOff(); - @Source("resources/ic_action_location_searching_xhdpi.png") - ImageResource locationSearching(); + @Source("resources/ic_action_location_searching_xhdpi.png") + ImageResource locationSearching(); - @Source("resources/ic_action_make_available_offline_xhdpi.png") - ImageResource makeAvailableOffline(); + @Source("resources/ic_action_make_available_offline_xhdpi.png") + ImageResource makeAvailableOffline(); - @Source("resources/ic_action_map_xhdpi.png") - ImageResource map(); + @Source("resources/ic_action_map_xhdpi.png") + ImageResource map(); - @Source("resources/ic_action_merge_xhdpi.png") - ImageResource merge(); + @Source("resources/ic_action_merge_xhdpi.png") + ImageResource merge(); - @Source("resources/ic_action_mic_muted_xhdpi.png") - ImageResource micMuted(); + @Source("resources/ic_action_mic_muted_xhdpi.png") + ImageResource micMuted(); - @Source("resources/ic_action_mic_xhdpi.png") - ImageResource mic(); + @Source("resources/ic_action_mic_xhdpi.png") + ImageResource mic(); - @Source("resources/ic_action_mouse_xhdpi.png") - ImageResource mouse(); + @Source("resources/ic_action_mouse_xhdpi.png") + ImageResource mouse(); - @Source("resources/ic_action_network_cell_xhdpi.png") - ImageResource networkCell(); + @Source("resources/ic_action_network_cell_xhdpi.png") + ImageResource networkCell(); - @Source("resources/ic_action_network_wifi_xhdpi.png") - ImageResource networkWifi(); + @Source("resources/ic_action_network_wifi_xhdpi.png") + ImageResource networkWifi(); - @Source("resources/ic_action_new_account_xhdpi.png") - ImageResource newAccount(); + @Source("resources/ic_action_new_account_xhdpi.png") + ImageResource newAccount(); - @Source("resources/ic_action_new_attachment_xhdpi.png") - ImageResource newAttachment(); + @Source("resources/ic_action_new_attachment_xhdpi.png") + ImageResource newAttachment(); - @Source("resources/ic_action_new_email_xhdpi.png") - ImageResource newEmail(); + @Source("resources/ic_action_new_email_xhdpi.png") + ImageResource newEmail(); - @Source("resources/ic_action_new_event_xhdpi.png") - ImageResource newEvent(); + @Source("resources/ic_action_new_event_xhdpi.png") + ImageResource newEvent(); - @Source("resources/ic_action_new_label_xhdpi.png") - ImageResource newLabel(); + @Source("resources/ic_action_new_label_xhdpi.png") + ImageResource newLabel(); - @Source("resources/ic_action_new_picture_xhdpi.png") - ImageResource newPicture(); + @Source("resources/ic_action_new_picture_xhdpi.png") + ImageResource newPicture(); - @Source("resources/ic_action_new_xhdpi.png") - ImageResource newItem(); + @Source("resources/ic_action_new_xhdpi.png") + ImageResource newItem(); - @Source("resources/ic_action_next_item_xhdpi.png") - ImageResource nextItem(); + @Source("resources/ic_action_next_item_xhdpi.png") + ImageResource nextItem(); - @Source("resources/ic_action_next_xhdpi.png") - ImageResource next(); + @Source("resources/ic_action_next_xhdpi.png") + ImageResource next(); - @Source("resources/ic_action_not_important_xhdpi.png") - ImageResource notImportant(); + @Source("resources/ic_action_not_important_xhdpi.png") + ImageResource notImportant(); - @Source("resources/ic_action_not_secure_xhdpi.png") - ImageResource notSecure(); + @Source("resources/ic_action_not_secure_xhdpi.png") + ImageResource notSecure(); - @Source("resources/ic_action_overflow_xhdpi.png") - ImageResource overflow(); + @Source("resources/ic_action_overflow_xhdpi.png") + ImageResource overflow(); - @Source("resources/ic_action_paste_xhdpi.png") - ImageResource paste(); + @Source("resources/ic_action_paste_xhdpi.png") + ImageResource paste(); - @Source("resources/ic_action_pause_over_video_xhdpi.png") - ImageResource pauseOverVideo(); + @Source("resources/ic_action_pause_over_video_xhdpi.png") + ImageResource pauseOverVideo(); - @Source("resources/ic_action_pause_xhdpi.png") - ImageResource pause(); + @Source("resources/ic_action_pause_xhdpi.png") + ImageResource pause(); - @Source("resources/ic_action_person_xhdpi.png") - ImageResource person(); + @Source("resources/ic_action_person_xhdpi.png") + ImageResource person(); - @Source("resources/ic_action_phone_xhdpi.png") - ImageResource phone(); + @Source("resources/ic_action_phone_xhdpi.png") + ImageResource phone(); - @Source("resources/ic_action_picture_xhdpi.png") - ImageResource picture(); + @Source("resources/ic_action_picture_xhdpi.png") + ImageResource picture(); - @Source("resources/ic_action_place_xhdpi.png") - ImageResource place(); + @Source("resources/ic_action_place_xhdpi.png") + ImageResource place(); - @Source("resources/ic_action_play_over_video_xhdpi.png") - ImageResource playOverVideo(); + @Source("resources/ic_action_play_over_video_xhdpi.png") + ImageResource playOverVideo(); - @Source("resources/ic_action_play_xhdpi.png") - ImageResource play(); + @Source("resources/ic_action_play_xhdpi.png") + ImageResource play(); - @Source("resources/ic_action_previous_item_xhdpi.png") - ImageResource previousItem(); + @Source("resources/ic_action_previous_item_xhdpi.png") + ImageResource previousItem(); - @Source("resources/ic_action_previous_xhdpi.png") - ImageResource previous(); + @Source("resources/ic_action_previous_xhdpi.png") + ImageResource previous(); - @Source("resources/ic_action_read_xhdpi.png") - ImageResource read(); + @Source("resources/ic_action_print_xhdpi.png") + ImageResource print(); - @Source("resources/ic_action_refresh_xhdpi.png") - ImageResource refresh(); + @Source("resources/ic_action_read_xhdpi.png") + ImageResource read(); - @Source("resources/ic_action_remove_xhdpi.png") - ImageResource remove(); + @Source("resources/ic_action_refresh_xhdpi.png") + ImageResource refresh(); - @Source("resources/ic_action_repeat_xhdpi.png") - ImageResource repeat(); + @Source("resources/ic_action_remove_xhdpi.png") + ImageResource remove(); - @Source("resources/ic_action_replay_xhdpi.png") - ImageResource replay(); + @Source("resources/ic_action_repeat_xhdpi.png") + ImageResource repeat(); - @Source("resources/ic_action_reply_all_xhdpi.png") - ImageResource replyAll(); + @Source("resources/ic_action_replay_xhdpi.png") + ImageResource replay(); - @Source("resources/ic_action_reply_xhdpi.png") - ImageResource reply(); + @Source("resources/ic_action_reply_all_xhdpi.png") + ImageResource replyAll(); - @Source("resources/ic_action_return_from_full_screen_xhdpi.png") - ImageResource returnFromFullScreen(); + @Source("resources/ic_action_reply_xhdpi.png") + ImageResource reply(); - @Source("resources/ic_action_rewind_xhdpi.png") - ImageResource rewind(); + @Source("resources/ic_action_return_from_full_screen_xhdpi.png") + ImageResource returnFromFullScreen(); - @Source("resources/ic_action_ring_volume_xhdpi.png") - ImageResource ringVolume(); + @Source("resources/ic_action_rewind_xhdpi.png") + ImageResource rewind(); - @Source("resources/ic_action_rotate_left_xhdpi.png") - ImageResource rotateLeft(); + @Source("resources/ic_action_ring_volume_xhdpi.png") + ImageResource ringVolume(); - @Source("resources/ic_action_rotate_right_xhdpi.png") - ImageResource rotateRight(); + @Source("resources/ic_action_rotate_left_xhdpi.png") + ImageResource rotateLeft(); - @Source("resources/ic_action_save_xhdpi.png") - ImageResource save(); + @Source("resources/ic_action_rotate_right_xhdpi.png") + ImageResource rotateRight(); - @Source("resources/ic_action_screen_locked_to_landscape_xhdpi.png") - ImageResource screenLockedToLandscape(); + @Source("resources/ic_action_save_xhdpi.png") + ImageResource save(); - @Source("resources/ic_action_screen_locked_to_portrait_xhdpi.png") - ImageResource screenLockedToPortrait(); + @Source("resources/ic_action_screen_locked_to_landscape_xhdpi.png") + ImageResource screenLockedToLandscape(); - @Source("resources/ic_action_screen_rotation_xhdpi.png") - ImageResource screenRotation(); + @Source("resources/ic_action_screen_locked_to_portrait_xhdpi.png") + ImageResource screenLockedToPortrait(); - @Source("resources/ic_action_sd_storage_xhdpi.png") - ImageResource sdStorage(); + @Source("resources/ic_action_screen_rotation_xhdpi.png") + ImageResource screenRotation(); - @Source("resources/ic_action_search_xhdpi.png") - ImageResource search(); + @Source("resources/ic_action_sd_storage_xhdpi.png") + ImageResource sdStorage(); - @Source("resources/ic_action_secure_xhdpi.png") - ImageResource secure(); + @Source("resources/ic_action_search_xhdpi.png") + ImageResource search(); - @Source("resources/ic_action_select_all_xhdpi.png") - ImageResource selectAll(); + @Source("resources/ic_action_secure_xhdpi.png") + ImageResource secure(); - @Source("resources/ic_action_send_now_xhdpi.png") - ImageResource sendNow(); + @Source("resources/ic_action_select_all_xhdpi.png") + ImageResource selectAll(); - @Source("resources/ic_action_settings_xhdpi.png") - ImageResource settings(); + @Source("resources/ic_action_send_now_xhdpi.png") + ImageResource sendNow(); - @Source("resources/ic_action_share_xhdpi.png") - ImageResource share(); + @Source("resources/ic_action_settings_xhdpi.png") + ImageResource settings(); - @Source("resources/ic_action_shuffle_xhdpi.png") - ImageResource shuffle(); + @Source("resources/ic_action_share_xhdpi.png") + ImageResource share(); - @Source("resources/ic_action_slideshow_xhdpi.png") - ImageResource slideshow(); + @Source("resources/ic_action_shuffle_xhdpi.png") + ImageResource shuffle(); - @Source("resources/ic_action_sort_by_size_xhdpi.png") - ImageResource sortBySize(); + @Source("resources/ic_action_slideshow_xhdpi.png") + ImageResource slideshow(); - @Source("resources/ic_action_split_xhdpi.png") - ImageResource split(); + @Source("resources/ic_action_sort_by_size_xhdpi.png") + ImageResource sortBySize(); - @Source("resources/ic_action_stop_xhdpi.png") - ImageResource stop(); + @Source("resources/ic_action_split_xhdpi.png") + ImageResource split(); - @Source("resources/ic_action_storage_xhdpi.png") - ImageResource storage(); + @Source("resources/ic_action_stop_xhdpi.png") + ImageResource stop(); - @Source("resources/ic_action_switch_camera_xhdpi.png") - ImageResource switchCamera(); + @Source("resources/ic_action_storage_xhdpi.png") + ImageResource storage(); - @Source("resources/ic_action_switch_video_xhdpi.png") - ImageResource switchVideo(); + @Source("resources/ic_action_switch_camera_xhdpi.png") + ImageResource switchCamera(); - @Source("resources/ic_action_time_xhdpi.png") - ImageResource time(); + @Source("resources/ic_action_switch_video_xhdpi.png") + ImageResource switchVideo(); - @Source("resources/ic_action_undo_xhdpi.png") - ImageResource undo(); + @Source("resources/ic_action_time_xhdpi.png") + ImageResource time(); - @Source("resources/ic_action_unread_xhdpi.png") - ImageResource unread(); + @Source("resources/ic_action_undo_xhdpi.png") + ImageResource undo(); - @Source("resources/ic_action_upload_xhdpi.png") - ImageResource upload(); + @Source("resources/ic_action_unread_xhdpi.png") + ImageResource unread(); - @Source("resources/ic_action_usb_xhdpi.png") - ImageResource usb(); + @Source("resources/ic_action_upload_xhdpi.png") + ImageResource upload(); - @Source("resources/ic_action_video_xhdpi.png") - ImageResource video(); + @Source("resources/ic_action_usb_xhdpi.png") + ImageResource usb(); - @Source("resources/ic_action_view_as_grid_xhdpi.png") - ImageResource viewAsGrid(); + @Source("resources/ic_action_video_xhdpi.png") + ImageResource video(); - @Source("resources/ic_action_view_as_list_xhdpi.png") - ImageResource viewAsList(); + @Source("resources/ic_action_view_as_grid_xhdpi.png") + ImageResource viewAsGrid(); - @Source("resources/ic_action_volume_muted_xhdpi.png") - ImageResource volumeMuted(); + @Source("resources/ic_action_view_as_list_xhdpi.png") + ImageResource viewAsList(); - @Source("resources/ic_action_volume_on_xhdpi.png") - ImageResource volumeOn(); + @Source("resources/ic_action_volume_muted_xhdpi.png") + ImageResource volumeMuted(); - @Source("resources/ic_action_warning_xhdpi.png") - ImageResource warning(); + @Source("resources/ic_action_volume_on_xhdpi.png") + ImageResource volumeOn(); - @Source("resources/ic_action_web_site_xhdpi.png") - ImageResource webSite(); + @Source("resources/ic_action_warning_xhdpi.png") + ImageResource warning(); + @Source("resources/ic_action_web_site_xhdpi.png") + ImageResource webSite(); - } + } - @Override - public Images get() { - return Resources.INSTANCE; - } + @Override + public Images get() { + return Resources.INSTANCE; + } } diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/resources/ic_action_print_mdpi.png b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/resources/ic_action_print_mdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..d7ac5b152d4d096e0129e5c6ae625db707312eda GIT binary patch literal 536 zcmV+z0_XjSP)NfVuAM#Tmntt zp$xHIKsmNV`qd(i`f|qmrGEhSfocJ)F3muqPlL%lFQ0BM}GClrpZ{ zzlldXaN&4sS9Ngn3Ce; zVw1-GGcX2h1J_dUzSlg-VCti#m~-OmR_>3pL>L8F`xLWg^i@-YA)M zLs=ZU7FcJ@*i)AK2}8M@h*H*1z=d`~vi<5hux`WD+&VWUBe0NxnYNSP%CYjWGb&mk zGO^zDB`_x&z@caLM>ZlH_9R68h*q-|AyNlUOXQ2X>z3c}Tn}Ddj#Qh#j3*7W%KobT aUHby|XO%u9=n)P80000zy@K|25v@BQKv~EU>kI8n0xxwAs}>C2{;AZZbZN!Fv7o_TNn}+BV=y$B!>Qk z2sqyC-9e)zP;YlPa5_i>MkMG!A)y(z11CtHT#f7TRki-sw{L)Zz%dbV_55+*8t^m7 z-K`Pr%}v@x@5f_pTu-(0lX#ir|4cPYgNpO|tbS}*8{0Nn73$Z_E0*(D11cf%Z&`$& zwye~y>GToVlApul=A?`(n$#tJfO>ub*pWw9xNZRhV&;#4-@w{N;e0tq1UTA?P!02t z^B4?8(y<~OE(jsfQP_=RuBN*cX*Wy nS-~vcN0nK2(+dzu)=Y^Sc)$Ns=TQ$N*@4I*63Al zCxMTEXX|48&mx_ht+3(a_jV2V!gu4Zw8MGUlc&F1I|V#E2;;RJoMSEUfMb8sPlfg& zI&6KHcK{XwL!JjBA+Q8E04(a~#mhF_Brsh8Be#GB86b=TCxEAcOLYM7F>uh)Nb5yo zz?T_E!U%8(*kq%n%IobE=eD&X_xMzSNNKzu(^1Rw^Ov#Uj88|4nqZ)+I_A!Fv`PR5 z2VoTWrL2)40NEfs4jco91z>Ox9vUa!)T*Yi>9Cvx4&A@R?F~coP zMsYgQW=P)Vx6N}S?@#I5Ow0~bz)j#U%zoHsdcF7v@EyHXzSJ2&mMWZ2fO$nOJO&)4 z_sSDr00aqbKgCO-Iv{?<6tHA=!Xx%gt0O0Df})0R*%tJ8E`XPTpRxjI0egYv*6;!T zmL3(23R}Q^4*MPgF9Ppo0kD+0onJ04KIvg-8Abw&=>p+**kv??m^zBldxfF9nJch% z0pLwwqo)hLyO>Q_Y10hAk2dOg40tQWe#4j|_D|C;dV%t4a(!({{g?!H#(c*D;B?CS z_L1^oeye7NE4zK4V8<0Ce`CNAV*5&?Q^R6qW^(Di)K8EEAe2pWX?McwtI4r@TIuNGvHf~X9duM{fuD;$&`-#*7HSu)KRDDS4H0i= zfQQo70aE^vuo&3hWqqJ2s89K$o^v14fRj&>00@9200JNhfB;AWAOJ3x>2*-4{U|dR z6kvAKO?qtjg(T@$Gtn38{Abw^HEPFU&}fS_j4i+2Df zVjv{%%4TwtT5sT}|RAMl>Fvs1l6GYd4HuZk0% zM>93QDgYz_5CBO4{8ZVwpb_9v{7lB(B>jhfDi0t8KDW*HMOSHSoHD1Nx-85B$E#uI z046X6ZB5A`b^1A8l^Ytf%j+i8mUa4g)|K&GILB*tm~MzX9d*qMb^5glIA67!+l$He z)%oeaN^)sZB^>1%;3dot-qdN0F$0{#e22!#Dg%g~w@%YglfJY>k|arzB&iSjAD(Fw UY~cbO>i_@%07*qoM6N<$g0^riF#rGn literal 0 HcmV?d00001 From fa5423e4ba128540adde08e3c47d986b0157b319 Mon Sep 17 00:00:00 2001 From: Maurycy-Sokolowski Date: Sat, 7 May 2016 00:58:41 -0700 Subject: [PATCH 39/40] Corrected edge stuff --- .../ui/client/OsDetectionRuntimeImpl.java | 2 +- .../ui/client/animation/AnimationHelper.java | 67 ++++++++++-------- .../image/resources/ic_action_print_hdpi.png | Bin 0 -> 835 bytes 3 files changed, 40 insertions(+), 29 deletions(-) create mode 100644 src/main/java/com/googlecode/mgwt/ui/client/widget/image/resources/ic_action_print_hdpi.png diff --git a/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java b/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java index a78d4db57..6f9c63544 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/OsDetectionRuntimeImpl.java @@ -156,7 +156,7 @@ public boolean isAndroid4_3_orLower() { } private boolean isIEEdge(String userAgent) { - if (userAgent.contains("edge/12")) { + if (userAgent.contains("edge")) { return true; } return false; diff --git a/src/main/java/com/googlecode/mgwt/ui/client/animation/AnimationHelper.java b/src/main/java/com/googlecode/mgwt/ui/client/animation/AnimationHelper.java index 38018dd1e..f73efef4a 100644 --- a/src/main/java/com/googlecode/mgwt/ui/client/animation/AnimationHelper.java +++ b/src/main/java/com/googlecode/mgwt/ui/client/animation/AnimationHelper.java @@ -24,7 +24,6 @@ import com.googlecode.mgwt.ui.client.widget.animation.AnimationEndCallback; import com.googlecode.mgwt.ui.client.widget.animation.AnimationWidget; - /** * A simple helper class to make the direct use of {@link AnimatableDisplay} * easier. @@ -53,7 +52,8 @@ public AnimationHelper() { /** * Construct an animation helper with a given display * - * @param display the display to use + * @param display + * the display to use */ public AnimationHelper(AnimatableDisplay display) { this.display = display; @@ -62,33 +62,43 @@ public AnimationHelper(AnimatableDisplay display) { initWidget(display.asWidget()); } - /** - * animate to a given widget. If this is called while an animation is running this is a noop. - * - * @param w the widget to animate to - * @param animation the animation to use - */ + /** + * animate to a given widget. If this is called while an animation is + * running this is a noop. + * + * @param w + * the widget to animate to + * @param animation + * the animation to use + */ public void goTo(IsWidget w, Animation animation) { goTo(w, animation, null); } - /** - * animate to a given widget. If this is called while an animation is running this is a noop. - * - * @param w the widget to animate to - * @param animation the animation to use - * @param callback a callback that will be called once the animation is finished - */ + /** + * animate to a given widget. If this is called while an animation is + * running this is a noop. + * + * @param w + * the widget to animate to + * @param animation + * the animation to use + * @param callback + * a callback that will be called once the animation is finished + */ public void goTo(IsWidget w, Animation animation, AnimationEndCallback callback) { goTo(w.asWidget(), animation, callback); } - /** - * animate to a given widget. If this is called while an animation is running this is a noop. - * - * @param w the widget to animate to - * @param animation the animation to use - */ + /** + * animate to a given widget. If this is called while an animation is + * running this is a noop. + * + * @param w + * the widget to animate to + * @param animation + * the animation to use + */ public void goTo(Widget w, Animation animation) { goTo(w, animation, null); } @@ -97,10 +107,12 @@ public void goTo(Widget w, Animation animation) { * animate to a given widget. If this is called while an animation is * running this is a noop. * - * @param w the widget to animate to - * @param animation the animation to use - * @param callback a callback that will be called once the animation is - * finished + * @param w + * the widget to animate to + * @param animation + * the animation to use + * @param callback + * a callback that will be called once the animation is finished */ public void goTo(Widget w, Animation animation, final AnimationEndCallback callback) { if (isAnimating) { @@ -119,13 +131,12 @@ public void goTo(Widget w, Animation animation, final AnimationEndCallback callb @Override public void onAnimationEnd() { isAnimating = false; - if (callback != null) + if (callback != null) { callback.onAnimationEnd(); + } } }); - isFirst = !isFirst; - } /** diff --git a/src/main/java/com/googlecode/mgwt/ui/client/widget/image/resources/ic_action_print_hdpi.png b/src/main/java/com/googlecode/mgwt/ui/client/widget/image/resources/ic_action_print_hdpi.png new file mode 100644 index 0000000000000000000000000000000000000000..f6579d2b74b56c7bd47fca2efb861cf57849b281 GIT binary patch literal 835 zcmV-J1HAl+P)2^uH{24bLrAS^7b*@}@M2#SKa#wH?Sq^zQ` z8vIB!FftM}SwRifKx7f|d=IKWWivBfHPf?ymYs%TnCiM-b@eqf81${rK%)$-Flx_0 zj1*Qiq^HjmC{pu3>=8SGV>I4?o}ktYE(C2i|o+W?+t2sj2DC*xIJ5UUM}T4oON zPeH2;dSxQCHx+dr!21i(p$2wKRflQ>9%XPq0A(de5U#e;B|R8;<%`U(sqlFaeXerK z5s)(nNpY4F%hc4m2!Mef10A;@7zcpwDzLIWh5Soh1;Ds&N^nIRDT62fhy{RU8MWB) z%3OrP1JF^B9)-PlpB5fLYy*Av8jt0NVvvp=H#L^fKdF4t-}aQham;~KOs@VOfGb@s z2rr8f;K^}Z?MKRS(K5=VZ4$IYl=r8MwAlX;wts@YfnI`cqL7q z1)uwra^SrNZvwOlL>}X~1!9?x+7;=@dGD=zZ`LtfQ!#Q5guc=7B9zcp0bu<~Q76k* z9Ua4MrF2I|fUM1d9{^CP3&F=AFDu3cN%DU(UEj#~N#~0MzNaY3T?fEybMmqkR>)ES zP+8hb0YK&CUseEeeAG=XrEVXd5eU0rDu^ciZXX^14D5-l24UaG{XF5_kGufd-t63G zEWHy~4ZXWIo79o$R{0#ATEl7dDwIBgenpP?eh#!dLqJ{=9PR5M-T`zY|Bc7k5W?YP zxtJH4{<}~-N^Q>rmd0;SX;9YkZ8WSre4dhW^7`?}heVlHJj*i5|6*-tKc1xF{gVfI zne0Y%d{q;hm N002ovPDHLkV1n@=ZNvZo literal 0 HcmV?d00001 From d857ea66dcc1df143bfb26b199dbcef3def625ed Mon Sep 17 00:00:00 2001 From: Maurycy-Sokolowski Date: Mon, 9 May 2016 15:33:27 -0700 Subject: [PATCH 40/40] Updated some dependencies --- pom.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 099ba27ab..193e79c82 100644 --- a/pom.xml +++ b/pom.xml @@ -53,10 +53,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.3.2 + 3.5.1 - 1.6 - 1.6 + 1.7 + 1.7 @@ -111,7 +111,7 @@ maven-surefire-plugin - 2.6 + 2.19.1 **/*Test.java @@ -166,7 +166,7 @@ junit junit - 4.7 + 4.12 jar test @@ -198,13 +198,13 @@ org.mockito mockito-all - 1.9.5 + 1.10.19 test com.google.gwt.gwtmockito gwtmockito - 1.1.3 + 1.1.6 test