當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。