Implements proper saving and loading of servers and profiles
This commit is contained in:
@ -118,15 +118,6 @@ public class GUI implements ActionListener {
|
||||
this.profiles.removeItemAt(index);
|
||||
}
|
||||
|
||||
/*public Profile currentProfile() {
|
||||
Object selected = profiles.getSelectedItem();
|
||||
if (selected != null) {
|
||||
return Profile.getProfile(selected.toString());
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}*/
|
||||
|
||||
private void initialize() {
|
||||
try {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
@ -511,7 +502,6 @@ public class GUI implements ActionListener {
|
||||
*/
|
||||
private void save() {
|
||||
Profile.getCurrent().save();
|
||||
//TODO: Save to a text file.
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,6 +25,15 @@ public class ServerTab implements ActionListener {
|
||||
private final JPanel panel;
|
||||
private final String name;
|
||||
|
||||
public void setData(String path, boolean enabled, String typeName, String serverVersion, String maxRam) {
|
||||
this.directory.setText(path);
|
||||
this.chckbxEnabled.setSelected(enabled);
|
||||
this.serverTypes.setSelectedItem(typeName);
|
||||
this.serverTypes();
|
||||
this.serverTypes.setSelectedItem(serverVersion);
|
||||
this.maxRam.setSelectedItem(maxRam);
|
||||
}
|
||||
|
||||
public ServerTab(String name) {
|
||||
this.name = name;
|
||||
panel = new JPanel();
|
||||
|
Reference in New Issue
Block a user