Browse Source
Merge in DESIGN/design from ~FANGLEI/design:feature/x to feature/x * commit '9af7ee1f8148f887a2b2d722cda1163649cc590e': REPORT-69470 多分类坐标轴分层显示,选择部分轴标签颜色弹窗自动关闭feature/x
fanglei
3 years ago
3 changed files with 66 additions and 4 deletions
@ -0,0 +1,46 @@ |
|||||||
|
package com.fr.design.gui.frpane; |
||||||
|
|
||||||
|
import com.fr.base.BaseUtils; |
||||||
|
import com.fr.design.beans.BasicBeanPane; |
||||||
|
import com.fr.design.gui.ilable.UILabel; |
||||||
|
|
||||||
|
import javax.swing.Icon; |
||||||
|
import javax.swing.JPanel; |
||||||
|
import java.awt.BorderLayout; |
||||||
|
import java.awt.Point; |
||||||
|
import java.awt.event.MouseAdapter; |
||||||
|
import java.awt.event.MouseEvent; |
||||||
|
|
||||||
|
public abstract class ClosableBubbleFloatPane<T> extends UIBubbleFloatPane<T> { |
||||||
|
public ClosableBubbleFloatPane(int arrowPosition, Point arrowPoint, BasicBeanPane<T> contentPane) { |
||||||
|
super(arrowPosition, arrowPoint, contentPane); |
||||||
|
} |
||||||
|
|
||||||
|
public ClosableBubbleFloatPane(int arrowPosition, Point arrowPoint, BasicBeanPane<T> contentPane, int width, int height) { |
||||||
|
super(arrowPosition, arrowPoint, contentPane, width, height); |
||||||
|
} |
||||||
|
|
||||||
|
protected void initAWTEventListener() { |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
public boolean forceLockFocus() { |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
protected JPanel initTopOptionMenu() { |
||||||
|
JPanel menu = new JPanel(new BorderLayout()); |
||||||
|
Icon icon = BaseUtils.readIcon("/com/fr/design/images/buttonicon/close_icon.png"); |
||||||
|
UILabel label = new UILabel(icon); |
||||||
|
label.addMouseListener(new MouseAdapter() { |
||||||
|
@Override |
||||||
|
public void mouseClicked(MouseEvent e) { |
||||||
|
showDialog.setVisible(false); |
||||||
|
updateContentPane(); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
menu.add(label, BorderLayout.EAST); |
||||||
|
return menu; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue