當前位置: 首頁>>代碼示例>>Java>>正文


Java UIUtil.setupComposite方法代碼示例

本文整理匯總了Java中com.intellij.util.ui.UIUtil.setupComposite方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.setupComposite方法的具體用法?Java UIUtil.setupComposite怎麽用?Java UIUtil.setupComposite使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.util.ui.UIUtil的用法示例。


在下文中一共展示了UIUtil.setupComposite方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: paintComponent

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
public void paintComponent(Graphics g) {
  myApplication.editorPaintStart();

  try {
    Graphics2D gg = !Boolean.TRUE.equals(EditorTextField.SUPPLEMENTARY_KEY.get(myEditor)) ?
                    IdeBackgroundUtil.withEditorBackground(g, this) : (Graphics2D)g;
    UIUtil.setupComposite(gg);
    EditorUIUtil.setupAntialiasing(gg);
    myEditor.paint(gg);
  }
  finally {
    myApplication.editorPaintFinish();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:16,代碼來源:EditorComponentImpl.java

示例2: paintChildren

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
protected void paintChildren(Graphics g) {
  super.paintChildren(g);

  Graphics2D g2 = (Graphics2D)g;
  UISettings.setupAntialiasing(g);

  Font labelFont = JBUI.Fonts.label();
  if (SystemInfo.isWindows) {
    labelFont = JBUI.Fonts.create("Tahoma", 12);
  }

  int startFontSize = Registry.is("ide.new.about") ? 14 : 10;
  for (int labelSize = JBUI.scale(startFontSize); labelSize != JBUI.scale(6); labelSize -= 1) {
    myLinks.clear();
    g2.setPaint(myColor);
    myImage.paintIcon(this, g2, 0, 0);

    g2.setColor(myColor);
    TextRenderer renderer = createTextRenderer(g2);
    UIUtil.setupComposite(g2);
    myFont = labelFont.deriveFont(Font.PLAIN, labelSize);
    myBoldFont = labelFont.deriveFont(Font.BOLD, labelSize + 1);
    try {
      renderer.render(30, 0, myLines);
      break;
    }
    catch (TextRenderer.OverflowException ignore) { }
  }

  ApplicationInfo appInfo = ApplicationInfo.getInstance();
  Rectangle aboutLogoRect = appInfo.getAboutLogoRect();
  if (aboutLogoRect != null) {
    myLinks.add(new Link(aboutLogoRect, appInfo.getCompanyURL()));
  }

  if (appInfo instanceof ApplicationInfoImpl) {
    g2.setColor(((ApplicationInfoImpl)appInfo).getCopyrightForeground());
    if (SystemInfo.isMac) {
      g2.setFont(JBUI.Fonts.miniFont());
    }
    else {
      g2.setFont(JBUI.Fonts.create("Tahoma", 10));
    }
  } else {
    g2.setColor(JBColor.BLACK);
  }

  if (Registry.is("ide.new.about")) {
    g2.setColor(Gray.x33);
    g2.setFont(JBUI.Fonts.label(12));
  }
  final int copyrightX = Registry.is("ide.new.about") ? JBUI.scale(100) : JBUI.scale(30);
  final int copyrightY = Registry.is("ide.new.about") ? JBUI.scale(390) : JBUI.scale(284);
  g2.drawString("\u00A9 2000\u2013" + Calendar.getInstance().get(Calendar.YEAR) + " JetBrains s.r.o. All rights reserved.", copyrightX, copyrightY);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:57,代碼來源:AboutPopup.java

示例3: setupAntialiasing

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
protected void setupAntialiasing(Graphics graphics) {
  UIUtil.setupComposite((Graphics2D)graphics);
  UISettings.setupAntialiasing(graphics);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:JBTerminalPanel.java


注:本文中的com.intellij.util.ui.UIUtil.setupComposite方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。