Examples of ActionEvent


Examples of java.awt.event.ActionEvent

      return preferredSize;
    }

    public void mouseClicked(MouseEvent e) {
      if (callback != null) {
        callback.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "clicked")); //$NON-NLS-1$
      }
      hideAndRemove(this);
    }
View Full Code Here

Examples of java.awt.event.ActionEvent

            return preferredSize;
        }

        public void mouseClicked(MouseEvent e) {
            if (callback != null) {
                callback.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "clicked"));
            }
            hideAndRemove(this);
        }
View Full Code Here

Examples of java.awt.event.ActionEvent

        public void mouseClicked(MouseEvent e) {
            if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) != 0) {
                int clicked = getIndexForLocation(e.getX(), e.getY());
                if (clicked != -1 && clicked < menu.getChildCount()) {
                    Action action = menu.getChild(clicked);
                    action.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, action.getName(), e.getModifiers()));
                }
            }
            hideMenuWindow();

        }
View Full Code Here

Examples of javafx.event.ActionEvent

     * false.
     */
    public void fire() {
        if (!isDisabled()) {
            setSelected(!isSelected());
            fireEvent(new ActionEvent());
        }
    }
View Full Code Here

Examples of javax.faces.event.ActionEvent

                    command,
                    context)))
        {
            final MethodBinding binding = command.getActionOpen();
            command.setAction(binding);
            final ActionEvent actionEvent = new ActionEvent(command);
            if (command.isImmediate())
            {
                command.queueEventImmediate(actionEvent);
            }
            else
            {
                command.queueEventNormal(actionEvent);
            }
        }
        else if (popupAction != null && popupAction.equals(getHiddenFieldClose(
                    command,
                    context)))
        {
            final MethodBinding binding = command.getActionClose();
            if (binding != null)
            {
                command.setAction(binding);
                ActionEvent actionEvent = new ActionEvent(command);
                command.queueEventImmediate(actionEvent);
            }
        }
    }
View Full Code Here

Examples of jcurses.event.ActionEvent

    _listenerManager.removeListener(listener);
  }
 
 
  private void doAction() {
    _listenerManager.handleEvent(new ActionEvent(this));
  }
View Full Code Here

Examples of net.solosky.maplefetion.event.ActionEvent

      Dialog.assertActionEvent(future.waitActionEventWithException(), ActionEventType.SUCCESS);
     
      //用户验证
      future.clear();
      serverDialog.userAuth(presence, listener);
      ActionEvent event = future.waitActionEventWithoutException();
      if(event.getEventType()==ActionEventType.SUCCESS){
        this.updateLoginState(LoginState.SIPC_REGISGER_SUCCESS, null);
      }else if(event.getEventType()==ActionEventType.FAILURE){
        FailureEvent evt = (FailureEvent) event;
        FailureType type =  evt.getFailureType();
        if(type==FailureType.REGISTER_FORBIDDEN){
          throw new LoginException(LoginState.SIPC_ACCOUNT_FORBIDDEN); //帐号限制登录,可能存在不安全因素,请修改密码后再登录
        }else if(type==FailureType.AUTHORIZATION_FAIL){
View Full Code Here

Examples of net.solosky.maplefetion.event.ActionEvent

      ScheduleSMS sc = it.next();
      readyList.add(sc);
      if(readyList.size()==20){
        future.clear();
        dialog.getScheduleSMSInfo(readyList, future);
        ActionEvent event = future.waitActionEventWithoutException();
        if(event.getEventType()==ActionEventType.SUCCESS){
          readyList.clear();    //成功继续下一次请求
        }else{
          return event;      //失败返回这个错误事件
        }
      }
View Full Code Here

Examples of net.solosky.maplefetion.event.ActionEvent

    }
  }
 
  @Override
  public void run() {
    ActionEvent event = this.getScheduleSMSList();
    if(event.getEventType()==ActionEventType.SUCCESS){
      event = this.getScheduleSMSInfo();
    }
   
    if(listener!=nulllistener.fireEevent(event);
  }
View Full Code Here

Examples of net.solosky.maplefetion.event.ActionEvent

      if(state==LoginState.LOGIN_SUCCESS){  //登录成功
        System.out.println("登录成功,正在发送消息至 "+args[2]+",请稍候...");                     
         
        ActionEventFuture future = new ActionEventFuture()//建立一个Future来等待操作事件     
        client.sendChatMessage(Long.parseLong(args[2]), new Message(args[3]), future);
        ActionEvent event = future.waitActionEventWithoutException()//等待操作完成事件
        switch(event.getEventType()){
         
          case SUCCESS:
            SendChatMessageSuccessEvent evt = (SendChatMessageSuccessEvent) event;
            if(evt.isSendToMobile()){
              System.out.println("发送成功,消息已通过短信发送到对方手机!");
            }else if(evt.isSendToClient()){
              System.out.println("发送成功,消息已通过服务直接发送到对方客户端!");
            }
            break;
           
          case FAILURE:
            FailureEvent evt2 = (FailureEvent) event;
            switch(evt2.getFailureType()){
              case BUDDY_NOT_FOUND:
                System.out.println("发送失败, 该用户可能不是你好友,请尝试添加该用户为好友后再发送消息。");
                break;
              case USER_NOT_FOUND:
                System.out.println("发送失败, 该用户不是移动用户。");
                break;
              case SIPC_FAIL:
                System.out.println("发送失败, 服务器返回了错误的信息。");
                break;
              case UNKNOWN_FAIL:
                System.out.println("发送失败, 不知道错在哪里。");
               
              case REQEUST_FAIL:
                RequestFailureEvent evt3 = (RequestFailureEvent) event;
                System.out.println("提示:"+evt3.getReason()+", 更多信息请访问:"+evt3.getReason());
               
              default:
                System.out.println("发送消息失败!"+event.toString());
            }
            break;
         
          /* 以下三个错误状态是在异步发送消息的情况才会发生,
           * 为了方便处理,使用waitActionEventWithException()同步的情况下,这三个错误是通过异常来处理的
 
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.