144 |
/* Location of the popup */ |
/* Location of the popup */ |
145 |
private Point popupLocation; |
private Point popupLocation; |
146 |
|
|
147 |
|
/* Field indicating if popup menu is visible or not */ |
148 |
|
private boolean visible = false; |
149 |
|
|
150 |
/* Bound Property indicating visibility of the popup menu*/ |
/* Bound Property indicating visibility of the popup menu*/ |
151 |
public static final String VISIBLE_CHANGED_PROPERTY = "visible"; |
public static final String VISIBLE_CHANGED_PROPERTY = "visible"; |
152 |
|
|
567 |
*/ |
*/ |
568 |
public boolean isVisible() |
public boolean isVisible() |
569 |
{ |
{ |
570 |
return super.isVisible(); |
return visible; |
571 |
} |
} |
572 |
|
|
573 |
/** |
/** |
580 |
public void setVisible(boolean visible) |
public void setVisible(boolean visible) |
581 |
{ |
{ |
582 |
boolean old = isVisible(); |
boolean old = isVisible(); |
583 |
super.setVisible(visible); |
this.visible = visible; |
584 |
if (old != isVisible()) |
if (old != isVisible()) |
585 |
{ |
{ |
586 |
firePropertyChange(VISIBLE_CHANGED_PROPERTY, old, (boolean) isVisible()); |
firePropertyChange(VISIBLE_CHANGED_PROPERTY, old, (boolean) isVisible()); |
618 |
.getLayeredPane(); |
.getLayeredPane(); |
619 |
Point p = new Point(popupLocation.x, popupLocation.y); |
Point p = new Point(popupLocation.x, popupLocation.y); |
620 |
SwingUtilities.convertPointFromScreen(p, layeredPane); |
SwingUtilities.convertPointFromScreen(p, layeredPane); |
621 |
popup.show(p.x, p.y, size.width, size.height); |
popup.show(p.x, p.y, size.width, size.height); |
622 |
} |
} |
623 |
else |
else |
624 |
{ |
{ |