IntelliJ . , , IntelliJ. IDE ( , , ..), : UIManager.put("XXX.font", new Font("fontName", style, size))
XXX - , Label, TextField, Tree ..). Swing (IntelliJ Swing framework) : Java Swing? IntelliJ UI. :
import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import com.intellij.ui.content.Content;
import com.intellij.ui.content.ContentFactory;
import javax.swing.*;
import java.awt.*;
public class MyUIPlugin implements ToolWindowFactory
{
private ToolWindow myToolWindow;
public static final String TOOL_WINDOW_ID = "MyUISettings";
public MyUIPlugin() {}
public void createToolWindowContent(final Project project, final ToolWindow toolWindow) {
myToolWindow = toolWindow;
this.createContent(toolWindow);
}
public void createContent(final ToolWindow toolWindow) {
final ContentFactory contentFactory = toolWindow.getContentManager().getFactory();
JLabel myPluginUI = new JLabel("This is empty panel with my custom fonts settings behind it");
final Content content = contentFactory.createContent(myPluginUI, "", true);
toolWindow.getContentManager().addContent(content);
UIManager.put("TextField.font", new Font(...));
UIManager.put("List.font", new Font(...));
UIManager.put("Label.font", new Font(...));
UIManager.put("Button.font", new Font(...));
.....
SwingUtilities.updateComponentTreeUI(myPluginUI);
}
}
, Swing JLabel placeholder, , , GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(). IntelliJ UI.