Examples of addListener()


Examples of org.apache.tuscany.spi.component.CompositeComponent.addListener()

        RuntimeEventListener listener = createMock(RuntimeEventListener.class);
        listener.onEvent(isA(CompositeStart.class));
        listener.onEvent(eq(event));
        expectLastCall();
        replay(listener);
        composite.addListener(listener);
        composite.start();
        composite.onEvent(event);
    }

    public void testPrepare() {
View Full Code Here

Examples of org.apache.twill.api.TwillController.addListener()

    TwillController controller = runner.prepare(new SleepRunnable(600))
                                       .addLogHandler(new PrinterLogHandler(new PrintWriter(System.out, true)))
                                       .start();

    final CountDownLatch runLatch = new CountDownLatch(1);
    controller.addListener(new ServiceListenerAdapter() {
      @Override
      public void running() {
        runLatch.countDown();
      }
    }, Threads.SAME_THREAD_EXECUTOR);
View Full Code Here

Examples of org.apache.uima.caseditor.editor.contextmenu.ModeMenu.addListener()

    // mode menu
    MenuManager modeMenuManager = new MenuManager("Mode");
    menu.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, modeMenuManager);

    ModeMenu modeMenu = new ModeMenu(typeSytem, this);
    modeMenu.addListener(new IModeMenuListener(){

    public void modeChanged(Type newMode) {
      IAction actionToExecute = new ChangeModeAction(newMode, newMode.getShortName(),
              AnnotationEditor.this);
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestHandler.addListener()

    @Override
    public void onEvent(IEvent <?> event) {
        super.onEvent(event);
        if (event.getPayload() instanceof AjaxRequestHandler) {
            final AjaxRequestHandler target = (AjaxRequestHandler) event.getPayload();
            target.addListener(new IListener() {
                @Override
                public void onBeforeRespond(Map<String, Component> map, AjaxRequestTarget target) {
                }

                @Override
View Full Code Here

Examples of org.apache.wicket.ajax.AjaxRequestTarget.addListener()

  public final AjaxRequestTarget newAjaxRequestTarget(final Page page)
  {
    AjaxRequestTarget target = getAjaxRequestTargetProvider().get(page);
    for (AjaxRequestTarget.IListener listener : ajaxRequestTargetListeners)
    {
      target.addListener(listener);
    }
    return target;
  }

  /**
 
View Full Code Here

Examples of org.apache.xmlgraphics.ps.dsc.DSCParser.addListener()

                    "'to' page number must be equal or larger than the 'from' page number");
        }

        DSCParser parser = new DSCParser(in);
        PSGenerator gen = new PSGenerator(out);
        parser.addListener(new DefaultNestedDocumentHandler(gen));
        int pageCount = 0;

        //Skip DSC header
        DSCHeaderComment header = DSCTools.checkAndSkipDSC30Header(parser);
        header.generate(gen);
View Full Code Here

Examples of org.aperteworkflow.util.vaadin.ui.table.LocalizedPagedTable.addListener()

        table.setPageLength(10);
        table.setImmediate(true);
        table.setSelectable(true);
        table.setContainerDataSource(container);
        if (itemClickListener != null) {
            table.addListener(itemClickListener);
        }
        if (customViewColumns != null && !customViewColumns.isEmpty()) {
      for (Map.Entry<String, ColumnGenerator> entry : customViewColumns.entrySet()) {
                table.addGeneratedColumn(entry.getKey(), entry.getValue());
            }
View Full Code Here

Examples of org.asmatron.messengine.engines.DefaultEventDelegate.addListener()

  public void shouldTestEventEngine() throws Exception {
    final AtomicBoolean invoked = new AtomicBoolean(false);

    DefaultEventDelegate engine = new DefaultEventDelegate();

    engine.addListener(aType, new Listener<CustomEvent>() {
      @Override
      public void handleEvent(CustomEvent eventArgs) {
        invoked.set(true);
      }
View Full Code Here

Examples of org.atmosphere.cpr.Meteor.addListener()

            final Meteor m = Meteor.build(req);
            req.getSession().setAttribute("meteor", m);
            m.suspend(5000, false);
           
            m.broadcast("resume");
            m.addListener(new AtmosphereResourceEventListener(){

                @Override
                public void onSuspend(final AtmosphereResourceEvent<HttpServletRequest, HttpServletResponse> event){
                }
View Full Code Here

Examples of org.beryl.gui.widgets.Button.addListener()

    Panel panel = new Panel(null, null);
    panel.setProperty("border", BorderFactory.createEmptyBorder(1, 1, 1, 1));

    Button button = new Button(panel, null);
    button.setProperty("text", "Edit ...");
    button.addListener("clicked",  name, new GUIEventListener() {
      int counter = 0;

      public void eventOccured(GUIEvent event) {
        counter++;
        if (counter > 1) {
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.