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

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

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

JInternalFrame.isShowing介绍

暂无

代码示例

代码示例来源:origin: com.github.tntim96/rhino

/**
 * Returns the current selected internal frame.
 */
private JInternalFrame getSelectedFrame() {
  JInternalFrame[] frames = desk.getAllFrames();
  for (int i = 0; i < frames.length; i++) {
    if (frames[i].isShowing()) {
      return frames[i];
    }
  }
  return frames[frames.length - 1];
}

代码示例来源:origin: com.github.houbie/rhino-mod

/**
 * Returns the current selected internal frame.
 */
private JInternalFrame getSelectedFrame() {
  JInternalFrame[] frames = desk.getAllFrames();
  for (int i = 0; i < frames.length; i++) {
    if (frames[i].isShowing()) {
      return frames[i];
    }
  }
  return frames[frames.length - 1];
}

代码示例来源:origin: org.jvnet.hudson/embedded-rhino-debugger

/**
 * Returns the current selected internal frame.
 */
private JInternalFrame getSelectedFrame() {
  JInternalFrame[] frames = desk.getAllFrames();
  for (int i = 0; i < frames.length; i++) {
    if (frames[i].isShowing()) {
      return frames[i];
    }
  }
  return frames[frames.length - 1];
}

代码示例来源:origin: ro.isdc.wro4j/rhino

/**
 * Returns the current selected internal frame.
 */
private JInternalFrame getSelectedFrame() {
  JInternalFrame[] frames = desk.getAllFrames();
  for (int i = 0; i < frames.length; i++) {
    if (frames[i].isShowing()) {
      return frames[i];
    }
  }
  return frames[frames.length - 1];
}

代码示例来源:origin: net.java.dev.laf-widget/laf-widget

public static void refreshSnaphost(JInternalFrame frame) {
  if (!frame.isShowing())
    return;

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

public void run() {
  Container cp = getParent();
  if ((cp instanceof JViewport) && (_f != null) && _f.isShowing()) {
   JViewport vp = (JViewport) cp;
   Point vo = vp.getViewPosition();
   Dimension es = vp.getExtentSize();
   Dimension vs = vp.getViewSize();
   Point fo = _f.getLocation();
   Dimension fs = _f.getSize();
   if (fo.x < vo.x) vo.x = fo.x;
   if (fo.y < vo.y) vo.y = fo.y;
   if (fo.x + fs.width > vo.x + es.width) vo.x = Math.min(fo.x, vs.width - es.width);
   if (fo.y + fs.height > vo.y + es.height) vo.y = Math.min(fo.y, vs.height - es.height);
   vp.setViewPosition(vo);
  }
 }
};

代码示例来源:origin: senbox-org/snap-desktop

@Override
public SubComponent[] getSubComponents() {
  Map<Object, JInternalFrame> internalFrameMap = new HashMap<>();
  SubComponent[] subComponents = new SubComponent[tabbedContainer.getTabCount()];
  ActionListener activator = actionEvent -> {
    JInternalFrame internalFrame = internalFrameMap.get(actionEvent.getSource());
    try {
      internalFrame.setSelected(true);
    } catch (PropertyVetoException e1) {
      // ok
    }
    internalFrame.requestFocusInWindow();
  };
  for (int i = 0; i < subComponents.length; i++) {
    TabData tab = tabbedContainer.getModel().getTab(i);
    JInternalFrame internalFrame = tabToFrameMap.get(tab);
    SubComponent subComponent = new SubComponent(internalFrame.getTitle(),
                           internalFrame.getToolTipText(),
                           activator,
                           internalFrame.isSelected(),
                           getTopComponent(internalFrame).getLookup(),
                           internalFrame.isShowing());
    internalFrameMap.put(subComponent, internalFrame);
    subComponents[i] = subComponent;
  }
  return subComponents;
}

代码示例来源:origin: net.java.dev.laf-widget/laf-widget

if (!frame.isShowing())
  return;

相关文章

JInternalFrame类方法