javax.swing.JInternalFrame#setSelected ( )源码实例Demo

下面列出了javax.swing.JInternalFrame#setSelected ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: jdk8u-dev-jdk   文件: MetalworksFrame.java
public void openHelpWindow() {
    JInternalFrame help = new MetalworksHelp();
    desktop.add(help, HELPLAYER);
    try {
        help.setVisible(true);
        help.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码2 项目: openjdk-jdk8u-backup   文件: MetalworksFrame.java
public void openInBox() {
    JInternalFrame doc = new MetalworksInBox();
    desktop.add(doc, DOCLAYER);
    try {
        doc.setVisible(true);
        doc.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码3 项目: dragonwell8_jdk   文件: MetalworksFrame.java
public void openInBox() {
    JInternalFrame doc = new MetalworksInBox();
    desktop.add(doc, DOCLAYER);
    try {
        doc.setVisible(true);
        doc.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码4 项目: openjdk-8   文件: MetalworksFrame.java
public void openHelpWindow() {
    JInternalFrame help = new MetalworksHelp();
    desktop.add(help, HELPLAYER);
    try {
        help.setVisible(true);
        help.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码5 项目: openjdk-8   文件: MetalworksFrame.java
public void newDocument() {
    JInternalFrame doc = new MetalworksDocumentFrame();
    desktop.add(doc, DOCLAYER);
    try {
        doc.setVisible(true);
        doc.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码6 项目: TencentKona-8   文件: MetalworksFrame.java
public void openHelpWindow() {
    JInternalFrame help = new MetalworksHelp();
    desktop.add(help, HELPLAYER);
    try {
        help.setVisible(true);
        help.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码7 项目: jdk8u-jdk   文件: MetalworksFrame.java
public void openInBox() {
    JInternalFrame doc = new MetalworksInBox();
    desktop.add(doc, DOCLAYER);
    try {
        doc.setVisible(true);
        doc.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码8 项目: openjdk-jdk9   文件: WindowsDesktopManager.java
public void activateFrame(JInternalFrame f) {
    JInternalFrame currentFrame = currentFrameRef != null ?
        currentFrameRef.get() : null;
    try {
        super.activateFrame(f);
        if (currentFrame != null && f != currentFrame) {
            // If the current frame is maximized, transfer that
            // attribute to the frame being activated.
            if (!currentFrame.isClosed() && currentFrame.isMaximum() &&
                (f.getClientProperty("JInternalFrame.frameType") !=
                "optionDialog") ) {
                //Special case.  If key binding was used to select next
                //frame instead of minimizing the icon via the minimize
                //icon.
                if (!currentFrame.isIcon()) {
                    currentFrame.setMaximum(false);
                    if (f.isMaximizable()) {
                        if (!f.isMaximum()) {
                            f.setMaximum(true);
                        } else if (f.isMaximum() && f.isIcon()) {
                            f.setIcon(false);
                        } else {
                            f.setMaximum(false);
                        }
                    }
                }
            }
            if (currentFrame.isSelected()) {
                currentFrame.setSelected(false);
            }
        }

        if (!f.isSelected()) {
            f.setSelected(true);
        }
    } catch (PropertyVetoException e) {}
    if (f != currentFrame) {
        currentFrameRef = new WeakReference<JInternalFrame>(f);
    }
}
 
源代码9 项目: noa-libre   文件: OOODesktopManager.java
public void deiconifyFrame(JInternalFrame f) {
  JInternalFrame.JDesktopIcon desktopIcon = f.getDesktopIcon();
  Container c = desktopIcon.getParent();
  if (c != null) {
    f.setBounds(oldBounds.remove(f)); //XXX
    //c.add(f); //XXX

    // If the frame is to be restored to a maximized state make
    // sure it still fills the whole desktop.
    if (f.isMaximum()) {
      Rectangle desktopBounds = c.getBounds();
      if (f.getWidth() != desktopBounds.width || f.getHeight() != desktopBounds.height) {
        setBoundsForFrame(f, 0, 0, desktopBounds.width, desktopBounds.height);
      }
    }
    removeIconFor(f);
    if (f.isSelected()) {
      f.moveToFront();
    }
    else {
      try {
        f.setSelected(true);
      }
      catch (PropertyVetoException e2) {
      }
    }
  }
}
 
源代码10 项目: jdk8u_jdk   文件: MetalworksFrame.java
public void openHelpWindow() {
    JInternalFrame help = new MetalworksHelp();
    desktop.add(help, HELPLAYER);
    try {
        help.setVisible(true);
        help.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码11 项目: openjdk-8-source   文件: MetalworksFrame.java
public void openInBox() {
    JInternalFrame doc = new MetalworksInBox();
    desktop.add(doc, DOCLAYER);
    try {
        doc.setVisible(true);
        doc.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码12 项目: jdk8u-jdk   文件: MetalworksFrame.java
public void openHelpWindow() {
    JInternalFrame help = new MetalworksHelp();
    desktop.add(help, HELPLAYER);
    try {
        help.setVisible(true);
        help.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码13 项目: openjdk-8   文件: MetalworksFrame.java
public void openInBox() {
    JInternalFrame doc = new MetalworksInBox();
    desktop.add(doc, DOCLAYER);
    try {
        doc.setVisible(true);
        doc.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码14 项目: jdk8u_jdk   文件: MetalworksFrame.java
public void newDocument() {
    JInternalFrame doc = new MetalworksDocumentFrame();
    desktop.add(doc, DOCLAYER);
    try {
        doc.setVisible(true);
        doc.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码15 项目: openjdk-jdk8u   文件: MetalworksFrame.java
public void openHelpWindow() {
    JInternalFrame help = new MetalworksHelp();
    desktop.add(help, HELPLAYER);
    try {
        help.setVisible(true);
        help.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码16 项目: jdk8u-jdk   文件: WindowsDesktopManager.java
public void activateFrame(JInternalFrame f) {
    JInternalFrame currentFrame = currentFrameRef != null ?
        currentFrameRef.get() : null;
    try {
        super.activateFrame(f);
        if (currentFrame != null && f != currentFrame) {
            // If the current frame is maximized, transfer that
            // attribute to the frame being activated.
            if (currentFrame.isMaximum() &&
                (f.getClientProperty("JInternalFrame.frameType") !=
                "optionDialog") ) {
                //Special case.  If key binding was used to select next
                //frame instead of minimizing the icon via the minimize
                //icon.
                if (!currentFrame.isIcon()) {
                    currentFrame.setMaximum(false);
                    if (f.isMaximizable()) {
                        if (!f.isMaximum()) {
                            f.setMaximum(true);
                        } else if (f.isMaximum() && f.isIcon()) {
                            f.setIcon(false);
                        } else {
                            f.setMaximum(false);
                        }
                    }
                }
            }
            if (currentFrame.isSelected()) {
                currentFrame.setSelected(false);
            }
        }

        if (!f.isSelected()) {
            f.setSelected(true);
        }
    } catch (PropertyVetoException e) {}
    if (f != currentFrame) {
        currentFrameRef = new WeakReference<JInternalFrame>(f);
    }
}
 
源代码17 项目: openjdk-jdk8u   文件: WindowsDesktopManager.java
public void activateFrame(JInternalFrame f) {
    JInternalFrame currentFrame = currentFrameRef != null ?
        currentFrameRef.get() : null;
    try {
        super.activateFrame(f);
        if (currentFrame != null && f != currentFrame) {
            // If the current frame is maximized, transfer that
            // attribute to the frame being activated.
            if (currentFrame.isMaximum() &&
                (f.getClientProperty("JInternalFrame.frameType") !=
                "optionDialog") ) {
                //Special case.  If key binding was used to select next
                //frame instead of minimizing the icon via the minimize
                //icon.
                if (!currentFrame.isIcon()) {
                    currentFrame.setMaximum(false);
                    if (f.isMaximizable()) {
                        if (!f.isMaximum()) {
                            f.setMaximum(true);
                        } else if (f.isMaximum() && f.isIcon()) {
                            f.setIcon(false);
                        } else {
                            f.setMaximum(false);
                        }
                    }
                }
            }
            if (currentFrame.isSelected()) {
                currentFrame.setSelected(false);
            }
        }

        if (!f.isSelected()) {
            f.setSelected(true);
        }
    } catch (PropertyVetoException e) {}
    if (f != currentFrame) {
        currentFrameRef = new WeakReference<JInternalFrame>(f);
    }
}
 
源代码18 项目: jdk8u-jdk   文件: MetalworksFrame.java
public void newDocument() {
    JInternalFrame doc = new MetalworksDocumentFrame();
    desktop.add(doc, DOCLAYER);
    try {
        doc.setVisible(true);
        doc.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码19 项目: openjdk-jdk9   文件: MetalworksFrame.java
public void newDocument() {
    JInternalFrame doc = new MetalworksDocumentFrame();
    desktop.add(doc, DOCLAYER);
    try {
        doc.setVisible(true);
        doc.setSelected(true);
    } catch (java.beans.PropertyVetoException e2) {
    }
}
 
源代码20 项目: noa-libre   文件: OOODesktopManager.java
@Override
public void iconifyFrame(JInternalFrame f) {
  JInternalFrame.JDesktopIcon desktopIcon;
  Container c = f.getParent();
  JDesktopPane d = f.getDesktopPane();
  boolean findNext = f.isSelected();

  desktopIcon = f.getDesktopIcon();
  if (!wasIcon(f)) {
    Rectangle r = getBoundsForIconOf(f);
    desktopIcon.setBounds(r.x, r.y, r.width, r.height);
    setWasIcon(f, Boolean.TRUE);
  }

  if (c == null) {
    return;
  }

  if (c instanceof JLayeredPane) {
    JLayeredPane lp = (JLayeredPane) c;
    int layer = JLayeredPane.getLayer(f);
    JLayeredPane.putLayer(desktopIcon, layer);
  }

  // If we are maximized we already have the normal bounds recorded
  // don't try to re-record them, otherwise we incorrectly set the
  // normal bounds to maximized state.
  if (!f.isMaximum()) {
    f.setNormalBounds(f.getBounds());
  }
  //c.remove(f); XXX
  oldBounds.put(f, f.getBounds()); //XXX
  f.setBounds(0, 0, 0, 0); //XXX

  c.add(desktopIcon);
  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) {
    activateNextFrame(c);
  }
}