Compare commits
2 commits
ff0c3f0b98
...
5e93294c38
Author | SHA1 | Date | |
---|---|---|---|
5e93294c38 | |||
25068543ad |
2 changed files with 315 additions and 304 deletions
|
@ -29,6 +29,7 @@ import java.util.Set;
|
||||||
* @version 2.04 2021/9/11 Test as plugin
|
* @version 2.04 2021/9/11 Test as plugin
|
||||||
*/
|
*/
|
||||||
public class ExBoxFrame extends JFrame implements ActionListener, ItemListener {
|
public class ExBoxFrame extends JFrame implements ActionListener, ItemListener {
|
||||||
|
private final Dimension UHDTHRESHOLD = new Dimension(2000, 1500);
|
||||||
private final String STANDARDENCODING = "UTF-8";
|
private final String STANDARDENCODING = "UTF-8";
|
||||||
|
|
||||||
private JMenuItem connect, exit, open, test, retest, textView, graphicView, clear;
|
private JMenuItem connect, exit, open, test, retest, textView, graphicView, clear;
|
||||||
|
@ -154,8 +155,18 @@ public class ExBoxFrame extends JFrame implements ActionListener, ItemListener {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
setFontSize(11);
|
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
|
||||||
setSize(new Dimension(400, 400));
|
|
||||||
|
double scale = (
|
||||||
|
screenSize.getWidth() > UHDTHRESHOLD.getWidth() &&
|
||||||
|
screenSize.getHeight() > UHDTHRESHOLD.getHeight()) ? 2 : 1;
|
||||||
|
|
||||||
|
scale = Math.max(scale, Toolkit.getDefaultToolkit().getScreenResolution() / 96.0);
|
||||||
|
setFontSize((int) (11 * scale));
|
||||||
|
|
||||||
|
setSize(
|
||||||
|
new Dimension((int)(400 * scale), (int)(400 * scale)));
|
||||||
|
|
||||||
setTitle("ExBox");
|
setTitle("ExBox");
|
||||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||||
initComponents();
|
initComponents();
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class MyCompetitor implements Comparable<MyCompetitor> {
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hashCode = 13;
|
int hashCode = 13;
|
||||||
hashCode += name.hashCode();
|
hashCode += getName().hashCode();
|
||||||
hashCode *= 17;
|
hashCode *= 17;
|
||||||
return hashCode + rank;
|
return hashCode + rank;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue