-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75c217f
commit 83d02fe
Showing
9 changed files
with
70 additions
and
13 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
src/main/java/edu/jiangxin/apktoolbox/help/settings/AlwaysOnTopPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package edu.jiangxin.apktoolbox.help.settings; | ||
|
||
import edu.jiangxin.apktoolbox.swing.extend.EasyChildTabbedPanel; | ||
import edu.jiangxin.apktoolbox.utils.Constants; | ||
|
||
import javax.swing.*; | ||
|
||
public class AlwaysOnTopPanel extends EasyChildTabbedPanel { | ||
private JPanel optionPanel; | ||
|
||
@Override | ||
public void createUI() { | ||
BoxLayout boxLayout = new BoxLayout(this, BoxLayout.Y_AXIS); | ||
setLayout(boxLayout); | ||
|
||
createOptionPanel(); | ||
add(optionPanel); | ||
|
||
add(Box.createVerticalStrut(15 * Constants.DEFAULT_Y_BORDER)); | ||
} | ||
|
||
private void createOptionPanel() { | ||
optionPanel = new JPanel(); | ||
optionPanel.setLayout(new BoxLayout(optionPanel, BoxLayout.X_AXIS)); | ||
|
||
JLabel typeLabel = new JLabel("Always on top:"); | ||
JCheckBox alwaysOnTopCheckBox = new JCheckBox(); | ||
alwaysOnTopCheckBox.setSelected(conf.getBoolean("always.on.top", false)); | ||
alwaysOnTopCheckBox.addActionListener(e -> { | ||
conf.setProperty("always.on.top", alwaysOnTopCheckBox.isSelected()); | ||
getFrame().setAlwaysOnTop(alwaysOnTopCheckBox.isSelected()); | ||
SwingUtilities.updateComponentTreeUI(getFrame()); | ||
getFrame().refreshSizeAndLocation(); | ||
}); | ||
|
||
optionPanel.add(typeLabel); | ||
optionPanel.add(Box.createHorizontalStrut(Constants.DEFAULT_X_BORDER)); | ||
optionPanel.add(alwaysOnTopCheckBox); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
src/site/markdown/getting_started_guide/how_to_change_language.md
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
src/site/markdown/getting_started_guide/how_to_change_look_and_feel.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Settings | ||
|
||
### How To Change Language | ||
|
||
You can change language by: | ||
|
||
* `Help->Settings->Set Display Language` | ||
* Restart the software | ||
|
||
However, There are many pages which is not translated. I have less time on it, so any pull request is very welcomed. I will merge them as long as I check them. | ||
|
||
## How To Change Look And Feel | ||
|
||
* `Help->Settings->Set Look and Feel` | ||
|
||
## How To Set Always On Top | ||
|
||
* `Help->Settings->Set Always On Top` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters