Browse Source
* commit '65273aef1b52b69114498d56103ce7972b7d9a05': 无jira任务 漏了冒号 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方法bugfix/10.0
superman
4 years ago
17 changed files with 67 additions and 253 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