mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-23 07:58:27 -05:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
c51bb3eafb
4 changed files with 15 additions and 31 deletions
|
@ -116,7 +116,6 @@ dependencies {
|
|||
exclude group: "io.netty", module: "netty-transport"
|
||||
}
|
||||
include "gs.mclo:api:3.0.1"
|
||||
include "org.swinglabs:swingx:1.6.1"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
|
|
@ -32,7 +32,6 @@ import net.raphimc.viaproxy.util.GBC;
|
|||
import net.raphimc.viaproxy.util.logging.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender;
|
||||
import org.jdesktop.swingx.VerticalLayout;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
@ -60,18 +59,10 @@ public class AdvancedTab extends AUITab {
|
|||
|
||||
@Override
|
||||
protected void init(JPanel contentPane) {
|
||||
JPanel top = new JPanel();
|
||||
top.setLayout(new VerticalLayout());
|
||||
|
||||
JPanel bottom = new JPanel();
|
||||
bottom.setLayout(new VerticalLayout());
|
||||
|
||||
this.addBody(top);
|
||||
this.addFooter(bottom);
|
||||
|
||||
contentPane.setLayout(new BorderLayout());
|
||||
contentPane.add(top, BorderLayout.NORTH);
|
||||
contentPane.add(bottom, BorderLayout.SOUTH);
|
||||
|
||||
this.addBody(contentPane);
|
||||
this.addFooter(contentPane);
|
||||
}
|
||||
|
||||
private void addBody(final Container parent) {
|
||||
|
@ -126,7 +117,7 @@ public class AdvancedTab extends AUITab {
|
|||
GBC.create(body).grid(0, gridy++).weightx(1).insets(BODY_BLOCK_PADDING, BORDER_PADDING, 0, 0).fill(GridBagConstraints.HORIZONTAL).add(this.ignorePacketTranslationErrors);
|
||||
}
|
||||
|
||||
parent.add(body, BorderLayout.CENTER);
|
||||
parent.add(body, BorderLayout.NORTH);
|
||||
}
|
||||
|
||||
private void addFooter(final Container container) {
|
||||
|
@ -189,7 +180,7 @@ public class AdvancedTab extends AUITab {
|
|||
padding.setLayout(new GridBagLayout());
|
||||
GBC.create(padding).grid(0, 0).weightx(1).insets(0, BORDER_PADDING, BORDER_PADDING, BORDER_PADDING).fill(GridBagConstraints.HORIZONTAL).add(footer);
|
||||
|
||||
container.add(padding, BorderLayout.CENTER);
|
||||
container.add(padding, BorderLayout.SOUTH);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
|
@ -33,7 +33,6 @@ import net.raphimc.viaproxy.ui.events.UICloseEvent;
|
|||
import net.raphimc.viaproxy.ui.events.UIInitEvent;
|
||||
import net.raphimc.viaproxy.util.GBC;
|
||||
import net.raphimc.viaproxy.util.logging.Logger;
|
||||
import org.jdesktop.swingx.VerticalLayout;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
@ -63,18 +62,14 @@ public class GeneralTab extends AUITab {
|
|||
@Override
|
||||
protected void init(JPanel contentPane) {
|
||||
JPanel top = new JPanel();
|
||||
top.setLayout(new VerticalLayout());
|
||||
|
||||
JPanel bottom = new JPanel();
|
||||
bottom.setLayout(new VerticalLayout());
|
||||
|
||||
this.addHeader(top);
|
||||
this.addBody(top);
|
||||
this.addFooter(bottom);
|
||||
top.setLayout(new BorderLayout());
|
||||
|
||||
contentPane.setLayout(new BorderLayout());
|
||||
contentPane.add(top, BorderLayout.NORTH);
|
||||
contentPane.add(bottom, BorderLayout.SOUTH);
|
||||
|
||||
this.addHeader(top);
|
||||
this.addBody(top);
|
||||
this.addFooter(contentPane);
|
||||
}
|
||||
|
||||
private void addHeader(final Container parent) {
|
||||
|
@ -98,7 +93,7 @@ public class GeneralTab extends AUITab {
|
|||
JLabel copyright = new JLabel("© RK_01 & Lenni0451");
|
||||
GBC.create(header).grid(2, 0).width(0).insets(BORDER_PADDING, 0, 0, BORDER_PADDING).anchor(GridBagConstraints.NORTHEAST).add(copyright);
|
||||
|
||||
parent.add(header);
|
||||
parent.add(header, BorderLayout.NORTH);
|
||||
}
|
||||
|
||||
private void addBody(final Container parent) {
|
||||
|
@ -163,7 +158,7 @@ public class GeneralTab extends AUITab {
|
|||
}
|
||||
}
|
||||
|
||||
parent.add(body);
|
||||
parent.add(body, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
private void addFooter(final Container parent) {
|
||||
|
@ -182,7 +177,7 @@ public class GeneralTab extends AUITab {
|
|||
this.stateButton.setEnabled(false);
|
||||
GBC.create(footer).grid(0, 1).weightx(1).insets(0, BORDER_PADDING, BORDER_PADDING, BORDER_PADDING).anchor(GridBagConstraints.WEST).fill(GridBagConstraints.HORIZONTAL).add(this.stateButton);
|
||||
|
||||
parent.add(footer);
|
||||
parent.add(footer, BorderLayout.SOUTH);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
|
@ -23,7 +23,6 @@ import net.raphimc.viaproxy.ui.I18n;
|
|||
import net.raphimc.viaproxy.ui.ViaProxyUI;
|
||||
import net.raphimc.viaproxy.util.GBC;
|
||||
import net.raphimc.viaproxy.util.logging.Logger;
|
||||
import org.jdesktop.swingx.VerticalLayout;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
@ -78,8 +77,8 @@ public class UISettingsTab extends AUITab {
|
|||
GBC.create(body).grid(0, gridy++).weightx(1).insets(0, BORDER_PADDING, 0, BORDER_PADDING).fill(GridBagConstraints.HORIZONTAL).add(language);
|
||||
}
|
||||
|
||||
contentPane.setLayout(new VerticalLayout());
|
||||
contentPane.add(body);
|
||||
contentPane.setLayout(new BorderLayout());
|
||||
contentPane.add(body, BorderLayout.NORTH);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue