Пример #1
0
 public ActionRedirect updateMousePosition(
     final IUIBean bean, final String listenerType, final String actionName, final EventObject e) {
   final GameBean gb = (GameBean) bean;
   gb.setMouseActualX(new Integer(EventMethods.getX(e)));
   gb.setMouseActualY(new Integer(EventMethods.getY(e)));
   return null;
 }
Пример #2
0
 public ActionRedirect forwardBackward(
     final IUIBean bean, final String listenerType, final String actionName, final EventObject e) {
   final GameBean gb = (GameBean) bean;
   MoveObjectHelper.move(
       gb.getSc3d(),
       GameBean.CAMERA,
       gb.getSc3d().getCameraTransformGroup(),
       2,
       EventMethods.getWheelRotation(e),
       0,
       EventMethods.getScrollAmount(e),
       0,
       0);
   return null;
 }
Пример #3
0
  private void setPressedAttributes(final GameBean gb, final Session session, final EventObject e) {
    gb.setMousePressX(new Integer(EventMethods.getX(e)));
    gb.setMousePressY(new Integer(EventMethods.getY(e)));
    gb.setButtonPressed(new Integer(EventMethods.getButton(e)));

    Object stg =
        S3DHelper.getScenePicker()
            .getTransformGroupAt(
                gb.getSc3d(), "LetterBranchGroup", EventMethods.getX(e), EventMethods.getY(e));
    if (stg == null) {
      stg = gb.getSc3d().getCameraTransformGroup();
      gb.setTypeOfObjectMoved(GameBean.CAMERA);
    } else {
      gb.setTypeOfObjectMoved("Letter");
    }

    gb.setMoveObject(stg);
  }