config: Refactor config panel into separate panels for each logical view
This commit is contained in:
@@ -29,6 +29,7 @@ import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Image;
|
||||
import java.awt.Insets;
|
||||
import java.awt.SystemTray;
|
||||
import java.awt.TrayIcon;
|
||||
import java.awt.event.MouseAdapter;
|
||||
@@ -41,6 +42,7 @@ import java.util.concurrent.Callable;
|
||||
import java.util.function.BiConsumer;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.swing.AbstractButton;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
@@ -277,4 +279,18 @@ public class SwingUtil
|
||||
navigationButton.setOnSelect(button::doClick);
|
||||
return button;
|
||||
}
|
||||
|
||||
public static void removeButtonDecorations(AbstractButton button)
|
||||
{
|
||||
button.setBorderPainted(false);
|
||||
button.setContentAreaFilled(false);
|
||||
button.setFocusPainted(false);
|
||||
button.setMargin(new Insets(0, 0, 0, 0));
|
||||
button.setOpaque(false);
|
||||
}
|
||||
|
||||
public static void addModalTooltip(AbstractButton button, String on, String off)
|
||||
{
|
||||
button.addItemListener(l -> button.setToolTipText(button.isSelected() ? on : off));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user