Java 类javax.swing.plaf.basic.BasicInternalFrameTitlePane 实例源码

项目:openjdk-jdk10    文件:DefaultInternalFrameDriver.java   
@Override
public Component getTitlePane(ComponentOperator operator) {
    ComponentSearcher cs = new ComponentSearcher((Container) operator.getSource());
    cs.setOutput(operator.getOutput().createErrorOutput());
    return (cs.findComponent(new ComponentChooser() {
        @Override
        public boolean checkComponent(Component comp) {
            if (System.getProperty("java.version").startsWith("1.2")) {
                return comp.getClass().getName().endsWith("InternalFrameTitlePane");
            } else {
                return comp instanceof BasicInternalFrameTitlePane;
            }
        }

        @Override
        public String getDescription() {
            return "Title pane";
        }

        @Override
        public String toString() {
            return "getTitlePane.ComponentChooser{description = " + getDescription() + '}';
        }
    }));
}
项目:openjdk9    文件:DefaultInternalFrameDriver.java   
@Override
public Component getTitlePane(ComponentOperator operator) {
    ComponentSearcher cs = new ComponentSearcher((Container) operator.getSource());
    cs.setOutput(operator.getOutput().createErrorOutput());
    return (cs.findComponent(new ComponentChooser() {
        @Override
        public boolean checkComponent(Component comp) {
            if (System.getProperty("java.version").startsWith("1.2")) {
                return comp.getClass().getName().endsWith("InternalFrameTitlePane");
            } else {
                return comp instanceof BasicInternalFrameTitlePane;
            }
        }

        @Override
        public String getDescription() {
            return "Title pane";
        }

        @Override
        public String toString() {
            return "getTitlePane.ComponentChooser{description = " + getDescription() + '}';
        }
    }));
}
项目:Recaf    文件:EditBox.java   
@Override
public Component add(Component comp) {
    // Don't count internal swing components
    if (!(comp instanceof BasicInternalFrameTitlePane)) {
        hasContent = true;
    }
    return super.add(comp);
}
项目:cn1    文件:MetalInternalFrameTitlePaneTest.java   
public void testCreatePropertyChangeListener() {
    PropertyChangeListener listener = pane.createPropertyChangeListener();
    assertTrue("!= null", listener != null);
    assertTrue("instanceof TitlePaneLayout",
            listener instanceof BasicInternalFrameTitlePane.PropertyChangeHandler);
}
项目:cn1    文件:MetalInternalFrameTitlePaneTest.java   
public void testCreateLayout() {
    LayoutManager layout = pane.createLayout();
    assertTrue("!= null", layout != null);
    assertTrue("instanceof TitlePaneLayout",
            layout instanceof BasicInternalFrameTitlePane.TitlePaneLayout);
}
项目:freeVM    文件:MetalInternalFrameTitlePaneTest.java   
public void testCreatePropertyChangeListener() {
    PropertyChangeListener listener = pane.createPropertyChangeListener();
    assertTrue("!= null", listener != null);
    assertTrue("instanceof TitlePaneLayout",
            listener instanceof BasicInternalFrameTitlePane.PropertyChangeHandler);
}
项目:freeVM    文件:MetalInternalFrameTitlePaneTest.java   
public void testCreateLayout() {
    LayoutManager layout = pane.createLayout();
    assertTrue("!= null", layout != null);
    assertTrue("instanceof TitlePaneLayout",
            layout instanceof BasicInternalFrameTitlePane.TitlePaneLayout);
}
项目:freeVM    文件:MetalInternalFrameTitlePaneTest.java   
public void testCreatePropertyChangeListener() {
    PropertyChangeListener listener = pane.createPropertyChangeListener();
    assertTrue("!= null", listener != null);
    assertTrue("instanceof TitlePaneLayout",
            listener instanceof BasicInternalFrameTitlePane.PropertyChangeHandler);
}
项目:freeVM    文件:MetalInternalFrameTitlePaneTest.java   
public void testCreateLayout() {
    LayoutManager layout = pane.createLayout();
    assertTrue("!= null", layout != null);
    assertTrue("instanceof TitlePaneLayout",
            layout instanceof BasicInternalFrameTitlePane.TitlePaneLayout);
}