Cleanup SwingUtil

- Remove unused code
- Remove hardcoded size for icons

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-11-03 18:51:48 +01:00
parent 1983abd5c4
commit 7eb09d45af

View File

@@ -26,13 +26,10 @@ package net.runelite.client.util;
import java.awt.AWTException;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Frame;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.SystemTray;
import java.awt.Toolkit;
import java.awt.TrayIcon;
import java.awt.Window;
import java.awt.event.MouseAdapter;
@@ -186,20 +183,6 @@ public class SwingUtil
return trayIcon;
}
/**
* Check if point is in screen bounds.
*
* @param x the x
* @param y the y
* @return the boolean
*/
public static boolean isInScreenBounds(final int x, final int y)
{
final Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
final Rectangle bounds = new Rectangle(size);
return bounds.contains(x, y);
}
/**
* Add graceful exit callback.
*
@@ -261,7 +244,7 @@ public class SwingUtil
: navigationButton.getIcon();
final JButton button = new JButton();
button.setMaximumSize(new Dimension(30, 30));
button.setSize(scaledImage.getWidth(), scaledImage.getHeight());
button.setToolTipText(navigationButton.getTooltip());
button.setIcon(new ImageIcon(scaledImage));
button.putClientProperty(SubstanceSynapse.FLAT_LOOK, Boolean.TRUE);