當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。