Skip to content

Commit

Permalink
window: устанавливает размер окна 1024x768
Browse files Browse the repository at this point in the history
    Для проведения замеров производительности необходимо
    создать одинаковые условия. Установим размер окна и,
    соответственно мира, в 1024x768.
  • Loading branch information
xlam committed Aug 29, 2018
1 parent 743d9ae commit 39cc056
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ru/cyberbiology/test/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ public MainWindow()
window = this;
properties = new ProjectProperties("properties.xml");


setTitle("CyberBiologyTest 1.0.0");
setSize(new Dimension(640, 480));
Dimension sSize = Toolkit.getDefaultToolkit().getScreenSize(), fSize = getSize();
if (fSize.height > sSize.height) { fSize.height = sSize.height; }
if (fSize.width > sSize.width) { fSize.width = sSize.width; }
//setLocation((sSize.width - fSize.width)/2, (sSize.height - fSize.height)/2);
setSize(new Dimension(sSize.width, sSize.height));
setPreferredSize(new Dimension(1024, 768));
// setSize(new Dimension(1024, 768));
// Dimension sSize = Toolkit.getDefaultToolkit().getScreenSize(), fSize = getSize();
// if (fSize.height > sSize.height) { fSize.height = sSize.height; }
// if (fSize.width > sSize.width) { fSize.width = sSize.width; }
// //setLocation((sSize.width - fSize.width)/2, (sSize.height - fSize.height)/2);
// setSize(new Dimension(sSize.width, sSize.height));


setDefaultCloseOperation (WindowConstants.EXIT_ON_CLOSE);
Expand Down Expand Up @@ -399,7 +399,7 @@ public void actionPerformed(ActionEvent e)
view = new ViewBasic();
this.pack();
this.setVisible(true);
setExtendedState(MAXIMIZED_BOTH);
setExtendedState(NORMAL);

String tmp = this.getFileDirectory();
if(tmp==null||tmp.length()==0)
Expand Down

0 comments on commit 39cc056

Please sign in to comment.