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() . These examples are extracted from open source projects. 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
@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
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
/**
 * 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 Project: gwt-material-demo   File: TreeView.java    License: Apache License 2.0 4 votes vote down vote up
@UiHandler("btnAdd")
void onAddDialog(ClickEvent e) {
    MaterialPathAnimator.animate(btnAdd.getElement(), addOverlay.getElement());
}
 
Example 5
@UiHandler("btnSource1")
void onSource(ClickEvent e) {
    MaterialPathAnimator.animate(btnSource1.getElement(), panelTarget1.getElement());
}
 
Example 6
@UiHandler("btnSource2")
void onClickCard(ClickEvent e) {
    MaterialPathAnimator.animate(card.getElement(), panelTarget2.getElement());
}
 
Example 7
@UiHandler("btnSource3")
void onClickCard3(ClickEvent e) {
    MaterialPathAnimator.animate(btnSource3.getElement(), panelTarget3.getElement());
}
 
Example 8
@UiHandler("btnSource4")
void onClickIconDelete(ClickEvent e) {
    MaterialPathAnimator.animate(btnSource4.getElement(), panelTarget4.getElement());
}
 
Example 9
@UiHandler("col1")
void onCol1(ClickEvent e) {
    MaterialPathAnimator.animate(col1.getElement(), panelTargetCol1.getElement());
}
 
Example 10
@UiHandler("col2")
void onCol2(ClickEvent e) {
    MaterialPathAnimator.animate(col2.getElement(), panelTargetCol2.getElement());
}
 
Example 11
@UiHandler("col3")
void onCol3(ClickEvent e) {
    MaterialPathAnimator.animate(col3.getElement(), panelTargetCol3.getElement());
}
 
Example 12
@UiHandler("col4")
void onCol4(ClickEvent e) {
    MaterialPathAnimator.animate(col4.getElement(), panelTargetCol4.getElement());
}
 
Example 13
@UiHandler("col5")
void onCol5(ClickEvent e) {
    MaterialPathAnimator.animate(col5.getElement(), panelTargetCol5.getElement());
}
 
Example 14
@UiHandler("col6")
void onCol6(ClickEvent e) {
    MaterialPathAnimator.animate(col6.getElement(), panelTargetCol6.getElement());
}
 
Example 15
@UiHandler("col7")
void onCol7(ClickEvent e) {
    MaterialPathAnimator.animate(col7.getElement(), panelTargetCol7.getElement());
}