use of com.intellij.ide.ui.laf.darcula.ui.DarculaEditorTextFieldBorder in project intellij-community by JetBrains.
the class EditorTextField method setupBorder.
protected void setupBorder(@NotNull EditorEx editor) {
if (UIUtil.isUnderAquaLookAndFeel() || UIUtil.isUnderDarcula() || UIUtil.isUnderIntelliJLaF()) {
editor.setBorder(UIUtil.isUnderDarcula() || UIUtil.isUnderIntelliJLaF() ? new DarculaEditorTextFieldBorder() : new MacUIUtil.EditorTextFieldBorder(this));
editor.addFocusListener(new FocusChangeListener() {
@Override
public void focusGained(Editor editor) {
repaint();
}
@Override
public void focusLost(Editor editor) {
repaint();
}
});
} else if (UIUtil.isUnderAlloyLookAndFeel() || UIUtil.isUnderJGoodiesLookAndFeel()) {
editor.setBorder(BorderFactory.createCompoundBorder(UIUtil.getTextFieldBorder(), BorderFactory.createEmptyBorder(1, 1, 1, 1)));
} else {
editor.setBorder(BorderFactory.createCompoundBorder(UIUtil.getTextFieldBorder(), BorderFactory.createEmptyBorder(2, 2, 2, 2)));
}
}
Aggregations