Adds more javadoc
This commit is contained in:
parent
be32c7e3a1
commit
85e4fa4fc7
@ -24,13 +24,13 @@ class Main {
|
|||||||
try {
|
try {
|
||||||
setup();
|
setup();
|
||||||
new GUI();
|
new GUI();
|
||||||
new ServerConsoles();
|
//new ServerConsoles();
|
||||||
Profile.addProfile("Default");
|
Profile.addProfile("Default");
|
||||||
//TODO: replace with profiles loading generating a default profile if empty.
|
//TODO: replace with profiles loading generating a default profile if empty.
|
||||||
|
|
||||||
ScheduledExecutorService exec = Executors.newSingleThreadScheduledExecutor();
|
ScheduledExecutorService exec = Executors.newSingleThreadScheduledExecutor();
|
||||||
exec.scheduleAtFixedRate(() -> {
|
exec.scheduleAtFixedRate(() -> {
|
||||||
//TODO: Read from consoles and insert into gui not added yet.
|
//TODO: Read from consoles and insert into ServerConsoles.
|
||||||
}, 0, 5, TimeUnit.SECONDS);
|
}, 0, 5, TimeUnit.SECONDS);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -3,6 +3,14 @@ package net.knarcraft.serverlauncher.userinterface;
|
|||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Acts as a single writable/readable tab
|
||||||
|
* Has a box for user input, and a textArea for server output.
|
||||||
|
*
|
||||||
|
* @author Kristian Knarvik <kristian.knarvik@knett.no>
|
||||||
|
* @version 0.0.0.1
|
||||||
|
* @since 0.0.0.1
|
||||||
|
*/
|
||||||
class Console {
|
class Console {
|
||||||
private JTextField textInput;
|
private JTextField textInput;
|
||||||
private JTextArea textOutput;
|
private JTextArea textOutput;
|
||||||
|
@ -3,10 +3,20 @@ package net.knarcraft.serverlauncher.userinterface;
|
|||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JTabbedPane;
|
import javax.swing.JTabbedPane;
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A parent window for server consoles
|
||||||
|
* Should be toggled with the "View server consoles" button
|
||||||
|
* Keeps track of all consoles
|
||||||
|
*
|
||||||
|
* @author Kristian Knarvik <kristian.knarvik@knett.no>
|
||||||
|
* @version 0.0.0.1
|
||||||
|
* @since 0.0.0.1
|
||||||
|
*/
|
||||||
public class ServerConsoles {
|
public class ServerConsoles {
|
||||||
|
|
||||||
private static ServerConsoles serverConsoles;
|
private static ServerConsoles serverConsoles;
|
||||||
|
private static ArrayList<Console> consoles = new ArrayList<>();
|
||||||
private JFrame frame;
|
private JFrame frame;
|
||||||
private JTabbedPane consolesTab;
|
private JTabbedPane consolesTab;
|
||||||
|
|
||||||
|
@ -7,13 +7,18 @@ import javax.swing.*;
|
|||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains all buttons for configuring a server
|
||||||
|
* Does some visual stuff by itself, but otherwise reads boxes and stuff
|
||||||
|
*
|
||||||
|
* @author Kristian Knarvik <kristian.knarvik@knett.no>
|
||||||
|
* @version 0.0.0.1
|
||||||
|
* @since 0.0.0.1
|
||||||
|
*/
|
||||||
public class ServerTab implements ActionListener {
|
public class ServerTab implements ActionListener {
|
||||||
private final JComboBox<String> serverTypes;
|
private final JComboBox<String> serverTypes, serverVersions, maxRam;
|
||||||
private final JComboBox<String> serverVersions;
|
|
||||||
private final JComboBox<String> maxRam;
|
|
||||||
private final JCheckBox chckbxEnabled;
|
private final JCheckBox chckbxEnabled;
|
||||||
private final JButton btnRemoveServer;
|
private final JButton btnRemoveServer, btnBrowse;
|
||||||
private final JButton btnBrowse;
|
|
||||||
private final JTextField directory;
|
private final JTextField directory;
|
||||||
|
|
||||||
public ServerTab(String name) {
|
public ServerTab(String name) {
|
||||||
|
Loading…
Reference in New Issue
Block a user