|
|
|
@ -42,16 +42,8 @@ public class TopXCreator extends BasicTopXCreator {
|
|
|
|
|
* 依据鼠标事件和visible设置是否显示蒙层 |
|
|
|
|
* */ |
|
|
|
|
public void displayCoverPane(MouseEvent event, boolean visible) { |
|
|
|
|
if (!visible) { |
|
|
|
|
setVisible(false); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
Rectangle rect = getBounds(); |
|
|
|
|
if (rect.contains(event.getX(), event.getY())) { |
|
|
|
|
coverPanel.setVisible(true); |
|
|
|
|
} else { |
|
|
|
|
coverPanel.setVisible(false); |
|
|
|
|
} |
|
|
|
|
boolean isVisible = visible && getBounds().contains(event.getX(), event.getY()); |
|
|
|
|
coverPanel.setVisible(isVisible); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|