本文整理匯總了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();
}
}
示例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);
}
示例3: setupAntialiasing
import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@Override
protected void setupAntialiasing(Graphics graphics) {
UIUtil.setupComposite((Graphics2D)graphics);
UISettings.setupAntialiasing(graphics);
}