You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
782 B
31 lines
782 B
package com.fr.design.menu; |
|
|
|
import com.fr.design.gui.imenu.UIMenuItemUI; |
|
|
|
import javax.swing.JMenuItem; |
|
import java.awt.Graphics; |
|
import java.awt.Rectangle; |
|
|
|
/** |
|
* created by Harrison on 2020/03/22 |
|
**/ |
|
class SnapChatMenuItemUI extends UIMenuItemUI { |
|
|
|
private final SnapChatUpdateAction snapChatUpdateAction; |
|
|
|
public SnapChatMenuItemUI(SnapChatUpdateAction snapChatUpdateAction) { |
|
|
|
this.snapChatUpdateAction = snapChatUpdateAction; |
|
} |
|
|
|
@Override |
|
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { |
|
|
|
super.paintText(g, menuItem, textRect, text); |
|
|
|
if (!snapChatUpdateAction.hasRead()) { |
|
SnapChatUtil.paintSnapChat(g, textRect); |
|
} |
|
} |
|
|
|
}
|
|
|