예제 #1
0
파일: IMDialog.java 프로젝트: tasfe/italk
  @Override
  @SuppressWarnings("unchecked")
  public void hide() {
    SkinManager skinManager = IMContext.getBean(SkinManager.class);
    // 取消注册皮肤管理
    skinManager.unregister(this);

    super.hide();
  }
예제 #2
0
파일: IMDialog.java 프로젝트: tasfe/italk
  @Override
  @SuppressWarnings("unchecked")
  public void show() {
    SkinManager skinManager = IMContext.getBean(SkinManager.class);
    // 注册皮肤管理
    skinManager.register(this);
    installSkin(getSkinService());

    super.show();
  }
예제 #3
0
파일: IMDialog.java 프로젝트: tasfe/italk
  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);
  }