use of com.intellij.openapi.ui.AbstractPainter in project intellij-community by JetBrains.
the class IdeBackgroundUtil method initFramePainters.
public static void initFramePainters(@NotNull IdeGlassPaneImpl glassPane) {
PaintersHelper painters = glassPane.getNamedPainters(FRAME_PROP);
PaintersHelper.initWallpaperPainter(FRAME_PROP, painters);
ApplicationInfoEx appInfo = ApplicationInfoEx.getInstanceEx();
String path = /*UIUtil.isUnderDarcula()? appInfo.getEditorBackgroundImageUrl() : */
null;
URL url = path == null ? null : appInfo.getClass().getResource(path);
Image centerImage = url == null ? null : ImageLoader.loadFromUrl(url);
if (centerImage != null) {
painters.addPainter(PaintersHelper.newImagePainter(centerImage, PaintersHelper.Fill.PLAIN, PaintersHelper.Place.TOP_CENTER, 1.0f, JBUI.insets(10, 0, 0, 0)), null);
}
painters.addPainter(new AbstractPainter() {
EditorEmptyTextPainter p = ServiceManager.getService(EditorEmptyTextPainter.class);
@Override
public boolean needsRepaint() {
return true;
}
@Override
public void executePaint(Component component, Graphics2D g) {
p.paintEmptyText((JComponent) component, g);
}
}, null);
}
Aggregations