Examples of addEventListener()


Examples of org.jdesktop.wonderland.client.hud.HUD.addEventListener()

        // define the layout of HUD components in the Wonderland main HUD
        compManager.setLayoutManager(new HUDCompassLayoutManager(wonderlandHUD));

        // manage the components in the main HUD
        wonderlandHUD.addEventListener(compManager);

        // create a HUD for icons
        //
        logger.fine("creating icon HUD: " + DEFAULT_HUD_WIDTH + "x" + ICON_HUD_HEIGHT +
                " at " + DEFAULT_HUD_X + ", " + DEFAULT_HUD_Y);
View Full Code Here

Examples of org.jdesktop.wonderland.client.hud.HUDComponent.addEventListener()

        // Maintain an association between components and their windows.
        // Note: it would be nice of the HUD could do this but its tricky.
        hudComponents.put(component, window);

        component.addEventListener(new HUDEventListener() {
            public void HUDObjectChanged(HUDEvent e) {
                if (e.getEventType().equals(HUDEvent.HUDEventType.CLOSED)) {
                    HUDComponent comp = (HUDComponent)e.getObject();
                    if (mainHUD != null) {
                        mainHUD.removeComponent(comp);
View Full Code Here

Examples of org.jdesktop.wonderland.modules.appbase.client.Window2D.addEventListener()

        } else {
            window = createWindow(component);
            component2D.setWindow(window);
        }

        window.addEventListener(new EnterExitEvent3DLogger() {

            @Override
            public boolean propagatesToParent(Event event) {
                return false;
            }
View Full Code Here

Examples of org.kie.api.runtime.KieSession.addEventListener()

                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            }
        };
        ksession.addEventListener(agendaEventListener);

        List list = new ArrayList();
        ksession.setGlobal("list", list);

        // Using the Pseudo Clock.
View Full Code Here

Examples of org.kie.api.runtime.StatelessKieSession.addEventListener()

            public void afterRuleFlowGroupDeactivated(org.kie.api.event.rule.RuleFlowGroupDeactivatedEvent event) {
            }
        };

        ksession.addEventListener(agendaEventListener);

        ksession.execute("1");
        ksession.execute("2");

        assertEquals(2, firings.size());
View Full Code Here

Examples of org.kie.internal.KnowledgeBase.addEventListener()

    @Test
    public void testKnowledgeBaseEventSupportLeak() throws Exception {
        // JBRULES-3666
        KnowledgeBase kbase = getKnowledgeBase();
        KieBaseEventListener listener = new DefaultKieBaseEventListener();
        kbase.addEventListener(listener);
        kbase.addEventListener(listener);
        assertEquals(1, ((KnowledgeBaseImpl) kbase).getKieBaseEventListeners().size());
        kbase.removeEventListener(listener);
        assertEquals(0, ((KnowledgeBaseImpl) kbase).getKieBaseEventListeners().size());
    }
View Full Code Here

Examples of org.kie.internal.runtime.StatefulKnowledgeSession.addEventListener()

        final List created = new ArrayList();
        final List cancelled = new ArrayList();
        final List fired = new ArrayList();

        ks.addEventListener( new DefaultAgendaEventListener() {

            public void matchCreated( MatchCreatedEvent event ) {
                created.add( event.getMatch().getRule().getName() );
            }
View Full Code Here

Examples of org.kie.internal.runtime.StatelessKnowledgeSession.addEventListener()

        KnowledgeBase kbase = loadKnowledgeBaseFromString(kconf, str);
        StatelessKnowledgeSession ksession = createStatelessKnowledgeSession( kbase );
       
        final List list = new ArrayList();
       
        ksession.addEventListener( new AgendaEventListener() {

            public void matchCancelled(MatchCancelledEvent event) {
                assertNotNull( event.getKieRuntime() );
                list.add( event );
            }
View Full Code Here

Examples of org.kie.runtime.KieSession.addEventListener()

    public Void execute(Context context) {
        KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();

        if ( workingMemoryEventlistener != null ) {
            ksession.addEventListener( workingMemoryEventlistener );
        } else if ( agendaEventlistener != null ) {
            ksession.addEventListener( agendaEventlistener );
        } else {
            ksession.addEventListener( processEventListener );
        }
View Full Code Here

Examples of org.kie.runtime.StatefulKnowledgeSession.addEventListener()

    public Void execute(Context context) {
        StatefulKnowledgeSession ksession = ((KnowledgeCommandContext) context).getStatefulKnowledgesession();
       
        if ( workingMemoryEventlistener != null ) {
            ksession.addEventListener( workingMemoryEventlistener );
        } else if ( agendaEventlistener != null ) {
            ksession.addEventListener( agendaEventlistener );
        } else {
            ksession.addEventListener( processEventListener );
        }
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.