Browse Source
Merge in DESIGN/design from ~YUAN.WANG/design:release/10.0 to release/10.0 * commit 'c309ef5c27310c59e26e00b8cefd23ea1340345c': REPORT-38954&&REPORT-38927&&REPORT-38924&&REPORT-38896 修改Nullable的import REPORT-38954&&REPORT-38927&&REPORT-38924&&REPORT-38896 消除NPE REPORT-38954&&REPORT-38927&&REPORT-38924&&REPORT-38896 TopXCreator中添加XCreator的变量,绘制的时候禁用其双缓冲然后直接调用其paint方法feature/big-screen
Yuan.Wang
4 years ago
16 changed files with 66 additions and 252 deletions
@ -1,49 +0,0 @@ |
|||||||
package com.fr.design.mainframe.widget.topxcreator; |
|
||||||
|
|
||||||
import com.fr.design.designer.creator.XCreator; |
|
||||||
import com.fr.design.mainframe.CoverReportPane; |
|
||||||
|
|
||||||
import java.awt.*; |
|
||||||
import java.awt.event.MouseEvent; |
|
||||||
|
|
||||||
/** |
|
||||||
* @Author: Yuan.Wang |
|
||||||
* @Date: 2020/8/26 |
|
||||||
*/ |
|
||||||
public class TopXCreator extends BasicTopXCreator { |
|
||||||
|
|
||||||
private final CoverReportPane coverPanel; |
|
||||||
|
|
||||||
public TopXCreator(XCreator creator) { |
|
||||||
super(creator); |
|
||||||
coverPanel = new CoverReportPane(); |
|
||||||
init(); |
|
||||||
} |
|
||||||
|
|
||||||
private void init() { |
|
||||||
coverPanel.setSize(getSize()); |
|
||||||
coverPanel.setVisible(false); |
|
||||||
add(coverPanel); |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
protected void resetSize(Rectangle bounds) { |
|
||||||
coverPanel.setSize(getSize()); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 设置是否显示蒙层 |
|
||||||
* */ |
|
||||||
public void displayCoverPane(boolean visible) { |
|
||||||
coverPanel.setVisible(visible); |
|
||||||
} |
|
||||||
|
|
||||||
/** |
|
||||||
* 依据鼠标事件和visible设置是否显示蒙层 |
|
||||||
* */ |
|
||||||
public void displayCoverPane(MouseEvent event, boolean visible) { |
|
||||||
boolean isVisible = visible && getBounds().contains(event.getX(), event.getY()); |
|
||||||
coverPanel.setVisible(isVisible); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
Loading…
Reference in new issue