|
|
|
@ -115,7 +115,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
|
|
|
|
|
private int contentWidth = (int) (Toolkit.getDefaultToolkit().getScreenSize().getWidth()); |
|
|
|
|
private int contentHeight = (int) (Toolkit.getDefaultToolkit().getScreenSize().getHeight()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private WindowAdapter windowAdapter = new WindowAdapter() { |
|
|
|
|
public void windowOpened(WindowEvent e) { |
|
|
|
|
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setComposite(); |
|
|
|
@ -166,26 +166,50 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
protected DesktopCardPane getCenterTemplateCardPane() { |
|
|
|
|
return centerTemplateCardPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 初始menuPane的方法 方便OEM时修改该组件 |
|
|
|
|
* @param ad |
|
|
|
|
*/ |
|
|
|
|
protected void initMenuPane(){ |
|
|
|
|
menuPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
menuPane.add(new UIMenuHighLight(), BorderLayout.SOUTH); |
|
|
|
|
menuPane.add(initNorthEastPane(ad), BorderLayout.EAST); |
|
|
|
|
basePane.add(menuPane, BorderLayout.NORTH); |
|
|
|
|
this.resetToolkitByPlus(null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Constructor. |
|
|
|
|
* @param ad |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
protected JPanel initNorthEastPane(final ToolBarMenuDock ad){ |
|
|
|
|
//hugh: private修改为protected方便oem的时候修改右上的组件构成
|
|
|
|
|
//顶部日志+登陆按钮
|
|
|
|
|
final JPanel northEastPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
GeneralContext.addPluginReadListener(new PluginReadListener() { |
|
|
|
|
@Override |
|
|
|
|
public void success() { |
|
|
|
|
TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING); |
|
|
|
|
if (processor == null) { |
|
|
|
|
processor = new DefaultTitlePlace(); |
|
|
|
|
} |
|
|
|
|
processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return northEastPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public DesignerFrame(ToolBarMenuDock ad) { |
|
|
|
|
setName(DESIGNER_FRAME_NAME); |
|
|
|
|
this.ad = ad; |
|
|
|
|
this.initTitleIcon(); |
|
|
|
|
this.setTitle();// james:因为有默认的了
|
|
|
|
|
|
|
|
|
|
// set this to context.
|
|
|
|
|
DesignerContext.setDesignerFrame(this); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// the content pane
|
|
|
|
|
basePane.setLayout(new BorderLayout()); |
|
|
|
|
|
|
|
|
|
menuPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
menuPane.add(new UIMenuHighLight(), BorderLayout.SOUTH); |
|
|
|
|
menuPane.add(initNorthEastPane(ad), BorderLayout.EAST); |
|
|
|
|
|
|
|
|
|
toolbarPane = new JPanel() { |
|
|
|
|
public Dimension getPreferredSize() { |
|
|
|
|
Dimension dim = super.getPreferredSize(); |
|
|
|
@ -211,7 +235,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
centerPane.add(centerTemplateCardPane = new DesktopCardPane(), BorderLayout.CENTER); |
|
|
|
|
centerPane.add(toolbarPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
basePane.add(menuPane, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
basePane.add(centerPane, BorderLayout.CENTER); |
|
|
|
|
laoyoutWestPane(); |
|
|
|
|
basePane.add(EastRegionContainerPane.getInstance(), BorderLayout.EAST); |
|
|
|
@ -222,7 +246,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
// 调整Window大小
|
|
|
|
|
modWindowBounds(); |
|
|
|
|
|
|
|
|
|
this.resetToolkitByPlus(null); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// p:检查所有按钮的可见性和是否可以编辑性.
|
|
|
|
|
checkToolbarMenuEnable(); |
|
|
|
@ -243,6 +267,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
this.setExtendedState(JFrame.MAXIMIZED_BOTH); |
|
|
|
|
this.setDropTarget(new DropTarget(this, DnDConstants.ACTION_MOVE, new FileDropTargetListener(), true)); |
|
|
|
|
closeMode = UIConstants.CLOSE_OF_AUTHORITY; |
|
|
|
|
initMenuPane(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void initTitleIcon() { |
|
|
|
@ -256,22 +281,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
|
|
|
|
|
this.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel initNorthEastPane(final ToolBarMenuDock ad){ |
|
|
|
|
//顶部日志+登陆按钮
|
|
|
|
|
final JPanel northEastPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); |
|
|
|
|
GeneralContext.addPluginReadListener(new PluginReadListener() { |
|
|
|
|
@Override |
|
|
|
|
public void success() { |
|
|
|
|
TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING); |
|
|
|
|
if (processor == null) { |
|
|
|
|
processor = new DefaultTitlePlace(); |
|
|
|
|
} |
|
|
|
|
processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return northEastPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void addWindowListeners(ArrayList<WindowListener> listeners){ |
|
|
|
|
for(WindowListener listener : listeners){ |
|
|
|
|