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

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

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

JInternalFrame.addComponentListener介绍

暂无

代码示例

代码示例来源:origin: cytoscape/application

frame.addComponentListener(frameListener);

代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw

window.addComponentListener(new ComponentAdapter() {

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

public void componentAdded(ContainerEvent e) {
  if (e.getChild() instanceof JInternalFrame) {
    JInternalFrame f = (JInternalFrame) e.getChild();
    JInternalFrame.JDesktopIcon desktopIcon = f.getDesktopIcon();
    for (Component comp : getComponents()) {
      if (comp == desktopIcon) {
        // We have it already
        return;
      }
    }
    add(desktopIcon);
    f.addComponentListener(this);
    if (getComponentCount() == 1) {
      adjustSize();
    }
  }
}

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

iframe.addComponentListener(new ComponentAdapter() {
  @Override
  public void componentResized(ComponentEvent e) {

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

protected void installDefaults() {
  updateStyle(desktop);
  if (UIManager.getBoolean("InternalFrame.useTaskBar")) {
    taskBar = new TaskBar();
    for (Component comp : desktop.getComponents()) {
      JInternalFrame.JDesktopIcon desktopIcon;
      if (comp instanceof JInternalFrame.JDesktopIcon) {
        desktopIcon = (JInternalFrame.JDesktopIcon) comp;
      } else if (comp instanceof JInternalFrame) {
        desktopIcon = ((JInternalFrame) comp).getDesktopIcon();
      } else {
        continue;
      }
      // Move desktopIcon from desktop to taskBar
      if (desktopIcon.getParent() == desktop) {
        desktop.remove(desktopIcon);
      }
      if (desktopIcon.getParent() != taskBar) {
        taskBar.add(desktopIcon);
        desktopIcon.getInternalFrame().addComponentListener(taskBar);
      }
    }
    taskBar.setBackground(desktop.getBackground());
    desktop.add(taskBar, new Integer(JLayeredPane.PALETTE_LAYER.intValue() + 1));
    if (desktop.isShowing()) {
      taskBar.adjustSize();
    }
  }
}

相关文章

JInternalFrame类方法