Browse Source

改名

master
vito 8 years ago
parent
commit
a260cd4f93
  1. 12
      designer_base/src/com/fr/design/style/AbstractPopBox.java

12
designer_base/src/com/fr/design/style/AbstractPopBox.java

@ -97,13 +97,13 @@ public abstract class AbstractPopBox extends JPanel {
private void mouseClick(MouseEvent evt) { private void mouseClick(MouseEvent evt) {
Point point = new Point((int) (evt.getLocationOnScreen().getX()), (int) evt.getLocationOnScreen().getY()); Point point = new Point((int) (evt.getLocationOnScreen().getX()), (int) evt.getLocationOnScreen().getY());
Dimension d = AbstractPopBox.this.getSize(); Dimension popBoxD = AbstractPopBox.this.getSize();
Point p = AbstractPopBox.this.getLocationOnScreen(); Point popBoxP = AbstractPopBox.this.getLocationOnScreen();
Dimension popBoxD = this.getControlWindow().getSize(); Dimension popMenuD = this.getControlWindow().getSize();
Point popBoxP = this.getControlWindow().getLocation(); Point popMenuP = this.getControlWindow().getLocation();
Rectangle rect = new Rectangle(p, d);
Rectangle popBoxRect = new Rectangle(popBoxP, popBoxD); Rectangle popBoxRect = new Rectangle(popBoxP, popBoxD);
if (!rect.contains(point) && !popBoxRect.contains(point)) { Rectangle popMenuRect = new Rectangle(popMenuP, popMenuD);
if (!popBoxRect.contains(point) && !popMenuRect.contains(point)) {
this.hidePopupMenu(); this.hidePopupMenu();
} }
} }

Loading…
Cancel
Save