windowMode.setFont(new Font("Arial", Font.PLAIN, 11));
windowMode.setToolTipText("<html>Windowed - Starts the game in a smaller 900x540 window<br/>" +
"Full Screen - Starts the game using the full monitor resolution, ontop.<br/>" +
"Maximized - Starts the game with the maximimum size</html>");
GroupLayout gamePaneLayout = new GroupLayout(gamePane);
gamePane.setLayout(gamePaneLayout);
gamePaneLayout.setHorizontalGroup(
gamePaneLayout.createParallelGroup()
.add(gamePaneLayout.createSequentialGroup()
.addContainerGap()
.add(gamePaneLayout.createParallelGroup()
.add(gamePaneLayout.createSequentialGroup()
.add(memoryLabel)
.addPreferredGap(LayoutStyle.UNRELATED)
.add(memory))
.add(gamePaneLayout.createSequentialGroup()
.add(gamePaneLayout.createParallelGroup()
.add(minecraftVersionLabel)
.add(spoutcraftVersionLabel))
.addPreferredGap(LayoutStyle.RELATED)
.add(gamePaneLayout.createParallelGroup()
.add(spoutcraftVersion, GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
.add(minecraftVersion)))
.add(gamePaneLayout.createSequentialGroup()
.add(windowModeLabel)
.addPreferredGap(LayoutStyle.RELATED)
.add(windowMode, GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)))
//.add(gamePaneLayout.createSequentialGroup()
//.add(logsButton)
//.addPreferredGap(LayoutStyle.RELATED)
.addContainerGap())
);
gamePaneLayout.setVerticalGroup(
gamePaneLayout.createParallelGroup()
.add(gamePaneLayout.createSequentialGroup()
.addContainerGap()
.add(gamePaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(minecraftVersionLabel)
.add(minecraftVersion, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(gamePaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(spoutcraftVersionLabel)
.add(spoutcraftVersion, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(gamePaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(memoryLabel)
.add(memory, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(gamePaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(windowModeLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
.add(windowMode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addContainerGap(86, Short.MAX_VALUE))
);
}
mainOptions.addTab("Game", gamePane);
//======== proxyPane ========
{
//---- proxyHostLabel ----
proxyHostLabel.setText("Proxy Host:");
proxyHostLabel.setFont(new Font("Arial", Font.PLAIN, 11));
//---- proxyPortLabel ----
proxyPortLabel.setText("Proxy Port:");
proxyPortLabel.setFont(new Font("Arial", Font.PLAIN, 11));
//---- proxyUsername ----
proxyUsernameLabel.setText("Username:");
proxyUsernameLabel.setFont(new Font("Arial", Font.PLAIN, 11));
//---- passwordLabel ----
passwordLabel.setText("Password:");
passwordLabel.setFont(new Font("Arial", Font.PLAIN, 11));
//---- proxyHost ----
proxyHost.setFont(new Font("Arial", Font.PLAIN, 11));
proxyHost.setToolTipText("The host or IP address of the proxy");
//---- proxyPort ----
proxyPort.setFont(new Font("Arial", Font.PLAIN, 11));
proxyPort.setToolTipText("The port (if any) for the proxy");
//---- proxyUser ----
proxyUser.setFont(new Font("Arial", Font.PLAIN, 11));
proxyUser.setToolTipText("The username, if required, for the proxy");
//---- proxyPass ----
proxyPass.setFont(new Font("Arial", Font.PLAIN, 11));
proxyPass.setToolTipText("The password, if required, for the proxy");
GroupLayout proxyPaneLayout = new GroupLayout(proxyPane);
proxyPane.setLayout(proxyPaneLayout);
proxyPaneLayout.setHorizontalGroup(
proxyPaneLayout.createParallelGroup()
.add(proxyPaneLayout.createSequentialGroup()
.addContainerGap()
.add(proxyPaneLayout.createParallelGroup()
.add(proxyPortLabel)
.add(proxyHostLabel)
.add(proxyUsernameLabel)
.add(passwordLabel))
.addPreferredGap(LayoutStyle.UNRELATED)
.add(proxyPaneLayout.createParallelGroup()
.add(proxyPass, GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
.add(proxyUser, GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
.add(proxyHost, GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
.add(proxyPort, GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE))
.addContainerGap())
);
proxyPaneLayout.setVerticalGroup(
proxyPaneLayout.createParallelGroup()
.add(proxyPaneLayout.createSequentialGroup()
.addContainerGap()
.add(proxyPaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(proxyHostLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
.add(proxyHost, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(proxyPaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(proxyPortLabel)
.add(proxyPort, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.UNRELATED)
.add(proxyPaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(proxyUsernameLabel)
.add(proxyUser, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(proxyPaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(passwordLabel)
.add(proxyPass, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addContainerGap(82, Short.MAX_VALUE))
);
}
mainOptions.addTab("Proxy", proxyPane);
//======== advancedPane ========
{
//---- launcherVersionLabel ----
launcherVersionLabel.setText("Launcher:");
launcherVersionLabel.setFont(new Font("Arial", Font.PLAIN, 11));
//---- launcherVersion ----
launcherVersion.setFont(new Font("Arial", Font.PLAIN, 11));
//---- debugLabel ----
debugLabel.setText("Debug Mode:");
debugLabel.setFont(new Font("Arial", Font.PLAIN, 11));
//---- debugCheckbox ----
debugCheckbox.setFont(new Font("Arial", Font.PLAIN, 11));
debugCheckbox.setToolTipText("Enables more detailed logging and console");
//---- md5Label ----
md5Label.setText("Disable MD5:");
md5Label.setFont(new Font("Arial", Font.PLAIN, 11));
//---- md5Checkbox ----
md5Checkbox.setFont(new Font("Arial", Font.PLAIN, 11));
md5Checkbox.setToolTipText("Disables MD5 hashsum checks on the files");
//---- buildLabel ----
buildLabel.setText("Build:");
buildLabel.setFont(new Font("Arial", Font.PLAIN, 11));
//---- buildCombo ----
buildCombo.setFont(new Font("Arial", Font.PLAIN, 11));
//---- serverLabel ----
serverLabel.setText("Direct Join:");
serverLabel.setFont(new Font("Arial", Font.PLAIN, 11));
//---- directJoin ----
directJoin.setFont(new Font("Arial", Font.PLAIN, 11));
GroupLayout advancedPaneLayout = new GroupLayout(advancedPane);
advancedPane.setLayout(advancedPaneLayout);
advancedPaneLayout.setHorizontalGroup(
advancedPaneLayout.createParallelGroup()
.add(advancedPaneLayout.createSequentialGroup()
.addContainerGap()
.add(advancedPaneLayout.createParallelGroup()
.add(advancedPaneLayout.createSequentialGroup()
.add(launcherVersionLabel)
.addPreferredGap(LayoutStyle.RELATED)
.add(launcherVersion))
.add(advancedPaneLayout.createSequentialGroup()
.add(serverLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(LayoutStyle.RELATED)
.add(directJoin, GroupLayout.PREFERRED_SIZE, 196, GroupLayout.PREFERRED_SIZE))
.add(advancedPaneLayout.createSequentialGroup()
.add(buildLabel)
.addPreferredGap(LayoutStyle.RELATED)
.add(buildCombo))
.add(advancedPaneLayout.createSequentialGroup()
.add(advancedPaneLayout.createParallelGroup()
.add(advancedPaneLayout.createSequentialGroup()
.add(debugLabel, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(debugCheckbox))
.add(advancedPaneLayout.createSequentialGroup()
.add(md5Label, GroupLayout.PREFERRED_SIZE, 77, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.RELATED)
.add(md5Checkbox)))
.add(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
advancedPaneLayout.setVerticalGroup(
advancedPaneLayout.createParallelGroup()
.add(advancedPaneLayout.createSequentialGroup()
.addContainerGap()
.add(advancedPaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(launcherVersionLabel)
.add(launcherVersion, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(advancedPaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(buildCombo, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
.add(buildLabel))
.addPreferredGap(LayoutStyle.RELATED)
.add(advancedPaneLayout.createParallelGroup()
.add(debugCheckbox)
.add(debugLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(advancedPaneLayout.createParallelGroup(GroupLayout.TRAILING)
.add(md5Label, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
.add(md5Checkbox))
.addPreferredGap(LayoutStyle.RELATED)
.add(advancedPaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(serverLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
.add(directJoin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addContainerGap(5, Short.MAX_VALUE))
);
}
mainOptions.addTab("Advanced", advancedPane);
}
//---- logsButton ----
logsButton.setText("Logs");
//---- resetButton ----
resetButton.setText("Reset");
//---- cancelButton ----
cancelButton.setText("Cancel");
//---- saveButton ----
saveButton.setText("OK");
GroupLayout contentPaneLayout = new GroupLayout(contentPane);
contentPane.setLayout(contentPaneLayout);
contentPaneLayout.setHorizontalGroup(
contentPaneLayout.createParallelGroup()
.add(contentPaneLayout.createSequentialGroup()
.addContainerGap()
.add(resetButton)
.addPreferredGap(LayoutStyle.RELATED)
.add(logsButton)
.addPreferredGap(LayoutStyle.RELATED)
.add(cancelButton)
.addPreferredGap(LayoutStyle.UNRELATED)
.add(saveButton, GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE)
.add(11, 11, 11))
.add(GroupLayout.TRAILING, mainOptions, GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE)
);
contentPaneLayout.setVerticalGroup(
contentPaneLayout.createParallelGroup()
.add(contentPaneLayout.createSequentialGroup()
.add(mainOptions, GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)
.addPreferredGap(LayoutStyle.RELATED)
.add(contentPaneLayout.createParallelGroup(GroupLayout.BASELINE)
.add(resetButton)
.add(logsButton)
.add(cancelButton)
.add(saveButton))
.addContainerGap())