|
|
|
@ -19,11 +19,13 @@ import com.fr.stable.StringUtils;
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
import java.awt.AlphaComposite; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.FontMetrics; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.Image; |
|
|
|
|
import java.awt.Point; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
@ -43,7 +45,9 @@ public class EmbedPane extends JPanel {
|
|
|
|
|
private static final String EMBED_PANE_TIMER = "EMBED_PANE_TIMER"; |
|
|
|
|
private static final Color BORDER_COLOR = Color.decode("#D9DADD"); |
|
|
|
|
private static final Color SEARCH_BUTTON_COLOR = Color.decode("#419BF9"); |
|
|
|
|
private static final float DELTA_ALPHA = 0.13F; |
|
|
|
|
private Image image; |
|
|
|
|
private float alpha = 1.0F; |
|
|
|
|
|
|
|
|
|
public EmbedPane(OnlineEmbedFilterShowPane showPane) { |
|
|
|
|
this.addMouseListener(new MouseAdapter() { |
|
|
|
@ -172,6 +176,7 @@ public class EmbedPane extends JPanel {
|
|
|
|
|
Dimension newDimension = new Dimension(dimension.width - 25, dimension.height - 30); |
|
|
|
|
EmbedPane.this.setSize(newDimension); |
|
|
|
|
EmbedPane.this.setLocation(point.x + 25, 0); |
|
|
|
|
alpha -= DELTA_ALPHA; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}, 0, 60, TimeUnit.MILLISECONDS); |
|
|
|
@ -179,6 +184,8 @@ public class EmbedPane extends JPanel {
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void paint(Graphics g) { |
|
|
|
|
AlphaComposite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha); |
|
|
|
|
((Graphics2D) g).setComposite(composite); |
|
|
|
|
super.paint(g); |
|
|
|
|
if (image != null) { |
|
|
|
|
g.drawImage(image, 0, 0, EmbedPane.this.getWidth(), EmbedPane.this.getHeight(), null); |
|
|
|
|