类javax.swing.plaf.RootPaneUI源码实例Demo

下面列出了怎么用javax.swing.plaf.RootPaneUI的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: weblaf   文件: LafUtils.java
/**
 * Returns whether {@link Window} in which specified {@link Component} located is decorated by LaF or not.
 *
 * @param component {@link Component} used to determine {@link Window} decoration state
 * @return true if {@link Window} in which specified {@link Component} located is decorated by LaF, false otherwise
 */
public static boolean isInDecoratedWindow ( @Nullable final Component component )
{
    boolean result = false;
    final JRootPane rootPane = CoreSwingUtils.getRootPane ( component );
    if ( rootPane != null )
    {
        final RootPaneUI ui = rootPane.getUI ();
        if ( ui instanceof WRootPaneUI )
        {
            result = ( ( WRootPaneUI ) ui ).isDecorated ();
        }
    }
    return result;
}
 
源代码2 项目: littleluck   文件: LuckMetalRootPaneLayout.java
public void layoutContainer(Container parent)
{
    JRootPane root = (JRootPane) parent;
    Rectangle bound = root.getBounds();
    Insets inset = root.getInsets();

    // 获取内容面板实际宽度, 减去左右边框面积
    // Calculate the actual width
    int w = bound.width - inset.right - inset.left;

    // 获取内容面板实际高度, 减去上下边框面积
    // Calculate the actual height
    int h = bound.height - inset.top - inset.bottom;

    // 设置层级面板在根窗格中的位置
    // layout LayeredPane
    if(root.getLayeredPane() != null)
    {
        root.getLayeredPane().setBounds(inset.left, inset.top, w, h);
    }

    // 玻璃窗格是在层级面板中,所以坐标从(0, 0)开始
    // layout GlassPane
    if(root.getGlassPane() != null)
    {
        root.getGlassPane().setBounds(inset.left, inset.top, w, h);
    }

    int nextY = 0;

    RootPaneUI rootPaneUI = root.getUI();

    if(rootPaneUI instanceof LuckMetalRootPaneUI)
    {
        // 布局标题面板
        // layout TitlePane
        Component titlePanel = ((LuckMetalRootPaneUI)rootPaneUI).getTitlePane();

        // 如果未取消窗体装饰
        if (titlePanel != null)
        {
            titlePanel.setBounds(0, nextY, w, titlePanel.getHeight());

            nextY += titlePanel.getHeight();
        }
    }

    // 布局JMenuBar
    // layout JMenuBar
    JMenuBar menuBar = root.getJMenuBar();

    if(menuBar != null && menuBar.isVisible())
    {
        menuBar.setBounds(0, nextY, w, menuBar.getPreferredSize().height);

        nextY += menuBar.getPreferredSize().getHeight();
    }

    // 布局内容面板
    // layout ContentPane
    root.getContentPane().setBounds(0, nextY, w, h - nextY);
}
 
源代码3 项目: jdk1.8-source-analysis   文件: JRootPane.java
/**
 * Returns the L&F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
源代码4 项目: jdk1.8-source-analysis   文件: JRootPane.java
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>LabelUI</code> L&amp;F object
 * @see UIDefaults#getUI
 * @beaninfo
 *        bound: true
 *       hidden: true
 *      expert: true
 *    attribute: visualUpdate true
 *  description: The UI object that implements the Component's LookAndFeel.
 * @since 1.3
 */
public void setUI(RootPaneUI ui) {
    super.setUI(ui);
}
 
源代码5 项目: jdk1.8-source-analysis   文件: JRootPane.java
/**
 * Resets the UI property to a value from the current look and feel.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((RootPaneUI)UIManager.getUI(this));
}
 
源代码6 项目: dragonwell8_jdk   文件: JRootPane.java
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
源代码7 项目: dragonwell8_jdk   文件: JRootPane.java
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>LabelUI</code> L&amp;F object
 * @see UIDefaults#getUI
 * @beaninfo
 *        bound: true
 *       hidden: true
 *      expert: true
 *    attribute: visualUpdate true
 *  description: The UI object that implements the Component's LookAndFeel.
 * @since 1.3
 */
public void setUI(RootPaneUI ui) {
    super.setUI(ui);
}
 
源代码8 项目: dragonwell8_jdk   文件: JRootPane.java
/**
 * Resets the UI property to a value from the current look and feel.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((RootPaneUI)UIManager.getUI(this));
}
 
源代码9 项目: TencentKona-8   文件: JRootPane.java
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
源代码10 项目: TencentKona-8   文件: JRootPane.java
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>LabelUI</code> L&amp;F object
 * @see UIDefaults#getUI
 * @beaninfo
 *        bound: true
 *       hidden: true
 *      expert: true
 *    attribute: visualUpdate true
 *  description: The UI object that implements the Component's LookAndFeel.
 * @since 1.3
 */
public void setUI(RootPaneUI ui) {
    super.setUI(ui);
}
 
源代码11 项目: TencentKona-8   文件: JRootPane.java
/**
 * Resets the UI property to a value from the current look and feel.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((RootPaneUI)UIManager.getUI(this));
}
 
源代码12 项目: jdk8u60   文件: JRootPane.java
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
源代码13 项目: jdk8u60   文件: JRootPane.java
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>LabelUI</code> L&amp;F object
 * @see UIDefaults#getUI
 * @beaninfo
 *        bound: true
 *       hidden: true
 *      expert: true
 *    attribute: visualUpdate true
 *  description: The UI object that implements the Component's LookAndFeel.
 * @since 1.3
 */
public void setUI(RootPaneUI ui) {
    super.setUI(ui);
}
 
源代码14 项目: jdk8u60   文件: JRootPane.java
/**
 * Resets the UI property to a value from the current look and feel.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((RootPaneUI)UIManager.getUI(this));
}
 
源代码15 项目: JDKSourceCode1.8   文件: JRootPane.java
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
源代码16 项目: JDKSourceCode1.8   文件: JRootPane.java
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>LabelUI</code> L&amp;F object
 * @see UIDefaults#getUI
 * @beaninfo
 *        bound: true
 *       hidden: true
 *      expert: true
 *    attribute: visualUpdate true
 *  description: The UI object that implements the Component's LookAndFeel.
 * @since 1.3
 */
public void setUI(RootPaneUI ui) {
    super.setUI(ui);
}
 
源代码17 项目: JDKSourceCode1.8   文件: JRootPane.java
/**
 * Resets the UI property to a value from the current look and feel.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((RootPaneUI)UIManager.getUI(this));
}
 
源代码18 项目: openjdk-jdk8u   文件: JRootPane.java
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
源代码19 项目: openjdk-jdk8u   文件: JRootPane.java
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>LabelUI</code> L&amp;F object
 * @see UIDefaults#getUI
 * @beaninfo
 *        bound: true
 *       hidden: true
 *      expert: true
 *    attribute: visualUpdate true
 *  description: The UI object that implements the Component's LookAndFeel.
 * @since 1.3
 */
public void setUI(RootPaneUI ui) {
    super.setUI(ui);
}
 
源代码20 项目: openjdk-jdk8u   文件: JRootPane.java
/**
 * Resets the UI property to a value from the current look and feel.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((RootPaneUI)UIManager.getUI(this));
}
 
源代码21 项目: openjdk-jdk8u-backup   文件: JRootPane.java
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
源代码22 项目: openjdk-jdk8u-backup   文件: JRootPane.java
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>LabelUI</code> L&amp;F object
 * @see UIDefaults#getUI
 * @beaninfo
 *        bound: true
 *       hidden: true
 *      expert: true
 *    attribute: visualUpdate true
 *  description: The UI object that implements the Component's LookAndFeel.
 * @since 1.3
 */
public void setUI(RootPaneUI ui) {
    super.setUI(ui);
}
 
源代码23 项目: openjdk-jdk8u-backup   文件: JRootPane.java
/**
 * Resets the UI property to a value from the current look and feel.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((RootPaneUI)UIManager.getUI(this));
}
 
源代码24 项目: Bytecoder   文件: JRootPane.java
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
源代码25 项目: Bytecoder   文件: JRootPane.java
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>LabelUI</code> L&amp;F object
 * @see UIDefaults#getUI
 * @since 1.3
 */
@BeanProperty(expert = true, hidden = true, visualUpdate = true, description
        = "The UI object that implements the Component's LookAndFeel.")
public void setUI(RootPaneUI ui) {
    super.setUI(ui);
}
 
源代码26 项目: Bytecoder   文件: JRootPane.java
/**
 * Resets the UI property to a value from the current look and feel.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((RootPaneUI)UIManager.getUI(this));
}
 
源代码27 项目: openjdk-jdk9   文件: JRootPane.java
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
源代码28 项目: openjdk-jdk9   文件: JRootPane.java
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>LabelUI</code> L&amp;F object
 * @see UIDefaults#getUI
 * @since 1.3
 */
@BeanProperty(expert = true, hidden = true, visualUpdate = true, description
        = "The UI object that implements the Component's LookAndFeel.")
public void setUI(RootPaneUI ui) {
    super.setUI(ui);
}
 
源代码29 项目: openjdk-jdk9   文件: JRootPane.java
/**
 * Resets the UI property to a value from the current look and feel.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((RootPaneUI)UIManager.getUI(this));
}
 
源代码30 项目: jdk8u-jdk   文件: JRootPane.java
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return <code>LabelUI</code> object
 * @since 1.3
 */
public RootPaneUI getUI() {
    return (RootPaneUI)ui;
}
 
 类所在包
 同包方法