Checkstyle: fix indentation [Indentation]

This commit is contained in:
mkpaz 2023-02-10 14:15:14 +04:00
parent c3a9b71e93
commit 9abf4afe5f
5 changed files with 45 additions and 44 deletions

@ -61,23 +61,22 @@ public class SplitPanePage extends AbstractPage {
topSplitPane.getItems().setAll(createBox("Quarter 4"), createBox("Quarter 1"));
VBox.setVgrow(topSplitPane, Priority.ALWAYS);
var topBox = new VBox(topSplitPane);
topBox.setAlignment(Pos.CENTER);
var bottomSplitPane = new SplitPane();
bottomSplitPane.setOrientation(Orientation.HORIZONTAL);
bottomSplitPane.setDividerPositions(0.5);
bottomSplitPane.getItems().setAll(createBox("Quarter 3"), createBox("Quarter 2"));
VBox.setVgrow(bottomSplitPane, Priority.ALWAYS);
var bottomBox = new VBox(bottomSplitPane);
bottomBox.setAlignment(Pos.CENTER);
var doubleSplitPane = new SplitPane();
doubleSplitPane.setOrientation(Orientation.VERTICAL);
doubleSplitPane.setDividerPositions(0.5);
doubleSplitPane.getItems().setAll(
new VBox(topSplitPane) {{
setAlignment(Pos.CENTER);
}},
new VBox(bottomSplitPane) {{
setAlignment(Pos.CENTER);
}}
);
doubleSplitPane.getItems().setAll(topBox, bottomBox);
doubleSplitPane.setMinSize(400, 200);
doubleSplitPane.setMaxSize(400, 200);

@ -301,20 +301,21 @@ public class TablePage extends AbstractPage {
table.tableMenuButtonVisibleProperty().bind(menuButtonItem.selectedProperty());
menuButtonItem.setSelected(true);
return new MenuButton("Properties") {{
getItems().setAll(
resizePolicyCaption,
unconstrainedResizeItem,
constrainedResizeItem,
selectionModeCaption,
singleSelectionItem,
multiSelectionItem,
new SeparatorMenuItem(),
editCellsItem,
cellSelectionItem,
menuButtonItem
);
}};
var propertiesMenu = new MenuButton("Properties");
propertiesMenu.getItems().setAll(
resizePolicyCaption,
unconstrainedResizeItem,
constrainedResizeItem,
selectionModeCaption,
singleSelectionItem,
multiSelectionItem,
new SeparatorMenuItem(),
editCellsItem,
cellSelectionItem,
menuButtonItem
);
return propertiesMenu;
}
private static void addStyleClass(TableColumn<?, ?> c, String styleClass, String... excludes) {

@ -284,21 +284,22 @@ public class TreeTablePage extends AbstractPage {
treeTable.tableMenuButtonVisibleProperty().bind(menuButtonItem.selectedProperty());
menuButtonItem.setSelected(true);
return new MenuButton("Properties") {{
getItems().setAll(
resizePolicyCaption,
unconstrainedResizeItem,
constrainedResizeItem,
selectionModeCaption,
singleSelectionItem,
multiSelectionItem,
new SeparatorMenuItem(),
showRootItem,
editCellsItem,
cellSelectionItem,
menuButtonItem
);
}};
var propertiesMenu = new MenuButton("Properties");
propertiesMenu.getItems().setAll(
resizePolicyCaption,
unconstrainedResizeItem,
constrainedResizeItem,
selectionModeCaption,
singleSelectionItem,
multiSelectionItem,
new SeparatorMenuItem(),
showRootItem,
editCellsItem,
cellSelectionItem,
menuButtonItem
);
return propertiesMenu;
}
private static void addStyleClass(TreeTableColumn<?, ?> c, String styleClass, String... excludes) {

@ -122,8 +122,8 @@ public class Stepper extends HBox {
}
private void createView() {
alignmentProperty().bind(Bindings.createObjectBinding(() ->
switch (textPositionProperty().get()) {
alignmentProperty().bind(Bindings.createObjectBinding(
() -> switch (textPositionProperty().get()) {
case TOP -> Pos.TOP_LEFT;
case BOTTOM -> Pos.BOTTOM_LEFT;
default -> Pos.CENTER_LEFT;
@ -138,8 +138,8 @@ public class Stepper extends HBox {
var children = new ArrayList<Node>();
for (int i = 0; i < items.size(); i++) {
var item = items.get(i);
item.contentDisplayProperty().bind(Bindings.createObjectBinding(() ->
switch (textPositionProperty().get()) {
item.contentDisplayProperty().bind(Bindings.createObjectBinding(
() -> switch (textPositionProperty().get()) {
case TOP -> ContentDisplay.TOP;
case BOTTOM -> ContentDisplay.BOTTOM;
case LEFT -> ContentDisplay.LEFT;

@ -48,10 +48,10 @@ public enum ContrastLevel {
}
public static double getContrastRatio(double luminance1, double luminance2) {
return 1 / (luminance1 > luminance2
var x = luminance1 > luminance2
? (luminance2 + 0.05) / (luminance1 + 0.05)
: (luminance1 + 0.05) / (luminance2 + 0.05)
);
: (luminance1 + 0.05) / (luminance2 + 0.05);
return 1 / x;
}
public static double getContrastRatioOpacityAware(Color bgColor, Color fgColor, Color bgBaseColor) {