Examples of WindowEvent


Examples of java.awt.event.WindowEvent

  }

  @Override
  void exit() {
    mainWindow.windowClosing(new WindowEvent(mainWindow, WindowEvent.WINDOW_CLOSING));
  }
View Full Code Here

Examples of java.awt.event.WindowEvent

   
  }

  @Override
  void exit() {
    mainWindow.windowClosing(new WindowEvent(mainWindow, WindowEvent.WINDOW_CLOSING));
  }
View Full Code Here

Examples of javafx.stage.WindowEvent

    public void close() {
        final Stage stage = undecorator.getStage();
        Platform.runLater(new Runnable() {
            @Override
            public void run() {
                stage.fireEvent(new WindowEvent(stage, WindowEvent.WINDOW_CLOSE_REQUEST));
            }
        });

    }
View Full Code Here

Examples of jcurses.event.WindowEvent

    *
  */
 
  public boolean tryToClose() {
    if (_listenerManager.countListeners() > 0) {
      _listenerManager.handleEvent(new WindowEvent(this, WindowEvent.CLOSING));
      return isClosed();
    } else {
      close();
      return true;
    }
View Full Code Here

Examples of org.gatein.pc.controller.event.WindowEvent

         EventPhaseContext phaseContext = new EventPhaseContext(controller, context, log);

         // Feed session it with the events that may have been produced
         for (UpdateNavigationalStateResponse.Event portletEvent : updateResponse.getEvents())
         {
            if (!phaseContext.push(new WindowEvent(portletEvent.getName(), portletEvent.getPayload(), portletRequest.getWindowId())))
            {
               return new PageUpdateResponse(updateResponse, requestProperties, pageNavigationalState, PortletResponse.INTERRUPTED);
            }
         }

         // Deliver events
         while (phaseContext.hasNext())
         {
            WindowEvent toConsumeEvent = phaseContext.next();

            // Apply consumed event quota if necessary
            int consumedEventThreshold = controller.getConsumedEventThreshold();
            if (consumedEventThreshold >= 0)
            {
               if (phaseContext.consumedEventSize + 1 > consumedEventThreshold)
               {
                  log.trace("Event distribution interrupted because the maximum number of consumed event is reached");
                  safeInvoker.eventDiscarded(eventCC, phaseContext, toConsumeEvent, EventControllerContext.CONSUMED_EVENT_FLOODED);
                  return new PageUpdateResponse(updateResponse, requestProperties, pageNavigationalState, PortletResponse.INTERRUPTED);
               }
            }

            //
            PortletInvocationResponse eventResponse;
            try
            {
               eventResponse = deliverEvent(context, toConsumeEvent, pageNavigationalState, requestProperties.getCookies());
            }
            catch (Exception e)
            {
               log.trace("Event delivery of " + toConsumeEvent + " failed", e);
               safeInvoker.eventFailed(eventCC, phaseContext, toConsumeEvent, e);
               continue;
            }

            // Now it is consumed
            phaseContext.consumedEventSize++;

            // Update nav state if needed
            if (eventResponse instanceof UpdateNavigationalStateResponse)
            {
               UpdateNavigationalStateResponse eventStateResponse = (UpdateNavigationalStateResponse)eventResponse;

               // Update ns
               updateNavigationalState(context, toConsumeEvent.getWindowId(), eventStateResponse, pageNavigationalState);

               // Add events to source event queue
               for (UpdateNavigationalStateResponse.Event portletEvent : eventStateResponse.getEvents())
               {
                  WindowEvent toRouteEvent = new WindowEvent(portletEvent.getName(), portletEvent.getPayload(), toConsumeEvent.getWindowId());

                  //
                  if (!phaseContext.push(toConsumeEvent,  toRouteEvent))
                  {
                     return new PageUpdateResponse(updateResponse, requestProperties, pageNavigationalState, PortletResponse.INTERRUPTED);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.