mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
LoginDialog: remove unused TitlePanel.ImagePanel and its bg image
This commit is contained in:
@ -15,25 +15,16 @@
|
||||
*/
|
||||
package org.jivesoftware.spark.component;
|
||||
|
||||
import org.jivesoftware.resource.Default;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.Image;
|
||||
import java.awt.Insets;
|
||||
import java.awt.LayoutManager;
|
||||
import java.awt.geom.AffineTransform;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
/**
|
||||
* <code>TitlePanel</code> class is the top panel displayed in this application.
|
||||
@ -128,28 +119,5 @@ public final class TitlePanel extends JPanel {
|
||||
}
|
||||
descriptionLabel.setText(desc);
|
||||
}
|
||||
|
||||
public static class ImagePanel extends JPanel {
|
||||
|
||||
private static final long serialVersionUID = 5155908601530113727L;
|
||||
final ImageIcon icons = Default.getImageIcon(Default.SECONDARY_BACKGROUND_IMAGE);
|
||||
|
||||
public ImagePanel() {
|
||||
|
||||
}
|
||||
|
||||
public ImagePanel(LayoutManager layout) {
|
||||
super(layout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void paintComponent(Graphics g) {
|
||||
Image backgroundImage = icons.getImage();
|
||||
double scaleX = getWidth() / (double) backgroundImage.getWidth(null);
|
||||
double scaleY = getHeight() / (double) backgroundImage.getHeight(null);
|
||||
AffineTransform xform = AffineTransform.getScaleInstance(scaleX, scaleY);
|
||||
((Graphics2D) g).drawImage(backgroundImage, xform, this);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ USER_DIRECTORY_MAC = Library/Application Support/Spark
|
||||
|
||||
LOGIN_DIALOG_BACKGROUND_IMAGE = images/login_dialog_background.png
|
||||
TOP_BOTTOM_BACKGROUND_IMAGE = images/top_bottom_background_image.png
|
||||
SECONDARY_BACKGROUND_IMAGE = images/steel.png
|
||||
|
||||
# Specify a fixed Hostname
|
||||
# Changing the Hostname will also be prohibited if set
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 KiB |
Reference in New Issue
Block a user