|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
package com.fr.design.gui.frpane; |
|
|
|
|
|
|
|
|
|
import com.fine.theme.utils.FineUIUtils; |
|
|
|
|
import com.formdev.flatlaf.util.SystemInfo; |
|
|
|
|
import com.fr.design.beans.BasicBeanPane; |
|
|
|
|
import com.fr.design.dialog.UIDialog; |
|
|
|
|
import com.fr.design.utils.AWTUtilities; |
|
|
|
@ -9,15 +11,22 @@ import com.fr.stable.Constants;
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
import javax.swing.border.Border; |
|
|
|
|
import java.awt.AWTEvent; |
|
|
|
|
import java.awt.BasicStroke; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.Dialog; |
|
|
|
|
import java.awt.Frame; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.Insets; |
|
|
|
|
import java.awt.Point; |
|
|
|
|
import java.awt.Polygon; |
|
|
|
|
import java.awt.Rectangle; |
|
|
|
|
import java.awt.Shape; |
|
|
|
|
import java.awt.Stroke; |
|
|
|
|
import java.awt.Toolkit; |
|
|
|
|
import java.awt.Window; |
|
|
|
|
import java.awt.event.AWTEventListener; |
|
|
|
@ -319,7 +328,7 @@ public abstract class UIBubbleFloatPane<T> extends BasicBeanPane<T> {
|
|
|
|
|
final JPanel contentPane = (JPanel) this.getContentPane(); |
|
|
|
|
this.setLayout(null); |
|
|
|
|
contentPane.add(UIBubbleFloatPane.this); |
|
|
|
|
contentPane.setBorder(null); |
|
|
|
|
setContentBorder(contentPane); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -328,5 +337,33 @@ public abstract class UIBubbleFloatPane<T> extends BasicBeanPane<T> {
|
|
|
|
|
public void checkValid() throws Exception { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setContentBorder(JPanel contentPane) { |
|
|
|
|
if (SystemInfo.isWindows) { |
|
|
|
|
contentPane.setBorder(new Border() { |
|
|
|
|
@Override |
|
|
|
|
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { |
|
|
|
|
Graphics2D g2d = (Graphics2D) g; |
|
|
|
|
Stroke oldStroke = g2d.getStroke(); |
|
|
|
|
g2d.setStroke(new BasicStroke(2, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND)); |
|
|
|
|
g2d.setColor(FineUIUtils.getUIColor("Label.borderColor", "Label.borderColor")); |
|
|
|
|
g2d.drawPolygon((Polygon) getShape4Board()); |
|
|
|
|
g2d.setStroke(oldStroke); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Insets getBorderInsets(Component c) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean isBorderOpaque() { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
contentPane.setBorder(null); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |