当前位置: 首页>>代码示例>>Java>>正文


Java BalloonImpl类代码示例

本文整理汇总了Java中com.intellij.ui.BalloonImpl的典型用法代码示例。如果您正苦于以下问题:Java BalloonImpl类的具体用法?Java BalloonImpl怎么用?Java BalloonImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BalloonImpl类属于com.intellij.ui包,在下文中一共展示了BalloonImpl类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createBalloon

import com.intellij.ui.BalloonImpl; //导入依赖的package包/类
@NotNull
@Override
public Balloon createBalloon() {
  final BalloonImpl result = new BalloonImpl(
    myContent, myBorder, myBorderInsets, myFill, myHideOnMouseOutside, myHideOnKeyOutside, myHideOnAction, myShowCallout, myCloseButtonEnabled,
    myFadeoutTime, myHideOnFrameResize, myHideOnLinkClick, myClickHandler, myCloseOnClick, myAnimationCycle, myCalloutShift,
    myPositionChangeXShift, myPositionChangeYShift, myDialogMode, myTitle, myContentInsets, myShadow, mySmallVariant, myBlockClicks,
    myLayer);

  if (myStorage != null && myAnchor != null) {
    List<Balloon> balloons = myStorage.get(myAnchor);
    if (balloons == null) {
      myStorage.put(myAnchor, balloons = new ArrayList<Balloon>());
      Disposer.register(myAnchor, new Disposable() {
        @Override
        public void dispose() {
          List<Balloon> toDispose = myStorage.remove(myAnchor);
          if (toDispose != null) {
            for (Balloon balloon : toDispose) {
              if (!balloon.isDisposed()) {
                Disposer.dispose(balloon);
              }
            }
          }
        }
      });
    }
    balloons.add(result);
    result.addListener(new JBPopupAdapter() {
      @Override
      public void onClosed(LightweightWindowEvent event) {
        if (!result.isDisposed()) {
          Disposer.dispose(result);
        }
      }
    });
  }

  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:BalloonPopupBuilderImpl.java

示例2: createBalloon

import com.intellij.ui.BalloonImpl; //导入依赖的package包/类
@NotNull
public Balloon createBalloon() {
  final BalloonImpl result =
    new BalloonImpl(myContent, myBorder, myFill, myHideOnMouseOutside, myHideOnKeyOutside, myHideOnAction, myShowCalllout,
                    myCloseButtonEnabled, myFadeoutTime, myHideOnFrameResize, myClickHandler, myCloseOnClick, myAnimationCycle,
                    myCalloutShift, myPositionChangeXShift, myPositionChangeYShift, myDialogMode, myTitle, myContentInsets, myShadow,
                    mySmallVariant, myBlockClicks, myLayer);
  if (myAnchor != null) {
    List<Balloon> balloons = myStorage.get(myAnchor);
    if (balloons == null) {
      myStorage.put(myAnchor, balloons = new ArrayList<Balloon>());
      Disposer.register(myAnchor, new Disposable() {
        @Override
        public void dispose() {
          List<Balloon> toDispose = myStorage.remove(myAnchor);
          if (toDispose != null) {
            for (Balloon balloon : toDispose) {
              if (!balloon.isDisposed()) {
                Disposer.dispose(balloon);
              }
            }
          }
        }
      });
    }
    balloons.add(result);
    result.addListener(new JBPopupAdapter() {
      @Override
      public void onClosed(LightweightWindowEvent event) {
        if (!result.isDisposed()) {
          Disposer.dispose(result);
        }
        myStorage.remove(result);
      }
    });
  }
  return result;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:39,代码来源:BalloonPopupBuilderImpl.java

示例3: updateBalloon

import com.intellij.ui.BalloonImpl; //导入依赖的package包/类
private void updateBalloon() {
  boolean correct = false;
  try {
    correct = Pattern.compile(myRegExp.getText()).matcher(mySampleText.getText()).matches();
  } catch (Exception ignore) {}

  mySampleText.setBackground(correct ? new JBColor(new Color(231, 250, 219), new Color(68, 85, 66)) : new JBColor(new Color(255, 177, 160), new Color(110, 43, 40)));
  BalloonImpl balloon = (BalloonImpl)myRef.get();
  if (balloon != null && balloon.isDisposed()) {
    balloon.revalidate();
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:CheckRegExpForm.java

示例4: createBalloon

import com.intellij.ui.BalloonImpl; //导入依赖的package包/类
@Nonnull
@Override
public Balloon createBalloon() {
  final BalloonImpl result =
          new BalloonImpl(myContent, myBorder, myBorderInsets, myFill, myHideOnMouseOutside, myHideOnKeyOutside, myHideOnAction, myHideOnCloseClick,
                          myShowCallout, myCloseButtonEnabled, myFadeoutTime, myHideOnFrameResize, myHideOnLinkClick, myClickHandler, myCloseOnClick,
                          myAnimationCycle, myCalloutShift, myPositionChangeXShift, myPositionChangeYShift, myDialogMode, myTitle, myContentInsets, myShadow,
                          mySmallVariant, myBlockClicks, myLayer, myRequestFocus, myPointerSize, myCornerToPointerDistance);

  if (myStorage != null && myAnchor != null) {
    List<Balloon> balloons = myStorage.get(myAnchor);
    if (balloons == null) {
      myStorage.put(myAnchor, balloons = new ArrayList<>());
      Disposer.register(myAnchor, new Disposable() {
        @Override
        public void dispose() {
          List<Balloon> toDispose = myStorage.remove(myAnchor);
          if (toDispose != null) {
            for (Balloon balloon : toDispose) {
              if (!balloon.isDisposed()) {
                Disposer.dispose(balloon);
              }
            }
          }
        }
      });
    }
    balloons.add(result);
    result.addListener(new JBPopupAdapter() {
      @Override
      public void onClosed(LightweightWindowEvent event) {
        if (!result.isDisposed()) {
          Disposer.dispose(result);
        }
      }
    });
  }

  return result;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:41,代码来源:BalloonPopupBuilderImpl.java


注:本文中的com.intellij.ui.BalloonImpl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。