Browse Source

alphafine 广告弹框

master
XiaXiang 8 years ago
parent
commit
4964155c0f
  1. 1
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  2. 8
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java
  3. 4
      designer_base/src/com/fr/aspectj/designerbase/AlphaFineReminder.aj
  4. 2
      designer_base/src/com/fr/design/DesignerEnvManager.java
  5. 3
      designer_base/src/com/fr/design/actions/help/alphafine/AlphafineAction.java
  6. 2
      designer_base/src/com/fr/design/actions/help/alphafine/AlphafineConfigManager.java
  7. 2
      designer_base/src/com/fr/design/actions/help/alphafine/AlphafineConfigPane.java
  8. 29
      designer_base/src/com/fr/design/actions/help/alphafine/AlphafineContext.java
  9. 8
      designer_base/src/com/fr/design/actions/help/alphafine/AlphafineListener.java
  10. 4
      designer_base/src/com/fr/design/actions/help/alphafine/RemindDialog.java
  11. 10
      designer_base/src/com/fr/design/actions/help/alphafine/RemindPane.java
  12. 2
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

1
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -487,6 +487,7 @@ public class AlphaFineDialog extends UIDialog {
Rectangle paneRectangle = new Rectangle(AlphaFinePane.createAlphaFinePane().getLocationOnScreen(), AlphaFinePane.createAlphaFinePane().getSize());
if (!dialogRectangle.contains(p) && !paneRectangle.contains(p)) {
AlphaFineDialog.this.dispose();
System.out.print(p + "\n");
}
}
}

8
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java

@ -2,6 +2,8 @@ package com.fr.design.mainframe.alphafine.component;
import com.fr.base.BaseUtils;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.help.alphafine.AlphafineContext;
import com.fr.design.actions.help.alphafine.AlphafineListener;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.alphafine.AlphaFineHelper;
@ -40,6 +42,12 @@ public class AlphaFinePane extends BasicPane {
AlphaFineHelper.showAlphaFineDialog();
}
});
AlphafineContext.addAlphafineContextListener(new AlphafineListener() {
@Override
public void showDialog() {
AlphaFineHelper.showAlphaFineDialog();
}
});
}
@Override

4
designer_base/src/com/fr/aspectj/designerbase/AlphaFineReminder.aj

@ -1,8 +1,8 @@
package com.fr.aspectj.designerbase;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.help.AlphaFine.AlphafineConfigManager;
import com.fr.design.actions.help.AlphaFine.RemindDialog;
import com.fr.design.actions.help.alphafine.AlphafineConfigManager;
import com.fr.design.actions.help.alphafine.RemindDialog;
import com.fr.design.mainframe.DesignerContext;
import java.awt.event.ActionEvent;

2
designer_base/src/com/fr/design/DesignerEnvManager.java

@ -5,7 +5,7 @@ package com.fr.design;
import com.fr.base.*;
import com.fr.dav.LocalEnv;
import com.fr.design.actions.help.AlphaFine.AlphafineConfigManager;
import com.fr.design.actions.help.alphafine.AlphafineConfigManager;
import com.fr.design.constants.UIConstants;
import com.fr.env.RemoteEnv;
import com.fr.env.SignIn;

3
designer_base/src/com/fr/design/actions/help/AlphaFine/AlphafineAction.java → designer_base/src/com/fr/design/actions/help/alphafine/AlphafineAction.java

@ -1,4 +1,4 @@
package com.fr.design.actions.help.AlphaFine;
package com.fr.design.actions.help.alphafine;
import com.fr.base.BaseUtils;
import com.fr.design.DesignerEnvManager;
@ -9,7 +9,6 @@ import com.fr.design.dialog.DialogActionListener;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.DesignerFrame;
import com.fr.design.menu.MenuKeySet;
import com.fr.general.Inter;
import javax.swing.*;
import java.awt.event.ActionEvent;

2
designer_base/src/com/fr/design/actions/help/AlphaFine/AlphafineConfigManager.java → designer_base/src/com/fr/design/actions/help/alphafine/AlphafineConfigManager.java

@ -1,4 +1,4 @@
package com.fr.design.actions.help.AlphaFine;
package com.fr.design.actions.help.alphafine;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StringUtils;

2
designer_base/src/com/fr/design/actions/help/AlphaFine/AlphafineConfigPane.java → designer_base/src/com/fr/design/actions/help/alphafine/AlphafineConfigPane.java

@ -1,4 +1,4 @@
package com.fr.design.actions.help.AlphaFine;
package com.fr.design.actions.help.alphafine;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.BasicPane;

29
designer_base/src/com/fr/design/actions/help/alphafine/AlphafineContext.java

@ -0,0 +1,29 @@
package com.fr.design.actions.help.alphafine;
import java.util.ArrayList;
import java.util.List;
/**
* Created by XiaXiang on 2017/5/27.
*/
public class AlphafineContext {
private static List<AlphafineListener> fireLoginContextListener = new ArrayList<AlphafineListener>();
/**
* 触发AlphaFine弹窗
*/
public static void fireAlphaFineContextListener() {
for (AlphafineListener l : fireLoginContextListener) {
l.showDialog();
}
}
/**
* 添加一个弹出AlphaFine的监听事件
*
* @param l AlphaFine框弹出监听事件
*/
public static void addAlphafineContextListener(AlphafineListener l) {
fireLoginContextListener.add(l);
}
}

8
designer_base/src/com/fr/design/actions/help/alphafine/AlphafineListener.java

@ -0,0 +1,8 @@
package com.fr.design.actions.help.alphafine;
/**
* Created by XiaXiang on 2017/5/27.
*/
public interface AlphafineListener {
void showDialog();
}

4
designer_base/src/com/fr/design/actions/help/AlphaFine/RemindDialog.java → designer_base/src/com/fr/design/actions/help/alphafine/RemindDialog.java

@ -1,12 +1,10 @@
package com.fr.design.actions.help.AlphaFine;
package com.fr.design.actions.help.alphafine;
import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.UIDialog;
import com.fr.design.utils.gui.GUICoreUtils;
import java.awt.*;
import java.awt.event.*;
/**
* Created by XiaXiang on 2017/5/26.

10
designer_base/src/com/fr/design/actions/help/AlphaFine/RemindPane.java → designer_base/src/com/fr/design/actions/help/alphafine/RemindPane.java

@ -1,4 +1,4 @@
package com.fr.design.actions.help.AlphaFine;
package com.fr.design.actions.help.alphafine;
import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ibutton.UIButton;
@ -45,9 +45,11 @@ public class RemindPane extends JPanel {
openButton.set4ToolbarButton();
openButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
public void mousePressed(MouseEvent e) {
System.out.print(e.getLocationOnScreen() + "\n");
//manager.setOperateCount(0);
dialog.dispose();
AlphafineContext.fireAlphaFineContextListener();
}
});
backgroundLabel = new UILabel(Inter.getLocText("FR-Designer-Alphafine_No_Remind"));
@ -59,7 +61,7 @@ public class RemindPane extends JPanel {
private boolean isCheck = false;
@Override
public void mouseClicked(MouseEvent e) {
public void mousePressed(MouseEvent e) {
if (isCheck) {
checkLabel.setIcon(unCheckIcon);
manager.setNeedRemind(true);
@ -75,7 +77,7 @@ public class RemindPane extends JPanel {
backgroundPane.add(new UILabel(labelIcon), BorderLayout.CENTER);
closeButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
public void mousePressed(MouseEvent e) {
//manager.setOperateCount(0);
dialog.dispose();

2
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -11,7 +11,7 @@ import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.community.*;
import com.fr.design.actions.file.*;
import com.fr.design.actions.help.AboutAction;
import com.fr.design.actions.help.AlphaFine.AlphafineAction;
import com.fr.design.actions.help.alphafine.AlphafineAction;
import com.fr.design.actions.help.TutorialAction;
import com.fr.design.actions.help.WebDemoAction;
import com.fr.design.actions.server.*;

Loading…
Cancel
Save