当前位置: 首页>>代码示例>>Java>>正文


Java JComponent.isVisible方法代码示例

本文整理汇总了Java中javax.swing.JComponent.isVisible方法的典型用法代码示例。如果您正苦于以下问题:Java JComponent.isVisible方法的具体用法?Java JComponent.isVisible怎么用?Java JComponent.isVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.swing.JComponent的用法示例。


在下文中一共展示了JComponent.isVisible方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: uninstall

import javax.swing.JComponent; //导入方法依赖的package包/类
/** Removes popup component from textComponent root pane
 *  @param popup popup component to be removed from
 *  root pane of the text component.
 */
public void uninstall(JComponent popup) {
    JComponent oldPopup = this.popup;

    if (oldPopup != null) {
        if (oldPopup.isVisible()) {
            oldPopup.setVisible(false);
        }
        removeFromRootPane(oldPopup);
        this.popup = null;
    }

    if (popup != null && popup != oldPopup) {
        if (popup.isVisible()) {
            popup.setVisible(false);
        }
        removeFromRootPane(popup);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:PopupManager.java

示例2: preferredLayoutSize

import javax.swing.JComponent; //导入方法依赖的package包/类
public Dimension preferredLayoutSize(Container parent) {
    JComponent filter = filterPanel;
    if (filter != null && !filter.isVisible()) filter = null;
    
    JComponent search = searchPanel;
    if (search != null && !search.isVisible()) search = null;
    
    Dimension dim = new Dimension();
    
    if (filter != null && search != null) {
        Dimension dim1 = filter.getPreferredSize();
        Dimension dim2 = search.getPreferredSize();
        dim.width = dim1.width + dim2.width + 1;
        dim.height = Math.max(dim1.height, dim2.height);
    } else if (filter != null) {
        dim = filter.getPreferredSize();
    } else if (search != null) {
        dim = search.getPreferredSize();
    }
    
    if ((filter != null || search != null) && hasBottomFilterFindMargin())
        dim.height += 1;
    
    return dim;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:DataView.java

示例3: minimumLayoutSize

import javax.swing.JComponent; //导入方法依赖的package包/类
public Dimension minimumLayoutSize(Container parent) {
    JComponent filter = filterPanel;
    if (filter != null && !filter.isVisible()) filter = null;
    
    JComponent search = searchPanel;
    if (search != null && !search.isVisible()) search = null;
    
    Dimension dim = new Dimension();
    
    if (filter != null && search != null) {
        Dimension dim1 = filter.getMinimumSize();
        Dimension dim2 = search.getMinimumSize();
        dim.width = dim1.width + dim2.width + 1;
        dim.height = Math.max(dim1.height, dim2.height);
    } else if (filter != null) {
        dim = filter.getMinimumSize();
    } else if (search != null) {
        dim = search.getMinimumSize();
    }
    
    if ((filter != null || search != null) && hasBottomFilterFindMargin())
        dim.height += 1;
    
    return dim;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:26,代码来源:DataView.java

示例4: getCurrentComponent

import javax.swing.JComponent; //导入方法依赖的package包/类
private JComponent getCurrentComponent() {
    int n = getComponentCount();
    for (int i = 0; i < n; i++) {
        JComponent comp = (JComponent) getComponent(i);
        if (comp.isVisible()) {
            return comp;
        }
    }
    return null;
}
 
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:11,代码来源:SlideShow.java

示例5: isAvailable

import javax.swing.JComponent; //导入方法依赖的package包/类
private boolean isAvailable(JComponent c) {
    return c.isVisible() && c.isEnabled();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:IntroduceMethodPanel.java


注:本文中的javax.swing.JComponent.isVisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。