UISettings — use smart state class (stored properties), part 7

This commit is contained in:
Vladimir Krivosheev
2017-02-03 11:33:41 +01:00
parent 913b68a5a0
commit c0b4796d2d
65 changed files with 403 additions and 332 deletions
@@ -524,7 +524,7 @@ public final class XXXXX extends UserDataHolderBase implements EditorEx, Highlig
myGutterComponent = new EditorGutterComponentImpl(this);
initComponent();
myScrollingModel = new ScrollingModelImpl(this);
if (UISettings.getInstance().PRESENTATION_MODE) {
if (UISettings.getInstance().getPresentationMode()) {
setFontSize(UISettings.getInstance().PRESENTATION_MODE_FONT_SIZE);
}
@@ -6907,7 +6907,7 @@ public final class XXXXX extends UserDataHolderBase implements EditorEx, Highlig
}
boolean isInPresentationMode() {
return UISettings.getInstance().PRESENTATION_MODE && EditorUtil.isRealFileEditor(this);
return UISettings.getInstance().getPresentationMode() && EditorUtil.isRealFileEditor(this);
}
@Override
@@ -7000,7 +7000,7 @@ public final class XXXXX extends UserDataHolderBase implements EditorEx, Highlig
toolWindowIsNotEmpty();
//noinspection ConstantConditions
Component header = myHeaderPanel == null ? null : ArrayUtil.getFirstElement(myHeaderPanel.getComponents());
boolean paintTop = thereIsSomethingAbove && header == null && UISettings.getInstance().EDITOR_TAB_PLACEMENT != SwingConstants.TOP;
boolean paintTop = thereIsSomethingAbove && header == null && UISettings.getInstance().getEditorTabPlacement() != SwingConstants.TOP;
return splitters == null ? super.getBorderInsets(c) : new Insets(paintTop ? 1 : 0, 0, 0, 0);
}
@@ -547,7 +547,7 @@ public final class YYYYYYY extends UserDataHolderBase implements EditorEx, Highl
myGutterComponent = new EditorGutterComponentImpl(this);
initComponent();
myScrollingModel = new ScrollingModelImpl(this);
if (UISettings.getInstance().PRESENTATION_MODE) {
if (UISettings.getInstance().getPresentationMode()) {
setFontSize(UISettings.getInstance().PRESENTATION_MODE_FONT_SIZE);
}
@@ -6902,7 +6902,7 @@ public final class YYYYYYY extends UserDataHolderBase implements EditorEx, Highl
}
boolean isInPresentationMode() {
return UISettings.getInstance().PRESENTATION_MODE && EditorUtil.isRealFileEditor(this);
return UISettings.getInstance().getPresentationMode() && EditorUtil.isRealFileEditor(this);
}
@Override
@@ -6996,7 +6996,7 @@ public final class YYYYYYY extends UserDataHolderBase implements EditorEx, Highl
toolWindowIsNotEmpty();
//noinspection ConstantConditions
Component header = myHeaderPanel == null ? null : ArrayUtil.getFirstElement(myHeaderPanel.getComponents());
boolean paintTop = thereIsSomethingAbove && header == null && UISettings.getInstance().EDITOR_TAB_PLACEMENT != SwingConstants.TOP;
boolean paintTop = thereIsSomethingAbove && header == null && UISettings.getInstance().getEditorTabPlacement() != SwingConstants.TOP;
return splitters == null ? super.getBorderInsets(c) : new Insets(paintTop ? 1 : 0, 0, 0, 0);
}