Browse Source

为了方便OEM设计器右上的工具栏做一些修改

master
hugh 8 years ago
parent
commit
1fcca594cb
  1. 19
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java
  2. 4
      designer_base/src/com/fr/start/BaseDesigner.java

19
designer_base/src/com/fr/design/mainframe/DesignerFrame.java

@ -167,22 +167,11 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
return centerTemplateCardPane;
}
/**
* 生成frame的方法
* @param ad
* @return
*/
public static DesignerFrame getNewInstance(ToolBarMenuDock ad){
DesignerFrame frame = new DesignerFrame(ad);
frame.initMenuPane(ad);
return frame;
}
/**
* 初始menuPane的方法 方便OEM时修改该组件
* @param ad
*/
protected void initMenuPane(ToolBarMenuDock ad){
public void initMenuPane(){
menuPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
menuPane.add(new UIMenuHighLight(), BorderLayout.SOUTH);
menuPane.add(initNorthEastPane(ad), BorderLayout.EAST);
@ -211,20 +200,16 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
return northEastPane;
}
protected DesignerFrame(ToolBarMenuDock ad) {
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());
toolbarPane = new JPanel() {
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();

4
designer_base/src/com/fr/start/BaseDesigner.java

@ -148,7 +148,9 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
}
protected DesignerFrame createDesignerFrame() {
return DesignerFrame.getNewInstance(this);
DesignerFrame frame = new DesignerFrame(this);
frame.initMenuPane();
return frame;
}
protected int getStartPort() {

Loading…
Cancel
Save