Java Code Examples for gwt.material.design.addins.client.pathanimator.MaterialPathAnimator#animate()

The following examples show how to use gwt.material.design.addins.client.pathanimator.MaterialPathAnimator#animate() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PathAnimatorShowcase.java    From gwt-material-demo with Apache License 2.0 6 votes vote down vote up
@UiHandler("btnFAB")
void onFAB(ClickEvent e){
    // Execute the opening callback once the fab is clicked
    MaterialPathAnimator.animate(btnFAB.getElement(), musicPanel.getElement(), () -> {
        // Hide the fab with zoom out animation
        new MaterialAnimation().transition(Transition.ZOOMOUT).animate(btnFAB);
        btnFAB.setVisibility(Style.Visibility.HIDDEN);
        btnFAB.setOpacity(0);

        // Setting the visibility of the music panel
        musicPanel.setVisibility(Style.Visibility.VISIBLE);
        musicPanel.setOpacity(1);

        // Setting the music label with Bounce up animation
        lblMusic.setText("Pharell Williams / Love Yourself to Dance");
        new MaterialAnimation().transition(Transition.BOUNCEINUP).animate(lblMusic);

        // Setting the image of the artist
        imgMusic.setUrl("http://thatgrapejuice.net/wp-content/uploads/2013/08/pharrell-williams-that-grape-juice.png");
    });
}
 
Example 2
Source File: MaterialPathAnimatorTest.java    From gwt-material-addins with Apache License 2.0 5 votes vote down vote up
public void testStaticInstance() {
    // given
    MaterialPanel source = new MaterialPanel();
    MaterialPanel target = new MaterialPanel();
    RootPanel.get().add(source);
    RootPanel.get().add(target);

    // when / then
    target.setVisibility(Style.Visibility.HIDDEN);
    target.setOpacity(0);
    assertEquals("hidden", target.getElement().getStyle().getVisibility());
    assertEquals("0", target.getElement().getStyle().getOpacity());
    MaterialPathAnimator.animate(source, target);
    MaterialPathAnimator.reverseAnimate(source, target);
}
 
Example 3
Source File: GoogleContactsView.java    From gwt-material-patterns with Apache License 2.0 4 votes vote down vote up
/**
 * Open the profile overlay to view the user details
 * @param colaps
 */
public void openProfileOverlay(CustomerCollapsible colaps) {
    profileOverlay.setCustomerCollapsible(colaps);
    MaterialPathAnimator.animate(colaps.getColapsItem().getElement(), profileOverlay.getOverlay().getElement());
}
 
Example 4
Source File: TreeView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("btnAdd")
void onAddDialog(ClickEvent e) {
    MaterialPathAnimator.animate(btnAdd.getElement(), addOverlay.getElement());
}
 
Example 5
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("btnSource1")
void onSource(ClickEvent e) {
    MaterialPathAnimator.animate(btnSource1.getElement(), panelTarget1.getElement());
}
 
Example 6
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("btnSource2")
void onClickCard(ClickEvent e) {
    MaterialPathAnimator.animate(card.getElement(), panelTarget2.getElement());
}
 
Example 7
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("btnSource3")
void onClickCard3(ClickEvent e) {
    MaterialPathAnimator.animate(btnSource3.getElement(), panelTarget3.getElement());
}
 
Example 8
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("btnSource4")
void onClickIconDelete(ClickEvent e) {
    MaterialPathAnimator.animate(btnSource4.getElement(), panelTarget4.getElement());
}
 
Example 9
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("col1")
void onCol1(ClickEvent e) {
    MaterialPathAnimator.animate(col1.getElement(), panelTargetCol1.getElement());
}
 
Example 10
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("col2")
void onCol2(ClickEvent e) {
    MaterialPathAnimator.animate(col2.getElement(), panelTargetCol2.getElement());
}
 
Example 11
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("col3")
void onCol3(ClickEvent e) {
    MaterialPathAnimator.animate(col3.getElement(), panelTargetCol3.getElement());
}
 
Example 12
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("col4")
void onCol4(ClickEvent e) {
    MaterialPathAnimator.animate(col4.getElement(), panelTargetCol4.getElement());
}
 
Example 13
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("col5")
void onCol5(ClickEvent e) {
    MaterialPathAnimator.animate(col5.getElement(), panelTargetCol5.getElement());
}
 
Example 14
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("col6")
void onCol6(ClickEvent e) {
    MaterialPathAnimator.animate(col6.getElement(), panelTargetCol6.getElement());
}
 
Example 15
Source File: PathAnimatorView.java    From gwt-material-demo with Apache License 2.0 4 votes vote down vote up
@UiHandler("col7")
void onCol7(ClickEvent e) {
    MaterialPathAnimator.animate(col7.getElement(), panelTargetCol7.getElement());
}