• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jiangxincode / ApkToolBoxGUI / #735

19 May 2024 02:55PM UTC coverage: 3.14% (-0.01%) from 3.151%
#735

push

jiangxincode
fix #52: add alway on top feature

0 of 28 new or added lines in 3 files covered. (0.0%)

236 of 7517 relevant lines covered (3.14%)

0.03 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/edu/jiangxin/apktoolbox/help/settings/AlwaysOnTopPanel.java
1
package edu.jiangxin.apktoolbox.help.settings;
2

3
import edu.jiangxin.apktoolbox.swing.extend.EasyChildTabbedPanel;
4
import edu.jiangxin.apktoolbox.utils.Constants;
5

6
import javax.swing.*;
7

NEW
8
public class AlwaysOnTopPanel extends EasyChildTabbedPanel {
×
9
    private JPanel optionPanel;
10

11
    @Override
12
    public void createUI() {
NEW
13
        BoxLayout boxLayout = new BoxLayout(this, BoxLayout.Y_AXIS);
×
NEW
14
        setLayout(boxLayout);
×
15

NEW
16
        createOptionPanel();
×
NEW
17
        add(optionPanel);
×
18

NEW
19
        add(Box.createVerticalStrut(15 * Constants.DEFAULT_Y_BORDER));
×
NEW
20
    }
×
21

22
    private void createOptionPanel() {
NEW
23
        optionPanel = new JPanel();
×
NEW
24
        optionPanel.setLayout(new BoxLayout(optionPanel, BoxLayout.X_AXIS));
×
25

NEW
26
        JLabel typeLabel = new JLabel("Always on top:");
×
NEW
27
        JCheckBox alwaysOnTopCheckBox = new JCheckBox();
×
NEW
28
        alwaysOnTopCheckBox.setSelected(conf.getBoolean("always.on.top", false));
×
NEW
29
        alwaysOnTopCheckBox.addActionListener(e -> {
×
NEW
30
            conf.setProperty("always.on.top", alwaysOnTopCheckBox.isSelected());
×
NEW
31
            getFrame().setAlwaysOnTop(alwaysOnTopCheckBox.isSelected());
×
NEW
32
            SwingUtilities.updateComponentTreeUI(getFrame());
×
NEW
33
            getFrame().refreshSizeAndLocation();
×
NEW
34
        });
×
35

NEW
36
        optionPanel.add(typeLabel);
×
NEW
37
        optionPanel.add(Box.createHorizontalStrut(Constants.DEFAULT_X_BORDER));
×
NEW
38
        optionPanel.add(alwaysOnTopCheckBox);
×
NEW
39
    }
×
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc