Browse Source

REPORT-62400 && REPORT-62399 && REPORT-62547【接触点优化】拖拽动效出现时,预览图不消失;【接触点优化】轮播的同时,鼠标悬浮在组件上,轮播图不消失,与组件预览图同时出现;【接触点优化】轮播的图片固定大小,导致预览图显示不全

feature/x
kerry 3 years ago
parent
commit
78aab5a878
  1. 4
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/OnlineEmbedFilterSelectPane.java
  2. 18
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/PreviewDialog.java

4
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/OnlineEmbedFilterSelectPane.java

@ -95,7 +95,7 @@ public class OnlineEmbedFilterSelectPane extends AbstractOnlineWidgetSelectPane
this.doLayout(); this.doLayout();
this.validate(); this.validate();
this.repaint(); this.repaint();
previewDialog.setImage(getPreviewImage(shareWidget)); previewDialog.setImage(getPreviewImage(shareWidget), widgetPane.getLocationOnScreen());
//展示弹出框 //展示弹出框
service.schedule(new Runnable() { service.schedule(new Runnable() {
@Override @Override
@ -114,6 +114,7 @@ public class OnlineEmbedFilterSelectPane extends AbstractOnlineWidgetSelectPane
if (!CarouselStateManger.getInstance().isSuspend()) { if (!CarouselStateManger.getInstance().isSuspend()) {
showCurrentLoadBlock(integer, widgetPane); showCurrentLoadBlock(integer, widgetPane);
} else { } else {
previewDialog.setVisible(false);
pollingCarouselState(integer, widgetPane); pollingCarouselState(integer, widgetPane);
} }
} }
@ -130,6 +131,7 @@ public class OnlineEmbedFilterSelectPane extends AbstractOnlineWidgetSelectPane
return; return;
} }
if (!CarouselStateManger.getInstance().isSuspend()) { if (!CarouselStateManger.getInstance().isSuspend()) {
previewDialog.setVisible(true);
showCurrentLoadBlock(integer, widgetPane); showCurrentLoadBlock(integer, widgetPane);
service.shutdown(); service.shutdown();
} }

18
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/embed/PreviewDialog.java

@ -6,35 +6,33 @@ import com.fr.design.mainframe.EastRegionContainerPane;
import javax.swing.ImageIcon; import javax.swing.ImageIcon;
import javax.swing.JDialog; import javax.swing.JDialog;
import java.awt.Dimension;
import java.awt.Image; import java.awt.Image;
import java.awt.Point;
/** /**
* Created by kerry on 2021/10/22 * Created by kerry on 2021/10/22
*/ */
public class PreviewDialog extends JDialog { public class PreviewDialog extends JDialog {
private static final int OFFSET_Y = 9;
public PreviewDialog() { public PreviewDialog() {
super(DesignerContext.getDesignerFrame()); super(DesignerContext.getDesignerFrame());
setUndecorated(true); setUndecorated(true);
setSize(300, 300);
adjustLocation();
this.setVisible(false); this.setVisible(false);
} }
public void setImage(Image image) { public void setImage(Image image, Point point) {
this.getContentPane().removeAll(); this.getContentPane().removeAll();
this.getContentPane().add(new UILabel(new ImageIcon(image))); this.getContentPane().add(new UILabel(new ImageIcon(image)));
int width = image.getWidth(null);
this.setSize(width, image.getHeight(null));
this.setLocation(point.x - width, point.y + OFFSET_Y);
this.doLayout(); this.doLayout();
this.validate(); this.validate();
this.repaint(); this.repaint();
} }
public void adjustLocation() {
this.setLocation(
EastRegionContainerPane.getInstance().getX() - 300,
20
);
}
} }

Loading…
Cancel
Save