|
|
|
@ -4,7 +4,6 @@
|
|
|
|
|
package com.fr.design.mainframe; |
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.base.Env; |
|
|
|
|
import com.fr.base.FRContext; |
|
|
|
|
import com.fr.core.env.EnvConfig; |
|
|
|
|
import com.fr.core.env.EnvContext; |
|
|
|
@ -37,15 +36,14 @@ import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
|
|
|
|
|
import com.fr.design.menu.MenuManager; |
|
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
|
import com.fr.file.FILE; |
|
|
|
|
import com.fr.file.FILEFactory; |
|
|
|
|
import com.fr.file.FileFILE; |
|
|
|
|
import com.fr.file.FileNodeFILE; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
|
import com.fr.general.Inter; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.plugin.context.PluginContext; |
|
|
|
|
import com.fr.plugin.injectable.PluginModule; |
|
|
|
|
import com.fr.plugin.manage.PluginFilter; |
|
|
|
@ -58,9 +56,23 @@ import com.fr.stable.StableUtils;
|
|
|
|
|
import com.fr.stable.image4j.codec.ico.ICODecoder; |
|
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JFrame; |
|
|
|
|
import javax.swing.JLayeredPane; |
|
|
|
|
import javax.swing.JMenuBar; |
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.WindowConstants; |
|
|
|
|
import javax.swing.border.MatteBorder; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Insets; |
|
|
|
|
import java.awt.Point; |
|
|
|
|
import java.awt.Rectangle; |
|
|
|
|
import java.awt.Toolkit; |
|
|
|
|
import java.awt.datatransfer.DataFlavor; |
|
|
|
|
import java.awt.datatransfer.Transferable; |
|
|
|
|
import java.awt.dnd.DnDConstants; |
|
|
|
@ -84,9 +96,6 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.Iterator; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import static com.fr.core.env.EnvEvent.AFTER_SIGN_OUT; |
|
|
|
|
import static com.fr.core.env.EnvEvent.BEFORE_SIGN_OUT; |
|
|
|
|
|
|
|
|
|
public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener { |
|
|
|
|
public static final String DESIGNER_FRAME_NAME = "designer_frame"; |
|
|
|
|
public static final Dimension MIN_SIZE = new Dimension(100, 100); |
|
|
|
@ -130,9 +139,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
|
|
|
|
|
private WindowAdapter windowAdapter = new WindowAdapter() { |
|
|
|
|
public void windowOpened(WindowEvent e) { |
|
|
|
|
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setComposite(); |
|
|
|
|
reCalculateFrameSize(); |
|
|
|
|
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().doResize(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -265,6 +271,14 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.addDesignerOpenedListener(new DesignerOpenedListener() { |
|
|
|
|
@Override |
|
|
|
|
public void designerOpened() { |
|
|
|
|
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setComposite(); |
|
|
|
|
reCalculateFrameSize(); |
|
|
|
|
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().doResize(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
|
|
|
|
this.setVisible(false); |
|
|
|
|
this.setExtendedState(JFrame.MAXIMIZED_BOTH); |
|
|
|
|