Skip to content

Commit

Permalink
Merge pull request #587 from GwtMaterialDesign/release_2.0
Browse files Browse the repository at this point in the history
Release 2.0-rc5
  • Loading branch information
kevzlou7979 committed May 9, 2017
2 parents 444d9f1 + 6f32db2 commit a600fa1
Show file tree
Hide file tree
Showing 127 changed files with 2,787 additions and 881 deletions.
7 changes: 4 additions & 3 deletions README.md
@@ -1,12 +1,13 @@
<img src="http://i.imgur.com/VaBxpGj.png" />
<h2>gwt-material</h2>
<p>A Google Material Design wrapper for GWT</p>

[![Build Status](https://travis-ci.org/GwtMaterialDesign/gwt-material.svg?branch=master)](https://travis-ci.org/GwtMaterialDesign/gwt-material) [![Join the chat at https://gitter.im/GwtMaterialDesign/gwt-material](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/GwtMaterialDesign/gwt-material?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

<br/>

## Demo
* [2.0-rc4 Release Demo](http://gwtmaterialdesign.github.io/gwt-material-demo/)
* [2.0-rc5 Release Demo](http://gwtmaterialdesign.github.io/gwt-material-demo/)
* [2.0 Snapshot Demo](http://gwtmaterialdesign.github.io/gwt-material-demo/snapshot/)
* [2.1 Snapshot Demo](http://gwtmaterialdesign.github.io/gwt-material-demo/2.1/)

Expand All @@ -16,12 +17,12 @@ We created <a href="http://gwtmaterialdesign.github.io/gwt-material-demo/apidocs


## Maven
### Current Version 2.0-rc4
### Current Version 2.0-rc5
```xml
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material</artifactId>
<version>2.0-rc4</version>
<version>2.0-rc5</version>
</dependency>
```
### Snapshot Version 2.0-SNAPSHOT
Expand Down
4 changes: 2 additions & 2 deletions gwt-material/pom.xml
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>gwt-material-parent</artifactId>
<groupId>com.github.gwtmaterialdesign</groupId>
<version>2.0-rc4</version>
<version>2.0-rc5</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -17,7 +17,7 @@
<dependency>
<groupId>com.github.gwtmaterialdesign</groupId>
<artifactId>gwt-material-jquery</artifactId>
<version>1.0-rc4</version>
<version>2.0-rc5</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
Expand Down
Expand Up @@ -50,7 +50,6 @@ protected void load() {
if(!isMaterializeLoaded()) {
injectJs(MaterialResources.INSTANCE.materializeJs());
injectJs(MaterialResources.INSTANCE.animationJs());
injectJs(MaterialResources.INSTANCE.shrinkJs());
}
onModuleLoaded();
}
Expand Down
Expand Up @@ -30,7 +30,6 @@ public void load() {
if(!isMaterializeLoaded()) {
injectDebugJs(MaterialDebugResources.INSTANCE.materializeJsDebug());
injectDebugJs(MaterialDebugResources.INSTANCE.animationJsDebug());
injectDebugJs(MaterialDebugResources.INSTANCE.shrinkJsDebug());
}
onModuleLoaded();
}
Expand Down
Expand Up @@ -188,4 +188,8 @@ public void setTargetHistoryToken(final String targetHistoryToken) {
public String getTargetHistoryToken() {
return targetHistoryToken;
}

public Span getSpan() {
return span;
}
}
Expand Up @@ -2,7 +2,7 @@
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2016 GwtMaterialDesign
* Copyright (C) 2015 - 2017 GwtMaterialDesign
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,15 +19,15 @@
*/
package gwt.material.design.client.base;

public interface HasTransition {
public interface HasDelayTransition {

/**
* Sets the In Duration of transition.
* Set the animation duration delay in milliseconds.
*/
void setInDuration(int inDuration);
void setDelay(int delay);

/**
* Sets the our duration of transition.
* Get the animation duration delay in milliseconds.
*/
void setOutDuration(int outDuration);
int getDelay();
}
@@ -0,0 +1,33 @@
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2017 GwtMaterialDesign
* %%
* 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.
* #L%
*/
package gwt.material.design.client.base;

public interface HasDurationTransition {

/**
* Set the animation duration in milliseconds.
*/
void setDuration(int duration);

/**
* Get the animation duration in milliseconds.
*/
int getDuration();
}
@@ -0,0 +1,43 @@
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2016 GwtMaterialDesign
* %%
* 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.
* #L%
*/
package gwt.material.design.client.base;

public interface HasInOutDurationTransition {

/**
* Set the in / enter animation duration in milliseconds.
*/
void setInDuration(int inDuration);

/**
* Get the in / enter animation duration in milliseconds.
*/
int getInDuration();

/**
* Set the out / exit animation duration in milliseconds.
*/
void setOutDuration(int outDuration);

/**
* Get the out / exit animation duration in milliseconds.
*/
int getOutDuration();
}
@@ -0,0 +1,27 @@
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2017 GwtMaterialDesign
* %%
* 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.
* #L%
*/
package gwt.material.design.client.base;

/**
* An interface to determine whether this sidenav
* component will not be selectable on {@link gwt.material.design.client.ui.MaterialSideNav} component.
*/
public interface HasNoSideNavSelection {
}
@@ -0,0 +1,31 @@
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2017 GwtMaterialDesign
* %%
* 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.
* #L%
*/
package gwt.material.design.client.base;

import com.google.web.bindery.event.shared.HandlerRegistration;
import gwt.material.design.client.events.NavBarExpandEvent;
import gwt.material.design.client.events.NavBarShrinkEvent;

public interface HasShrinkableNavBarHandlers {

HandlerRegistration addExpandHandler(NavBarExpandEvent.NavBarExpandHandler handler);

HandlerRegistration addShrinkHandler(NavBarShrinkEvent.NavBarShrinkHandler handler);
}
@@ -0,0 +1,27 @@
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2017 GwtMaterialDesign
* %%
* 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.
* #L%
*/
package gwt.material.design.client.base;

public interface HasWithHeader {

void setWithHeader(boolean value);

boolean isWithHeader();
}
Expand Up @@ -54,6 +54,7 @@ public class MaterialWidget extends ComplexPanel implements HasId, HasEnabled, H

private static JQueryElement window = null;
private static JQueryElement body = null;
private boolean initialize;

public static JQueryElement window() {
if (window == null) {
Expand Down Expand Up @@ -174,6 +175,11 @@ protected void onLoad() {
}
onLoadAdd.clear();
}

if (!initialize) {
initialize();
initialize = true;
}
}

@Override
Expand Down Expand Up @@ -206,6 +212,43 @@ protected void insert(Widget child, com.google.gwt.user.client.Element container
}
}

/**
* A protected method to build the structure of any complex widget that
* can be overridden to perform a different behavior of this widget.
*/
protected void build() {}

/**
* A initialization phase that can be overriden by any complex widget
* that needs to initialize their feature specially for JSInterop instances.
*/
protected void initialize() {}

/**
* Can be called multiple times to reinitialize the state of any complex widget
*/
public void reinitialize() {
initialize();
}

/**
* Returns whether the widget has been initialized or not
*/
public boolean isInitialize() {
return initialize;
}

protected void setInitialize(boolean initialize) {
this.initialize = initialize;
}

@Override
protected void onUnload() {
super.onUnload();

this.initialize = false;
}

/**
* Inserts a widget at a specific index
*
Expand Down Expand Up @@ -1102,6 +1145,20 @@ protected void clearActiveClass(HasWidgets widget) {
}
}

/**
* Applies a CSS3 Transition property to this widget.
*/

public void setTransition(TransitionConfig property) {
Element target = getElement();
if (property.getTarget() != null) {
target = property.getTarget();
}
target.getStyle().setProperty("WebkitTransition", property.getProperty() + " " + property.getDuration() + "ms " + property.getTimingFunction() + property.getDelay() + "ms");
target.getStyle().setProperty("transition", property.getProperty() + " " + property.getDuration() + "ms " + property.getTimingFunction() + property.getDelay() + "ms");
}


/**
* Add an {@code AttachHandler} for attachment events.
*
Expand Down

0 comments on commit a600fa1

Please sign in to comment.