From 8e131b11b3c7229c4bf4a21b45a7a51054e353de Mon Sep 17 00:00:00 2001 From: weisj Date: Sun, 25 Oct 2020 00:52:10 +0200 Subject: [PATCH] Update style. Enum declarations should always be in separate lines. --- .../weisj/darklaf/components/TabEvent.java | 4 +++- .../components/border/DropShadowBorder.java | 9 ++++++++- .../components/filetree/FileTreeNode.java | 3 ++- .../components/tooltip/ToolTipStyle.java | 4 +++- .../darklaf/graphics/DefaultInterpolator.java | 11 ++++++++--- .../task/ForegroundColorGenerationTask.java | 4 +++- .../weisj/darklaf/ui/DarkPopupFactory.java | 4 +++- .../ui/colorchooser/ColorTriangle.java | 4 +++- .../darklaf/ui/splitpane/DividerStyle.java | 3 ++- .../weisj/darklaf/ui/text/DarkCaret.java | 5 ++++- .../darklaf/ui/text/DarkTextFieldUI.java | 4 +++- darklaf_java.eclipseformat.xml | 4 ++-- .../weisj/darklaf/icons/AwareIconStyle.java | 3 ++- .../darklaf/theme/info/ColorToneRule.java | 3 ++- .../darklaf/theme/info/ContrastRule.java | 3 ++- .../darklaf/theme/info/FontSizePreset.java | 9 ++++++++- .../darklaf/theme/info/PresetIconRule.java | 4 +++- .../weisj/darklaf/util/AlignmentExt.java | 19 +++++++++++++++---- 18 files changed, 76 insertions(+), 24 deletions(-) diff --git a/core/src/main/java/com/github/weisj/darklaf/components/TabEvent.java b/core/src/main/java/com/github/weisj/darklaf/components/TabEvent.java index 675257d1..19d5d394 100644 --- a/core/src/main/java/com/github/weisj/darklaf/components/TabEvent.java +++ b/core/src/main/java/com/github/weisj/darklaf/components/TabEvent.java @@ -63,7 +63,9 @@ public class TabEvent extends ActionEvent { } public enum Type { - TAB_OPENED("tabOpened"), TAB_CLOSED("tabClosed"), TAB_CLOSING("tabClosing"); + TAB_OPENED("tabOpened"), + TAB_CLOSED("tabClosed"), + TAB_CLOSING("tabClosing"); private final String command; diff --git a/core/src/main/java/com/github/weisj/darklaf/components/border/DropShadowBorder.java b/core/src/main/java/com/github/weisj/darklaf/components/border/DropShadowBorder.java index 7f98d45e..0e32b360 100644 --- a/core/src/main/java/com/github/weisj/darklaf/components/border/DropShadowBorder.java +++ b/core/src/main/java/com/github/weisj/darklaf/components/border/DropShadowBorder.java @@ -399,7 +399,14 @@ public class DropShadowBorder implements Border, Serializable { } private enum Position { - TOP, TOP_LEFT, LEFT, BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT, RIGHT, TOP_RIGHT; + TOP, + TOP_LEFT, + LEFT, + BOTTOM_LEFT, + BOTTOM, + BOTTOM_RIGHT, + RIGHT, + TOP_RIGHT; static int count() { return 8; diff --git a/core/src/main/java/com/github/weisj/darklaf/components/filetree/FileTreeNode.java b/core/src/main/java/com/github/weisj/darklaf/components/filetree/FileTreeNode.java index 9d28ce87..aa8b8bf1 100644 --- a/core/src/main/java/com/github/weisj/darklaf/components/filetree/FileTreeNode.java +++ b/core/src/main/java/com/github/weisj/darklaf/components/filetree/FileTreeNode.java @@ -344,7 +344,8 @@ public class FileTreeNode implements TreeNode, Comparable { } private enum Type { - ADD, REMOVE + ADD, + REMOVE } } diff --git a/core/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipStyle.java b/core/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipStyle.java index 05b9239a..559dc64e 100644 --- a/core/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipStyle.java +++ b/core/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipStyle.java @@ -24,7 +24,9 @@ package com.github.weisj.darklaf.components.tooltip; import com.github.weisj.darklaf.ui.tooltip.ToolTipConstants; public enum ToolTipStyle implements ToolTipConstants { - BALLOON(true, false), PLAIN_BALLOON(false, false), PLAIN(false, true); + BALLOON(true, false), + PLAIN_BALLOON(false, false), + PLAIN(false, true); protected final boolean supportsPointer; protected final boolean opqaue; diff --git a/core/src/main/java/com/github/weisj/darklaf/graphics/DefaultInterpolator.java b/core/src/main/java/com/github/weisj/darklaf/graphics/DefaultInterpolator.java index 75553433..a6dae6f7 100644 --- a/core/src/main/java/com/github/weisj/darklaf/graphics/DefaultInterpolator.java +++ b/core/src/main/java/com/github/weisj/darklaf/graphics/DefaultInterpolator.java @@ -22,11 +22,16 @@ package com.github.weisj.darklaf.graphics; public enum DefaultInterpolator implements Interpolator { - LINEAR(x -> x), EASE_IN_SINE(x -> (float) (1 - Math.cos((x * Math.PI) / 2))), - EASE_OUT_SINE(x -> (float) Math.sin((x * Math.PI) / 2)), EASE_IN_QUAD(x -> x * x), EASE_OUT_QUAD(x -> { + LINEAR(x -> x), + EASE_IN_SINE(x -> (float) (1 - Math.cos((x * Math.PI) / 2))), + EASE_OUT_SINE(x -> (float) Math.sin((x * Math.PI) / 2)), + EASE_IN_QUAD(x -> x * x), + EASE_OUT_QUAD(x -> { float tmp = 1 - x; return 1 - tmp * tmp; - }), EASE_IN_CUBIC(x -> x * x * x), EASE_OUT_CUBIC(x -> { + }), + EASE_IN_CUBIC(x -> x * x * x), + EASE_OUT_CUBIC(x -> { float tmp = 1 - x; return 1 - tmp * tmp * tmp; }); diff --git a/core/src/main/java/com/github/weisj/darklaf/task/ForegroundColorGenerationTask.java b/core/src/main/java/com/github/weisj/darklaf/task/ForegroundColorGenerationTask.java index 4c22d2da..e6a0039d 100644 --- a/core/src/main/java/com/github/weisj/darklaf/task/ForegroundColorGenerationTask.java +++ b/core/src/main/java/com/github/weisj/darklaf/task/ForegroundColorGenerationTask.java @@ -106,7 +106,9 @@ public class ForegroundColorGenerationTask extends ColorAdjustmentTask { } public enum Bias { - BACKGROUND, WHITE, BLACK; + BACKGROUND, + WHITE, + BLACK; public static Bias getBackground() { return getBackground(0.5); diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java b/core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java index b10348fb..fb725984 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java @@ -219,6 +219,8 @@ public class DarkPopupFactory extends PopupFactory { } public enum PopupType { - LIGHT_WEIGHT, MEDIUM_WEIGHT, HEAVY_WEIGHT + LIGHT_WEIGHT, + MEDIUM_WEIGHT, + HEAVY_WEIGHT } } diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorTriangle.java b/core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorTriangle.java index ff4eff25..de231d6b 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorTriangle.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorTriangle.java @@ -676,7 +676,9 @@ public class ColorTriangle extends JComponent { } protected enum PickArea { - OUTSIDE, WHEEL, TRIANGLE + OUTSIDE, + WHEEL, + TRIANGLE } protected static class CircleInfo { diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/splitpane/DividerStyle.java b/core/src/main/java/com/github/weisj/darklaf/ui/splitpane/DividerStyle.java index 6eaa9703..7b226bbc 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/splitpane/DividerStyle.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/splitpane/DividerStyle.java @@ -24,7 +24,8 @@ package com.github.weisj.darklaf.ui.splitpane; public enum DividerStyle { GRIP(SplitPaneConstants.STYLE_GRIP, false, true), GRIP_BORDERLESS(SplitPaneConstants.STYLE_GRIP_BORDERLESS, false, false), - LINE(SplitPaneConstants.STYLE_LINE, true, true), INVISIBLE(SplitPaneConstants.STYLE_INVISIBLE, true, false); + LINE(SplitPaneConstants.STYLE_LINE, true, true), + INVISIBLE(SplitPaneConstants.STYLE_INVISIBLE, true, false); private final String name; private final boolean isThin; diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkCaret.java b/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkCaret.java index 58661205..591bf92e 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkCaret.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkCaret.java @@ -187,7 +187,10 @@ public class DarkCaret extends DefaultCaret implements UIResource { } public enum CaretStyle { - VERTICAL_LINE_STYLE(1, false), UNDERLINE_STYLE(1, true), BLOCK_STYLE(1, true), BLOCK_BORDER_STYLE(1, true), + VERTICAL_LINE_STYLE(1, false), + UNDERLINE_STYLE(1, true), + BLOCK_STYLE(1, true), + BLOCK_BORDER_STYLE(1, true), THICK_VERTICAL_LINE_STYLE(2, false); private final int size; diff --git a/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java b/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java index 25f15983..639c2777 100644 --- a/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java +++ b/core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java @@ -366,6 +366,8 @@ public class DarkTextFieldUI extends DarkTextFieldUIBridge implements PropertyCh } protected enum ClickAction { - RIGHT_ACTION, LEFT_ACTION, NONE + RIGHT_ACTION, + LEFT_ACTION, + NONE } } diff --git a/darklaf_java.eclipseformat.xml b/darklaf_java.eclipseformat.xml index 1b4d8524..fc1a2167 100644 --- a/darklaf_java.eclipseformat.xml +++ b/darklaf_java.eclipseformat.xml @@ -33,7 +33,7 @@ - + @@ -192,7 +192,7 @@ - + diff --git a/property-loader/src/main/java/com/github/weisj/darklaf/icons/AwareIconStyle.java b/property-loader/src/main/java/com/github/weisj/darklaf/icons/AwareIconStyle.java index 51cc42e3..1a6fe5c5 100644 --- a/property-loader/src/main/java/com/github/weisj/darklaf/icons/AwareIconStyle.java +++ b/property-loader/src/main/java/com/github/weisj/darklaf/icons/AwareIconStyle.java @@ -22,7 +22,8 @@ package com.github.weisj.darklaf.icons; public enum AwareIconStyle { - DARK, LIGHT; + DARK, + LIGHT; public AwareIconStyle toggle() { switch (this) { diff --git a/theme/src/main/java/com/github/weisj/darklaf/theme/info/ColorToneRule.java b/theme/src/main/java/com/github/weisj/darklaf/theme/info/ColorToneRule.java index f2b83c97..33f7ba2f 100644 --- a/theme/src/main/java/com/github/weisj/darklaf/theme/info/ColorToneRule.java +++ b/theme/src/main/java/com/github/weisj/darklaf/theme/info/ColorToneRule.java @@ -22,5 +22,6 @@ package com.github.weisj.darklaf.theme.info; public enum ColorToneRule { - DARK, LIGHT + DARK, + LIGHT } diff --git a/theme/src/main/java/com/github/weisj/darklaf/theme/info/ContrastRule.java b/theme/src/main/java/com/github/weisj/darklaf/theme/info/ContrastRule.java index b345ef10..9fb5aa89 100644 --- a/theme/src/main/java/com/github/weisj/darklaf/theme/info/ContrastRule.java +++ b/theme/src/main/java/com/github/weisj/darklaf/theme/info/ContrastRule.java @@ -22,5 +22,6 @@ package com.github.weisj.darklaf.theme.info; public enum ContrastRule { - HIGH_CONTRAST, STANDARD + HIGH_CONTRAST, + STANDARD } diff --git a/theme/src/main/java/com/github/weisj/darklaf/theme/info/FontSizePreset.java b/theme/src/main/java/com/github/weisj/darklaf/theme/info/FontSizePreset.java index 22f14dec..0e67d83c 100644 --- a/theme/src/main/java/com/github/weisj/darklaf/theme/info/FontSizePreset.java +++ b/theme/src/main/java/com/github/weisj/darklaf/theme/info/FontSizePreset.java @@ -22,7 +22,14 @@ package com.github.weisj.darklaf.theme.info; public enum FontSizePreset { - TINY(25), Small(50), SMALL(75), NORMAL(100), Large(125), LARGE(150), Huge(175), HUGE(200); + TINY(25), + Small(50), + SMALL(75), + NORMAL(100), + Large(125), + LARGE(150), + Huge(175), + HUGE(200); private final int percentage; diff --git a/theme/src/main/java/com/github/weisj/darklaf/theme/info/PresetIconRule.java b/theme/src/main/java/com/github/weisj/darklaf/theme/info/PresetIconRule.java index fa76b516..c6d86ffd 100644 --- a/theme/src/main/java/com/github/weisj/darklaf/theme/info/PresetIconRule.java +++ b/theme/src/main/java/com/github/weisj/darklaf/theme/info/PresetIconRule.java @@ -22,5 +22,7 @@ package com.github.weisj.darklaf.theme.info; public enum PresetIconRule { - NONE, DARK, LIGHT + NONE, + DARK, + LIGHT } diff --git a/utils/src/main/java/com/github/weisj/darklaf/util/AlignmentExt.java b/utils/src/main/java/com/github/weisj/darklaf/util/AlignmentExt.java index e421276e..887bcc97 100644 --- a/utils/src/main/java/com/github/weisj/darklaf/util/AlignmentExt.java +++ b/utils/src/main/java/com/github/weisj/darklaf/util/AlignmentExt.java @@ -24,10 +24,21 @@ package com.github.weisj.darklaf.util; import java.awt.*; public enum AlignmentExt { - NORTH(Alignment.NORTH), SOUTH(Alignment.SOUTH), EAST(Alignment.EAST), WEST(Alignment.WEST), - NORTH_EAST(Alignment.NORTH_EAST), NORTH_WEST(Alignment.NORTH_WEST), SOUTH_EAST(Alignment.SOUTH_EAST), - SOUTH_WEST(Alignment.SOUTH_WEST), CENTER(Alignment.CENTER), LEFT(null), MIDDLE_HORIZONTAL(null), RIGHT(null), - TOP(null), MIDDLE_VERTICAL(null), BOTTOM(null); + NORTH(Alignment.NORTH), + SOUTH(Alignment.SOUTH), + EAST(Alignment.EAST), + WEST(Alignment.WEST), + NORTH_EAST(Alignment.NORTH_EAST), + NORTH_WEST(Alignment.NORTH_WEST), + SOUTH_EAST(Alignment.SOUTH_EAST), + SOUTH_WEST(Alignment.SOUTH_WEST), + CENTER(Alignment.CENTER), + LEFT(null), + MIDDLE_HORIZONTAL(null), + RIGHT(null), + TOP(null), + MIDDLE_VERTICAL(null), + BOTTOM(null); private final Alignment parent;