Browse Source
Merge in DESIGN/design from ~TOMMY/design:feature/x to feature/x * commit 'b10a645f2f5e3a051b9d08c943b203bca94fedeb': REPORT-60489 主题面板引导长按滑动时候会有异常 REPORT-60477 完成弹窗的按钮有重影,使用UIButton实现 REPORT-60492 && REPORT-60480 解决window上不显示和错位问题 REPORT-60693 开启引导的时候设计器窗口最大化 REPORT-60485 解决引导页中模板保存点取消也显示完成弹窗 REPORT-60484 解决切换工作目录会多次注册问题 REPORT-60513 功能入口提示增加遮罩research/11.0
Tommy
3 years ago
19 changed files with 192 additions and 137 deletions
@ -1,47 +0,0 @@
|
||||
package com.fr.design.mainframe.guide.ui; |
||||
|
||||
import com.fr.design.mainframe.DesignerContext; |
||||
import com.fr.design.mainframe.DesignerFrame; |
||||
import com.fr.design.mainframe.guide.collect.GuideCollector; |
||||
|
||||
import javax.swing.JDialog; |
||||
import java.awt.Color; |
||||
import java.awt.Point; |
||||
import java.awt.Window; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
public class BubbleHintDialog extends JDialog { |
||||
private static final int DIALOG_WIDTH = 220; |
||||
private static final int DIALOG_HEIGHT = 140; |
||||
private static BubbleHintDialog dialog; |
||||
|
||||
public static BubbleHintDialog getInstance(){ |
||||
if (dialog == null) { |
||||
dialog = new BubbleHintDialog(DesignerContext.getDesignerFrame()); |
||||
} |
||||
return dialog; |
||||
} |
||||
|
||||
public BubbleHintDialog(Window parent) { |
||||
super(parent); |
||||
setUndecorated(true); |
||||
this.setBackground(new Color(0,0,0,0)); |
||||
setSize(DIALOG_WIDTH, DIALOG_HEIGHT); |
||||
BubbleHint bubbleHint = new BubbleHint(); |
||||
bubbleHint.addConfirmAction(new ActionListener() { |
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
setVisible(false); |
||||
dispose(); |
||||
GuideCollector.getInstance().setShowHint(true); |
||||
} |
||||
}); |
||||
this.setContentPane(bubbleHint); |
||||
} |
||||
|
||||
public void showDialog(Point location) { |
||||
dialog.setLocation(location); |
||||
dialog.setVisible(true); |
||||
} |
||||
} |
@ -0,0 +1,63 @@
|
||||
package com.fr.design.mainframe.guide.entry; |
||||
|
||||
import com.fr.design.mainframe.DesignerContext; |
||||
import com.fr.design.mainframe.guide.base.GuideView; |
||||
import com.fr.design.mainframe.guide.collect.GuideCollector; |
||||
import com.fr.design.mainframe.guide.scene.AbstractGuideScene; |
||||
import com.fr.design.mainframe.guide.scene.GuideSceneLifecycleAdaptor; |
||||
import com.fr.design.mainframe.guide.ui.BubbleHint; |
||||
|
||||
import javax.swing.SwingUtilities; |
||||
import java.awt.Dimension; |
||||
import java.awt.Point; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
public class GuideEntryHint { |
||||
private static GuideEntryHint hint; |
||||
private GuideView guideView; |
||||
|
||||
public static GuideEntryHint getInstance() { |
||||
if (hint == null) { |
||||
hint = new GuideEntryHint(); |
||||
} |
||||
return hint; |
||||
} |
||||
|
||||
public GuideEntryHint() { |
||||
AbstractGuideScene scene = new AbstractGuideScene(){}; |
||||
BubbleHint bubbleHint = new BubbleHint(); |
||||
guideView = new GuideView(DesignerContext.getDesignerFrame()); |
||||
|
||||
bubbleHint.addConfirmAction(new ActionListener() { |
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
GuideCollector.getInstance().setShowHint(true); |
||||
guideView.dismissGuide(); |
||||
} |
||||
}); |
||||
|
||||
scene.registerLifecycle(new GuideSceneLifecycleAdaptor() { |
||||
@Override |
||||
public boolean prepared() { |
||||
scene.addTarget(GuideEntryPane.getGuideEntryPane()); |
||||
scene.addCustomTarget(bubbleHint, getBubbleLocation()); |
||||
return true; |
||||
} |
||||
}); |
||||
|
||||
guideView.setScene(scene); |
||||
} |
||||
|
||||
public void show() { |
||||
if (!guideView.isVisible()) { |
||||
guideView.showGuide(); |
||||
} |
||||
} |
||||
|
||||
private Point getBubbleLocation() { |
||||
Point point = SwingUtilities.convertPoint(GuideEntryPane.getGuideEntryPane(),0,0, guideView.getRootPane()); |
||||
Dimension size = GuideEntryPane.getGuideEntryPane().getSize(); |
||||
return new Point(point.x - 187,point.y + size.height); |
||||
} |
||||
} |
Loading…
Reference in new issue