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


Java Container.setVisible方法代码示例

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


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

示例1: doHide

import java.awt.Container; //导入方法依赖的package包/类
@Override
protected void doHide() {
    Container parent = contents.getParent();
    if (parent != null) {
        contents.getParent().remove (contents);
        parent.repaint(bounds.x, bounds.y, bounds.width, bounds.height);
        parent.setVisible(false);
    }
    //If doShow() was never called, we've modified the visibility
    //of the contents component, which could cause problems elsewhere
    contents.setVisible (true);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:CustomPopupFactory.java

示例2: displaySection

import java.awt.Container; //导入方法依赖的package包/类
private void displaySection(Container sectionPanel,
                            String initPanelMethodName) {
    if (sectionPanel.getComponentCount() == 0) {
        invokeInitPanelMethod(initPanelMethodName);
    }
    sectionPanel.setVisible(true);
    enlargeVerticallyAsNecessary();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:CommitPanel.java

示例3: loadOptions

import java.awt.Container; //导入方法依赖的package包/类
public static void loadOptions(final String name,
                               final Container component, final Properties properties) {

    if (ResourceLoader.isParent(JFrame.class, component.getClass())) {
        ((JFrame) component).setBounds(getRectangle(name,
                ((JFrame) component).getBounds(), properties));
    }

    if (ResourceLoader.isParent(JDialog.class, component.getClass())) {
        ((JDialog) component).setBounds(getRectangle(name,
                ((JDialog) component).getBounds(), properties));
    }
    if (ResourceLoader.isParent(RowFindPanel.class, component.getClass())) {
        component.setVisible(getBoolean(name + ".Visible",
                component.isVisible(), properties));
        ((RowFindPanel) component).getJCheckBox().setSelected(
                getBoolean(name + ".WO", ((RowFindPanel) component)
                        .getJCheckBox().isSelected(), properties));
    }

    for (int i = 0; i < component.getComponentCount(); i++) {
        if (ResourceLoader.isParent(JTable.class, component.getComponent(i)
                .getClass()))
            getJTableOptions(name + "_" + i,
                    (JTable) component.getComponent(i), properties);
        if (ResourceLoader.isParent(JSplitPane.class, component
                .getComponent(i).getClass())) {
            ((JSplitPane) component.getComponent(i))
                    .setDividerLocation(getInteger(name + "__" + i,
                            ((JSplitPane) component.getComponent(i))
                                    .getDividerLocation(), properties));

        }

        if (ResourceLoader.isParent(Container.class, component
                .getComponent(i).getClass()))
            loadOptions(name + "X" + i,
                    (Container) component.getComponent(i), properties);
    }
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:41,代码来源:Options.java

示例4: prepareControls

import java.awt.Container; //导入方法依赖的package包/类
@Override
protected void prepareControls() {
    JFrame frame = new JFrame("Glass Pane children test");
    frame.setLayout(null);

    Container contentPane = frame.getContentPane();
    contentPane.setLayout(new BorderLayout());
    super.propagateAWTControls(contentPane);

    Container glassPane = (Container) frame.getRootPane().getGlassPane();
    glassPane.setVisible(true);
    glassPane.setLayout(null);

    internalFrame = new JInternalFrame("Internal Frame", true);
    internalFrame.setBounds(50, 0, 200, 100);
    internalFrame.setVisible(true);
    glassPane.add(internalFrame);

    internalFrame.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseClicked(MouseEvent e) {
            lwClicked = true;
        }
    });

    frame.setSize(300, 180);
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:31,代码来源:JGlassPaneInternalFrameOverlapping.java


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