Browse Source

REPORT-70475 新旧fm切换 悬浮按钮丢失

feature/x
hades 3 years ago
parent
commit
282242695a
  1. 9
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java
  2. 17
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java

9
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionPane.java

@ -23,12 +23,8 @@ public class QuestionPane extends JPanel {
private static final Image QUESTION_BACKGROUND_IMAGE = SVGLoader.load("/com/fr/design/mainframe/alphafine/images/groupbackgroud.svg"); private static final Image QUESTION_BACKGROUND_IMAGE = SVGLoader.load("/com/fr/design/mainframe/alphafine/images/groupbackgroud.svg");
/**
* 是否全部已读
*/
private boolean hasRead;
public QuestionPane(boolean hasRead) { public QuestionPane() {
this.setBackground(new Color(0, 0, 0, 0)); this.setBackground(new Color(0, 0, 0, 0));
} }
@ -47,9 +43,6 @@ public class QuestionPane extends JPanel {
} }
public void setHasRead(boolean hasRead) {
this.hasRead = hasRead;
}
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {

17
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/question/QuestionWindow.java

@ -20,7 +20,7 @@ import javax.swing.JWindow;
public class QuestionWindow extends JWindow { public class QuestionWindow extends JWindow {
private static final QuestionWindow INSTANCE = new QuestionWindow(); private static final QuestionWindow INSTANCE = new QuestionWindow();
private final QuestionPane questionPane = new QuestionPane(true); private final QuestionPane questionPane = new QuestionPane();
private int pressX; private int pressX;
private int pressY; private int pressY;
private QuestionWindow() { private QuestionWindow() {
@ -62,6 +62,8 @@ public class QuestionWindow extends JWindow {
this.getLayeredPane().setToolTipText(Toolkit.i18nText("Fine-Design_Report_AlphaFine_Learn_More_About")); this.getLayeredPane().setToolTipText(Toolkit.i18nText("Fine-Design_Report_AlphaFine_Learn_More_About"));
this.setContentPane(questionPane); this.setContentPane(questionPane);
this.setSize(new Dimension(40, 40)); this.setSize(new Dimension(40, 40));
// 这个地方可以设置alwaysOnTop 弹窗会跟随主页面失去激活状态而隐藏 不会与其他弹窗冲突
this.setAlwaysOnTop(true);
this.setLocation(DesignerContext.getDesignerFrame().getWidth() - 100, this.setLocation(DesignerContext.getDesignerFrame().getWidth() - 100,
DesignerContext.getDesignerFrame().getHeight() - 100); DesignerContext.getDesignerFrame().getHeight() - 100);
} }
@ -70,17 +72,4 @@ public class QuestionWindow extends JWindow {
return INSTANCE; return INSTANCE;
} }
public void setHasRead(boolean hasRead) {
this.questionPane.setHasRead(hasRead);
}
@Override
public void setVisible(boolean b) {
super.setVisible(b);
}
@Override
public void dispose() {
super.dispose();
}
} }

Loading…
Cancel
Save