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