javax.swing.JInternalFrame.setNormalBounds()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中javax.swing.JInternalFrame.setNormalBounds()方法的一些代码示例,展示了JInternalFrame.setNormalBounds()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.setNormalBounds()方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:setNormalBounds

JInternalFrame.setNormalBounds介绍

暂无

代码示例

代码示例来源:origin: khuxtable/seaglass

public void maximizeFrame(JInternalFrame f) {
  if (f.isIcon()) {
    try {
      f.setIcon(false);
    } catch (PropertyVetoException e2) {
    }
  } else {
    f.setNormalBounds(f.getBounds());
    Component desktop = f.getParent();
    setBoundsForFrame(f, 0, 0, desktop.getWidth(), desktop.getHeight() - taskBar.getHeight());
  }
  try {
    f.setSelected(true);
  } catch (PropertyVetoException e2) {
  }
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public void minimizeFrame(JInternalFrame f) {
  // If the frame was an icon restore it back to an icon.
  if (f.isIcon()) {
    iconifyFrame(f);
    return;
  }
  if ((f.getNormalBounds()) != null) {
    Rectangle r = f.getNormalBounds();
    f.setNormalBounds(null);
    try {
      f.setSelected(true);
    } catch (PropertyVetoException e2) {
    }
    setBoundsForFrame(f, r.x, r.y, r.width, r.height);
  }
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public void minimizeFrame(JInternalFrame _f)
{
 if(DEBUG) FuLog.debug("BDM: minimizeFrame()");
 if(_f.isIcon())
 {
  iconifyFrame(_f);
 }
 else
 {
  /*GCJ-BEGIN*/
  if(_f.getNormalBounds()!=null)
  {
 Rectangle r=_f.getNormalBounds();
 _f.setNormalBounds(null);
 try { _f.setSelected(true); }
 catch (PropertyVetoException ex) { }
 setBoundsForFrame(_f,r.x,r.y,r.width,r.height);
  }
  /*GCJ-END*/
 }
}

代码示例来源:origin: stackoverflow.com

f.setNormalBounds(f.getBounds());

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public void maximizeFrame(JInternalFrame f) {
  if (f.isIcon()) {
    try {
      // In turn calls deiconifyFrame in the desktop manager.
      // That method will handle the maximization of the frame.
      f.setIcon(false);
    } catch (PropertyVetoException e2) {
    }
  } else {
    f.setNormalBounds(f.getBounds());
    Rectangle desktopBounds = f.getParent().getBounds();
    setBoundsForFrame(f, 0, 0,
             desktopBounds.width, desktopBounds.height);
  }
  // Set the maximized frame as selected.
  try {
    f.setSelected(true);
  } catch (PropertyVetoException e2) {
  }
}

代码示例来源:origin: khuxtable/seaglass

public void iconifyFrame(JInternalFrame f) {
  Container c = f.getParent();
  boolean findNext = f.isSelected();
  if (c == null) {
    return;
  }
  if (!f.isMaximum()) {
    f.setNormalBounds(f.getBounds());
  }
  c.remove(f);
  c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
  try {
    f.setSelected(false);
  } catch (PropertyVetoException e2) {
  }
  // Get topmost of the remaining frames
  if (findNext) {
    for (Component comp : c.getComponents()) {
      if (comp instanceof JInternalFrame) {
        try {
          ((JInternalFrame) comp).setSelected(true);
        } catch (PropertyVetoException e2) {
        }
        ((JInternalFrame) comp).moveToFront();
        return;
      }
    }
  }
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

_f.setNormalBounds(_f.getBounds());

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public void closeFrame(JInternalFrame f) {
  boolean findNext = f.isSelected();
  Container c = f.getParent();
  if (findNext)
    try {
      f.setSelected(false);
    } catch (PropertyVetoException e2) {
    }
  if (c != null) {
    c.remove(f);
    c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
  }
  removeIconFor(f);
  if (f.getNormalBounds() != null)
    f.setNormalBounds(null);
  if (wasIcon(f))
    setWasIcon(f, null);
  if (findNext) activateNextFrame(c);
}

代码示例来源:origin: com.fifesoft.rtext/fife.common

/**
 * Removes the frame, and, if necessary, the
 * <code>desktopIcon</code>, from its parent.  This method is overridden so
 * that the "next internal frame" isn't selected after this one is closed.
 * @param f the <code>JInternalFrame</code> to be removed
 */
@Override
public void closeFrame(JInternalFrame f) {
  Container c = f.getParent();
  if (f.isSelected()) {
    try {
      f.setSelected(false);
    } catch (PropertyVetoException e2) {
      // Do nothing
    }
  }
  if(c != null) {
    c.remove(f);
    c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
  }
  removeIconFor(f);
  if(f.getNormalBounds() != null)
    f.setNormalBounds(null);
  if(wasIcon(f))
    setWasIcon(f, null);
}

代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu

public void closeFrame(JInternalFrame _f)
{
 if(DEBUG) FuLog.debug("BDM: closeFrame()");
 //if(DEBUG) FuLog.printStackTrace();
 boolean selected=_f.isSelected();
 if(selected)
 {
  try { _f.setSelected(false); }
  catch (PropertyVetoException ex) { }
 }
 desktop_.remove(_f);
 desktop_.remove(_f.getDesktopIcon());
 /*GCJ-BEGIN*/
 if(BuLib.swing()>=1.2)
 {
  if(_f.getNormalBounds()!=null)
   _f.setNormalBounds(null);
 }
 /*GCJ-END*/
 if(wasIcon(_f))
  setWasIcon(_f,null);
 if(selected) activateNextFrame();
}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

f.setNormalBounds(f.getBounds());

相关文章

JInternalFrame类方法