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

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

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

JInternalFrame.isClosed介绍

暂无

代码示例

代码示例来源:origin: org.java.net.substance/substance

@Override
public void removeNotify() {
  super.removeNotify();
  // fix for defect 211 - internal frames that are iconified
  // programmatically should not uninstall the title panes.
  boolean isAlive = ((this.frame.isIcon() && !this.frame.isClosed()) || Boolean.TRUE
      .equals(frame.getClientProperty(ICONIFYING)));
  if (!isAlive) {
    this.uninstall();
  }
}

代码示例来源:origin: joel-costigliola/assertj-swing

@RunsInEDT
@Nullable private static Point findCloseButtonLocation(final @Nonnull JInternalFrame internalFrame) {
 return execute(() -> {
  checkShowing(internalFrame);
  if (!internalFrame.isClosable()) {
   String msg = String.format("The JInternalFrame <%s> is not closable", format(internalFrame));
   throw new IllegalStateException(msg);
  }
  if (internalFrame.isClosed()) {
   return null;
  }
  return closeButtonLocation(internalFrame);
 });
}

代码示例来源:origin: com.github.insubstantial/substance

@Override
public void removeNotify() {
  super.removeNotify();
  // fix for defect 211 - internal frames that are iconified
  // programmatically should not uninstall the title panes.
  boolean isAlive = ((this.frame.isIcon() && !this.frame.isClosed()) || Boolean.TRUE
      .equals(frame.getClientProperty(ICONIFYING)));
  if (!isAlive) {
    this.uninstall();
  }
}

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

JInternalFrame frmUpdateData = null;
 frmUpdateData = new JInternalFrame("Test", true, true);
 frmUpdateData.setBounds(0, 0, 200, 200);
 JDesktopPane desktopPane = new JDesktopPane();
 desktopPane.setBounds(0, 0, 600, 600);
 desktopPane.add(frmUpdateData);
 desktopPane.setVisible(true);
 frmUpdateData.setVisible(true);
 JFrame frame = new JFrame();
 frame.setBounds(0, 0, 600, 600);
 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 frame.getContentPane().add(desktopPane);
 frame.setVisible(true);
 while (frmUpdateData != null && !frmUpdateData.isClosed()) {
   try {
     Thread.sleep(100);
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
 }
 JOptionPane.showMessageDialog(null, "Done");

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

public void close() {
 if (isCloseFrameMode()) {
  JInternalFrame frame = getCurrentInternalFrame();
  if (!frame.isClosed() && frame.isClosable()) {
   try {
    frame.setClosed(true);
   } catch (PropertyVetoException ex) {}
  }
 }
}

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

public void daughter(String _action, String _name) {
 JInternalFrame[] frames = getMainPanel().getAllInternalFrames();
 JInternalFrame f = null;
 for (int i = 0; i < frames.length; i++) {
  String n = frames[i].getName();
  if (_name.equals(n) || ("if" + _name).equals(n) || _name.equals("*") || _name.equals(frames[i].getTitle())) {
   f = frames[i];
   try {
    if ("ACTIVER".equals(_action)) {
     if (f.isIcon()) f.setIcon(false);
     if (!f.isSelected()) f.setSelected(true);
    } else if ("FERMER".equals(_action)) {
     if (!f.isClosed()) f.setClosed(true);
    } else if ("ICONIFIER".equals(_action)) {
     if (!f.isIcon()) f.setIcon(true);
    } else if ("DEICONIFIER".equals(_action)) {
     if (f.isIcon()) f.setIcon(false);
    } else
     System.err.println("UNKNOWN SUB-ACTION: " + _action);
   } catch (PropertyVetoException ex) {}
  }
 }
 if (f == null) System.err.println("UNKNOWN FRAME: " + _name);
}

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

y = 0;
for (int i = 0; i < l; i++) {
 if (frames[i].isClosed()) continue;
 if (!frames[i].isVisible()) continue;

代码示例来源:origin: org.cytoscape/swing-application-impl

final JInternalFrame frame = e.getInternalFrame();
if (frame.isClosed())
  return;

代码示例来源:origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Adds command line window to main frame.
 * 
 * @param desktop
 *            OVTK2Desktop to host command line
 */
private void initCommandLine(OVTK2Desktop desktop) {
  if (console == null || console.isClosed()) {
    console = new RegisteredJInternalFrame(Config.language.getProperty("Menu.Tools.Console"), "Tools", Config.language.getProperty("Menu.Tools.Console"), true, true, true, true);
    console.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
    console.setSize(600, 100);
    try {
      OutputPrinter c = OVTKScriptingInitialiser.getCommandLine();
      JScrollPane scrollingArea = new JScrollPane((Component) c);
      scrollingArea.setMinimumSize(new Dimension(0, 35));
      console.add(scrollingArea);
    } catch (RuntimeException e) {
      ErrorDialog.show(e);
    }
    desktop.display(console, Position.centered);
    console.setVisible(true);
  } else {
    console.setVisible(true);
    console.toFront();
  }
}

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

@Override
public void actionPerformed(ActionEvent e) {
  if (imageFrame == null || imageFrame.isClosed()) {
    imageFrame = new JInternalFrame("Image");
    imageFrame.setIconifiable(true);

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

public void activateInternalFrame(JInternalFrame _f) {
 if (!SwingUtilities.isEventDispatchThread()) throw new RuntimeException("Not in swing thread. "
   + "Use Implementation.activateInternalFrame() instead");
 if (!_f.isVisible()) {
  _f.setVisible(true);
 }
 if (_f.isClosed()) {
  try {
   _f.setClosed(false);
  } catch (PropertyVetoException ex) {}
 }
 checkInternalFrame(_f);
 if (_f.isIcon()) {
  try {
   _f.setIcon(false);
  } catch (PropertyVetoException ex) {}
 }
 // if(!isPalette(_f))
 {
  moveToFront(_f);
  if (!_f.isSelected() && !isPalette(_f)) {
   try {
    _f.setSelected(true);
   } catch (PropertyVetoException ex) {}
  }
 }
}

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

while (! f.isClosed())       {
  if (EventQueue.isDispatchThread())    {

代码示例来源:origin: realXuJiang/bigtable-sql

if (!frame.isClosed())

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

if (!frame.isClosed())

相关文章

JInternalFrame类方法