* remove river easter egg
This commit is contained in:
parent
3b509a9f05
commit
0f47606ac0
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
|
@ -1,7 +1,5 @@
|
|||
|
||||
package net.filebot.ui;
|
||||
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
|
@ -15,65 +13,54 @@ import javax.swing.JPanel;
|
|||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
|
||||
import net.filebot.ResourceManager;
|
||||
import net.filebot.util.ui.GradientStyle;
|
||||
import net.filebot.util.ui.notification.SeparatorBorder;
|
||||
import net.filebot.util.ui.notification.SeparatorBorder.Position;
|
||||
|
||||
|
||||
class HeaderPanel extends JComponent {
|
||||
|
||||
|
||||
private JLabel titleLabel = new JLabel();
|
||||
|
||||
|
||||
private float[] gradientFractions = { 0.0f, 0.5f, 1.0f };
|
||||
private Color[] gradientColors = { new Color(0xF6F6F6), new Color(0xF8F8F8), new Color(0xF3F3F3) };
|
||||
|
||||
|
||||
|
||||
public HeaderPanel() {
|
||||
setLayout(new BorderLayout());
|
||||
setBackground(Color.WHITE);
|
||||
|
||||
|
||||
JPanel centerPanel = new JPanel(new BorderLayout());
|
||||
centerPanel.setOpaque(false);
|
||||
|
||||
|
||||
titleLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
titleLabel.setVerticalAlignment(SwingConstants.CENTER);
|
||||
titleLabel.setOpaque(false);
|
||||
titleLabel.setForeground(new Color(0x101010));
|
||||
titleLabel.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 24));
|
||||
|
||||
JLabel decorationLabel = new JLabel(ResourceManager.getIcon("decoration.header"));
|
||||
decorationLabel.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
decorationLabel.setVerticalAlignment(SwingConstants.CENTER);
|
||||
|
||||
|
||||
centerPanel.setBorder(new EmptyBorder(0, 78, 0, 0));
|
||||
centerPanel.add(decorationLabel, BorderLayout.EAST);
|
||||
centerPanel.add(titleLabel, BorderLayout.CENTER);
|
||||
|
||||
|
||||
add(centerPanel, BorderLayout.CENTER);
|
||||
|
||||
|
||||
setBorder(new SeparatorBorder(1, new Color(0xB4B4B4), new Color(0xACACAC), GradientStyle.LEFT_TO_RIGHT, Position.BOTTOM));
|
||||
}
|
||||
|
||||
|
||||
public void setTitle(String title) {
|
||||
titleLabel.setText(title);
|
||||
}
|
||||
|
||||
|
||||
public JLabel getTitleLabel() {
|
||||
return titleLabel;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
Graphics2D g2d = (Graphics2D) g;
|
||||
|
||||
|
||||
LinearGradientPaint paint = new LinearGradientPaint(0, 0, getWidth(), 0, gradientFractions, gradientColors);
|
||||
|
||||
|
||||
g2d.setPaint(paint);
|
||||
g2d.fill(getBounds());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue