Ejemplo n.º 1
0
  @PostConstruct
  public void init() {
    imBridge = new WebQQBridge();
    imBridge.setApp(this);

    UIEventDispatcher uiEventDispatcher = new UIEventDispatcher(this);
    eventService.register(uiEventDispatcher.getEventTypes(), uiEventDispatcher);
  }
Ejemplo n.º 2
0
  public IMDialog(IMFrame owner) {
    super(owner);
    this.owner = owner;

    i18nService = IMContext.getBean(I18nService.class);
    skinService = IMContext.getBean(SkinService.class);
    resourceService = IMContext.getBean(ResourceService.class);
    eventService = IMContext.getBean(EventService.class);

    setDefaultCloseOperation(WebFrame.DISPOSE_ON_CLOSE);
    getRootPane().setDoubleBuffered(true);
    // 创建wrap,并设置为默认面板(该面板为窗口阴影面板)
    contentWrap = new IMFrameWrap();
    contentWrap.installSkin(getSkinService());
    super.setContentPane(contentWrap);

    // 去了默认边框
    setUndecorated(true);
    // 把窗口设置为透明
    AWTUtilities.setWindowOpaque(this, false);

    UIEventDispatcher uiEventDispatcher = new UIEventDispatcher(this);
    eventService.register(uiEventDispatcher.getEventTypes(), uiEventDispatcher);
  }
Ejemplo n.º 3
0
 @IMEventHandler(IMEventType.IMAGE_VERIFY_NEED)
 protected void processNeedVerify(IMEvent imEvent) {
   eventService.broadcast(new UIEvent(UIEventType.IMAGE_VERIFY_NEED, imEvent.getTarget()));
 }
Ejemplo n.º 4
0
 @IMEventHandler(IMEventType.LOGIN_ERROR)
 protected void processLoginError(IMEvent imEvent) {
   QQException ex = (QQException) imEvent.getTarget();
   eventService.broadcast(new UIEvent(UIEventType.LOGIN_ERROR, ex.getMessage()));
 }
Ejemplo n.º 5
0
 @IMEventHandler(IMEventType.LOGIN_SUCCESS)
 protected void processLoginSuccess(IMEvent imEvent) {
   eventService.broadcast(new UIEvent(UIEventType.LOGIN_SUCCESS));
 }
Ejemplo n.º 6
0
 @IMEventHandler(IMEventType.USER_FACE_UPDATE)
 protected void processUserFaceUpdate(IMEvent imEvent) {
   eventService.broadcast(new UIEvent(UIEventType.USER_FACE_UPDATE, imEvent.getTarget()));
 }
Ejemplo n.º 7
0
 @IMEventHandler(IMEventType.BUDDY_LIST_UPDATE)
 protected void processBuddyListUpdate(IMEvent imEvent) {
   eventService.broadcast(new UIEvent(UIEventType.BUDDY_LIST_UPDATE, imEvent.getTarget()));
 }
Ejemplo n.º 8
0
 @IMEventHandler(IMEventType.SELF_SIGN_UPDATE)
 protected void processSelfSignUpdate(IMEvent imEvent) {
   eventService.broadcast(new UIEvent(UIEventType.SELF_SIGN_UPDATE, imEvent.getTarget()));
 }
Ejemplo n.º 9
0
 /**
  * 广播 UIEvent
  *
  * @param type
  * @param target
  */
 protected void broadcastUIEvent(UIEventType type, Object target) {
   eventService.broadcast(new UIEvent(type, target));
 }
Ejemplo n.º 10
0
 /**
  * 广播 UIEvent
  *
  * @param uiEvent
  */
 public void broadcastUIEvent(UIEvent uiEvent) {
   eventService.broadcast(uiEvent);
 }