Examples of EventCallback


Examples of org.mule.tck.functional.EventCallback

    public void testComparator() throws Exception
    {

        final CountDownLatch countDown = new CountDownLatch(2);
        EventCallback callback = new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                int index = (int) countDown.getCount() - 1;
                assertEquals(FILE_NAMES[index], context.getMessage().getOutboundProperty(FileConnector.PROPERTY_ORIGINAL_FILENAME));
View Full Code Here

Examples of org.mule.tck.functional.EventCallback

    }

    public void testWorkDirectory() throws Exception
    {
        FunctionalTestComponent ftc = (FunctionalTestComponent) getComponent("relay");
        ftc.setEventCallback(new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                File workDir = new File(".mule/work");
                String[] filenames = workDir.list();
View Full Code Here

Examples of org.mule.tck.functional.EventCallback

            {
                Element ele = (Element) list.item(i);
                String c = ele.getAttribute("class");
                try
                {
                    EventCallback cb = (EventCallback)ClassUtils.instanciateClass(c);
                    props.put("eventCallback", cb);

                }
                catch (Exception e)
                {
View Full Code Here

Examples of org.persvr.remote.EventStream.EventCallback

      final HttpServletRequest request) throws IOException {
    if (jettyContinuations) {
      // must keep the full class names in there so we can conditionally try to use Jetty continuations, and not fail on class load (due to imports)
      request.setAttribute("org.persvr.suspended", true);
      final org.mortbay.util.ajax.Continuation continuation = org.mortbay.util.ajax.ContinuationSupport.getContinuation(request, null);
      EventCallback callback = new EventCallback() {

        public void onEvent() throws IOException {
          request.setAttribute("org.persvr.suspended", false);
          continuation.resume();
        }
View Full Code Here

Examples of org.sgx.yuigwt.yui.event.EventCallback

    footer = body.one("#ft");

    drawTestNav(Y);

    // //java source button
    Button showJavaButton = Y.newButton(Button.config().label(constants.showJava()).render(extraContent).on("click", new EventCallback() {
      @Override
      public void call(EventFacade e) {
        doShowCurrentTestSources2();
      }
    }));
    showJavaButton.srcNode().setStyles(Style.create().fontSize("1.2em").fontWeight("bolder").textDecoration("underline").margin("10px 0px"));

    // test description button
    Button descrButton = Y.newButton(Button.config().label("Test description")).render(extraContent).on("click", new EventCallback() {
      @Override
      public void call(EventFacade e) {
        showCurrentTestDescription(Y);
      }
    }).cast();
    // descrButton.contentBox().setStyle("width", "100%");

    // this gallery sources button
    Button showSurceButton = Y.newButton(Button.config().label(constants.thisExampleGallerySources())).render(extraContent).on("click", new EventCallback() {
      @Override
      public void call(EventFacade e) {
        Map<String, ResourcePrototype> r = new HashMap<String, ResourcePrototype>();
        r.put(constants.thisExampleGallerySources(), TestResources.instance.Gallery());
        doShowSources2(r);
        // showJavaSource2(Y, TestResources.instance.Gallery(),
        // constants.thisExampleGallerySources(), 0);
      }
    }).cast();
    // showSurceButton.contentBox().setStyle("width", "100%");

    Button aboutButton = Y.newButton(Button.config().label("About")).render(extraContent).on("click", new EventCallback() {
      @Override
      public void call(EventFacade e) {
        showAboutThisApplication(Y);
      }
    }).cast();
View Full Code Here

Examples of org.sgx.yuigwt.yui.event.EventCallback

  }

  private void drawAllTest(YuiGalleryContext Y, Node parent) {

    for (final Test test : util.getTests()) {
      Y.newButton(Button.config().label(test.getName()).render(parent).on("click", new EventCallback() {
        @Override
        public void call(EventFacade e) {
          setCurrentTest(test);
        }
      }));
View Full Code Here

Examples of org.sgx.yuigwt.yui.event.EventCallback

      acc1.addItem(item1);

      Node testParent = Y.one("#" + parentId);
      for (final Test test : tests) {
        Y.newButton(Button.config().label(test.getName()).render(testParent).on("click", new EventCallback() {
          @Override
          public void call(EventFacade e) {
            setCurrentTest(test);
          }
        }));
View Full Code Here

Examples of org.sgx.yuigwt.yui.event.EventCallback

  final static int vdiff = 105;
  final static String sel = "#nav .content, #main .content, #extra .content";

  private void installHeightHack(final YuiContext Y) {
    Y.on("windowresize", new EventCallback() {
      @Override
      public void call(EventFacade e) {
        ssheet1.set(sel, Style.create().height((getMainContent().winHeight() - vdiff) + "px"));
      }
    });
View Full Code Here

Examples of org.sgx.yuigwt.yui.event.EventCallback

    // Using round to round sub-pixel values for FF3 just
      // to make the text box values prettier.
      xInput.set("value", overlay.getInt("x"));
      yInput.set("value", overlay.getInt("y"));
     
      Y.on("click", new EventCallback() {     
      @Override
      public void call(EventFacade e) {
        double x = Double.parseDouble(xInput.getString("value")),
          y = Double.parseDouble(yInput.getString("value"));
        overlay.move(x, y);
View Full Code Here

Examples of org.sgx.yuigwt.yui.event.EventCallback

    //create a draggable console
    final Console console1 = Y.newConsole(ConsoleConfig.create());
    console1.plug(Y.Plugin().Drag());
   
    //be a nasty console catching each log entry and asking for confirmation.
    console1.before(Console.EVENT_ENTRY, new EventCallback() {     
      @Override
      public void call(EventFacade e) {
        if(!Window.confirm("Do you really want to add the msg: "+((ConsoleEvent)e).message().message()+" ? "))  {
          Window.alert("preventing");
          e.preventDefault();
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.