Skip to content

Commit

Permalink
Fix code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
RetGal committed Sep 11, 2024
1 parent 22d1c6d commit 76960d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/mpo/dayon/assistant/gui/Assistant.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import static java.lang.String.format;
import static java.lang.String.valueOf;
import static java.lang.Thread.sleep;
import static javax.swing.SwingConstants.HORIZONTAL;
import static mpo.dayon.common.babylon.Babylon.translate;
import static mpo.dayon.common.gui.common.ImageUtilities.getOrCreateIcon;
import static mpo.dayon.common.utils.SystemUtilities.*;
Expand Down Expand Up @@ -372,7 +373,8 @@ public void actionPerformed(ActionEvent ev) {

final JLabel tickLbl = new JLabel(translate("tick"));
tickLbl.setToolTipText(translate("tick.tooltip"));
final JSlider tickMillisSlider = new JSlider(JSlider.HORIZONTAL, 50, 1000, captureEngineConfiguration.getCaptureTick());
final JSlider tickMillisSlider = new JSlider(HORIZONTAL, 50, 1000, captureEngineConfiguration.getCaptureTick());
@java.lang.SuppressWarnings("squid:S1149") // setLabelTable expects a Dictionary...
final Hashtable<Integer, Component> tickLabelTable = new Hashtable<>();
JLabel actualTick = new JLabel(format("%dms", tickMillisSlider.getValue()));
tickLabelTable.put(50, new JLabel(translate("min")));
Expand All @@ -386,7 +388,8 @@ public void actionPerformed(ActionEvent ev) {
pane.add(tickMillisSlider);

final JLabel grayLevelsLbl = new JLabel(translate("grays"));
final JSlider grayLevelsSlider = new JSlider(JSlider.HORIZONTAL, 0, 6, 6 - captureEngineConfiguration.getCaptureQuantization().ordinal());
final JSlider grayLevelsSlider = new JSlider(HORIZONTAL, 0, 6, 6 - captureEngineConfiguration.getCaptureQuantization().ordinal());
@java.lang.SuppressWarnings("squid:S1149") // setLabelTable expects a Dictionary...
final Hashtable<Integer, Component> grayLabelTable = new Hashtable<>();
JLabel actualLevels = new JLabel(format("%d", toGrayLevel(grayLevelsSlider.getValue()).getLevels()));
grayLabelTable.put(0, new JLabel(translate("min")));
Expand Down

0 comments on commit 76960d9

Please sign in to comment.