javax.swing.JLayeredPane#remove ( )源码实例Demo

下面列出了javax.swing.JLayeredPane#remove ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: netbeans   文件: SlideOperationImpl.java
private void performOperation(JLayeredPane pane, Integer layer) {
    // XXX - TBD
    switch (type) {
        case SLIDE_IN:
            component.setBounds(finishBounds);
            pane.add(component, layer);
            if( isHeavyWeightShowing() ) {
                repaintLayeredPane();
            }
            break;
        case SLIDE_OUT:
            pane.remove(component);
            break;
        case SLIDE_RESIZE:
            component.setBounds(finishBounds);
            ((JComponent)component).revalidate();
            if( isHeavyWeightShowing() ) {
                repaintLayeredPane();
            }
            break;
    }
}
 
源代码2 项目: littleluck   文件: LuckMetalRootPaneUI.java
protected void installTitlePane(JRootPane root, LuckTitlePanel titlePane, Window window)
{
    JLayeredPane layeredPane = root.getLayeredPane();

    JComponent oldTitlePane = getTitlePane();

    if (oldTitlePane != null)
    {
        oldTitlePane.setVisible(false);

        layeredPane.remove(oldTitlePane);
    }

    if (titlePane != null)
    {
    	titlePane.setOpaque(true);
    	
        layeredPane.add(titlePane, JLayeredPane.FRAME_CONTENT_LAYER);

        titlePane.setVisible(true);
    }

    this.titlePane = titlePane;
}
 
源代码3 项目: beautyeye   文件: BERootPaneUI.java
/**
 * Sets the window title pane -- the JComponent used to provide a plaf a
 * way to override the native operating system's window title pane with
 * one whose look and feel are controlled by the plaf.  The plaf creates
 * and sets this value; the default is null, implying a native operating
 * system window title pane.
 *
 * @param root the root
 * @param titlePane the title pane
 */
private void setTitlePane(JRootPane root, JComponent titlePane) 
{
	JLayeredPane layeredPane = root.getLayeredPane();
	JComponent oldTitlePane = getTitlePane();

	if (oldTitlePane != null)
	{
		oldTitlePane.setVisible(false);
		layeredPane.remove(oldTitlePane);
	}
	if (titlePane != null) 
	{
		layeredPane.add(titlePane, JLayeredPane.FRAME_CONTENT_LAYER);
		titlePane.setVisible(true);
	}
	this.titlePane = titlePane;
}
 
源代码4 项目: seaglass   文件: SeaGlassRootPaneUI.java
/**
 * Sets the window title pane -- the JComponent used to provide a plaf a way
 * to override the native operating system's window title pane with one
 * whose look and feel are controlled by the plaf. The plaf creates and sets
 * this value; the default is null, implying a native operating system
 * window title pane.
 *
 * @param root      content the <code>JComponent</code> to use for the
 *                  window title pane.
 * @param titlePane the SeaGlassTitlePane.
 */
private void setTitlePane(JRootPane root, JComponent titlePane) {
    JLayeredPane layeredPane  = root.getLayeredPane();
    JComponent   oldTitlePane = getTitlePane();

    if (oldTitlePane != null) {
        oldTitlePane.setVisible(false);
        layeredPane.remove(oldTitlePane);
    }

    if (titlePane != null) {
        layeredPane.add(titlePane, JLayeredPane.FRAME_CONTENT_LAYER);
        titlePane.setVisible(true);
    }

    this.titlePane = titlePane;
}
 
源代码5 项目: RipplePower   文件: LightBoxPanel.java
public void close() {

		Preconditions.checkState(SwingUtilities.isEventDispatchThread(), "Must be on the EDT");
		JLayeredPane layeredPane = Panels.getApplication().getLayeredPane();

		Component[] components = layeredPane.getComponents();

		if (components.length == 4 || components.length == 6) {
			layeredPane.remove(0);
		}

		if (components.length > 2 && components.length < 7) {
			layeredPane.remove(1);
			layeredPane.remove(0);
		}
		Panels.getApplication().validate();
		Panels.getApplication().repaint();

	}
 
源代码6 项目: FlatLaf   文件: FlatRootPaneUI.java
protected void setTitlePane( FlatTitlePane newTitlePane ) {
	JLayeredPane layeredPane = rootPane.getLayeredPane();

	if( titlePane != null )
		layeredPane.remove( titlePane );

	if( newTitlePane != null )
		layeredPane.add( newTitlePane, TITLE_PANE_LAYER );

	titlePane = newTitlePane;
}
 
源代码7 项目: netbeans   文件: ConsoleEditor.java
private void removeProgressIndicator() {
    if (lastLayeredPane == null || progressIndicator == null) {
        return;
    }
    progressIndicator.setVisible(false);
    JLayeredPane lp = lastLayeredPane;
    lp.remove(progressIndicator);
    lp.repaint();
    progressIndicator = null;
    
}
 
源代码8 项目: netbeans   文件: StickyWindowSupport.java
/**
 * Remove a sticky window from the editor.
 * @param window the JComponent to remove
 */
public void removeWindow(JComponent window) {
    Container container = jtc.getParent();
    if(container instanceof JLayeredPane) {
        JLayeredPane pane = (JLayeredPane) container;
        pane.remove(window);
        pane.repaint(window.getBounds());
    }
}