|
|
@ -7,6 +7,7 @@ import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.Icon; |
|
|
|
import javax.swing.JTextPane; |
|
|
|
import javax.swing.JTextPane; |
|
|
|
import javax.swing.text.SimpleAttributeSet; |
|
|
|
import javax.swing.text.SimpleAttributeSet; |
|
|
|
import javax.swing.text.StyleConstants; |
|
|
|
import javax.swing.text.StyleConstants; |
|
|
@ -32,6 +33,7 @@ import java.text.AttributedString; |
|
|
|
|
|
|
|
|
|
|
|
public class BubbleWithClose extends Bubble { |
|
|
|
public class BubbleWithClose extends Bubble { |
|
|
|
private static final Font FONT = new Font(Font.SANS_SERIF, Font.PLAIN, 14); |
|
|
|
private static final Font FONT = new Font(Font.SANS_SERIF, Font.PLAIN, 14); |
|
|
|
|
|
|
|
private static final Icon ICON = IOUtils.readIcon("/com/fr/design/mainframe/guide/close.png"); |
|
|
|
private static final int HEADER_HEIGHT = 24; |
|
|
|
private static final int HEADER_HEIGHT = 24; |
|
|
|
private static final Color HEADER_COLOR = new Color(245, 245, 246); |
|
|
|
private static final Color HEADER_COLOR = new Color(245, 245, 246); |
|
|
|
private static final Color TITLE_COLOR = new Color(51, 51, 52); |
|
|
|
private static final Color TITLE_COLOR = new Color(51, 51, 52); |
|
|
@ -112,9 +114,9 @@ public class BubbleWithClose extends Bubble { |
|
|
|
|
|
|
|
|
|
|
|
private void createCloseButton() { |
|
|
|
private void createCloseButton() { |
|
|
|
closeButton = new UIButton(); |
|
|
|
closeButton = new UIButton(); |
|
|
|
closeButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/guide/close.png")); |
|
|
|
closeButton.setIcon(ICON); |
|
|
|
closeButton.set4ToolbarButton(); |
|
|
|
closeButton.set4ToolbarButton(); |
|
|
|
closeButton.setPreferredSize(new Dimension(16, 16)); |
|
|
|
closeButton.setPreferredSize(new Dimension(12, 12)); |
|
|
|
closeButton.setRolloverEnabled(false); |
|
|
|
closeButton.setRolloverEnabled(false); |
|
|
|
closeButton.setPressedPainted(false); |
|
|
|
closeButton.setPressedPainted(false); |
|
|
|
this.add(closeButton); |
|
|
|
this.add(closeButton); |
|
|
|