本文整理汇总了Java中javax.swing.plaf.RootPaneUI类的典型用法代码示例。如果您正苦于以下问题:Java RootPaneUI类的具体用法?Java RootPaneUI怎么用?Java RootPaneUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RootPaneUI类属于javax.swing.plaf包,在下文中一共展示了RootPaneUI类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: layoutContainer
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
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);
}
示例2: getUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
public RootPaneUI getUI() {
AndroidClassUtil.callEmptyMethod();
return null;
}
示例3: setUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
public void setUI(RootPaneUI ui) {
AndroidClassUtil.callEmptyMethod();
// super.setUI(ui);
}
示例4: updateUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
/**
* DOCUMENT ME!
*/
public void updateUI()
{
setUI((RootPaneUI) UIManager.getUI(this));
}
示例5: setUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
public void setUI(final RootPaneUI newUI) {
super.setUI(newUI);
}
示例6: getUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
public RootPaneUI getUI() {
return (RootPaneUI)ui;
}
示例7: updateUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
public void updateUI() {
setUI((RootPaneUI)UIManager.getUI(this));
}
示例8: getUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
/**
* Returns the L&F object that renders this component.
*
* @return <code>LabelUI</code> object
* @since 1.3
*/
public RootPaneUI getUI() {
return (RootPaneUI)ui;
}
示例9: setUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
/**
* Sets the L&F object that renders this component.
*
* @param ui the <code>LabelUI</code> L&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);
}
示例10: updateUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
/**
* Resets the UI property to a value from the current look and feel.
*
* @see JComponent#updateUI
*/
public void updateUI() {
setUI((RootPaneUI)UIManager.getUI(this));
}
示例11: setUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
/**
* Sets the L&F object that renders this component.
*
* @param ui the <code>LabelUI</code> L&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);
}
示例12: getUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
/**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
public RootPaneUI getUI()
{
return (RootPaneUI) ui;
}
示例13: setUI
import javax.swing.plaf.RootPaneUI; //导入依赖的package包/类
/**
* DOCUMENT ME!
*
* @param ui DOCUMENT ME!
*/
public void setUI(RootPaneUI ui)
{
super.setUI(ui);
}