Package org.uberfire.client.workbench.widgets.notifications

Examples of org.uberfire.client.workbench.widgets.notifications.NotificationPopupView


     * @param event
     */
    public void addNotification( @Observes final DesignerNotificationEvent event ) {

        //Create a Notification pop-up. Because it is instantiated with CDI we need to manually destroy it when finished
        final NotificationPopupView view = iocManager.lookupBean( NotificationPopupView.class ).getInstance();
        activeNotifications.add( view );
        view.setPopupPosition( getMargin(),
                activeNotifications.size() * SPACING );
        view.setNotification( event.getNotification() );
        view.setType( event.getType() );
        view.setNotificationWidth( getWidth() + "px" );
        view.show( new Command() {

            @Override
            public void execute() {
                //The notification has been shown and can now be removed
                deactiveNotifications.add( view );
View Full Code Here


        }
        if ( deactiveNotifications.size() == 0 ) {
            return;
        }
        removing = true;
        final NotificationPopupView view = deactiveNotifications.get( 0 );
        final LinearFadeOutAnimation fadeOutAnimation = new LinearFadeOutAnimation( view ) {

            @Override
            public void onUpdate( double progress ) {
                super.onUpdate( progress );
                for ( int i = 0; i < activeNotifications.size(); i++ ) {
                    NotificationPopupView v = activeNotifications.get( i );
                    final int left = v.getPopupLeft();
                    final int top = (int) ( ( ( i + 1 ) * SPACING ) - ( progress * SPACING ) );
                    v.setPopupPosition( left,
                            top );
                }
            }

            @Override
View Full Code Here

TOP

Related Classes of org.uberfire.client.workbench.widgets.notifications.NotificationPopupView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.