Browse Source

Demo: Rename AllIcons to AllUIconsDemo

This avoids confusion with the AllIcons accessor class.
pull/299/head
Jannis Weis 3 years ago
parent
commit
d068d95675
No known key found for this signature in database
GPG Key ID: 7C9D8D4B558049AB
  1. 8
      core/src/test/java/com/github/weisj/darklaf/icon/AllIconsDemo.java
  2. 4
      core/src/test/java/com/github/weisj/darklaf/icon/IconEditorDemo.java
  3. 4
      core/src/test/java/com/github/weisj/darklaf/icon/RotatableIconDemo.java

8
core/src/test/java/com/github/weisj/darklaf/icon/AllIcons.java → core/src/test/java/com/github/weisj/darklaf/icon/AllIconsDemo.java

@ -43,15 +43,15 @@ import com.github.weisj.darklaf.ui.demo.DemoExecutor;
import com.github.weisj.darklaf.util.Lambdas;
import com.github.weisj.darklaf.util.Pair;
public class AllIcons extends BaseComponentDemo {
public class AllIconsDemo extends BaseComponentDemo {
private static final int ICON_SIZE = 50;
public static void main(final String[] args) {
DemoExecutor.showDemo(new AllIcons());
DemoExecutor.showDemo(new AllIconsDemo());
}
public AllIcons() {
public AllIconsDemo() {
List<DecorationsProvider> decorationsProviders =
ClassFinder.getInstancesOfType(DecorationsProvider.class, "com.github.weisj.darklaf")
.stream()
@ -106,7 +106,7 @@ public class AllIcons extends BaseComponentDemo {
.values().stream()
.peek(list -> makeUnique(list, 1))
.flatMap(List::stream)
.sorted(Pair.compareFirst(AllIcons::pathToIconName)).collect(Collectors.toList());
.sorted(Pair.compareFirst(AllIconsDemo::pathToIconName)).collect(Collectors.toList());
}
}

4
core/src/test/java/com/github/weisj/darklaf/icon/IconEditorDemo.java

@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2019-2021 Jannis Weis
* Copyright (c) 2019-2022 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
@ -42,7 +42,7 @@ public class IconEditorDemo extends BaseComponentDemo {
@Override
public JComponent createComponent() {
IconEditor editor = new IconEditor(
AllIcons.loadIcons(16, false)
AllIconsDemo.loadIcons(16, false)
.stream()
.map(p -> new Pair<>(p.getFirst(), p.getSecond()))
.collect(Collectors.toList()));

4
core/src/test/java/com/github/weisj/darklaf/icon/RotatableIconDemo.java

@ -1,7 +1,7 @@
/*
* MIT License
*
* Copyright (c) 2019-2021 Jannis Weis
* Copyright (c) 2019-2022 Jannis Weis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
@ -95,7 +95,7 @@ public class RotatableIconDemo extends BaseComponentDemo {
controls = panel.addControls(new BorderLayout());
AtomicReference<Icon> nextIcon = new AtomicReference<>(rotateIcon.getIcon());
JList<AllIcons.NamedIcon<? extends Icon>> list = AllIcons.createIconJList(size);
JList<AllIconsDemo.NamedIcon<? extends Icon>> list = AllIconsDemo.createIconJList(size);
list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
list.addListSelectionListener(e -> nextIcon.set(list.getSelectedValue().getSecond()));
controls.add(new OverlayScrollPane(list));

Loading…
Cancel
Save