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


Java UIManager.getInt方法代码示例

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


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

示例1: installStrings

import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
protected void installStrings(JFileChooser fc) {
	super.installStrings(fc);

	Locale l = fc.getLocale();

	this.lookInLabelMnemonic = UIManager.getInt("FileChooser.lookInLabelMnemonic");
	this.lookInLabelText = UIManager.getString("FileChooser.lookInLabelText", l);
	this.saveInLabelText = UIManager.getString("FileChooser.saveInLabelText", l);

	this.fileNameLabelMnemonic = UIManager.getInt("FileChooser.fileNameLabelMnemonic");
	this.fileNameLabelText = UIManager.getString("FileChooser.fileNameLabelText", l);

	this.filesOfTypeLabelMnemonic = UIManager.getInt("FileChooser.filesOfTypeLabelMnemonic");
	this.filesOfTypeLabelText = UIManager.getString("FileChooser.filesOfTypeLabelText", l);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:17,代码来源:FileChooserUI.java

示例2: installUI

import javax.swing.UIManager; //导入方法依赖的package包/类
@Override
public synchronized void installUI(JComponent c)
{
	super.installUI(c);

	mBackgroundNormal = UIManager.getColor("CheckBox.background");
	mBackgroundPressed = UIManager.getColor("CheckBox.backgroundPressed");
	mBackgroundActive = UIManager.getColor("CheckBox.backgroundActive");
	mTextNormal = UIManager.getColor("CheckBox.textNormal");
	mTextPressed = UIManager.getColor("CheckBox.textPressed");
	mTextActive = UIManager.getColor("CheckBox.textActive");
	mTextDisabled = UIManager.getColor("CheckBox.textDisabled");
	mTextIconGap = UIManager.getInt("CheckBox.textIconGap");
	mIconChecked = UIManager.getIcon("CheckBox.iconChecked");
	mIconUnchecked = UIManager.getIcon("CheckBox.iconUnchecked");
	mIconPressedChecked = UIManager.getIcon("CheckBox.iconPressedChecked");
	mIconPressedUnchecked = UIManager.getIcon("CheckBox.iconPressedUnchecked");

	c.setBackground(mBackgroundNormal);
	c.addMouseListener(this);
}
 
开发者ID:equella,项目名称:Equella,代码行数:22,代码来源:FlatterCheckBoxUI.java

示例3: installDefaults

import javax.swing.UIManager; //导入方法依赖的package包/类
protected void installDefaults() {
    super.installDefaults();

    titlePaneHeight = UIManager.getInt("InternalFrame.titlePaneHeight");
    buttonWidth     = UIManager.getInt("InternalFrame.titleButtonWidth")  - 4;
    buttonHeight    = UIManager.getInt("InternalFrame.titleButtonHeight") - 4;

    Object obj      = UIManager.get("InternalFrame.titleButtonToolTipsOn");
    hotTrackingOn = (obj instanceof Boolean) ? (Boolean)obj : true;


    if (XPStyle.getXP() != null) {
        // Fix for XP bug where sometimes these sizes aren't updated properly
        // Assume for now that height is correct and derive width using the
        // ratio from the uxtheme part
        buttonWidth = buttonHeight;
        Dimension d = XPStyle.getPartSize(Part.WP_CLOSEBUTTON, State.NORMAL);
        if (d != null && d.width != 0 && d.height != 0) {
            buttonWidth = (int) ((float) buttonWidth * d.width / d.height);
        }
    } else {
        buttonWidth += 2;
        Color activeBorderColor =
                UIManager.getColor("InternalFrame.activeBorderColor");
        setBorder(BorderFactory.createLineBorder(activeBorderColor, 1));
    }
    // JDK-8039383: initialize these colors because getXP() may return null when theme is changed
    selectedTitleGradientColor =
            UIManager.getColor("InternalFrame.activeTitleGradient");
    notSelectedTitleGradientColor =
            UIManager.getColor("InternalFrame.inactiveTitleGradient");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:WindowsInternalFrameTitlePane.java

示例4: runActualTest

import javax.swing.UIManager; //导入方法依赖的package包/类
private static void runActualTest(GraphicsDevice device,
                                  CountDownLatch latch,
                                  JFrame frame,
                                  boolean [] result)
{
    Rectangle screenBounds = setLocation(frame, device);
    JMenu menu = frame.getJMenuBar().getMenu(0);
    menu.doClick();

    Point location = menu.getLocationOnScreen();
    JPopupMenu pm = menu.getPopupMenu();
    Dimension pmSize = pm.getSize();

    int yOffset = UIManager.getInt("Menu.submenuPopupOffsetY");
    int height = location.y + yOffset + pmSize.height + menu.getHeight();
    int available = screenBounds.y + screenBounds.height - height;
    if (available > 0) {
        Point origin = pm.getLocationOnScreen();
        if (origin.y < location.y) {
            // growing upward, wrong!
            result[0] = false;
        } else {
            // growing downward, ok!
            result[0] = true;
        }
    } else {
        // there is no space, growing upward would be ok, so we pass
        result[0] = true;
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:31,代码来源:bug8071705.java

示例5: getBusyIconSize

import javax.swing.UIManager; //导入方法依赖的package包/类
private static int getBusyIconSize() {
    int res = UIManager.getInt( "Nb.BusyIcon.Height" );
    if( res < 1 )
        res = 16;
    return res;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:BusyIcon.java


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