本文整理了Java中javax.swing.JDialog.isActive()
方法的一些代码示例,展示了JDialog.isActive()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.isActive()
方法的具体详情如下:
包路径:javax.swing.JDialog
类名称:JDialog
方法名:isActive
暂无
代码示例来源:origin: khuxtable/seaglass
/**
* Determine if the title pane's parent is active.
*
* @return {@code true} if the parent is active, {@code false} otherwise.
*/
private boolean isParentSelected() {
if (rootParent instanceof JFrame) {
return ((JFrame) rootParent).isActive();
} else if (rootParent instanceof JDialog) {
return ((JDialog) rootParent).isActive();
} else {
return true;
}
}
代码示例来源:origin: chatty/chatty
/**
* Return the currently active Channel, which means the one that has focus,
* either because it is a popout dialog that has focus, or the currently
* selected tab if the focus is on the main window.
*
* <p>
* If the focus is not on a window containing a Channel, then the current
* tab of the main window is returned.
* </p>
*
* @return The Channel object which is currently selected.
*/
public Channel getActiveChannel() {
for (Channel channel : dialogs.keySet()) {
if (dialogs.get(channel).isActive()) {
return channel;
}
}
return getActiveTab();
}
内容来源于网络,如有侵权,请联系作者删除!