|
|
@ -33,6 +33,7 @@ import com.fr.stable.StringUtils; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.BorderFactory; |
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
import javax.swing.border.Border; |
|
|
|
import javax.swing.border.Border; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Color; |
|
|
@ -776,11 +777,17 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo |
|
|
|
} |
|
|
|
} |
|
|
|
int extraX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale()); |
|
|
|
int extraX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale()); |
|
|
|
int extraY = (int) (bounds.y * designer.getScale()); |
|
|
|
int extraY = (int) (bounds.y * designer.getScale()); |
|
|
|
|
|
|
|
// 放到事件尾部执行
|
|
|
|
|
|
|
|
SwingUtilities.invokeLater(new Runnable() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void run() { |
|
|
|
popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); |
|
|
|
popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); |
|
|
|
popup.updatePane(designer); |
|
|
|
popup.updatePane(designer); |
|
|
|
popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible()); |
|
|
|
popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible()); |
|
|
|
popup.setRelativeBounds(bounds); |
|
|
|
popup.setRelativeBounds(bounds); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 创建右击弹出菜单 |
|
|
|
* 创建右击弹出菜单 |
|
|
|