Package org.jdesktop.wonderland.client.jme.input

Examples of org.jdesktop.wonderland.client.jme.input.MouseEnterExitEvent3D


     * an entity with event listeners that don't propagate to under then the obscured
     * entity is effectively exitted. This is an example of an "event shadow."
     */
    private void generateEnterExitEvents (MouseEvent awtEvent, PickInfo pickInfo) {

        MouseEnterExitEvent3D enterEventProto =
      createEnterExitEventFromAwtEvent(awtEvent, MouseEvent.MOUSE_ENTERED);
  MouseEnterExitEvent3D exitEventProto =
      createEnterExitEventFromAwtEvent(awtEvent, MouseEvent.MOUSE_EXITED);

  // Calculate which entities have the pointer inside
  calcInsideEntities(awtEvent, enterEventProto, pickInfo);

View Full Code Here


      } else {
    Iterator<EventListener> it = listeners.iterator();
    while (it.hasNext()) {
        EventListener listener = it.next();
        if (listener.isEnabled()) {
      MouseEnterExitEvent3D distribEvent = (MouseEnterExitEvent3D)
          EventDistributor.createEventForEntity(enterEventProto, entity);
      distribEvent.setPickDetails(pickDetails);
      distribEvent.setPickInfo(pickInfo);
      // TODO: someday: decommit for now
      //propagatesToUnder |= listener.propagatesToUnder(distribEvent);
        }
    }
    if (propagatesToUnder) {
View Full Code Here

    /**
     * Send the exit events to the no longer inside entities.
     */
    private void sendExitEvents (MouseEnterExitEvent3D exitEventProto, PickInfo pickInfo) {
  for (EntityAndPickDetails entry : noLongerInsideEntities) {
      MouseEnterExitEvent3D exitEvent = (MouseEnterExitEvent3D)
    EventDistributor.createEventForEntity(exitEventProto, entry.entity);
      exitEvent.setPickDetails(entry.pickDetails);
      exitEvent.setPickInfo(pickInfo);
      //System.err.println("Try sending exitEvent = " + exitEvent);
      eventDistributor.tryGlobalListeners(exitEvent);
      //System.err.println("Try entity = " + entry.entity);
      tryListenersForEntity(entry.entity, exitEvent);
  }
View Full Code Here

    /**
     * Send the enter events to the newly inside entities.
     */
    private void sendEnterEvents (MouseEnterExitEvent3D enterEventProto, PickInfo pickInfo) {
  for (EntityAndPickDetails entry : newlyInsideEntities) {
      MouseEnterExitEvent3D enterEvent = (MouseEnterExitEvent3D)
    EventDistributor.createEventForEntity(enterEventProto, entry.entity);
      enterEvent.setPickDetails(entry.pickDetails);
      enterEvent.setPickInfo(pickInfo);
      eventDistributor.tryGlobalListeners(enterEvent);
      tryListenersForEntity(entry.entity, enterEvent);
  }
    }
View Full Code Here

  return new Class[] { MouseEnterExitEvent3D.class };
    }

    @Override
    public void commitEvent (Event event) {
  MouseEnterExitEvent3D eeEvent = (MouseEnterExitEvent3D) event;

  StringBuffer sb = new StringBuffer();
  if (name != null) {
      sb.append(name + ": ");
  }
  String typeStr = eeEvent.getID() == MouseEvent.MOUSE_ENTERED ? "ENTER" : "EXIT";
  sb.append(typeStr + ", entity = " + event.getEntity());
  logger.info(sb.toString());
    }
View Full Code Here

    public boolean isEnter(Event event) {
        // If the event carries an Entity and is a mouse enter event and the
        // Entity can be selected (N.Y.I)
        if (event instanceof MouseEnterExitEvent3D) {
            MouseEnterExitEvent3D mee = (MouseEnterExitEvent3D)event;
            return mee.isEnter() == true;
        }
        return false;
    }
View Full Code Here

    public boolean isExit(Event event) {
        // If the event carries an Entity and is a mouse exit event and the
        // Entity can be selected (N.Y.I)
        if (event instanceof MouseEnterExitEvent3D) {
            MouseEnterExitEvent3D mee = (MouseEnterExitEvent3D)event;
            return mee.isEnter() == false;
        }
        return false
    }
View Full Code Here

                return false;
            }

            @Override
            public void commitEvent(Event event) {
                MouseEnterExitEvent3D mouseEvent = (MouseEnterExitEvent3D) event;
                switch (mouseEvent.getID()) {
                    case MouseEvent.MOUSE_ENTERED:
                        if (logger.isLoggable(Level.FINEST)) {
                            logger.finest("mouse entered component: " + component);
                        }
                        setFocused(component, true);
View Full Code Here

        }

        @Override
        public void commitEvent(Event event) {
            if (event instanceof MouseEnterExitEvent3D) {
                MouseEnterExitEvent3D mevt = (MouseEnterExitEvent3D) event;
                if (mevt.isEnter()) {
                    setRenderState(innerOrb, HOVER_MATERIALSTATE);
                    setRenderState(innerOrb, HOVER_SHADESTATE);
                } else {
                    setRenderState(innerOrb, DEFAULT_MATERIALSTATE);
                    setRenderState(innerOrb, DEFAULT_SHADESTATE);
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.client.jme.input.MouseEnterExitEvent3D

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.