Browse Source

Update style. Enum declarations should always be in separate lines.

pull/214/head
weisj 4 years ago
parent
commit
8e131b11b3
  1. 4
      core/src/main/java/com/github/weisj/darklaf/components/TabEvent.java
  2. 9
      core/src/main/java/com/github/weisj/darklaf/components/border/DropShadowBorder.java
  3. 3
      core/src/main/java/com/github/weisj/darklaf/components/filetree/FileTreeNode.java
  4. 4
      core/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipStyle.java
  5. 11
      core/src/main/java/com/github/weisj/darklaf/graphics/DefaultInterpolator.java
  6. 4
      core/src/main/java/com/github/weisj/darklaf/task/ForegroundColorGenerationTask.java
  7. 4
      core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java
  8. 4
      core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorTriangle.java
  9. 3
      core/src/main/java/com/github/weisj/darklaf/ui/splitpane/DividerStyle.java
  10. 5
      core/src/main/java/com/github/weisj/darklaf/ui/text/DarkCaret.java
  11. 4
      core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java
  12. 4
      darklaf_java.eclipseformat.xml
  13. 3
      property-loader/src/main/java/com/github/weisj/darklaf/icons/AwareIconStyle.java
  14. 3
      theme/src/main/java/com/github/weisj/darklaf/theme/info/ColorToneRule.java
  15. 3
      theme/src/main/java/com/github/weisj/darklaf/theme/info/ContrastRule.java
  16. 9
      theme/src/main/java/com/github/weisj/darklaf/theme/info/FontSizePreset.java
  17. 4
      theme/src/main/java/com/github/weisj/darklaf/theme/info/PresetIconRule.java
  18. 19
      utils/src/main/java/com/github/weisj/darklaf/util/AlignmentExt.java

4
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;

9
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;

3
core/src/main/java/com/github/weisj/darklaf/components/filetree/FileTreeNode.java

@ -344,7 +344,8 @@ public class FileTreeNode implements TreeNode, Comparable<FileTreeNode> {
}
private enum Type {
ADD, REMOVE
ADD,
REMOVE
}
}

4
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;

11
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;
});

4
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);

4
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
}
}

4
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 {

3
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;

5
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;

4
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
}
}

4
darklaf_java.eclipseformat.xml

@ -33,7 +33,7 @@
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="16"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="49"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
@ -192,7 +192,7 @@
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>

3
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) {

3
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
}

3
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
}

9
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;

4
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
}

19
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;

Loading…
Cancel
Save