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

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

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

JInternalFrame.setClosed介绍

暂无

代码示例

代码示例来源:origin: pentaho/mondrian

case 3:
  sf.setClosed(true);
  break;
sf.setClosed(true);

代码示例来源:origin: pentaho/mondrian

case 2:
  try {
    schemaFrame.setClosed(false);
    schemaFrame.show();
  } catch (Exception ex) {

代码示例来源:origin: pentaho/mondrian

"workbench.open.schema.error.title", "Error"),
  JOptionPane.ERROR_MESSAGE);
schemaFrame.setClosed(true);
return;

代码示例来源:origin: net.java.linoleum/application

private static void hide(final JInternalFrame dialog) {
  try {
    dialog.setClosed(true);
  } catch (final PropertyVetoException e) {
  }
  dialog.setVisible(false);
}

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

/**
 * Closes a internal frame if it is not already null.
 * 
 * @param frame
 *            frame to close
 */
private static void close(JInternalFrame frame) {
  if (frame != null) {
    try {
      frame.setClosed(true);
    } catch (PropertyVetoException pve) {
      ErrorDialog.show(pve);
    }
  }
}

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

/**
 * Closes a internal frame if it is not already null.
 * 
 * @param frame
 *            frame to close
 */
private static void close(JInternalFrame frame) {
  if (frame != null) {
    try {
      frame.setClosed(true);
    } catch (PropertyVetoException pve) {
      ErrorDialog.show(pve);
    }
  }
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

/**
 * Sets the Closed attribute of the InternalFrameWindow object
 * 
 * @param b The new Closed value
 * @exception PropertyVetoException Description of Exception
 */
public void setClosed(boolean b) throws PropertyVetoException {
 if (OS.isOneDotThreeOrMore()) {
  try {
   Class.forName("javax.swing.JInternalFrame").getMethod(
     "doDefaultCloseAction", new Class[0]).invoke(frame, null);
  } catch (Exception e) {
   e.printStackTrace();
  }
 } else {
  if (b == false) {
   frame.setClosed(b);
   return;
  }
  doDefaultCloseAction();
 }
}

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

public void setClosed(boolean _closed) throws PropertyVetoException
{
 super.setClosed(_closed);
 if(isClosed()&&isSelected()) setSelected(false);
 // should be done before ?
}

代码示例来源:origin: locationtech/jts

/**
 * Workaround for bug: can't re-show internal frames. See bug parade 4138031.
 */
public static void show(JInternalFrame internalFrame, JDesktopPane desktopPane)
  throws PropertyVetoException {
  if (!desktopPane.isAncestorOf(internalFrame))
    desktopPane.add(internalFrame);
  internalFrame.setClosed(false);
  internalFrame.setVisible(true);
  internalFrame.toFront();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/skinlf

case WindowConstants.HIDE_ON_CLOSE:
 try {
  frame.setClosed(true);
  frame.setVisible(false);
  if (frame.isSelected()) {
case WindowConstants.DISPOSE_ON_CLOSE:
 try {
  frame.setClosed(true);
  frame.dispose();
case WindowConstants.DO_NOTHING_ON_CLOSE:
 try {
  frame.setClosed(true);
 } catch (PropertyVetoException pve) {}
default:

代码示例来源:origin: bcdev/beam

public void closeFrame(JInternalFrame internalFrame) {
  internalFrame.removeInternalFrameListener(frameListener);
  try {
    internalFrame.setClosed(true);
  } catch (PropertyVetoException e) {
    internalFrame.dispose();
  }
  removeTabFor(internalFrame);
  desktopPane.remove(internalFrame);
}

代码示例来源: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: bcdev/beam

private void closeAssociatedViews(String varName) {
  final List<Band> bands = timeSeries.getBandsForVariable(varName);
  for (Band band : bands) {
    final JInternalFrame[] internalFrames = VisatApp.getApp().findInternalFrames(band);
    for (final JInternalFrame internalFrame : internalFrames) {
      try {
        internalFrame.setClosed(true);
      } catch (PropertyVetoException e) {
        Debug.trace(e);
      }
    }
  }
}

代码示例来源: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: bcdev/beam

private void closeAssociatedViews(ProductLocation location) {
    final List<Band> bands = timeSeries.getBandsForProductLocation(location);
    for (Band band : bands) {
      final JInternalFrame[] internalFrames = VisatApp.getApp().findInternalFrames(band);
      for (final JInternalFrame internalFrame : internalFrames) {
        try {
          internalFrame.setClosed(true);
        } catch (PropertyVetoException e) {
          Debug.trace(e);
        }
      }
    }
  }
}

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

try {
  internalF.setClosed(true);
  frameRegistry.deregisterInternalFrame((RegisteredFrame) internalF);
} catch (PropertyVetoException e1) {

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

private void disposeFrame(final JInternalFrame frame) throws PropertyVetoException {
  if (!SwingUtilities.isEventDispatchThread()) {
    SwingUtilities.invokeLater(new Runnable() {
      @Override
      public void run() {
        try {
          disposeFrame(frame);
        } catch (PropertyVetoException e) {
          logger.error("Network View unable to be killed", e);
        }
      }
    });
    return;
  }
  frame.getRootPane().getLayeredPane().removeAll();
  frame.getRootPane().getContentPane().removeAll();
  frame.setClosed(true);
  
  frame.removeInternalFrameListener(this);
  InternalFrameListener frameListener = frameListeners.remove(frame);
  if (frameListener != null)
    frame.removeInternalFrameListener(frameListener);
  
  frame.dispose();
}

代码示例来源: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: bcdev/beam

private void exchangeVDN(SimpleFeatureType featureType, FeatureStatisticsWriter featureStatisticsWriter) {
  final VectorDataNode originalVDN = featureType2VDN.get(featureType);
  final VectorDataNode vectorDataNode = createVectorDataNode(featureStatisticsWriter, originalVDN);
  final ProductNodeGroup<VectorDataNode> vectorDataNodeGroup = provider.getVectorDataNodeGroup();
  vectorDataNodeGroup.remove(originalVDN);
  originalVDN.dispose();
  vectorDataNodeGroup.add(vectorDataNode);
  final JInternalFrame internalFrame = VisatApp.getApp().findInternalFrame(originalVDN);
  if (internalFrame != null) {
    try {
      internalFrame.setClosed(true);
    } catch (PropertyVetoException ignored) {
      // ok
    }
  }
  final ProductSceneView sceneView = VisatApp.getApp().getSelectedProductSceneView();
  if (sceneView != null) {
    sceneView.setLayersVisible(vectorDataNode);
  }
}

代码示例来源:origin: bcdev/beam

for (final JInternalFrame internalFrame : internalFrames) {
  try {
    internalFrame.setClosed(true);
  } catch (PropertyVetoException e) {
    Debug.trace(e);

相关文章

JInternalFrame类方法