BOS 使得打开UI界面最大化 实现

来源:互联网 发布:手机点读软件 编辑:程序博客网 时间:2024/05/17 02:05

实现方式

1   UI界面全屏显示

Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();// 获得屏幕象素
this.setPreferredSize(screenSize);// 设置框架满屏显示

 

 

 

2 以查看的方式 显示全屏

   public void actionView_actionPerformed(ActionEvent e) throws Exception {
  checkSelected();
  String id = getSelectedKeyValue();
  if(id == null || "".equals(id)){
   return ;
  }
  
  UIContext uiContext = new UIContext(this);
  uiContext.put("ID", new ObjectStringPK(id));
  getUIContext().putAll(uiContext);
  uiContext.put("this", this); //将本页面对象作为参数传递到编辑界面,用来在编辑界面保存之后刷新数据
  IUIWindow uiWindow = UIFactory.createUIFactory(UIFactoryName.NEWTAB).create(getEditUIName(), uiContext, null, OprtState.VIEW);
  uiWindow.show();
  //super.actionView_actionPerformed(e);
 }